refactor: adapt models to the new api

This commit is contained in:
2024-12-18 06:48:51 +03:00
parent 99958a2383
commit 21f89132ff
37 changed files with 199 additions and 189 deletions

@ -0,0 +1,5 @@
export interface CampusBasicInfoResponse {
id: number;
codeName: string;
fullName?: string;
}

@ -0,0 +1,6 @@
export interface CampusDetailsResponse {
id: number;
codeName: string;
fullName?: string;
address?: string;
}

@ -0,0 +1,4 @@
export interface DisciplineResponse {
id: number;
name: string;
}

@ -0,0 +1,4 @@
export interface ErrorResponse {
error: string;
code: number;
}

@ -0,0 +1,4 @@
export interface FacultyResponse {
id: number;
name: string;
}

@ -0,0 +1,7 @@
export interface GroupDetailsResponse {
id: number;
name: string;
courseNumber: number;
facultyId?: number;
facultyName?: string;
}

@ -0,0 +1,6 @@
export interface GroupResponse {
id: number;
name: string;
courseNumber: number;
facultyId?: number;
}

@ -0,0 +1,7 @@
export interface LectureHallDetailsResponse {
id: number;
name: string;
campusId: number;
campusName?: string;
campusCode?: string;
}

@ -0,0 +1,5 @@
export interface LectureHallResponse {
id: number;
name: string;
campusId: number;
}

@ -0,0 +1,5 @@
export interface ProfessorResponse {
id: number;
name: string;
altName?: string;
}

@ -0,0 +1,21 @@
import {DayOfWeek} from "@model/dayOfWeek";
export interface ScheduleResponse {
dayOfWeek: DayOfWeek;
pairNumber: number;
isEven: boolean;
discipline: string;
disciplineId: number;
isExcludedWeeks?: boolean;
weeks?: Array<number>;
typeOfOccupations: Array<string>;
group: string;
groupId: number;
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>;
}

@ -0,0 +1,7 @@
import {OAuthProvider} from "@model/oAuthProvider";
export interface AvailableOAuthProvidersResponse {
providerName: string;
provider: OAuthProvider;
redirect: string;
}

@ -0,0 +1,8 @@
import {CacheType} from "@model/cacheType";
export interface CacheResponse {
type: CacheType;
server?: string;
port: number;
password?: string;
}

@ -0,0 +1,12 @@
import {DatabaseType} from "@model/databaseType";
export interface DatabaseResponse {
type: DatabaseType;
server?: string;
port: number;
database?: string;
user?: string;
ssl: boolean;
password?: string;
pathToDatabase?: string;
}

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

@ -1,25 +0,0 @@
/**
* 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 TokenResponse {
/**
*
*/
accessToken : string;
/**
*
*/
expiresIn: Date;
}

@ -0,0 +1,8 @@
import {OAuthProvider} from "@model/oAuthProvider";
export interface UserResponse {
email: string;
username: string;
twoFactorAuthenticatorEnabled: boolean;
usedOAuthProviders: OAuthProvider[];
}