diff --git a/client/src/api/api.ts b/client/src/api/api.ts index 5ba900f290..116257ddd9 100644 --- a/client/src/api/api.ts +++ b/client/src/api/api.ts @@ -574,6 +574,25 @@ export interface CountryDto { */ 'countryName': string; } +/** + * + * @export + * @interface CountryStatDto + */ +export interface CountryStatDto { + /** + * + * @type {string} + * @memberof CountryStatDto + */ + 'country': string; + /** + * + * @type {number} + * @memberof CountryStatDto + */ + 'studentsCount': number; +} /** * * @export @@ -5000,6 +5019,19 @@ export interface StudentId { */ 'id': number; } +/** + * + * @export + * @interface StudentsCountriesStatsDto + */ +export interface StudentsCountriesStatsDto { + /** + * + * @type {Array} + * @memberof StudentsCountriesStatsDto + */ + 'countries': Array; +} /** * * @export @@ -7980,6 +8012,39 @@ export const CourseStatsApiAxiosParamCreator = function (configuration?: Configu + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} courseId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCourseStudentCountries: async (courseId: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'courseId' is not null or undefined + assertParamExists('getCourseStudentCountries', 'courseId', courseId) + const localVarPath = `/courses/{courseId}/stats/students/countries` + .replace(`{${"courseId"}}`, encodeURIComponent(String(courseId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -8009,6 +8074,16 @@ export const CourseStatsApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.getCourseStats(courseId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * + * @param {number} courseId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCourseStudentCountries(courseId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCourseStudentCountries(courseId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, } }; @@ -8028,6 +8103,15 @@ export const CourseStatsApiFactory = function (configuration?: Configuration, ba getCourseStats(courseId: number, options?: any): AxiosPromise { return localVarFp.getCourseStats(courseId, options).then((request) => request(axios, basePath)); }, + /** + * + * @param {number} courseId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCourseStudentCountries(courseId: number, options?: any): AxiosPromise { + return localVarFp.getCourseStudentCountries(courseId, options).then((request) => request(axios, basePath)); + }, }; }; @@ -8048,6 +8132,17 @@ export class CourseStatsApi extends BaseAPI { public getCourseStats(courseId: number, options?: AxiosRequestConfig) { return CourseStatsApiFp(this.configuration).getCourseStats(courseId, options).then((request) => request(this.axios, this.basePath)); } + + /** + * + * @param {number} courseId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CourseStatsApi + */ + public getCourseStudentCountries(courseId: number, options?: AxiosRequestConfig) { + return CourseStatsApiFp(this.configuration).getCourseStudentCountries(courseId, options).then((request) => request(this.axios, this.basePath)); + } } diff --git a/client/src/components/Sider/data/menuItems.tsx b/client/src/components/Sider/data/menuItems.tsx index b14d7f3f0c..79b3767956 100644 --- a/client/src/components/Sider/data/menuItems.tsx +++ b/client/src/components/Sider/data/menuItems.tsx @@ -143,6 +143,12 @@ export function getAdminMenuItems(session: Session): MenuItemsRenderData[] { } const courseManagementMenuItems: CourseManagementMenuItemsData[] = [ + { + name: 'Dashboard', + key: 'courseDashboard', + getUrl: (course: Course) => `/course/admin/dashboard?course=${course.alias}`, + courseAccess: some(isCourseManager, isCourseSupervisor, isDementor), + }, { name: 'Course Events', key: 'courseEvents', diff --git a/client/src/modules/AdminDashboard/components/StudentsCountriesCard/StudentsCountriesCard.tsx b/client/src/modules/AdminDashboard/components/StudentsCountriesCard/StudentsCountriesCard.tsx new file mode 100644 index 0000000000..ff5cfa9d81 --- /dev/null +++ b/client/src/modules/AdminDashboard/components/StudentsCountriesCard/StudentsCountriesCard.tsx @@ -0,0 +1,21 @@ +import { Card } from 'antd'; +import { StudentsCountriesStatsDto } from 'api'; +import dynamic from 'next/dynamic'; + +type Props = { + studentsCountriesStats: StudentsCountriesStatsDto; + studentsActiveCount: number; +}; + +const StudentsCountriesChart = dynamic(() => import('./StudentsCountriesChart'), { ssr: false }); + +export const StudentsCountriesCard = ({ studentsCountriesStats, studentsActiveCount }: Props) => { + const { countries } = studentsCountriesStats; + return ( + +
+ +
+
+ ); +}; diff --git a/client/src/modules/AdminDashboard/components/StudentsCountriesCard/StudentsCountriesChart.tsx b/client/src/modules/AdminDashboard/components/StudentsCountriesCard/StudentsCountriesChart.tsx new file mode 100644 index 0000000000..51c0d1d111 --- /dev/null +++ b/client/src/modules/AdminDashboard/components/StudentsCountriesCard/StudentsCountriesChart.tsx @@ -0,0 +1,60 @@ +import { Bar, BarConfig } from '@ant-design/plots'; +import { Flex, Image, Typography } from 'antd'; +import { CountryStatDto } from 'api'; +import { useCallback, useMemo } from 'react'; + +type Props = { + data: CountryStatDto[]; + studentsActiveCount: number; +}; + +/* + * Defining the Datum type manually as it cannot be imported directly from @ant-design/plots. + * This type is inferred from the 'data' property of the Bar component's first parameter. + * This approach is necessary because @ant-design/plots does not explicitly export the Datum type. + * Use this type definition cautiously and review it if the library updates. + */ +type Datum = Parameters[0]['data'][number]; + +const { Text } = Typography; + +function StudentsCountriesChart({ data, studentsActiveCount }: Props) { + const tooltipFormatter = useCallback( + (datum: Datum) => { + const percentage = studentsActiveCount ? Math.ceil((datum.studentsCount / studentsActiveCount) * 100) : 0; + return { + name: 'Number of Students', + value: `${datum.studentsCount} (${percentage}%)`, + }; + }, + [studentsActiveCount], + ); + + const config: BarConfig = useMemo( + () => ({ + data, + yField: 'country', + xField: 'studentsCount', + yAxis: { + label: { autoRotate: false }, + }, + tooltip: { formatter: tooltipFormatter }, + xAxis: { title: { text: 'Number of Students' } }, + scrollbar: { type: 'vertical' }, + }), + [data, tooltipFormatter], + ); + + if (!data.length) { + return ( + + No student data available to display + Error 404 + + ); + } + + return ; +} + +export default StudentsCountriesChart; diff --git a/client/src/modules/AdminDashboard/components/StudentsCountriesCard/index.tsx b/client/src/modules/AdminDashboard/components/StudentsCountriesCard/index.tsx new file mode 100644 index 0000000000..98791d5c31 --- /dev/null +++ b/client/src/modules/AdminDashboard/components/StudentsCountriesCard/index.tsx @@ -0,0 +1 @@ +export { StudentsCountriesCard } from './StudentsCountriesCard'; diff --git a/client/src/modules/AdminDashboard/components/StudentsStatsCard/StudentsStatsCard.tsx b/client/src/modules/AdminDashboard/components/StudentsStatsCard/StudentsStatsCard.tsx new file mode 100644 index 0000000000..c748ef478e --- /dev/null +++ b/client/src/modules/AdminDashboard/components/StudentsStatsCard/StudentsStatsCard.tsx @@ -0,0 +1,19 @@ +import { Card } from 'antd'; +import { CourseStatsDto } from 'api'; +import dynamic from 'next/dynamic'; + +type Props = { + studentsStats: CourseStatsDto; +}; + +const StudentsStatsChart = dynamic(() => import('./StudentsStatsChart'), { ssr: false }); + +export const StudentsStatsCard = ({ studentsStats }: Props) => { + return ( + +
+ +
+
+ ); +}; diff --git a/client/src/modules/AdminDashboard/components/StudentsStatsCard/StudentsStatsChart.tsx b/client/src/modules/AdminDashboard/components/StudentsStatsCard/StudentsStatsChart.tsx new file mode 100644 index 0000000000..18996e85bd --- /dev/null +++ b/client/src/modules/AdminDashboard/components/StudentsStatsCard/StudentsStatsChart.tsx @@ -0,0 +1,23 @@ +import { Liquid } from '@ant-design/plots'; +import { CourseStatsDto } from 'api'; + +type Props = { + studentsStats: CourseStatsDto; +}; + +function StudentsStatsChart({ studentsStats }: Props) { + const percent = studentsStats.studentsActiveCount / studentsStats.studentsTotalCount; + const config = { + percent: percent, + outline: { + border: 4, + distance: 8, + }, + wave: { + length: 128, + }, + }; + return ; +} + +export default StudentsStatsChart; diff --git a/client/src/modules/AdminDashboard/components/StudentsStatsCard/index.tsx b/client/src/modules/AdminDashboard/components/StudentsStatsCard/index.tsx new file mode 100644 index 0000000000..02d1815ef9 --- /dev/null +++ b/client/src/modules/AdminDashboard/components/StudentsStatsCard/index.tsx @@ -0,0 +1 @@ +export { StudentsStatsCard } from './StudentsStatsCard'; diff --git a/client/src/modules/AdminDashboard/hooks/index.ts b/client/src/modules/AdminDashboard/hooks/index.ts new file mode 100644 index 0000000000..fcdddd82a0 --- /dev/null +++ b/client/src/modules/AdminDashboard/hooks/index.ts @@ -0,0 +1 @@ +export { useCourseStats } from './useCourseStats/useCourseStats'; diff --git a/client/src/modules/AdminDashboard/hooks/useCourseStats/useCourseStats.tsx b/client/src/modules/AdminDashboard/hooks/useCourseStats/useCourseStats.tsx new file mode 100644 index 0000000000..bfc1e4ae0c --- /dev/null +++ b/client/src/modules/AdminDashboard/hooks/useCourseStats/useCourseStats.tsx @@ -0,0 +1,22 @@ +import { message } from 'antd'; +import { CourseStatsApi } from 'api'; +import { useAsync } from 'react-use'; + +const courseStatsApi = new CourseStatsApi(); + +export function useCourseStats(courseId: number) { + return useAsync(async () => { + try { + const [studentsCountries, studentsStats] = await Promise.all([ + courseStatsApi.getCourseStudentCountries(courseId), + courseStatsApi.getCourseStats(courseId), + ]); + return { + studentsCountries: studentsCountries.data, + studentsStats: studentsStats.data, + }; + } catch (error) { + message.error('Something went wrong, please try to reload the page later'); + } + }, [courseId]); +} diff --git a/client/src/modules/AdminDashboard/index.tsx b/client/src/modules/AdminDashboard/index.tsx new file mode 100644 index 0000000000..6d9d069305 --- /dev/null +++ b/client/src/modules/AdminDashboard/index.tsx @@ -0,0 +1 @@ +export { default as AdminDashboard } from './pages/AdminDashboard'; diff --git a/client/src/modules/AdminDashboard/pages/AdminDashboard.tsx b/client/src/modules/AdminDashboard/pages/AdminDashboard.tsx new file mode 100644 index 0000000000..3da0d84c04 --- /dev/null +++ b/client/src/modules/AdminDashboard/pages/AdminDashboard.tsx @@ -0,0 +1,72 @@ +import { PageLayout } from 'components/PageLayout'; +import { useActiveCourseContext } from 'modules/Course/contexts'; +import Masonry from 'react-masonry-css'; +import { StudentsCountriesCard } from '../components/StudentsCountriesCard'; +import { useCourseStats } from '../hooks'; +import { StudentsStatsCard } from '../components/StudentsStatsCard'; +import css from 'styled-jsx/css'; + +const gapSize = 24; + +function AdminDashboard() { + const { course } = useActiveCourseContext(); + const { loading, value: stats } = useCourseStats(course.id); + + const masonryBreakPoints = { + default: 4, + 1100: 3, + 700: 2, + 500: 1, + }; + + const cards = [ + stats?.studentsCountries && { + title: 'studentsCountriesCard', + component: ( + + ), + }, + stats?.studentsStats && { + title: 'studentsStatsCard', + component: , + }, + ].filter(Boolean); + + return ( + + + {cards.map(({ title, component }) => ( +
+ {component} +
+ ))} +
+ {masonryStyles} + {masonryColumnStyles} +
+ ); +} + +const { className: masonryClassName, styles: masonryStyles } = css.resolve` + div { + display: flex; + margin-left: -${gapSize}px; + width: auto; + min-height: 85vh; + } +`; +const { className: masonryColumnClassName, styles: masonryColumnStyles } = css.resolve` + div { + padding-left: ${gapSize}px; + background-clip: padding-box; + } +`; + +export default AdminDashboard; diff --git a/client/src/pages/course/admin/dashboard.tsx b/client/src/pages/course/admin/dashboard.tsx new file mode 100644 index 0000000000..4a87568c70 --- /dev/null +++ b/client/src/pages/course/admin/dashboard.tsx @@ -0,0 +1,15 @@ +import { AdminDashboard } from 'modules/AdminDashboard'; +import { ActiveCourseProvider, SessionProvider } from 'modules/Course/contexts'; +import { CourseRole } from 'services/models'; + +function Page() { + return ( + + + + + + ); +} + +export default Page; diff --git a/nestjs/src/courses/stats/course-stats.controller.ts b/nestjs/src/courses/stats/course-stats.controller.ts index db28b140da..550b5f276a 100644 --- a/nestjs/src/courses/stats/course-stats.controller.ts +++ b/nestjs/src/courses/stats/course-stats.controller.ts @@ -9,12 +9,13 @@ import { UseInterceptors, } from '@nestjs/common'; import { CacheInterceptor, CacheTTL } from '@nestjs/cache-manager'; -import { ApiOkResponse, ApiOperation, ApiTags } from '@nestjs/swagger'; -import { CurrentRequest, DefaultGuard } from '../../auth'; +import { ApiBadRequestResponse, ApiOkResponse, ApiOperation, ApiTags } from '@nestjs/swagger'; +import { CurrentRequest, DefaultGuard, RequiredRoles, Role, RoleGuard } from '../../auth'; import { ONE_HOUR_CACHE_TTL } from '../../constants'; import { CourseAccessService } from '../course-access.service'; import { CourseStatsService } from './course-stats.service'; -import { CourseStatsDto } from './dto'; +import { CourseStatsDto, StudentsCountriesStatsDto } from './dto'; +import { CourseRole } from '@entities/index'; @Controller('courses/:courseId/stats') @ApiTags('course stats') @@ -37,4 +38,19 @@ export class CourseStatsController { const data = await this.courseStatsService.getById(courseId); return new CourseStatsDto(data); } + + @Get('/students/countries') + @CacheTTL(ONE_HOUR_CACHE_TTL) + @UseInterceptors(CacheInterceptor) + @UseGuards(RoleGuard) + @ApiOperation({ operationId: 'getCourseStudentCountries' }) + @ApiOkResponse({ type: StudentsCountriesStatsDto }) + @ApiBadRequestResponse() + @RequiredRoles([CourseRole.Manager, CourseRole.Supervisor, Role.Admin, CourseRole.Dementor], true) + public async getStudentCountries( + @Param('courseId', ParseIntPipe) courseId: number, + ): Promise { + const data = await this.courseStatsService.getStudentCountries(courseId); + return data; + } } diff --git a/nestjs/src/courses/stats/course-stats.service.ts b/nestjs/src/courses/stats/course-stats.service.ts index 4a3320997c..2be48c7767 100644 --- a/nestjs/src/courses/stats/course-stats.service.ts +++ b/nestjs/src/courses/stats/course-stats.service.ts @@ -2,6 +2,7 @@ import { Student } from '@entities/student'; import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; +import { CountryStatDto } from './dto'; @Injectable() export class CourseStatsService { @@ -20,4 +21,21 @@ export class CourseStatsService { studentsTotalCount, }; } + + public async getStudentCountries(courseId: number) { + const countries = await this.studentRepository + .createQueryBuilder('student') + .where('student.courseId = :courseId', { courseId }) + .andWhere('student.isExpelled = false') + .leftJoin('student.user', 'user') + .select('user.countryName', 'country') + .addSelect('COUNT(student.id)', 'studentsCount') + .groupBy('user.countryName') + .orderBy('COUNT(student.id)', 'DESC') + .getRawMany(); + + return { + countries: countries.map(country => ({ country: country.country, studentsCount: Number(country.studentsCount) })), + }; + } } diff --git a/nestjs/src/courses/stats/dto/index.ts b/nestjs/src/courses/stats/dto/index.ts index 8939e1b703..e399b350ee 100644 --- a/nestjs/src/courses/stats/dto/index.ts +++ b/nestjs/src/courses/stats/dto/index.ts @@ -1 +1,2 @@ export * from './course-stats.dto'; +export * from './students-countries-stats.dto'; diff --git a/nestjs/src/courses/stats/dto/students-countries-stats.dto.ts b/nestjs/src/courses/stats/dto/students-countries-stats.dto.ts new file mode 100644 index 0000000000..d7c70ec966 --- /dev/null +++ b/nestjs/src/courses/stats/dto/students-countries-stats.dto.ts @@ -0,0 +1,19 @@ +import { IsString, IsInt, IsArray, ValidateNested } from 'class-validator'; +import { ApiProperty } from '@nestjs/swagger'; + +export class CountryStatDto { + @IsString() + @ApiProperty() + public country: string; + + @IsInt() + @ApiProperty() + public studentsCount: number; +} + +export class StudentsCountriesStatsDto { + @IsArray() + @ValidateNested({ each: true }) + @ApiProperty({ type: [CountryStatDto] }) + public countries: CountryStatDto[]; +} diff --git a/nestjs/src/spec.json b/nestjs/src/spec.json index 2978b2594b..3af21e66c9 100644 --- a/nestjs/src/spec.json +++ b/nestjs/src/spec.json @@ -1,24 +1,2432 @@ { "openapi": "3.0.0", "paths": { + "/activity": { + "get": { + "operationId": "getActivity", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActivityDto" } } } + } + }, + "tags": ["activity"] + }, + "post": { + "operationId": "createActivity", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateActivityDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActivityDto" } } } + } + }, + "tags": ["activity"] + } + }, + "/activity/webhook": { + "post": { + "operationId": "createActivityWebhook", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateActivityWebhookDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActivityDto" } } } + } + }, + "tags": ["activity"] + } + }, + "/alerts": { + "post": { + "operationId": "createAlert", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAlertDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AlertDto" } } } + } + }, + "tags": ["alerts"] + }, + "get": { + "operationId": "getAlerts", + "summary": "", + "parameters": [{ "name": "enabled", "required": true, "in": "query", "schema": { "type": "boolean" } }], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AlertDto" } } + } + } + } + }, + "tags": ["alerts"] + } + }, + "/alerts/{id}": { + "delete": { + "operationId": "deleteAlert", + "summary": "", + "parameters": [{ "name": "id", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { "200": { "description": "" } }, + "tags": ["alerts"] + }, + "patch": { + "operationId": "updateAlert", + "summary": "", + "parameters": [{ "name": "id", "required": true, "in": "path", "schema": { "type": "number" } }], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateAlertDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AlertDto" } } } + } + }, + "tags": ["alerts"] + } + }, + "/students/{studentId}/feedbacks": { + "post": { + "operationId": "createStudentFeedback", + "summary": "", + "parameters": [{ "name": "studentId", "required": true, "in": "path", "schema": { "type": "number" } }], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateStudentFeedbackDto" } } } + }, + "responses": { + "201": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StudentFeedbackDto" } } } + } + }, + "tags": ["students feedbacks"] + } + }, + "/students/{studentId}/feedbacks/{id}": { + "patch": { + "operationId": "updateStudentFeedback", + "summary": "", + "parameters": [ + { "name": "studentId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateStudentFeedbackDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StudentFeedbackDto" } } } + } + }, + "tags": ["students feedbacks"] + }, + "get": { + "operationId": "getStudentFeedback", + "summary": "", + "parameters": [ + { "name": "studentId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StudentFeedbackDto" } } } + } + }, + "tags": ["students feedbacks"] + } + }, + "/courses": { + "get": { + "operationId": "getCourses", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CourseDto" } } + } + } + } + }, + "tags": ["courses"] + } + }, + "/courses/{courseId}": { + "get": { + "operationId": "getCourse", + "summary": "", + "parameters": [{ "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CourseDto" } } } + }, + "403": { "description": "" } + }, + "tags": ["courses"] + }, + "put": { + "operationId": "updateCourse", + "summary": "", + "parameters": [{ "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCourseDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CourseDto" } } } + }, + "403": { "description": "" } + }, + "tags": ["courses"] + } + }, + "/courses/{courseId}/leave": { + "post": { + "operationId": "leaveCourse", + "summary": "", + "parameters": [{ "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }], + "requestBody": { + "required": false, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeaveCourseRequestDto" } } } + }, + "responses": { "201": { "description": "" } }, + "tags": ["courses"] + } + }, + "/courses/{courseId}/rejoin": { + "post": { + "operationId": "rejoinCourse", + "summary": "", + "parameters": [{ "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { "201": { "description": "" } }, + "tags": ["courses"] + } + }, + "/courses/{courseId}/copy": { + "post": { + "operationId": "copyCourse", + "summary": "", + "parameters": [{ "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCourseDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CourseDto" } } } + } + }, + "tags": ["courses"] + } + }, + "/students/{studentId}": { + "get": { + "operationId": "getStudent", + "summary": "", + "parameters": [{ "name": "studentId", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StudentDto" } } } + }, + "400": { "description": "" }, + "403": { "description": "" } + }, + "tags": ["students"] + } + }, + "/mentors/{mentorId}/course/{courseId}/options": { + "get": { + "operationId": "getMentorOptions", + "summary": "", + "parameters": [ + { "name": "mentorId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MentorOptionsDto" } } } + }, + "403": { "description": "" }, + "404": { "description": "" } + }, + "tags": ["mentors"] + } + }, + "/mentors/{mentorId}/students": { + "get": { + "operationId": "getMentorStudents", + "summary": "", + "parameters": [{ "name": "mentorId", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MentorStudentDto" } } + } + } + }, + "400": { "description": "" } + }, + "tags": ["mentors"] + } + }, + "/mentors/{mentorId}/course/{courseId}/students": { + "get": { + "operationId": "getCourseStudentsCount", + "summary": "", + "parameters": [ + { "name": "mentorId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { + "200": { "description": "", "content": { "application/json": { "schema": { "type": "number" } } } }, + "400": { "description": "" } + }, + "tags": ["mentors"] + } + }, + "/mentors/{mentorId}/course/{courseId}/dashboard": { + "get": { + "operationId": "getMentorDashboardData", + "summary": "", + "parameters": [ + { "name": "mentorId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MentorDashboardDto" } } + } + } + }, + "400": { "description": "" } + }, + "tags": ["mentors"] + } + }, + "/mentors/{mentorId}/course/{courseId}/random-task": { + "get": { + "operationId": "getRandomTask", + "summary": "", + "parameters": [ + { "name": "mentorId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { "200": { "description": "" }, "400": { "description": "" } }, + "tags": ["mentors"] + } + }, + "/courses/{courseId}/tasks": { + "get": { + "operationId": "getCourseTasks", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { + "name": "status", + "required": false, + "in": "query", + "schema": { "enum": ["started", "inprogress", "finished"], "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CourseTaskDto" } } + } + } + }, + "400": { "description": "" }, + "403": { "description": "" } + }, + "tags": ["courses tasks"] + }, + "post": { + "operationId": "createCourseTask", + "summary": "", + "parameters": [{ "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCourseTaskDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CourseTaskDetailedDto" } } } + }, + "400": { "description": "" }, + "403": { "description": "" } + }, + "tags": ["courses tasks"] + } + }, + "/courses/{courseId}/tasks/solutions": { + "get": { + "operationId": "getCourseTasksWithStudentSolution", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { + "name": "status", + "required": false, + "in": "query", + "schema": { "enum": ["started", "inprogress", "finished"], "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CourseTaskDto" } } + } + } + }, + "400": { "description": "" }, + "403": { "description": "" } + }, + "tags": ["courses tasks"] + } + }, + "/courses/{courseId}/tasks/detailed": { + "get": { + "operationId": "getCourseTasksDetailed", + "summary": "", + "parameters": [{ "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CourseTaskDetailedDto" } } + } + } + }, + "400": { "description": "" }, + "403": { "description": "" } + }, + "tags": ["courses tasks"] + } + }, + "/courses/{courseId}/tasks/{courseTaskId}": { + "get": { + "operationId": "getCourseTask", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "courseTaskId", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CourseTaskDetailedDto" } } } + }, + "400": { "description": "" }, + "403": { "description": "" } + }, + "tags": ["courses tasks"] + }, + "put": { + "operationId": "updateCourseTask", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "courseTaskId", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCourseTaskDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CourseTaskDetailedDto" } } } + }, + "400": { "description": "" }, + "403": { "description": "" } + }, + "tags": ["courses tasks"] + }, + "delete": { + "operationId": "deleteCourseTask", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "courseTaskId", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { "200": { "description": "" }, "400": { "description": "" }, "403": { "description": "" } }, + "tags": ["courses tasks"] + } + }, + "/courses/{courseId}/events": { + "post": { + "operationId": "createCourseEvent", + "summary": "", + "parameters": [{ "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCourseEventDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CourseEventDto" } } + } + } + }, + "400": { "description": "" }, + "403": { "description": "" } + }, + "tags": ["courses events"] + } + }, + "/courses/{courseId}/events/{courseEventId}": { + "put": { + "operationId": "updateCourseEvent", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "courseEventId", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCourseEventDto" } } } + }, + "responses": { "200": { "description": "" }, "400": { "description": "" }, "403": { "description": "" } }, + "tags": ["courses events"] + }, + "delete": { + "operationId": "deleteCourseEvent", + "summary": "", + "parameters": [ + { "name": "courseEventId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "courseId", "required": true, "in": "path", "schema": {} } + ], + "responses": { "200": { "description": "" }, "400": { "description": "" }, "403": { "description": "" } }, + "tags": ["courses events"] + } + }, + "/courses/{courseId}/interviews": { + "get": { + "operationId": "getInterviews", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "disabled", "required": false, "in": "query", "schema": { "type": "boolean" } }, + { + "name": "types", + "required": false, + "in": "query", + "schema": { "type": "array", "items": { "type": "string" } } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/InterviewDto" } } + } + } + }, + "400": { "description": "" }, + "403": { "description": "" } + }, + "tags": ["courses interviews"] + } + }, + "/courses/{courseId}/interviews/{interviewId}": { + "get": { + "operationId": "getInterview", + "summary": "", + "parameters": [ + { "name": "interviewId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InterviewDto" } } } + }, + "400": { "description": "" }, + "403": { "description": "" } + }, + "tags": ["courses interviews"] + } + }, + "/courses/{courseId}/interviews/{interviewId}/students/available": { + "get": { + "operationId": "getAvailableStudents", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "interviewId", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AvailableStudentDto" } } + } + } + }, + "400": { "description": "" }, + "403": { "description": "" } + }, + "tags": ["courses interviews"] + } + }, + "/courses/{courseId}/interviews/{interviewId}/{type}/feedback": { + "get": { + "operationId": "getInterviewFeedback", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "interviewId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "type", "required": true, "in": "path", "schema": { "type": "string" } } + ], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InterviewFeedbackDto" } } } + }, + "400": { "description": "" }, + "403": { "description": "" } + }, + "tags": ["courses interviews"] + }, + "post": { + "operationId": "createInterviewFeedback", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "interviewId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "type", "required": true, "in": "path", "schema": { "type": "string" } } + ], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PutInterviewFeedbackDto" } } } + }, + "responses": { "200": { "description": "" }, "400": { "description": "" }, "403": { "description": "" } }, + "tags": ["courses interviews"] + } + }, + "/tasks/notify/changes": { + "post": { + "operationId": "notifyTasksDeadlines", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CheckTasksDeadlineDto" } } } + }, + "responses": { "403": { "description": "" } }, + "tags": ["courses tasks"] + } + }, + "/courses/{courseId}/stats": { + "get": { + "operationId": "getCourseStats", + "summary": "", + "parameters": [{ "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CourseStatsDto" } } } + } + }, + "tags": ["course stats"] + } + }, + "/courses/{courseId}/stats/students/countries": { + "get": { + "operationId": "getCourseStudentCountries", + "summary": "", + "parameters": [{ "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/StudentsCountriesStatsDto" } } + } + }, + "400": { "description": "" } + }, + "tags": ["course stats"] + } + }, + "/courses/{courseId}/cross-checks/pairs": { + "get": { + "operationId": "getCrossCheckPairs", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "pageSize", "required": true, "in": "query", "schema": { "type": "number" } }, + { "name": "current", "required": true, "in": "query", "schema": { "type": "number" } }, + { "name": "orderBy", "required": false, "in": "query", "schema": { "type": "string" } }, + { "name": "orderDirection", "required": false, "in": "query", "schema": { "type": "string" } }, + { "name": "checker", "required": false, "in": "query", "schema": { "type": "string" } }, + { "name": "student", "required": false, "in": "query", "schema": { "type": "string" } }, + { "name": "url", "required": false, "in": "query", "schema": { "type": "string" } }, + { "name": "task", "required": false, "in": "query", "schema": { "type": "string" } } + ], + "responses": { + "403": { "description": "" }, + "default": { + "description": "", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/CrossCheckPairResponseDto" } } + } + } + }, + "tags": ["courses tasks"] + } + }, + "/courses/{courseId}/cross-checks/available-review-stats": { + "get": { + "operationId": "getAvailableCrossCheckReviewStats", + "summary": "", + "parameters": [{ "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { + "403": { "description": "" }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AvailableReviewStatsDto" } } + } + } + } + }, + "tags": ["courses tasks"] + } + }, + "/courses/{courseId}/cross-checks/{courseTaskId}/csv": { + "get": { + "operationId": "getCrossCheckCsv", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "courseTaskId", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { "403": { "description": "" } }, + "tags": ["courses tasks"] + } + }, + "/courses/{courseId}/cross-checks/{courseTaskId}/feedbacks/my": { + "get": { + "operationId": "getMyCrossCheckFeedbacks", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "courseTaskId", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { + "403": { "description": "" }, + "default": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CrossCheckFeedbackDto" } } } + } + }, + "tags": ["courses tasks"] + } + }, + "/course/{courseId}/students/score": { + "get": { + "operationId": "getScore", + "summary": "", + "parameters": [ + { "name": "activeOnly", "required": true, "in": "query", "schema": { "type": "string" } }, + { + "name": "orderBy", + "required": true, + "in": "query", + "schema": { + "enum": [ + "rank", + "totalScore", + "crossCheckScore", + "githubId", + "name", + "cityName", + "mentor", + "totalScoreChangeDate", + "repositoryLastActivityDate" + ], + "type": "string" + } + }, + { + "name": "orderDirection", + "required": true, + "in": "query", + "schema": { "enum": ["asc", null, "desc"], "type": "string" } + }, + { "name": "current", "required": true, "in": "query", "schema": { "type": "string" } }, + { "name": "pageSize", "required": true, "in": "query", "schema": { "type": "string" } }, + { "name": "githubId", "required": false, "in": "query", "schema": { "type": "string" } }, + { "name": "name", "required": false, "in": "query", "schema": { "type": "string" } }, + { "name": "mentor.githubId", "required": false, "in": "query", "schema": { "type": "string" } }, + { "name": "cityName", "required": false, "in": "query", "schema": { "type": "string" } }, + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScoreDto" } } } + } + }, + "tags": ["students score"] + } + }, + "/course/{courseId}/students/score/{githubId}": { + "get": { + "operationId": "getStudentScore", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "githubId", "required": true, "in": "path", "schema": { "type": "string" } } + ], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScoreStudentDto" } } } + } + }, + "tags": ["students score"] + } + }, + "/courses/{courseId}/tasks/{courseTaskId}/solutions": { + "post": { + "operationId": "createTaskSolution", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "courseTaskId", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SaveTaskSolutionDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskSolutionDto" } } } + }, + "400": { "description": "" }, + "403": { "description": "" } + }, + "tags": ["courses task solutions"] + } + }, + "/courses/{courseId}/schedule": { + "get": { + "operationId": "getSchedule", + "summary": "", + "parameters": [{ "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CourseScheduleItemDto" } } + } + } + } + }, + "tags": ["courses schedule"] + } + }, + "/courses/{courseId}/schedule/copy": { + "post": { + "operationId": "copySchedule", + "summary": "", + "parameters": [{ "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CourseCopyFromDto" } } } + }, + "responses": { "200": { "description": "" } }, + "tags": ["courses schedule"] + } + }, + "/courses/{courseId}/icalendar/token": { + "get": { + "operationId": "getScheduleICalendarToken", + "summary": "", + "parameters": [{ "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CourseScheduleTokenDto" } } } + } + }, + "tags": ["courses schedule ical"] + } + }, + "/courses/{courseId}/icalendar/{token}": { + "get": { + "operationId": "getScheduleICalendar", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "token", "required": true, "in": "path", "schema": { "type": "string" } }, + { "name": "timezone", "required": true, "in": "query", "schema": { "type": "string" } } + ], + "responses": { + "200": { "description": "", "content": { "application/json": { "schema": { "type": "string" } } } } + }, + "tags": ["courses schedule ical"] + } + }, + "/courses/{courseId}/team-distribution": { + "post": { + "operationId": "createTeamDistribution", + "summary": "", + "parameters": [{ "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTeamDistributionDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamDistributionDto" } } } + } + }, + "tags": ["team distribution"] + }, + "get": { + "operationId": "getCourseTeamDistributions", + "summary": "", + "parameters": [{ "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TeamDistributionDto" } } + } + } + } + }, + "tags": ["team distribution"] + } + }, + "/courses/{courseId}/team-distribution/{id}": { + "delete": { + "operationId": "deleteTeamDistribution", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { "200": { "description": "" } }, + "tags": ["team distribution"] + }, + "put": { + "operationId": "updateTeamDistribution", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTeamDistributionDto" } } } + }, + "responses": { "200": { "description": "" } }, + "tags": ["team distribution"] + } + }, + "/courses/{courseId}/team-distribution/{id}/registry": { + "post": { + "operationId": "teamDistributionRegistry", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamDistributionDto" } } } + } + }, + "tags": ["team distribution"] + }, + "delete": { + "operationId": "teamDistributionDeleteRegistry", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { "200": { "description": "" } }, + "tags": ["team distribution"] + } + }, + "/courses/{courseId}/team-distribution/{id}/submit-score/{taskId}": { + "get": { + "operationId": "submitScore", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "taskId", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamDistributionDto" } } } + } + }, + "tags": ["team distribution"] + } + }, + "/courses/{courseId}/team-distribution/{id}/detailed": { + "get": { + "operationId": "getCourseTeamDistributionDetailed", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/TeamDistributionDetailedDto" } } + } + } + }, + "tags": ["team distribution"] + } + }, + "/courses/{courseId}/team-distribution/{id}/students": { + "get": { + "operationId": "getStudentsWithoutTeam", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "pageSize", "required": true, "in": "query", "schema": { "type": "number" } }, + { "name": "current", "required": true, "in": "query", "schema": { "type": "number" } }, + { "name": "search", "required": true, "in": "query", "schema": { "type": "string" } } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TeamDistributionStudentDto" } } + } + } + } + }, + "tags": ["team distribution"] + } + }, + "/courses/{courseId}/team-distribution/{id}/distribution": { + "post": { + "operationId": "distributeStudentsToTeam", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { "200": { "description": "" } }, + "tags": ["team distribution"] + } + }, + "/courses/{courseId}/team-distribution/{distributionId}/team": { + "get": { + "operationId": "getTeams", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "distributionId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "pageSize", "required": true, "in": "query", "schema": { "type": "number" } }, + { "name": "current", "required": true, "in": "query", "schema": { "type": "number" } }, + { "name": "search", "required": true, "in": "query", "schema": { "type": "string" } } + ], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamsDto" } } } + } + }, + "tags": ["team"] + }, + "post": { + "operationId": "createTeam", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "distributionId", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTeamDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamDto" } } } + } + }, + "tags": ["team"] + } + }, + "/courses/{courseId}/team-distribution/{distributionId}/team/{id}": { + "patch": { + "operationId": "updateTeam", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "distributionId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTeamDto" } } } + }, + "responses": { "200": { "description": "" } }, + "tags": ["team"] + } + }, + "/courses/{courseId}/team-distribution/{distributionId}/team/{id}/password": { + "get": { + "operationId": "getTeamPassword", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "distributionId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamPasswordDto" } } } + } + }, + "tags": ["team"] + }, + "post": { + "operationId": "changeTeamPassword", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "distributionId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamPasswordDto" } } } + } + }, + "tags": ["team"] + } + }, + "/courses/{courseId}/team-distribution/{distributionId}/team/{id}/join": { + "post": { + "operationId": "joinTeam", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "distributionId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JoinTeamDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamInfoDto" } } } + } + }, + "tags": ["team"] + } + }, + "/courses/{courseId}/team-distribution/{distributionId}/team/{id}/leave": { + "post": { + "operationId": "leaveTeam", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "distributionId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { "200": { "description": "" } }, + "tags": ["team"] + } + }, + "/courses/{courseId}/tasks/{courseTaskId}/verifications/answers": { + "get": { + "operationId": "getAnswers", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "courseTaskId", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TaskVerificationAttemptDto" } } + } + } + }, + "400": { "description": "" }, + "403": { "description": "" } + }, + "tags": ["course task verifications"] + } + }, + "/courses/{courseId}/tasks/{courseTaskId}/verifications": { + "post": { + "operationId": "createTaskVerification", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "courseTaskId", "required": true, "in": "path", "schema": { "type": "number" } } + ], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Object" } } } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/CreateTaskVerificationDto" } } + } + }, + "400": { "description": "" }, + "429": { "description": "" } + }, + "tags": ["course task verifications"] + } + }, + "/courses/{courseId}/users": { + "get": { + "operationId": "getCourseUsers", + "summary": "", + "parameters": [{ "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CourseUserDto" } } + } + } + }, + "404": { "description": "" } + }, + "tags": ["course users"] + }, + "put": { + "operationId": "putCourseUsers", + "summary": "", + "parameters": [{ "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UpdateCourseUserDto" } } + } + } + }, + "responses": { "200": { "description": "" } }, + "tags": ["course users"] + } + }, + "/courses/{courseId}/users/{githubId}": { + "put": { + "operationId": "putCourseUser", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "githubId", "required": true, "in": "path", "schema": { "type": "string" } } + ], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CourseRolesDto" } } } + }, + "responses": { "200": { "description": "" }, "400": { "description": "" } }, + "tags": ["course users"] + } + }, + "/course/{courseId}/mentors/details": { + "get": { + "operationId": "getMentorsDetails", + "summary": "", + "parameters": [{ "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MentorDetailsDto" } } + } + } + }, + "403": { "description": "" } + }, + "tags": ["course mentors"] + } + }, + "/course/{courseId}/mentors/details/csv": { + "get": { + "operationId": "getMentorsDetailsCsv", + "summary": "", + "parameters": [{ "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { "403": { "description": "" } }, + "tags": ["course mentors"] + } + }, + "/course/{courseId}/mentors/search/{searchText}": { + "get": { + "operationId": "searchMentors", + "summary": "", + "parameters": [ + { "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }, + { "name": "searchText", "required": true, "in": "path", "schema": { "type": "string" } } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SearchMentorDto" } } + } + } + }, + "403": { "description": "" } + }, + "tags": ["course mentors"] + } + }, + "/users/notifications": { + "get": { + "operationId": "getUserNotifications", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserNotificationsDto" } } } + } + }, + "tags": ["users notifications"] + }, + "put": { + "operationId": "updateUserNotifications", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/UpdateNotificationUserSettingsDto" } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/UpdateNotificationUserSettingsDto" } + } + } + } + } + }, + "tags": ["users notifications"] + } + }, + "/users/notifications/connections": { + "get": { + "operationId": "getUserNotificationConnections", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/NotificationUserConnectionsDto" } } + } + } + }, + "tags": ["users notifications"] + } + }, + "/users/notifications/confirmation/email": { + "post": { + "operationId": "sendEmailConfirmationLink", + "summary": "", + "parameters": [], + "responses": { "201": { "description": "" } }, + "tags": ["users notifications"] + } + }, + "/users/notifications/connection/find": { + "post": { + "operationId": "UsersNotificationsController_findConnection", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/NotificationConnectionExistsDto" } } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/NotificationConnectionDto" } } + } + } + }, + "tags": ["users notifications"] + } + }, + "/users/notifications/connection": { + "post": { + "operationId": "UsersNotificationsController_createUserConnection", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/UpsertNotificationConnectionDto" } } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/NotificationConnectionDto" } } + } + } + }, + "tags": ["users notifications"] + } + }, + "/users/notifications/send": { + "post": { + "operationId": "sendNotification", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendUserNotificationDto" } } } + }, + "responses": { "200": { "description": "" }, "403": { "description": "" } }, + "tags": ["users notifications"] + } + }, + "/notifications": { + "get": { + "operationId": "getNotifications", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/NotificationDto" } } + } + } + }, + "403": { "description": "" } + }, + "tags": ["notifications"] + }, + "put": { + "operationId": "updateNotification", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateNotificationDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationDto" } } } + }, + "403": { "description": "" } + }, + "tags": ["notifications"] + }, + "post": { + "operationId": "createNotification", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateNotificationDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationDto" } } } + }, + "403": { "description": "" } + }, + "tags": ["notifications"] + } + }, + "/notifications/{id}": { + "delete": { + "operationId": "deleteNotification", + "summary": "", + "parameters": [{ "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }], + "responses": { "200": { "description": "" }, "403": { "description": "" } }, + "tags": ["notifications"] + } + }, + "/auth/github/login": { + "get": { + "operationId": "githubLogin", + "summary": "", + "parameters": [], + "responses": { "200": { "description": "" } }, + "tags": ["auth"] + } + }, + "/auth/github/callback": { + "get": { + "operationId": "githubCallback", + "summary": "", + "parameters": [], + "responses": { "200": { "description": "" } }, + "tags": ["auth"] + } + }, + "/auth/github/logout": { + "get": { + "operationId": "githubLogout", + "summary": "", + "parameters": [], + "responses": { "200": { "description": "" } }, + "tags": ["auth"] + } + }, + "/auth/github/connect": { + "post": { + "operationId": "AuthController_createConnectLinkViaGithub", + "parameters": [], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthConnectionDto" } } } + }, + "responses": { "201": { "description": "" } }, + "tags": ["auth"] + } + }, + "/profile/{username}/courses": { + "get": { + "operationId": "getUserCourses", + "summary": "", + "parameters": [{ "name": "username", "required": true, "in": "path", "schema": { "type": "string" } }], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ProfileCourseDto" } } + } + } + } + }, + "tags": ["profile"] + } + }, + "/profile/user": { + "post": { + "operationId": "updateUser", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserDto" } } } + }, + "responses": { "201": { "description": "" } }, + "tags": ["profile"] + } + }, + "/profile/info": { + "patch": { + "operationId": "updateProfileInfoFlat", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateProfileInfoDto" } } } + }, + "responses": { "200": { "description": "" } }, + "tags": ["profile"] + } + }, + "/profile/{username}": { + "get": { + "operationId": "getProfile", + "summary": "", + "parameters": [{ "name": "username", "required": true, "in": "path", "schema": { "type": "string" } }], + "responses": { + "default": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProfileDto" } } } + } + }, + "tags": ["profile"] + }, + "delete": { + "operationId": "obfuscateProfile", + "summary": "", + "parameters": [{ "name": "username", "required": true, "in": "path", "schema": { "type": "string" } }], + "responses": { "200": { "description": "" } }, + "tags": ["profile"] + } + }, + "/profile/{username}/personal": { + "get": { + "operationId": "getPersonalProfile", + "summary": "", + "parameters": [{ "name": "username", "required": true, "in": "path", "schema": { "type": "string" } }], + "responses": { + "default": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonalProfileDto" } } } + } + }, + "tags": ["profile"] + } + }, + "/profile/{username}/endorsement": { + "get": { + "operationId": "getEndorsement", + "summary": "", + "parameters": [{ "name": "username", "required": true, "in": "path", "schema": { "type": "string" } }], + "responses": { + "default": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EndorsementDto" } } } + } + }, + "tags": ["profile"] + } + }, "/profile/{username}/endorsement-data": { "get": { - "operationId": "getEndorsementData", + "operationId": "getEndorsementData", + "summary": "", + "parameters": [{ "name": "username", "required": true, "in": "path", "schema": { "type": "string" } }], + "responses": { + "default": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EndorsementDataDto" } } } + } + }, + "tags": ["profile"] + } + }, + "/disciplines": { + "post": { + "operationId": "createDiscipline", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateDisciplineDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DisciplineDto" } } } + } + }, + "tags": ["disciplines"] + }, + "get": { + "operationId": "getDisciplines", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DisciplineDto" } } + } + } + } + }, + "tags": ["disciplines"] + } + }, + "/disciplines/{id}": { + "delete": { + "operationId": "deleteDiscipline", + "summary": "", + "parameters": [{ "name": "id", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { "200": { "description": "" } }, + "tags": ["disciplines"] + }, + "patch": { + "operationId": "updateDiscipline", + "summary": "", + "parameters": [{ "name": "id", "required": true, "in": "path", "schema": { "type": "number" } }], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateDisciplineDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DisciplineDto" } } } + } + }, + "tags": ["disciplines"] + } + }, + "/registry/mentor/{githubId}": { + "put": { + "operationId": "approveMentor", + "summary": "", + "parameters": [{ "name": "githubId", "required": true, "in": "path", "schema": { "type": "string" } }], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApproveMentorDto" } } } + }, + "responses": { "200": { "description": "" } }, + "tags": ["registry"] + }, + "delete": { + "operationId": "cancelMentorRegistry", + "summary": "", + "parameters": [{ "name": "githubId", "required": true, "in": "path", "schema": { "type": "string" } }], + "responses": { "200": { "description": "" } }, + "tags": ["registry"] + } + }, + "/registry/mentor/{githubId}/comment": { + "put": { + "operationId": "commentMentorRegistry", + "summary": "", + "parameters": [{ "name": "githubId", "required": true, "in": "path", "schema": { "type": "string" } }], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommentMentorRegistryDto" } } } + }, + "responses": { "200": { "description": "" } }, + "tags": ["registry"] + } + }, + "/registry/mentors": { + "get": { + "operationId": "getMentorRegistries", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MentorRegistryDto" } } + } + } + } + }, + "tags": ["registry"] + } + }, + "/certificate/{publicId}": { + "get": { + "operationId": "getCertificate", + "summary": "", + "parameters": [{ "name": "publicId", "required": true, "in": "path", "schema": { "type": "string" } }], + "responses": { "200": { "description": "" } }, + "tags": ["certificate"] + } + }, + "/certificate": { + "post": { + "operationId": "saveCertificate", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SaveCertificateDto" } } } + }, + "responses": { "201": { "description": "" } }, + "tags": ["certificate"] + } + }, + "/discord-servers": { + "post": { + "operationId": "createDiscordServer", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateDiscordServerDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscordServerDto" } } } + } + }, + "tags": ["discord-servers"] + }, + "get": { + "operationId": "getDiscordServers", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DiscordServerDto" } } + } + } + } + }, + "tags": ["discord-servers"] + } + }, + "/discord-servers/{id}": { + "put": { + "operationId": "updateDiscordServer", + "summary": "", + "parameters": [{ "name": "id", "required": true, "in": "path", "schema": { "type": "number" } }], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateDiscordServerDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscordServerDto" } } } + } + }, + "tags": ["discord-servers"] + }, + "delete": { + "operationId": "deleteDiscordServer", + "summary": "", + "parameters": [{ "name": "id", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscordServerDto" } } } + } + }, + "tags": ["discord-servers"] + } + }, + "/opportunities/{githubId}/resume": { + "get": { + "operationId": "getResume", + "summary": "", + "parameters": [{ "name": "githubId", "required": true, "in": "path", "schema": { "type": "string" } }], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResumeDto" } } } + }, + "400": { "description": "" }, + "403": { "description": "" }, + "404": { "description": "" } + }, + "tags": ["opportunities"] + }, + "patch": { + "operationId": "saveResume", + "summary": "", + "parameters": [{ "name": "githubId", "required": true, "in": "path", "schema": { "type": "string" } }], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FormDataDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Resume" } } } + }, + "400": { "description": "" }, + "403": { "description": "" }, + "404": { "description": "" } + }, + "tags": ["opportunities"] + } + }, + "/opportunities/consent": { + "get": { + "operationId": "getConsent", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConsentDto" } } } + } + }, + "tags": ["opportunities"] + }, + "post": { + "operationId": "createConsent", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GiveConsentDto" } } } + } + }, + "tags": ["opportunities"] + }, + "delete": { + "operationId": "deleteConsent", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConsentDto" } } } + } + }, + "tags": ["opportunities"] + } + }, + "/opportunities/prolong": { + "post": { + "operationId": "prolong", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatusDto" } } } + } + }, + "tags": ["opportunities"] + } + }, + "/opportunities/visibility": { + "post": { + "operationId": "setVisibility", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VisibilityDto" } } } + } + }, + "tags": ["opportunities"] + } + }, + "/opportunities/public/{uuid}": { + "get": { + "operationId": "getPublicResume", + "summary": "", + "parameters": [{ "name": "uuid", "required": true, "in": "path", "schema": { "type": "string" } }], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResumeDto" } } } + }, + "400": { "description": "" }, + "403": { "description": "" }, + "404": { "description": "" } + }, + "tags": ["opportunities"] + } + }, + "/opportunities/applicants": { + "get": { + "operationId": "getApplicants", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ApplicantResumeDto" } } + } + } + } + }, + "tags": ["opportunities"] + } + }, + "/user-group": { + "post": { + "operationId": "createUserGroup", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUserGroupDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserGroupDto" } } } + } + }, + "tags": ["user-group"] + }, + "get": { + "operationId": "getUserGroups", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UserGroupDto" } } + } + } + } + }, + "tags": ["user-group"] + } + }, + "/user-group/{id}": { + "put": { + "operationId": "updateUserGroup", + "summary": "", + "parameters": [{ "name": "id", "required": true, "in": "path", "schema": { "type": "number" } }], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserGroupDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserGroupDto" } } } + } + }, + "tags": ["user-group"] + }, + "delete": { + "operationId": "deleteUserGroup", + "summary": "", + "parameters": [{ "name": "id", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserGroupDto" } } } + } + }, + "tags": ["user-group"] + } + }, + "/schedule/notify/changes": { + "post": { + "operationId": "notifyScheduleChanges", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CheckScheduleChangesDto" } } } + }, + "responses": { "403": { "description": "" } }, + "tags": ["schedule"] + } + }, + "/gratitudes": { + "post": { + "operationId": "createGratitude", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateGratitudeDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GratitudeDto" } } } + } + }, + "tags": ["gratitudes"] + } + }, + "/gratitudes/badges/{courseId}": { + "get": { + "operationId": "getBadges", + "summary": "", + "parameters": [{ "name": "courseId", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BadgeDto" } } + } + } + } + }, + "tags": ["gratitudes"] + } + }, + "/gratitudes/heroes/radar": { + "get": { + "operationId": "getHeroesRadar", + "summary": "", + "parameters": [ + { "name": "current", "required": true, "in": "query", "schema": { "type": "number" } }, + { "name": "pageSize", "required": true, "in": "query", "schema": { "type": "number" } }, + { "name": "courseId", "required": false, "in": "query", "schema": { "type": "number" } }, + { "name": "notActivist", "required": false, "in": "query", "schema": { "type": "boolean" } }, + { "name": "countryName", "required": false, "in": "query", "schema": { "type": "string" } }, + { + "name": "startDate", + "required": false, + "in": "query", + "schema": { "format": "date-time", "type": "string" } + }, + { "name": "endDate", "required": false, "in": "query", "schema": { "format": "date-time", "type": "string" } } + ], + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HeroesRadarDto" } } } + }, + "403": { "description": "" } + }, + "tags": ["gratitudes"] + } + }, + "/gratitudes/heroes/radar/csv": { + "get": { + "operationId": "getHeroesRadarCsv", + "summary": "", + "parameters": [ + { "name": "current", "required": true, "in": "query", "schema": { "type": "number" } }, + { "name": "pageSize", "required": true, "in": "query", "schema": { "type": "number" } }, + { "name": "courseId", "required": false, "in": "query", "schema": { "type": "number" } }, + { "name": "notActivist", "required": false, "in": "query", "schema": { "type": "boolean" } }, + { "name": "countryName", "required": false, "in": "query", "schema": { "type": "string" } }, + { + "name": "startDate", + "required": false, + "in": "query", + "schema": { "format": "date-time", "type": "string" } + }, + { "name": "endDate", "required": false, "in": "query", "schema": { "format": "date-time", "type": "string" } } + ], + "responses": { "403": { "description": "" } }, + "tags": ["gratitudes"] + } + }, + "/gratitudes/heroes/countries": { + "get": { + "operationId": "getHeroesCountries", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CountryDto" } } + } + } + } + }, + "tags": ["gratitudes"] + } + }, + "/events": { + "get": { + "operationId": "getEvents", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EventDto" } } + } + } + } + }, + "tags": ["events"] + }, + "post": { + "operationId": "createEvent", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateEventDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EventDto" } } } + } + }, + "tags": ["events"] + } + }, + "/events/{id}": { + "patch": { + "operationId": "updateEvent", + "summary": "", + "parameters": [{ "name": "id", "required": true, "in": "path", "schema": { "type": "number" } }], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateEventDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EventDto" } } } + } + }, + "tags": ["events"] + }, + "delete": { + "operationId": "deleteEvent", + "summary": "", + "parameters": [{ "name": "id", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { "200": { "description": "" } }, + "tags": ["events"] + } + }, + "/tasks": { + "post": { + "operationId": "createTask", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTaskDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskDto" } } } + } + }, + "tags": ["tasks"] + }, + "get": { + "operationId": "getTasks", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TaskDto" } } } + } + } + }, + "tags": ["tasks"] + } + }, + "/tasks/{id}": { + "delete": { + "operationId": "deleteTask", + "summary": "", + "parameters": [{ "name": "id", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { "200": { "description": "" } }, + "tags": ["tasks"] + }, + "patch": { + "operationId": "updateTask", + "summary": "", + "parameters": [{ "name": "id", "required": true, "in": "path", "schema": { "type": "number" } }], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTaskDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskDto" } } } + } + }, + "tags": ["tasks"] + } + }, + "/tasks/{taskId}/criteria": { + "get": { + "operationId": "getTaskCriteria", "summary": "", - "parameters": [{ "name": "username", "required": true, "in": "path", "schema": { "type": "string" } }], + "parameters": [{ "name": "taskId", "required": true, "in": "path", "schema": { "type": "number" } }], "responses": { - "default": { + "200": { "description": "", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EndorsementDataDto" } } } + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskCriteriaDto" } } } } }, - "tags": ["profile"] + "tags": ["tasks-criteria"] + }, + "post": { + "operationId": "createTaskCriteria", + "summary": "", + "parameters": [{ "name": "taskId", "required": true, "in": "path", "schema": { "type": "number" } }], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskCriteriaDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskCriteriaDto" } } } + } + }, + "tags": ["tasks-criteria"] + }, + "patch": { + "operationId": "updateTaskCriteria", + "summary": "", + "parameters": [{ "name": "taskId", "required": true, "in": "path", "schema": { "type": "number" } }], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskCriteriaDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskCriteriaDto" } } } + } + }, + "tags": ["tasks-criteria"] + } + }, + "/prompts": { + "post": { + "operationId": "createPrompt", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePromptDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PromptDto" } } } + } + }, + "tags": ["prompts"] + }, + "get": { + "operationId": "getPrompts", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PromptDto" } } + } + } + } + }, + "tags": ["prompts"] + } + }, + "/prompts/{id}": { + "delete": { + "operationId": "deletePrompt", + "summary": "", + "parameters": [{ "name": "id", "required": true, "in": "path", "schema": { "type": "number" } }], + "responses": { "200": { "description": "" } }, + "tags": ["prompts"] + }, + "patch": { + "operationId": "updatePrompt", + "summary": "", + "parameters": [{ "name": "id", "required": true, "in": "path", "schema": { "type": "number" } }], + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePromptDto" } } } + }, + "responses": { + "200": { + "description": "", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PromptDto" } } } + } + }, + "tags": ["prompts"] } } }, "info": { "title": "", "description": "", "version": "1.0.0", "contact": {} }, "tags": [], - "servers": [{ "url": "https://app.rs.school/api/v2" }], + "servers": [{ "url": "/api/v2" }], "components": { "schemas": { "ActivityDto": { @@ -196,6 +2604,72 @@ "discipline" ] }, + "UpdateCourseDto": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "fullName": { "type": "string" }, + "alias": { "type": "string" }, + "description": { "type": "string" }, + "year": { "type": "number" }, + "startDate": { "type": "string" }, + "endDate": { "type": "string" }, + "registrationEndDate": { "type": "string" }, + "locationName": { "type": "string" }, + "discordServerId": { "type": "number" }, + "completed": { "type": "boolean" }, + "planned": { "type": "boolean" }, + "inviteOnly": { "type": "boolean" }, + "certificateIssuer": { "type": "string" }, + "usePrivateRepositories": { "type": "boolean" }, + "personalMentoring": { "type": "boolean" }, + "logo": { "type": "string" }, + "disciplineId": { "type": "number" } + }, + "required": ["name", "fullName", "alias"] + }, + "LeaveCourseRequestDto": { "type": "object", "properties": { "comment": { "type": "string" } } }, + "CreateCourseDto": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "startDate": { "type": "string" }, + "endDate": { "type": "string" }, + "fullName": { "type": "string" }, + "alias": { "type": "string" }, + "registrationEndDate": { "type": "string" }, + "completed": { "type": "boolean" }, + "planned": { "type": "boolean" }, + "inviteOnly": { "type": "boolean" }, + "description": { "type": "string" }, + "disciplineId": { "type": "number" }, + "discordServerId": { "type": "number" }, + "usePrivateRepositories": { "type": "boolean" }, + "certificateIssuer": { "type": "string" }, + "personalMentoring": { "type": "boolean" }, + "logo": { "type": "string" } + }, + "required": ["name", "startDate", "endDate", "fullName", "alias", "description"] + }, + "StudentDto": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "githubId": { "type": "string" }, + "id": { "type": "number" }, + "active": { "type": "boolean" }, + "cityName": { "type": "string", "nullable": true }, + "countryName": { "type": "string", "nullable": true }, + "totalScore": { "type": "number" }, + "rank": { "type": "number" } + }, + "required": ["name", "githubId", "id", "active", "cityName", "countryName", "totalScore", "rank"] + }, + "StudentsDto": { + "type": "object", + "properties": { "id": { "type": "number" }, "githubId": { "type": "string" }, "name": { "type": "string" } }, + "required": ["id", "githubId", "name"] + }, "MentorOptionsDto": { "type": "object", "properties": { @@ -260,10 +2734,283 @@ "endDate" ] }, - "Validations": { + "Validations": { + "type": "object", + "properties": { "githubIdInUrl": { "type": "boolean" } }, + "required": ["githubIdInUrl"] + }, + "CourseTaskDto": { + "type": "object", + "properties": { + "id": { "type": "number" }, + "taskId": { "type": "number" }, + "type": { + "type": "string", + "enum": [ + "jstask", + "kotlintask", + "objctask", + "htmltask", + "ipynb", + "selfeducation", + "codewars", + "test", + "codejam", + "interview", + "stage-interview", + "cv:html", + "cv:markdown" + ] + }, + "name": { "type": "string" }, + "checker": { "type": "string", "enum": ["auto-test", "assigned", "mentor", "taskOwner", "crossCheck"] }, + "studentStartDate": { "type": "string" }, + "studentEndDate": { "type": "string" }, + "crossCheckEndDate": { "type": "string", "nullable": true }, + "descriptionUrl": { "type": "string" }, + "taskOwner": { "nullable": true, "allOf": [{ "$ref": "#/components/schemas/PersonDto" }] }, + "taskSolutions": { "type": "object", "nullable": true }, + "maxScore": { "type": "number" }, + "scoreWeight": { "type": "number" }, + "pairsCount": { "type": "number", "nullable": true }, + "crossCheckStatus": { "type": "string" }, + "submitText": { "type": "string", "nullable": true }, + "validations": { "nullable": true, "allOf": [{ "$ref": "#/components/schemas/Validations" }] } + }, + "required": [ + "id", + "taskId", + "type", + "name", + "checker", + "studentStartDate", + "studentEndDate", + "crossCheckEndDate", + "descriptionUrl", + "taskOwner", + "taskSolutions", + "maxScore", + "scoreWeight", + "pairsCount", + "crossCheckStatus", + "submitText", + "validations" + ] + }, + "CourseTaskDetailedDto": { + "type": "object", + "properties": { + "id": { "type": "number" }, + "taskId": { "type": "number" }, + "type": { + "type": "string", + "enum": [ + "jstask", + "kotlintask", + "objctask", + "htmltask", + "ipynb", + "selfeducation", + "codewars", + "test", + "codejam", + "interview", + "stage-interview", + "cv:html", + "cv:markdown" + ] + }, + "name": { "type": "string" }, + "checker": { "type": "string", "enum": ["auto-test", "assigned", "mentor", "taskOwner", "crossCheck"] }, + "studentStartDate": { "type": "string" }, + "studentEndDate": { "type": "string" }, + "crossCheckEndDate": { "type": "string", "nullable": true }, + "descriptionUrl": { "type": "string" }, + "taskOwner": { "nullable": true, "allOf": [{ "$ref": "#/components/schemas/PersonDto" }] }, + "taskSolutions": { "type": "object", "nullable": true }, + "maxScore": { "type": "number" }, + "scoreWeight": { "type": "number" }, + "pairsCount": { "type": "number", "nullable": true }, + "crossCheckStatus": { "type": "string" }, + "submitText": { "type": "string", "nullable": true }, + "validations": { "nullable": true, "allOf": [{ "$ref": "#/components/schemas/Validations" }] }, + "publicAttributes": { "type": "object" }, + "githubRepoName": { "type": "string" }, + "sourceGithubRepoUrl": { "type": "string" }, + "resultsCount": { "type": "number" } + }, + "required": [ + "id", + "taskId", + "type", + "name", + "checker", + "studentStartDate", + "studentEndDate", + "crossCheckEndDate", + "descriptionUrl", + "taskOwner", + "taskSolutions", + "maxScore", + "scoreWeight", + "pairsCount", + "crossCheckStatus", + "submitText", + "validations", + "publicAttributes", + "githubRepoName", + "sourceGithubRepoUrl", + "resultsCount" + ] + }, + "CreateCourseTaskDto": { + "type": "object", + "properties": { + "taskId": { "type": "number" }, + "maxScore": { "type": "number" }, + "scoreWeight": { "type": "number" }, + "checker": { "type": "string", "enum": ["auto-test", "assigned", "mentor", "taskOwner", "crossCheck"] }, + "studentStartDate": { "type": "string" }, + "studentEndDate": { "type": "string" }, + "crossCheckEndDate": { "type": "string" }, + "taskOwnerId": { "type": "number" }, + "pairsCount": { "type": "number" }, + "type": { + "type": "string", + "enum": [ + "jstask", + "kotlintask", + "objctask", + "htmltask", + "ipynb", + "selfeducation", + "codewars", + "test", + "codejam", + "interview", + "stage-interview", + "cv:html", + "cv:markdown" + ] + }, + "submitText": { "type": "string" }, + "validations": { "type": "object" } + }, + "required": ["taskId", "checker", "studentStartDate", "studentEndDate", "type", "submitText", "validations"] + }, + "UpdateCourseTaskDto": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "jstask", + "kotlintask", + "objctask", + "htmltask", + "ipynb", + "selfeducation", + "codewars", + "test", + "codejam", + "interview", + "stage-interview", + "cv:html", + "cv:markdown" + ] + }, + "name": { "type": "string" }, + "checker": { "type": "string" }, + "studentStartDate": { "type": "string" }, + "studentEndDate": { "type": "string" }, + "descriptionUrl": { "type": "string" }, + "taskOwnerId": { "type": "number" }, + "maxScore": { "type": "number" }, + "scoreWeight": { "type": "number" }, + "pairsCount": { "type": "number" }, + "taskId": { "type": "number" }, + "crossCheckEndDate": { "type": "string" }, + "submitText": { "type": "string" }, + "validations": { "type": "object" } + }, + "required": ["studentStartDate", "studentEndDate", "submitText", "validations"] + }, + "Organizer": { "type": "object", "properties": { "id": { "type": "number" } }, "required": ["id"] }, + "CreateCourseEventDto": { + "type": "object", + "properties": { + "eventId": { "type": "number" }, + "special": { "type": "string" }, + "dateTime": { "type": "string" }, + "endTime": { "type": "string" }, + "duration": { "type": "number" }, + "place": { "type": "string" }, + "organizer": { "$ref": "#/components/schemas/Organizer" }, + "organizerId": { "type": "number" }, + "broadcastUrl": { "type": "string" }, + "coordinator": { "type": "string" }, + "comment": { "type": "string" } + }, + "required": ["eventId"] + }, + "CourseEventDto": { + "type": "object", + "properties": { + "id": { "type": "number" }, + "name": { "type": "string" }, + "type": { + "type": "string", + "enum": [ + "lecture_online", + "lecture_offline", + "lecture_mixed", + "lecture_self_study", + "warmup", + "info", + "workshop", + "meetup", + "cross_check_deadline", + "webinar", + "special" + ] + }, + "description": { "type": "string" }, + "descriptionUrl": { "type": "string" }, + "dateTime": { "type": "string" }, + "endTime": { "type": "string" }, + "organizer": { "$ref": "#/components/schemas/PersonDto" } + }, + "required": ["id", "name", "type", "description", "descriptionUrl", "dateTime", "endTime", "organizer"] + }, + "UpdateCourseEventDto": { "type": "object", - "properties": { "githubIdInUrl": { "type": "boolean" } }, - "required": ["githubIdInUrl"] + "properties": { + "special": { "type": "string" }, + "dateTime": { "type": "string" }, + "endTime": { "type": "string" }, + "duration": { "type": "number" }, + "place": { "type": "string" }, + "organizer": { "$ref": "#/components/schemas/Organizer" }, + "organizerId": { "type": "number" }, + "broadcastUrl": { "type": "string" }, + "coordinator": { "type": "string" }, + "comment": { "type": "string" } + } + }, + "Attributes": { "type": "object", "properties": { "template": { "type": "string", "nullable": true } } }, + "InterviewDto": { + "type": "object", + "properties": { + "id": { "type": "number" }, + "type": { "type": "string" }, + "name": { "type": "string" }, + "startDate": { "type": "string" }, + "endDate": { "type": "string" }, + "description": { "type": "string", "nullable": true }, + "descriptionUrl": { "type": "string" }, + "attributes": { "$ref": "#/components/schemas/Attributes" } + }, + "required": ["id", "type", "name", "startDate", "endDate", "description", "descriptionUrl", "attributes"] }, "AvailableStudentDto": { "type": "object", @@ -326,6 +3073,16 @@ "properties": { "studentsActiveCount": { "type": "number" }, "studentsTotalCount": { "type": "number" } }, "required": ["studentsActiveCount", "studentsTotalCount"] }, + "CountryStatDto": { + "type": "object", + "properties": { "country": { "type": "string" }, "studentsCount": { "type": "number" } }, + "required": ["country", "studentsCount"] + }, + "StudentsCountriesStatsDto": { + "type": "object", + "properties": { "countries": { "type": "array", "items": { "$ref": "#/components/schemas/CountryStatDto" } } }, + "required": ["countries"] + }, "CrossCheckCriteriaDataDto": { "type": "object", "properties": { @@ -546,6 +3303,255 @@ "properties": { "id": { "type": "number" }, "courseTaskId": { "type": "number" }, "url": { "type": "string" } }, "required": ["id", "courseTaskId", "url"] }, + "CourseScheduleItemDto": { + "type": "object", + "properties": { + "score": { "type": "number", "nullable": true }, + "name": { "type": "string" }, + "id": { "type": "number" }, + "status": { "type": "string", "enum": ["done", "available", "archived", "future", "missed", "review"] }, + "startDate": { "type": "string" }, + "endDate": { "type": "string" }, + "crossCheckEndDate": { "type": "string" }, + "organizer": { "nullable": true, "allOf": [{ "$ref": "#/components/schemas/PersonDto" }] }, + "maxScore": { "type": "number", "nullable": true }, + "scoreWeight": { "type": "number", "nullable": true }, + "descriptionUrl": { "type": "string", "nullable": true }, + "tag": { + "type": "string", + "enum": ["lecture", "coding", "self-study", "interview", "cross-check-submit", "cross-check-review", "test"] + }, + "type": { "type": "string", "enum": ["courseTask", "courseEvent"] } + }, + "required": [ + "score", + "name", + "id", + "status", + "startDate", + "endDate", + "crossCheckEndDate", + "organizer", + "maxScore", + "scoreWeight", + "descriptionUrl", + "tag", + "type" + ] + }, + "CourseCopyFromDto": { + "type": "object", + "properties": { "copyFromCourseId": { "type": "number" } }, + "required": ["copyFromCourseId"] + }, + "CourseScheduleTokenDto": { + "type": "object", + "properties": { "token": { "type": "string" } }, + "required": ["token"] + }, + "CreateTeamDistributionDto": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "startDate": { "format": "date-time", "type": "string" }, + "endDate": { "format": "date-time", "type": "string" }, + "description": { "type": "string" }, + "descriptionUrl": { "type": "string" }, + "minTeamSize": { "type": "number" }, + "maxTeamSize": { "type": "number" }, + "strictTeamSize": { "type": "number" }, + "strictTeamSizeMode": { "type": "boolean" }, + "minTotalScore": { "type": "number" } + }, + "required": [ + "name", + "startDate", + "endDate", + "description", + "descriptionUrl", + "minTeamSize", + "maxTeamSize", + "strictTeamSize", + "strictTeamSizeMode", + "minTotalScore" + ] + }, + "TeamDistributionDto": { + "type": "object", + "properties": { + "id": { "type": "number" }, + "name": { "type": "string" }, + "registrationStatus": { + "type": "string", + "enum": ["available", "unavailable", "future", "completed", "distributed", "closed"] + }, + "startDate": { "format": "date-time", "type": "string" }, + "endDate": { "format": "date-time", "type": "string" }, + "description": { "type": "string" }, + "descriptionUrl": { "type": "string" }, + "minTeamSize": { "type": "number" }, + "maxTeamSize": { "type": "number" }, + "strictTeamSize": { "type": "number" }, + "strictTeamSizeMode": { "type": "boolean" }, + "minTotalScore": { "type": "number" } + }, + "required": [ + "id", + "name", + "registrationStatus", + "startDate", + "endDate", + "description", + "descriptionUrl", + "minTeamSize", + "maxTeamSize", + "strictTeamSize", + "strictTeamSizeMode", + "minTotalScore" + ] + }, + "UpdateTeamDistributionDto": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "startDate": { "format": "date-time", "type": "string" }, + "endDate": { "format": "date-time", "type": "string" }, + "description": { "type": "string" }, + "descriptionUrl": { "type": "string" }, + "minTeamSize": { "type": "number" }, + "maxTeamSize": { "type": "number" }, + "strictTeamSize": { "type": "number" }, + "strictTeamSizeMode": { "type": "boolean" }, + "minTotalScore": { "type": "number" } + }, + "required": [ + "name", + "startDate", + "endDate", + "description", + "descriptionUrl", + "minTeamSize", + "maxTeamSize", + "strictTeamSize", + "strictTeamSizeMode", + "minTotalScore" + ] + }, + "TeamDistributionStudentDto": { + "type": "object", + "properties": { + "id": { "type": "number" }, + "fullName": { "type": "string" }, + "cvLink": { "type": "string" }, + "discord": { "nullable": true, "allOf": [{ "$ref": "#/components/schemas/Discord" }] }, + "telegram": { "type": "string" }, + "email": { "type": "string" }, + "githubId": { "type": "string" }, + "rank": { "type": "number" }, + "totalScore": { "type": "number" }, + "location": { "type": "string" }, + "cvUuid": { "type": "string" } + }, + "required": [ + "id", + "fullName", + "cvLink", + "discord", + "telegram", + "email", + "githubId", + "rank", + "totalScore", + "location", + "cvUuid" + ] + }, + "TeamDto": { + "type": "object", + "properties": { + "id": { "type": "number" }, + "name": { "type": "string" }, + "chatLink": { "type": "string" }, + "description": { "type": "string" }, + "teamLeadId": { "type": "number" }, + "teamDistributionId": { "type": "number" }, + "students": { "type": "array", "items": { "$ref": "#/components/schemas/TeamDistributionStudentDto" } } + }, + "required": ["id", "name", "chatLink", "description", "teamLeadId", "teamDistributionId", "students"] + }, + "TeamDistributionDetailedDto": { + "type": "object", + "properties": { + "id": { "type": "number" }, + "courseId": { "type": "number" }, + "name": { "type": "string" }, + "studentsWithoutTeamCount": { "type": "number" }, + "teamsCount": { "type": "number" }, + "myTeam": { "$ref": "#/components/schemas/TeamDto" }, + "minTeamSize": { "type": "number" }, + "maxTeamSize": { "type": "number" }, + "strictTeamSize": { "type": "number" }, + "strictTeamSizeMode": { "type": "boolean" } + }, + "required": [ + "id", + "courseId", + "name", + "studentsWithoutTeamCount", + "teamsCount", + "myTeam", + "minTeamSize", + "maxTeamSize", + "strictTeamSize", + "strictTeamSizeMode" + ] + }, + "TeamsDto": { + "type": "object", + "properties": { + "content": { "type": "array", "items": { "$ref": "#/components/schemas/TeamDto" } }, + "pagination": { "$ref": "#/components/schemas/PaginationMetaDto" } + }, + "required": ["content", "pagination"] + }, + "CreateTeamDto": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "description": { "type": "string" }, + "chatLink": { "type": "string" }, + "studentIds": { "type": "array", "items": { "type": "number" } } + }, + "required": ["name", "description", "chatLink"] + }, + "UpdateTeamDto": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "description": { "type": "string" }, + "chatLink": { "type": "string" }, + "studentIds": { "type": "array", "items": { "type": "number" } } + }, + "required": ["name", "description", "chatLink"] + }, + "TeamPasswordDto": { + "type": "object", + "properties": { "password": { "type": "string" } }, + "required": ["password"] + }, + "JoinTeamDto": { "type": "object", "properties": { "password": { "type": "string" } }, "required": ["password"] }, + "TeamInfoDto": { + "type": "object", + "properties": { + "id": { "type": "number" }, + "name": { "type": "string" }, + "chatLink": { "type": "string" }, + "description": { "type": "string" }, + "teamLeadId": { "type": "number" }, + "teamDistributionId": { "type": "number" } + }, + "required": ["id", "name", "chatLink", "description", "teamLeadId", "teamDistributionId"] + }, "SelfEducationQuestionSelectedAnswersDto": { "type": "object", "properties": { @@ -657,6 +3663,108 @@ "properties": { "id": { "type": "number" }, "githubId": { "type": "string" }, "name": { "type": "string" } }, "required": ["id", "githubId", "name"] }, + "Map": { "type": "object", "properties": {} }, + "NotificationUserSettingsDto": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "name": { "type": "string" }, + "enabled": { "type": "boolean" }, + "settings": { "$ref": "#/components/schemas/Map" } + }, + "required": ["id", "name", "enabled", "settings"] + }, + "UserNotificationsDto": { + "type": "object", + "properties": { + "notifications": { "type": "array", "items": { "$ref": "#/components/schemas/NotificationUserSettingsDto" } }, + "connections": { "$ref": "#/components/schemas/Map" } + }, + "required": ["notifications", "connections"] + }, + "NotificationUserConnectionsDto": { + "type": "object", + "properties": { "connections": { "$ref": "#/components/schemas/Map" } }, + "required": ["connections"] + }, + "UpdateNotificationUserSettingsDto": { + "type": "object", + "properties": { + "notificationId": { "type": "string" }, + "enabled": { "type": "boolean" }, + "channelId": { "type": "string" } + }, + "required": ["notificationId", "enabled", "channelId"] + }, + "NotificationConnectionExistsDto": { + "type": "object", + "properties": { + "channelId": { "type": "string" }, + "externalId": { "type": "string" }, + "userId": { "type": "number" } + }, + "required": ["channelId"] + }, + "NotificationConnectionDto": { + "type": "object", + "properties": { + "channelId": { "type": "string" }, + "externalId": { "type": "string" }, + "userId": { "type": "number" }, + "enabled": { "type": "boolean" } + }, + "required": ["channelId", "externalId", "userId", "enabled"] + }, + "UpsertNotificationConnectionDto": { + "type": "object", + "properties": { + "channelId": { "type": "string" }, + "externalId": { "type": "string" }, + "userId": { "type": "number" }, + "enabled": { "type": "boolean" } + }, + "required": ["channelId", "externalId", "userId", "enabled"] + }, + "SendUserNotificationDto": { + "type": "object", + "properties": { + "notificationId": { "type": "string" }, + "userId": { "type": "number" }, + "data": { "type": "object" }, + "expireDate": { "type": "number" } + }, + "required": ["notificationId", "userId", "data", "expireDate"] + }, + "NotificationType": { "type": "string", "enum": ["event", "message"] }, + "ChannelSettings": { + "type": "object", + "properties": { "channelId": { "type": "string" }, "template": { "type": "object" } }, + "required": ["channelId", "template"] + }, + "NotificationDto": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "name": { "type": "string" }, + "enabled": { "type": "boolean" }, + "type": { "$ref": "#/components/schemas/NotificationType" }, + "channels": { "type": "array", "items": { "$ref": "#/components/schemas/ChannelSettings" } }, + "parentId": { "type": "string" } + }, + "required": ["id", "name", "enabled", "type", "channels", "parentId"] + }, + "UpdateNotificationDto": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "name": { "type": "string" }, + "enabled": { "type": "boolean" }, + "channels": { "type": "array", "items": { "$ref": "#/components/schemas/ChannelSettings" } }, + "type": { "$ref": "#/components/schemas/NotificationType" }, + "parentId": { "type": "string" } + }, + "required": ["id", "name", "enabled", "channels", "type", "parentId"] + }, "AuthConnectionDto": { "type": "object", "properties": { "channelId": { "type": "string" }, "externalId": { "type": "string" } }, @@ -1292,6 +4400,59 @@ }, "required": ["userIds", "courseId", "comment", "badgeId"] }, + "BadgeDto": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "id": { + "type": "string", + "enum": [ + "Congratulations", + "Expert_help", + "Great_speaker", + "Good_job", + "Helping_hand", + "Hero", + "Thank_you", + "Outstanding_work", + "Top_performer", + "Job_Offer", + "RS_activist", + "Jury_Team" + ] + } + }, + "required": ["name", "id"] + }, + "HeroesRadarBadgeDto": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "badgeId": { "type": "string" }, + "comment": { "type": "string" }, + "date": { "type": "string" } + }, + "required": ["id", "badgeId", "comment", "date"] + }, + "HeroRadarDto": { + "type": "object", + "properties": { + "githubId": { "type": "string" }, + "name": { "type": "string" }, + "rank": { "type": "number" }, + "total": { "type": "number" }, + "badges": { "type": "array", "items": { "$ref": "#/components/schemas/HeroesRadarBadgeDto" } } + }, + "required": ["githubId", "name", "rank", "total", "badges"] + }, + "HeroesRadarDto": { + "type": "object", + "properties": { + "content": { "type": "array", "items": { "$ref": "#/components/schemas/HeroRadarDto" } }, + "pagination": { "$ref": "#/components/schemas/PaginationMetaDto" } + }, + "required": ["content", "pagination"] + }, "CountryDto": { "type": "object", "properties": { "countryName": { "type": "string" } },