From 58bdc6aa696600b543212dc3cc3dc0d73158ea96 Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Wed, 5 Jun 2024 21:36:51 +0300 Subject: [PATCH] feat: add api models --- src/shared/lectureHallResponse.ts | 5 -- src/shared/requests/v1/cacheRequest.ts | 29 +++++++ src/shared/requests/v1/createUserRequest.ts | 29 +++++++ src/shared/requests/v1/databaseRequest.ts | 41 +++++++++ src/shared/requests/v1/loggingRequest.ts | 29 +++++++ .../v1/scheduleConfigurationRequest.ts | 30 +++++++ src/shared/requests/v1/scheduleRequest.ts | 37 ++++++++ .../v1}/campusBasicInfoResponse.ts | 0 .../v1}/campusDetailsResponse.ts | 4 +- .../{ => responses/v1}/disciplineResponse.ts | 0 .../responses/v1/disciplineScheduleInfo.ts | 67 +++++++++++++++ .../v1/disciplineScheduleResponse.ts | 30 +++++++ src/shared/responses/v1/emailRequest.ts | 41 +++++++++ .../{ => responses/v1}/errorResponse.ts | 0 .../v1}/facultyDetailsResponse.ts | 0 .../{ => responses/v1}/facultyResponse.ts | 0 .../v1}/groupDetailsResponse.ts | 0 .../{ => responses/v1}/groupResponse.ts | 0 src/shared/responses/v1/groupScheduleInfo.ts | 75 +++++++++++++++++ .../responses/v1/groupScheduleResponse.ts | 30 +++++++ .../v1/lectureHallDetailsResponse.ts | 37 ++++++++ .../responses/v1/lectureHallResponse.ts | 29 +++++++ .../responses/v1/lectureHallScheduleInfo.ts | 76 +++++++++++++++++ .../v1/lectureHallScheduleResponse.ts | 30 +++++++ .../{ => responses/v1}/professorResponse.ts | 0 .../responses/v1/professorScheduleInfo.ts | 76 +++++++++++++++++ .../responses/v1/professorScheduleResponse.ts | 30 +++++++ src/shared/responses/v1/scheduleResponse.ts | 84 +++++++++++++++++++ src/shared/structs/dayOfWeek.ts | 23 +++++ src/shared/structs/pairPeriodTime.ts | 29 +++++++ 30 files changed, 854 insertions(+), 7 deletions(-) delete mode 100644 src/shared/lectureHallResponse.ts create mode 100644 src/shared/requests/v1/cacheRequest.ts create mode 100644 src/shared/requests/v1/createUserRequest.ts create mode 100644 src/shared/requests/v1/databaseRequest.ts create mode 100644 src/shared/requests/v1/loggingRequest.ts create mode 100644 src/shared/requests/v1/scheduleConfigurationRequest.ts create mode 100644 src/shared/requests/v1/scheduleRequest.ts rename src/shared/{ => responses/v1}/campusBasicInfoResponse.ts (100%) rename src/shared/{ => responses/v1}/campusDetailsResponse.ts (95%) rename src/shared/{ => responses/v1}/disciplineResponse.ts (100%) create mode 100644 src/shared/responses/v1/disciplineScheduleInfo.ts create mode 100644 src/shared/responses/v1/disciplineScheduleResponse.ts create mode 100644 src/shared/responses/v1/emailRequest.ts rename src/shared/{ => responses/v1}/errorResponse.ts (100%) rename src/shared/{ => responses/v1}/facultyDetailsResponse.ts (100%) rename src/shared/{ => responses/v1}/facultyResponse.ts (100%) rename src/shared/{ => responses/v1}/groupDetailsResponse.ts (100%) rename src/shared/{ => responses/v1}/groupResponse.ts (100%) create mode 100644 src/shared/responses/v1/groupScheduleInfo.ts create mode 100644 src/shared/responses/v1/groupScheduleResponse.ts create mode 100644 src/shared/responses/v1/lectureHallDetailsResponse.ts create mode 100644 src/shared/responses/v1/lectureHallResponse.ts create mode 100644 src/shared/responses/v1/lectureHallScheduleInfo.ts create mode 100644 src/shared/responses/v1/lectureHallScheduleResponse.ts rename src/shared/{ => responses/v1}/professorResponse.ts (100%) create mode 100644 src/shared/responses/v1/professorScheduleInfo.ts create mode 100644 src/shared/responses/v1/professorScheduleResponse.ts create mode 100644 src/shared/responses/v1/scheduleResponse.ts create mode 100644 src/shared/structs/dayOfWeek.ts create mode 100644 src/shared/structs/pairPeriodTime.ts diff --git a/src/shared/lectureHallResponse.ts b/src/shared/lectureHallResponse.ts deleted file mode 100644 index cd4e3cf..0000000 --- a/src/shared/lectureHallResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface LectureHallResponse { - id: number, - name: string, - campusId: number -} diff --git a/src/shared/requests/v1/cacheRequest.ts b/src/shared/requests/v1/cacheRequest.ts new file mode 100644 index 0000000..2e8f912 --- /dev/null +++ b/src/shared/requests/v1/cacheRequest.ts @@ -0,0 +1,29 @@ +/** + * MIREA Schedule Web API + * This API provides a convenient interface for retrieving data stored in the database. Special attention was paid to the lightweight and easy transfer of all necessary data. Made by the Winsomnia team. + * + * OpenAPI spec version: 1.0 + * Contact: support@winsomnia.net + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * Represents a request to configure cache settings. + */ +export interface CacheRequest { + /** + * Gets or sets the server address. + */ + server: string; + /** + * Gets or sets the port number. + */ + port: number; + /** + * Gets or sets the password. + */ + password?: string; +} \ No newline at end of file diff --git a/src/shared/requests/v1/createUserRequest.ts b/src/shared/requests/v1/createUserRequest.ts new file mode 100644 index 0000000..8afb2d2 --- /dev/null +++ b/src/shared/requests/v1/createUserRequest.ts @@ -0,0 +1,29 @@ +/** + * MIREA Schedule Web API + * This API provides a convenient interface for retrieving data stored in the database. Special attention was paid to the lightweight and easy transfer of all necessary data. Made by the Winsomnia team. + * + * OpenAPI spec version: 1.0 + * Contact: support@winsomnia.net + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * Request model for creating a user. + */ +export interface CreateUserRequest { + /** + * Gets or sets the email address of the user. + */ + email: string; + /** + * Gets or sets the username of the user. + */ + username: string; + /** + * Gets or sets the password of the user. + */ + password: string; +} \ No newline at end of file diff --git a/src/shared/requests/v1/databaseRequest.ts b/src/shared/requests/v1/databaseRequest.ts new file mode 100644 index 0000000..11bab60 --- /dev/null +++ b/src/shared/requests/v1/databaseRequest.ts @@ -0,0 +1,41 @@ +/** + * MIREA Schedule Web API + * This API provides a convenient interface for retrieving data stored in the database. Special attention was paid to the lightweight and easy transfer of all necessary data. Made by the Winsomnia team. + * + * OpenAPI spec version: 1.0 + * Contact: support@winsomnia.net + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * Represents a request to configure the database connection settings. + */ +export interface DatabaseRequest { + /** + * Gets or sets the server address. + */ + server: string; + /** + * Gets or sets the port number. + */ + port: number; + /** + * Gets or sets the database name. + */ + database: string; + /** + * Gets or sets the username. + */ + user: string; + /** + * Gets or sets a value indicating whether SSL is enabled. + */ + ssl: boolean; + /** + * Gets or sets the password. + */ + password?: string; +} \ No newline at end of file diff --git a/src/shared/requests/v1/loggingRequest.ts b/src/shared/requests/v1/loggingRequest.ts new file mode 100644 index 0000000..3f2d1cb --- /dev/null +++ b/src/shared/requests/v1/loggingRequest.ts @@ -0,0 +1,29 @@ +/** + * MIREA Schedule Web API + * This API provides a convenient interface for retrieving data stored in the database. Special attention was paid to the lightweight and easy transfer of all necessary data. Made by the Winsomnia team. + * + * OpenAPI spec version: 1.0 + * Contact: support@winsomnia.net + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * Represents a request to configure logging settings. + */ +export interface LoggingRequest { + /** + * Gets or sets a value indicating whether logging to file is enabled. + */ + enableLogToFile: boolean; + /** + * Gets or sets the log file name. + */ + logFileName?: string; + /** + * Gets or sets the log file path. + */ + logFilePath?: string; +} \ No newline at end of file diff --git a/src/shared/requests/v1/scheduleConfigurationRequest.ts b/src/shared/requests/v1/scheduleConfigurationRequest.ts new file mode 100644 index 0000000..8d15c1a --- /dev/null +++ b/src/shared/requests/v1/scheduleConfigurationRequest.ts @@ -0,0 +1,30 @@ +/** + * MIREA Schedule Web API + * This API provides a convenient interface for retrieving data stored in the database. Special attention was paid to the lightweight and easy transfer of all necessary data. Made by the Winsomnia team. + * + * OpenAPI spec version: 1.0 + * Contact: support@winsomnia.net + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import {PairPeriodTime} from "@model/pairPeriodTime"; + +/** + * Represents a request to configure the schedule settings. + */ +export interface ScheduleConfigurationRequest { + /** + * Gets or sets the cron expression for updating the schedule. + */ + cronUpdateSchedule?: string; + /** + * Gets or sets the start date of the term. + */ + startTerm: string; + /** + * Gets or sets the pair period times, keyed by pair number. + */ + pairPeriod: { [key: string]: PairPeriodTime; }; +} diff --git a/src/shared/requests/v1/scheduleRequest.ts b/src/shared/requests/v1/scheduleRequest.ts new file mode 100644 index 0000000..cce8737 --- /dev/null +++ b/src/shared/requests/v1/scheduleRequest.ts @@ -0,0 +1,37 @@ +/** + * MIREA Schedule Web API + * This API provides a convenient interface for retrieving data stored in the database. Special attention was paid to the lightweight and easy transfer of all necessary data. Made by the Winsomnia team. + * + * OpenAPI spec version: 1.0 + * Contact: support@winsomnia.net + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * Represents a request object for retrieving schedules based on various filters. + */ +export interface ScheduleRequest { + /** + * Gets or sets an array of group IDs. + */ + groups?: Array; + /** + * Gets or sets a value indicating whether to retrieve schedules for even weeks. + */ + isEven?: boolean; + /** + * Gets or sets an array of discipline IDs. + */ + disciplines?: Array; + /** + * Gets or sets an array of professor IDs. + */ + professors?: Array; + /** + * Gets or sets an array of lecture hall IDs. + */ + lectureHalls?: Array; +} \ No newline at end of file diff --git a/src/shared/campusBasicInfoResponse.ts b/src/shared/responses/v1/campusBasicInfoResponse.ts similarity index 100% rename from src/shared/campusBasicInfoResponse.ts rename to src/shared/responses/v1/campusBasicInfoResponse.ts diff --git a/src/shared/campusDetailsResponse.ts b/src/shared/responses/v1/campusDetailsResponse.ts similarity index 95% rename from src/shared/campusDetailsResponse.ts rename to src/shared/responses/v1/campusDetailsResponse.ts index 0af7cd5..20b2407 100644 --- a/src/shared/campusDetailsResponse.ts +++ b/src/shared/responses/v1/campusDetailsResponse.ts @@ -13,7 +13,7 @@ /** * Represents detailed information about a campus. */ -export interface CampusDetailsResponse { +export interface CampusDetailsResponse { /** * Gets or sets the unique identifier of the campus. */ @@ -30,4 +30,4 @@ export interface CampusDetailsResponse { * Gets or sets the address of the campus (optional). */ address?: string; -} \ No newline at end of file +} diff --git a/src/shared/disciplineResponse.ts b/src/shared/responses/v1/disciplineResponse.ts similarity index 100% rename from src/shared/disciplineResponse.ts rename to src/shared/responses/v1/disciplineResponse.ts diff --git a/src/shared/responses/v1/disciplineScheduleInfo.ts b/src/shared/responses/v1/disciplineScheduleInfo.ts new file mode 100644 index 0000000..7ea89ab --- /dev/null +++ b/src/shared/responses/v1/disciplineScheduleInfo.ts @@ -0,0 +1,67 @@ +/** + * MIREA Schedule Web API + * This API provides a convenient interface for retrieving data stored in the database. Special attention was paid to the lightweight and easy transfer of all necessary data. Made by the Winsomnia team. + * + * OpenAPI spec version: 1.0 + * Contact: support@winsomnia.net + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { DayOfWeek } from '../../structs/dayOfWeek'; + +/** + * Represents information about a specific schedule entry for a professor. + */ +export interface DisciplineScheduleInfo { + dayOfWeek: DayOfWeek; + /** + * Gets or sets the pair number for the schedule entry. + */ + pairNumber: number; + /** + * Gets or sets a value indicating whether the pair is on an even week. + */ + isEven: boolean; + /** + * Gets or sets the type of occupation for the schedule entry. + */ + typeOfOccupation: Array; + /** + * Gets or sets the names of the group for the schedule entry. + */ + group: string; + /** + * Gets or sets the IDs of the group for the schedule entry. + */ + groupId: number; + /** + * Gets or sets the names of the lecture halls for the schedule entry. + */ + lectureHalls: Array; + /** + * Gets or sets the IDs of the lecture halls for the schedule entry. + */ + lectureHallsId: Array; + /** + * Gets or sets the names of the professors for the schedule entry. + */ + professors: Array; + /** + * Gets or sets the IDs of the professors for the schedule entry. + */ + professorsId: Array; + /** + * Gets or sets the names of the campuses for the schedule entry. + */ + campus: Array; + /** + * Gets or sets the IDs of the campuses for the schedule entry. + */ + campusId: Array; + /** + * Gets or sets the links to online meetings for the schedule entry. + */ + linkToMeet: Array; +} diff --git a/src/shared/responses/v1/disciplineScheduleResponse.ts b/src/shared/responses/v1/disciplineScheduleResponse.ts new file mode 100644 index 0000000..14d9561 --- /dev/null +++ b/src/shared/responses/v1/disciplineScheduleResponse.ts @@ -0,0 +1,30 @@ +/** + * MIREA Schedule Web API + * This API provides a convenient interface for retrieving data stored in the database. Special attention was paid to the lightweight and easy transfer of all necessary data. Made by the Winsomnia team. + * + * OpenAPI spec version: 1.0 + * Contact: support@winsomnia.net + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { DisciplineScheduleInfo } from './disciplineScheduleInfo'; + +/** + * Represents a response containing schedule information for a professor. + */ +export interface DisciplineScheduleResponse { + /** + * Gets or sets the name of the discipline. + */ + discipline: string; + /** + * Gets or sets the ID of the discipline. + */ + disciplineId: number; + /** + * Gets or sets the schedules for the professor. + */ + schedules: Array; +} \ No newline at end of file diff --git a/src/shared/responses/v1/emailRequest.ts b/src/shared/responses/v1/emailRequest.ts new file mode 100644 index 0000000..02f5374 --- /dev/null +++ b/src/shared/responses/v1/emailRequest.ts @@ -0,0 +1,41 @@ +/** + * MIREA Schedule Web API + * This API provides a convenient interface for retrieving data stored in the database. Special attention was paid to the lightweight and easy transfer of all necessary data. Made by the Winsomnia team. + * + * OpenAPI spec version: 1.0 + * Contact: support@winsomnia.net + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * Represents a request to configure email settings. + */ +export interface EmailRequest { + /** + * Gets or sets the server address. + */ + server: string; + /** + * Gets or sets the email address from which emails will be sent. + */ + from: string; + /** + * Gets or sets the password for the email account. + */ + password: string; + /** + * Gets or sets the port number. + */ + port: number; + /** + * Gets or sets a value indicating whether SSL is enabled. + */ + ssl: boolean; + /** + * Gets or sets the username. + */ + user: string; +} \ No newline at end of file diff --git a/src/shared/errorResponse.ts b/src/shared/responses/v1/errorResponse.ts similarity index 100% rename from src/shared/errorResponse.ts rename to src/shared/responses/v1/errorResponse.ts diff --git a/src/shared/facultyDetailsResponse.ts b/src/shared/responses/v1/facultyDetailsResponse.ts similarity index 100% rename from src/shared/facultyDetailsResponse.ts rename to src/shared/responses/v1/facultyDetailsResponse.ts diff --git a/src/shared/facultyResponse.ts b/src/shared/responses/v1/facultyResponse.ts similarity index 100% rename from src/shared/facultyResponse.ts rename to src/shared/responses/v1/facultyResponse.ts diff --git a/src/shared/groupDetailsResponse.ts b/src/shared/responses/v1/groupDetailsResponse.ts similarity index 100% rename from src/shared/groupDetailsResponse.ts rename to src/shared/responses/v1/groupDetailsResponse.ts diff --git a/src/shared/groupResponse.ts b/src/shared/responses/v1/groupResponse.ts similarity index 100% rename from src/shared/groupResponse.ts rename to src/shared/responses/v1/groupResponse.ts diff --git a/src/shared/responses/v1/groupScheduleInfo.ts b/src/shared/responses/v1/groupScheduleInfo.ts new file mode 100644 index 0000000..8abcb20 --- /dev/null +++ b/src/shared/responses/v1/groupScheduleInfo.ts @@ -0,0 +1,75 @@ +/** + * MIREA Schedule Web API + * This API provides a convenient interface for retrieving data stored in the database. Special attention was paid to the lightweight and easy transfer of all necessary data. Made by the Winsomnia team. + * + * OpenAPI spec version: 1.0 + * Contact: support@winsomnia.net + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { DayOfWeek } from '@/shared/structs/dayOfWeek'; + +/** + * Represents information about a specific schedule entry for a group. + */ +export interface GroupScheduleInfo { + dayOfWeek: DayOfWeek; + /** + * Gets or sets the pair number for the schedule entry. + */ + pairNumber: number; + /** + * Gets or sets a value indicating whether the pair is on an even week. + */ + isEven: boolean; + /** + * Gets or sets the name of the discipline for the schedule entry. + */ + discipline: string; + /** + * Gets or sets the ID of the discipline for the schedule entry. + */ + disciplineId: number; + /** + * Gets or sets exclude or include weeks for a specific discipline. + */ + isExcludedWeeks?: boolean; + /** + * The week numbers required for the correct display of the schedule. Whether there will be Mirea.Api.Dto.Responses.Schedule.GroupScheduleInfo.Discipline during the week or not depends on the Mirea.Api.Dto.Responses.Schedule.GroupScheduleInfo.IsExcludedWeeks property. + */ + weeks?: Array; + /** + * Gets or sets the type of occupation for the schedule entry. + */ + typeOfOccupations: Array; + /** + * Gets or sets the names of the lecture halls for the schedule entry. + */ + lectureHalls: Array; + /** + * Gets or sets the IDs of the lecture halls for the schedule entry. + */ + lectureHallsId: Array; + /** + * Gets or sets the names of the professors for the schedule entry. + */ + professors: Array; + /** + * Gets or sets the IDs of the professors for the schedule entry. + */ + professorsId: Array; + /** + * Gets or sets the names of the campuses for the schedule entry. + */ + campus: Array; + /** + * Gets or sets the IDs of the campuses for the schedule entry. + */ + campusId: Array; + /** + * Gets or sets the links to online meetings for the schedule entry. + */ + linkToMeet: Array; +} diff --git a/src/shared/responses/v1/groupScheduleResponse.ts b/src/shared/responses/v1/groupScheduleResponse.ts new file mode 100644 index 0000000..27ccf41 --- /dev/null +++ b/src/shared/responses/v1/groupScheduleResponse.ts @@ -0,0 +1,30 @@ +/** + * MIREA Schedule Web API + * This API provides a convenient interface for retrieving data stored in the database. Special attention was paid to the lightweight and easy transfer of all necessary data. Made by the Winsomnia team. + * + * OpenAPI spec version: 1.0 + * Contact: support@winsomnia.net + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { GroupScheduleInfo } from './groupScheduleInfo'; + +/** + * Represents a response containing schedule information for a group. + */ +export interface GroupScheduleResponse { + /** + * Gets or sets the name of the group. + */ + group: string; + /** + * Gets or sets the ID of the group. + */ + groupId: number; + /** + * Gets or sets the schedules for the group. + */ + schedules: Array; +} \ No newline at end of file diff --git a/src/shared/responses/v1/lectureHallDetailsResponse.ts b/src/shared/responses/v1/lectureHallDetailsResponse.ts new file mode 100644 index 0000000..ec9defe --- /dev/null +++ b/src/shared/responses/v1/lectureHallDetailsResponse.ts @@ -0,0 +1,37 @@ +/** + * MIREA Schedule Web API + * This API provides a convenient interface for retrieving data stored in the database. Special attention was paid to the lightweight and easy transfer of all necessary data. Made by the Winsomnia team. + * + * OpenAPI spec version: 1.0 + * Contact: support@winsomnia.net + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * Represents the detailed response model for a lecture hall. + */ +export interface LectureHallDetailsResponse { + /** + * Gets or sets the ID of the lecture hall. + */ + id: number; + /** + * Gets or sets the name of the lecture hall. + */ + name: string; + /** + * Gets or sets the ID of the campus to which the lecture hall belongs. + */ + campusId: number; + /** + * Gets or sets the name of the campus. + */ + campusName?: string; + /** + * Gets or sets the code of the campus. + */ + campusCode?: string; +} \ No newline at end of file diff --git a/src/shared/responses/v1/lectureHallResponse.ts b/src/shared/responses/v1/lectureHallResponse.ts new file mode 100644 index 0000000..4aa5e62 --- /dev/null +++ b/src/shared/responses/v1/lectureHallResponse.ts @@ -0,0 +1,29 @@ +/** + * MIREA Schedule Web API + * This API provides a convenient interface for retrieving data stored in the database. Special attention was paid to the lightweight and easy transfer of all necessary data. Made by the Winsomnia team. + * + * OpenAPI spec version: 1.0 + * Contact: support@winsomnia.net + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * Represents the response model for a lecture hall. + */ +export interface LectureHallResponse { + /** + * Gets or sets the ID of the lecture hall. + */ + id: number; + /** + * Gets or sets the name of the lecture hall. + */ + name: string; + /** + * Gets or sets the ID of the campus to which the lecture hall belongs. + */ + campusId: number; +} \ No newline at end of file diff --git a/src/shared/responses/v1/lectureHallScheduleInfo.ts b/src/shared/responses/v1/lectureHallScheduleInfo.ts new file mode 100644 index 0000000..7fa0eb4 --- /dev/null +++ b/src/shared/responses/v1/lectureHallScheduleInfo.ts @@ -0,0 +1,76 @@ +/** + * MIREA Schedule Web API + * This API provides a convenient interface for retrieving data stored in the database. Special attention was paid to the lightweight and easy transfer of all necessary data. Made by the Winsomnia team. + * + * OpenAPI spec version: 1.0 + * Contact: support@winsomnia.net + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import {DayOfWeek} from "@model/dayOfWeek"; + +/** + * Represents information about a specific schedule entry for a lecture hall. + */ +export interface LectureHallScheduleInfo { + dayOfWeek: DayOfWeek; + /** + * Gets or sets the pair number for the schedule entry. + */ + pairNumber: number; + /** + * Gets or sets a value indicating whether the pair is on an even week. + */ + isEven: boolean; + /** + * Gets or sets the name of the discipline for the schedule entry. + */ + discipline: string; + /** + * Gets or sets the ID of the discipline for the schedule entry. + */ + disciplineId: number; + /** + * Gets or sets exclude or include weeks for a specific discipline. + */ + isExcludedWeeks?: boolean; + /** + * The week numbers required for the correct display of the schedule. Whether there will be Mirea.Api.Dto.Responses.Schedule.LectureHallScheduleInfo.Discipline during the week or not depends on the Mirea.Api.Dto.Responses.Schedule.LectureHallScheduleInfo.IsExcludedWeeks property. + */ + weeks?: Array; + /** + * Gets or sets the type of occupation for the schedule entry. + */ + typeOfOccupations: Array; + /** + * Gets or sets the names of the group for the schedule entry. + */ + group: string; + /** + * Gets or sets the IDs of the group for the schedule entry. + */ + groupId: number; + /** + * Gets or sets the names of the campuses for the schedule entry. + */ + campus: Array; + /** + * Gets or sets the IDs of the campuses for the schedule entry. + */ + campusId: Array; + /** + * Gets or sets the names of the professors for the schedule entry. + */ + professors: Array; + /** + * Gets or sets the IDs of the professors for the schedule entry. + */ + professorsId: Array; + /** + * Gets or sets the links to online meetings for the schedule entry. + */ + linkToMeet: Array; +} diff --git a/src/shared/responses/v1/lectureHallScheduleResponse.ts b/src/shared/responses/v1/lectureHallScheduleResponse.ts new file mode 100644 index 0000000..dd44c14 --- /dev/null +++ b/src/shared/responses/v1/lectureHallScheduleResponse.ts @@ -0,0 +1,30 @@ +/** + * MIREA Schedule Web API + * This API provides a convenient interface for retrieving data stored in the database. Special attention was paid to the lightweight and easy transfer of all necessary data. Made by the Winsomnia team. + * + * OpenAPI spec version: 1.0 + * Contact: support@winsomnia.net + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { LectureHallScheduleInfo } from './lectureHallScheduleInfo'; + +/** + * Represents a response containing schedule information for a lecture hall. + */ +export interface LectureHallScheduleResponse { + /** + * Gets or sets the names of the lecture halls. + */ + lectureHalls: string; + /** + * Gets or sets the IDs of the lecture halls. + */ + lectureHallsId: number; + /** + * Gets or sets the schedules for the lecture hall. + */ + schedules: Array; +} \ No newline at end of file diff --git a/src/shared/professorResponse.ts b/src/shared/responses/v1/professorResponse.ts similarity index 100% rename from src/shared/professorResponse.ts rename to src/shared/responses/v1/professorResponse.ts diff --git a/src/shared/responses/v1/professorScheduleInfo.ts b/src/shared/responses/v1/professorScheduleInfo.ts new file mode 100644 index 0000000..96b5e99 --- /dev/null +++ b/src/shared/responses/v1/professorScheduleInfo.ts @@ -0,0 +1,76 @@ +/** + * MIREA Schedule Web API + * This API provides a convenient interface for retrieving data stored in the database. Special attention was paid to the lightweight and easy transfer of all necessary data. Made by the Winsomnia team. + * + * OpenAPI spec version: 1.0 + * Contact: support@winsomnia.net + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import {DayOfWeek} from "@model/dayOfWeek"; + +/** + * Represents information about a specific schedule entry for a professor. + */ +export interface ProfessorScheduleInfo { + dayOfWeek: DayOfWeek; + /** + * Gets or sets the pair number for the schedule entry. + */ + pairNumber: number; + /** + * Gets or sets a value indicating whether the pair is on an even week. + */ + isEven: boolean; + /** + * Gets or sets the name of the discipline for the schedule entry. + */ + discipline: string; + /** + * Gets or sets the ID of the discipline for the schedule entry. + */ + disciplineId: number; + /** + * Gets or sets exclude or include weeks for a specific discipline. + */ + isExcludedWeeks?: boolean; + /** + * The week numbers required for the correct display of the schedule. Whether there will be Mirea.Api.Dto.Responses.Schedule.ProfessorScheduleInfo.Discipline during the week or not depends on the Mirea.Api.Dto.Responses.Schedule.ProfessorScheduleInfo.IsExcludedWeeks property. + */ + weeks?: Array; + /** + * Gets or sets the type of occupation for the schedule entry. + */ + typeOfOccupations: Array; + /** + * Gets or sets the names of the group for the schedule entry. + */ + group: string; + /** + * Gets or sets the IDs of the group for the schedule entry. + */ + groupId: number; + /** + * Gets or sets the names of the lecture halls for the schedule entry. + */ + lectureHalls: Array; + /** + * Gets or sets the IDs of the lecture halls for the schedule entry. + */ + lectureHallsId: Array; + /** + * Gets or sets the names of the campuses for the schedule entry. + */ + campus: Array; + /** + * Gets or sets the IDs of the campuses for the schedule entry. + */ + campusId: Array; + /** + * Gets or sets the links to online meetings for the schedule entry. + */ + linkToMeet: Array; +} diff --git a/src/shared/responses/v1/professorScheduleResponse.ts b/src/shared/responses/v1/professorScheduleResponse.ts new file mode 100644 index 0000000..5e23711 --- /dev/null +++ b/src/shared/responses/v1/professorScheduleResponse.ts @@ -0,0 +1,30 @@ +/** + * MIREA Schedule Web API + * This API provides a convenient interface for retrieving data stored in the database. Special attention was paid to the lightweight and easy transfer of all necessary data. Made by the Winsomnia team. + * + * OpenAPI spec version: 1.0 + * Contact: support@winsomnia.net + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { ProfessorScheduleInfo } from './professorScheduleInfo'; + +/** + * Represents a response containing schedule information for a professor. + */ +export interface ProfessorScheduleResponse { + /** + * Gets or sets the name of the professor. + */ + professor: string; + /** + * Gets or sets the ID of the professor. + */ + professorId: number; + /** + * Gets or sets the schedules for the professor. + */ + schedules: Array; +} \ No newline at end of file diff --git a/src/shared/responses/v1/scheduleResponse.ts b/src/shared/responses/v1/scheduleResponse.ts new file mode 100644 index 0000000..ed9a6ab --- /dev/null +++ b/src/shared/responses/v1/scheduleResponse.ts @@ -0,0 +1,84 @@ +/** + * MIREA Schedule Web API + * This API provides a convenient interface for retrieving data stored in the database. Special attention was paid to the lightweight and easy transfer of all necessary data. Made by the Winsomnia team. + * + * OpenAPI spec version: 1.0 + * Contact: support@winsomnia.net + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import {DayOfWeek} from "@model/dayOfWeek"; + +/** + * Represents a response object containing schedule information. + */ +export interface ScheduleResponse { + dayOfWeek: DayOfWeek; + /** + * Gets or sets the pair number for the schedule entry. + */ + pairNumber: number; + /** + * Gets or sets a value indicating whether the pair is on an even week. + */ + isEven: boolean; + /** + * Gets or sets the name of the discipline for the schedule entry. + */ + discipline: string; + /** + * Gets or sets the ID of the discipline for the schedule entry. + */ + disciplineId: number; + /** + * Gets or sets exclude or include weeks for a specific discipline. + */ + isExcludedWeeks?: boolean; + /** + * The week numbers required for the correct display of the schedule. Whether there will be Mirea.Api.Dto.Responses.Schedule.ScheduleResponse.Discipline during the week or not depends on the Mirea.Api.Dto.Responses.Schedule.ScheduleResponse.IsExcludedWeeks property. + */ + weeks?: Array; + /** + * Gets or sets the type of occupation for the schedule entry. + */ + typeOfOccupations: Array; + /** + * Gets or sets the name of the group for the schedule entry. + */ + group: string; + /** + * Gets or sets the ID of the group for the schedule entry. + */ + groupId: number; + /** + * Gets or sets the names of the lecture halls for the schedule entry. + */ + lectureHalls: Array; + /** + * Gets or sets the IDs of the lecture halls for the schedule entry. + */ + lectureHallsId: Array; + /** + * Gets or sets the names of the professors for the schedule entry. + */ + professors: Array; + /** + * Gets or sets the IDs of the professors for the schedule entry. + */ + professorsId: Array; + /** + * Gets or sets the names of the campuses for the schedule entry. + */ + campus: Array; + /** + * Gets or sets the IDs of the campuses for the schedule entry. + */ + campusId: Array; + /** + * Gets or sets the links to online meetings for the schedule entry. + */ + linkToMeet: Array; +} diff --git a/src/shared/structs/dayOfWeek.ts b/src/shared/structs/dayOfWeek.ts new file mode 100644 index 0000000..3fd0c8f --- /dev/null +++ b/src/shared/structs/dayOfWeek.ts @@ -0,0 +1,23 @@ +/** + * MIREA Schedule Web API + * This API provides a convenient interface for retrieving data stored in the database. Special attention was paid to the lightweight and easy transfer of all necessary data. Made by the Winsomnia team. + * + * OpenAPI spec version: 1.0 + * Contact: support@winsomnia.net + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +export type DayOfWeek = 0 | 1 | 2 | 3 | 4 | 5 | 6; + +export const DayOfWeek = { + NUMBER_0: 0 as DayOfWeek, + NUMBER_1: 1 as DayOfWeek, + NUMBER_2: 2 as DayOfWeek, + NUMBER_3: 3 as DayOfWeek, + NUMBER_4: 4 as DayOfWeek, + NUMBER_5: 5 as DayOfWeek, + NUMBER_6: 6 as DayOfWeek +}; \ No newline at end of file diff --git a/src/shared/structs/pairPeriodTime.ts b/src/shared/structs/pairPeriodTime.ts new file mode 100644 index 0000000..ce43f81 --- /dev/null +++ b/src/shared/structs/pairPeriodTime.ts @@ -0,0 +1,29 @@ +/** + * MIREA Schedule Web API + * This API provides a convenient interface for retrieving data stored in the database. Special attention was paid to the lightweight and easy transfer of all necessary data. Made by the Winsomnia team. + * + * OpenAPI spec version: 1.0 + * Contact: support@winsomnia.net + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * Represents a pair of time periods. + */ +export interface PairPeriodTime { + /** + * Gets or sets the start time of the period. + */ + start: string; + /** + * Gets or sets the end time of the period. + */ + end: string; +} + +export interface PeriodTimes { + [key: string]: PairPeriodTime; +}