refactor: adapt models to the new api

This commit is contained in:
Polianin Nikita 2024-12-18 06:50:41 +03:00
parent 21f89132ff
commit 3af8c43cd9
16 changed files with 40 additions and 466 deletions

View File

@ -1,29 +1,5 @@
/**
* 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.
*/
export interface CreateUserRequest {
email: string;
/**
* Gets or sets the username of the user.
*/
username: string;
/**
* Gets or sets the password of the user.
*/
password: string;
}
}

View File

@ -1,25 +1,4 @@
/**
* 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 interface LoginRequest {
/**
*
*/
username: string;
/**
*
*/
password: number;
password: string;
}

View File

@ -1,37 +1,7 @@
/**
* 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<number>;
/**
* 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<number>;
/**
* Gets or sets an array of professor IDs.
*/
professors?: Array<number>;
/**
* Gets or sets an array of lecture hall IDs.
*/
lectureHalls?: Array<number>;
groups?: Array<number>;
isEven?: boolean;
disciplines?: Array<number>;
professors?: Array<number>;
lectureHalls?: Array<number>;
}

View File

@ -1,29 +1,5 @@
/**
* 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 basic information about a campus.
*/
export interface CampusBasicInfoResponse {
/**
* Gets or sets the unique identifier of the campus.
*/
export interface CampusBasicInfoResponse {
id: number;
/**
* Gets or sets the code name of the campus.
*/
codeName: string;
/**
* Gets or sets the full name of the campus (optional).
*/
fullName?: string;
}
}

View File

@ -1,33 +1,6 @@
/**
* 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 detailed information about a campus.
*/
export interface CampusDetailsResponse {
/**
* Gets or sets the unique identifier of the campus.
*/
id: number;
/**
* Gets or sets the code name of the campus.
*/
codeName: string;
/**
* Gets or sets the full name of the campus (optional).
*/
fullName?: string;
/**
* Gets or sets the address of the campus (optional).
*/
address?: string;
}

View File

@ -1,25 +1,4 @@
/**
* 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 information about a discipline.
*/
export interface DisciplineResponse {
/**
* Gets or sets the unique identifier of the discipline.
*/
export interface DisciplineResponse {
id: number;
/**
* Gets or sets the name of the discipline.
*/
name: string;
}
}

View File

@ -1,25 +1,4 @@
/**
* 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.
*/
/**
* A class for providing information about an error
*/
export interface ErrorResponse {
/**
* The text or translation code of the error. This field may not contain information in specific scenarios. For example, it might be empty for HTTP 204 responses where no content is returned or if the validation texts have not been configured.
*/
export interface ErrorResponse {
error: string;
/**
* In addition to returning the response code in the header, it is also duplicated in this field. Represents the HTTP response code.
*/
code: number;
}
}

View File

@ -1,25 +1,4 @@
/**
* 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 basic information about a faculty.
*/
export interface FacultyResponse {
/**
* Gets or sets the unique identifier of the faculty.
*/
id: number;
/**
* Gets or sets the name of the faculty.
*/
name: string;
}

View File

@ -1,37 +1,7 @@
/**
* 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 detailed information about a group.
*/
export interface GroupDetailsResponse {
/**
* Gets or sets the unique identifier of the group.
*/
export interface GroupDetailsResponse {
id: number;
/**
* Gets or sets the name of the group.
*/
name: string;
/**
* Gets or sets the course number of the group.
*/
courseNumber: number;
/**
* Gets or sets the unique identifier of the faculty to which the group belongs (optional).
*/
facultyId?: number;
/**
* Gets or sets the name of the faculty to which the group belongs (optional).
*/
facultyName?: string;
}
}

View File

@ -1,33 +1,6 @@
/**
* 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 basic information about a group.
*/
export interface GroupResponse {
/**
* Gets or sets the unique identifier of the group.
*/
export interface GroupResponse {
id: number;
/**
* Gets or sets the name of the group.
*/
name: string;
/**
* Gets or sets the course number of the group.
*/
courseNumber: number;
/**
* Gets or sets the unique identifier of the faculty to which the group belongs (optional).
*/
facultyId?: number;
}
}

View File

@ -1,37 +1,7 @@
/**
* 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.
*/
export interface LectureHallDetailsResponse {
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;
}
}

View File

@ -1,29 +1,5 @@
/**
* 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.
*/
export interface LectureHallResponse {
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;
}
}

View File

@ -1,29 +1,5 @@
/**
* 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 information about a professor.
*/
export interface ProfessorResponse {
/**
* Gets or sets the unique identifier of the professor.
*/
export interface ProfessorResponse {
id: number;
/**
* Gets or sets the name of the professor.
*/
name: string;
/**
* Gets or sets the alternate name of the professor (optional).
*/
altName?: string;
}
}

View File

@ -1,84 +1,21 @@
/**
* 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<number>;
/**
* Gets or sets the type of occupation for the schedule entry.
*/
typeOfOccupations: Array<string>;
/**
* 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<string>;
/**
* Gets or sets the IDs of the lecture halls for the schedule entry.
*/
lectureHallsId: Array<number>;
/**
* Gets or sets the names of the professors for the schedule entry.
*/
professors: Array<string>;
/**
* Gets or sets the IDs of the professors for the schedule entry.
*/
professorsId: Array<number>;
/**
* Gets or sets the names of the campuses for the schedule entry.
*/
campus: Array<string>;
/**
* Gets or sets the IDs of the campuses for the schedule entry.
*/
campusId: Array<number>;
/**
* Gets or sets the links to online meetings for the schedule entry.
*/
linkToMeet: Array<string>;
lectureHalls: Array<string | null>;
lectureHallsId: Array<number | null>;
professors: Array<string | null>;
professorsId: Array<number | null>;
campus: Array<string | null>;
campusId: Array<number | null>;
linkToMeet: Array<string | null>;
}

View File

@ -1,23 +1,9 @@
/**
* 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
};
export enum DayOfWeek {
Sunday,
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday
}

View File

@ -1,29 +1,4 @@
/**
* 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;
}