zdu-student-api 1.1.6 → 1.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +231 -18
  3. package/dist/cabinet/cabinet.d.ts +79 -79
  4. package/dist/cabinet/cabinet.js +162 -162
  5. package/dist/cabinet/data.d.ts +33 -4
  6. package/dist/cabinet/data.js +52 -6
  7. package/dist/cabinet/disciplines.d.ts +19 -19
  8. package/dist/cabinet/disciplines.js +87 -87
  9. package/dist/cabinet/index.d.ts +2 -5
  10. package/dist/cabinet/index.js +2 -5
  11. package/dist/cabinet/parsers.d.ts +22 -3
  12. package/dist/cabinet/parsers.js +118 -0
  13. package/dist/cabinet/scores.d.ts +12 -12
  14. package/dist/cabinet/scores.js +101 -101
  15. package/dist/cabinet/sesId.d.ts +10 -10
  16. package/dist/cabinet/sesId.js +40 -40
  17. package/dist/cabinet/session.d.ts +33 -0
  18. package/dist/cabinet/session.js +99 -0
  19. package/dist/cabinet/types.d.ts +0 -137
  20. package/dist/cabinet/utils.d.ts +6 -6
  21. package/dist/cabinet/utils.js +16 -19
  22. package/dist/cabinet/validSession.d.ts +8 -8
  23. package/dist/cabinet/validSession.js +29 -29
  24. package/dist/cabinetStudent/cabinetStudent.d.ts +87 -0
  25. package/dist/cabinetStudent/cabinetStudent.js +185 -0
  26. package/dist/cabinetStudent/disciplines.d.ts +19 -0
  27. package/dist/cabinetStudent/disciplines.js +86 -0
  28. package/dist/cabinetStudent/index.d.ts +4 -0
  29. package/dist/cabinetStudent/index.js +4 -0
  30. package/dist/cabinetStudent/scores.d.ts +12 -0
  31. package/dist/cabinetStudent/scores.js +103 -0
  32. package/dist/cabinetStudent/types.d.ts +137 -0
  33. package/dist/cabinetStudent/types.js +1 -0
  34. package/dist/cabinetTeacher/academicGroups.d.ts +10 -0
  35. package/dist/cabinetTeacher/academicGroups.js +36 -0
  36. package/dist/cabinetTeacher/cabinetTeacher.d.ts +71 -0
  37. package/dist/cabinetTeacher/cabinetTeacher.js +132 -0
  38. package/dist/cabinetTeacher/index.d.ts +3 -0
  39. package/dist/cabinetTeacher/index.js +3 -0
  40. package/dist/cabinetTeacher/types.d.ts +68 -0
  41. package/dist/cabinetTeacher/types.js +1 -0
  42. package/dist/examples.d.ts +1 -1
  43. package/dist/examples.js +50 -38
  44. package/dist/index.d.ts +2 -0
  45. package/dist/index.js +2 -0
  46. package/dist/types.d.ts +4 -3
  47. package/package.json +35 -34
@@ -1,40 +1,40 @@
1
- import fetch from 'cross-fetch';
2
- import iconv from 'iconv-lite';
3
- /**
4
- * Отримати sesID та sessGUID користувача
5
- * @category Cabinet
6
- * @param login - Прізвище користувача
7
- * @param password - Пароль
8
- * @throws {Error} Якщо виникають проблеми з запитом або дані некоректні.
9
- * @returns Об'єкт { sesID, sessGUID }
10
- */
11
- export async function getSesId(login, password) {
12
- try {
13
- const formData = `user_name=${login}&user_pwd=${password}&n=1&rout=&t=16161`;
14
- const encodedFormData = iconv.encode(formData, 'windows-1251');
15
- const response = await fetch('https://dekanat.zu.edu.ua/cgi-bin/classman.cgi?n=1&ts=16161', {
16
- method: 'POST',
17
- body: new Uint8Array(encodedFormData),
18
- redirect: 'manual',
19
- });
20
- if (response.status === 302) {
21
- const buffer = await response.arrayBuffer();
22
- const responseText = iconv.decode(Buffer.from(buffer), 'utf-8');
23
- const cookies = response.headers.get('set-cookie');
24
- let sessGUID = '';
25
- if (cookies) {
26
- const sessGUIDStart = cookies.indexOf('SessGUID=') + 'SessGUID='.length;
27
- const sessGUIDEnd = cookies.indexOf(';', sessGUIDStart);
28
- sessGUID = cookies.substring(sessGUIDStart, sessGUIDEnd);
29
- }
30
- const sesIDIndex = responseText.indexOf('sesID=') + 6;
31
- const sesID = responseText.substring(sesIDIndex, sesIDIndex + 36);
32
- return { ok: true, sesID, sessGUID };
33
- }
34
- return { ok: false, sesID: '', sessGUID: '' };
35
- }
36
- catch (e) {
37
- console.error('Error in getSesID:', e);
38
- throw e;
39
- }
40
- }
1
+ import fetch from 'cross-fetch';
2
+ import iconv from 'iconv-lite';
3
+ /**
4
+ * Отримати sesID та sessGUID користувача
5
+ * @category Cabinet
6
+ * @param login - Прізвище користувача
7
+ * @param password - Пароль
8
+ * @throws {Error} Якщо виникають проблеми з запитом або дані некоректні.
9
+ * @returns Об'єкт { sesID, sessGUID }
10
+ */
11
+ export async function getSesId(login, password) {
12
+ try {
13
+ const formData = `user_name=${login}&user_pwd=${password}&n=1&rout=&t=16161`;
14
+ const encodedFormData = iconv.encode(formData, 'windows-1251');
15
+ const response = await fetch('https://dekanat.zu.edu.ua/cgi-bin/classman.cgi?n=1&ts=16161', {
16
+ method: 'POST',
17
+ body: new Uint8Array(encodedFormData),
18
+ redirect: 'manual',
19
+ });
20
+ if (response.status === 302) {
21
+ const buffer = await response.arrayBuffer();
22
+ const responseText = iconv.decode(Buffer.from(buffer), 'utf-8');
23
+ const cookies = response.headers.get('set-cookie');
24
+ let sessGUID = '';
25
+ if (cookies) {
26
+ const sessGUIDStart = cookies.indexOf('SessGUID=') + 'SessGUID='.length;
27
+ const sessGUIDEnd = cookies.indexOf(';', sessGUIDStart);
28
+ sessGUID = cookies.substring(sessGUIDStart, sessGUIDEnd);
29
+ }
30
+ const sesIDIndex = responseText.indexOf('sesID=') + 6;
31
+ const sesID = responseText.substring(sesIDIndex, sesIDIndex + 36);
32
+ return { ok: true, sesID, sessGUID };
33
+ }
34
+ return { ok: false, sesID: '', sessGUID: '' };
35
+ }
36
+ catch (e) {
37
+ console.error('Error in getSesID:', e);
38
+ throw e;
39
+ }
40
+ }
@@ -0,0 +1,33 @@
1
+ import { SessionData } from './types.js';
2
+ /**
3
+ * Отримати sesID та sessGUID користувача
4
+ * @category Cabinet
5
+ * @param login - Прізвище користувача
6
+ * @param password - Пароль
7
+ * @param type - тип кабінету 'student' | 'teacher'
8
+ * @throws {Error} Якщо виникають проблеми з запитом або дані некоректні.
9
+ * @returns Об'єкт { sesID, sessGUID }
10
+ */
11
+ export declare function getSesId(login: string, password: string, type: 'student' | 'teacher'): Promise<SessionData>;
12
+ /**
13
+ * Перевірка на валідність сесії
14
+ * @category Cabinet
15
+ * @param sesId - ID сесії користувача
16
+ * @param sessGUID - GUID сесії з cookie
17
+ * @param type - тип кабінету 'student' | 'teacher'
18
+ * @returns boolean значення.
19
+ */
20
+ export declare function isValidSession(sesId: string, sessGUID: string, type: 'student' | 'teacher'): Promise<boolean>;
21
+ /**
22
+ * Генерує cookie строку з DateTime та SessGUID
23
+ * @category Cabinet
24
+ * @param sessGUID - GUID сесії з cookie
25
+ * @returns cookie рядок
26
+ */
27
+ export declare function generateCookieString(sessGUID: string): string;
28
+ /**
29
+ * Перевірка чи є отримана сторінка сторінкою авторизації
30
+ * @category Cabinet
31
+ * @returns true | false
32
+ */
33
+ export declare function isLoginPage(html: string): boolean;
@@ -0,0 +1,99 @@
1
+ import fetch from 'cross-fetch';
2
+ import iconv from 'iconv-lite';
3
+ /**
4
+ * Отримати sesID та sessGUID користувача
5
+ * @category Cabinet
6
+ * @param login - Прізвище користувача
7
+ * @param password - Пароль
8
+ * @param type - тип кабінету 'student' | 'teacher'
9
+ * @throws {Error} Якщо виникають проблеми з запитом або дані некоректні.
10
+ * @returns Об'єкт { sesID, sessGUID }
11
+ */
12
+ export async function getSesId(login, password, type) {
13
+ try {
14
+ const urlStudent = 'https://dekanat.zu.edu.ua/cgi-bin/classman.cgi?n=1&ts=16161';
15
+ const urlTeacher = 'https://dekanat.zu.edu.ua/cgi-bin/kaf.cgi?n=1&ts=28888';
16
+ const formData = `user_name=${login}&user_pwd=${password}${type == 'student' ? '&n=1&rout=&t=16161' : '&n=1&rout=&t=1'}`;
17
+ const encodedFormData = iconv.encode(formData, 'windows-1251');
18
+ const response = await fetch(type == 'student' ? urlStudent : urlTeacher, {
19
+ method: 'POST',
20
+ body: new Uint8Array(encodedFormData),
21
+ redirect: 'manual',
22
+ });
23
+ if (response.status === 302) {
24
+ const buffer = await response.arrayBuffer();
25
+ const responseText = iconv.decode(Buffer.from(buffer), 'utf-8');
26
+ const cookies = response.headers.get('set-cookie');
27
+ let sessGUID = '';
28
+ if (cookies) {
29
+ const sessGUIDStart = cookies.indexOf('SessGUID=') + 'SessGUID='.length;
30
+ const sessGUIDEnd = cookies.indexOf(';', sessGUIDStart);
31
+ sessGUID = cookies.substring(sessGUIDStart, sessGUIDEnd);
32
+ }
33
+ const sesIDIndex = responseText.indexOf('sesID=') + 6;
34
+ const sesID = responseText.substring(sesIDIndex, sesIDIndex + 36);
35
+ return { ok: true, sesID, sessGUID };
36
+ }
37
+ return { ok: false, sesID: '', sessGUID: '' };
38
+ }
39
+ catch (e) {
40
+ console.error('Error in getSesID:', e);
41
+ throw e;
42
+ }
43
+ }
44
+ /**
45
+ * Перевірка на валідність сесії
46
+ * @category Cabinet
47
+ * @param sesId - ID сесії користувача
48
+ * @param sessGUID - GUID сесії з cookie
49
+ * @param type - тип кабінету 'student' | 'teacher'
50
+ * @returns boolean значення.
51
+ */
52
+ export async function isValidSession(sesId, sessGUID, type) {
53
+ const urlStudent = 'https://dekanat.zu.edu.ua/cgi-bin/classman.cgi?n=3&sesID=';
54
+ const urlTeacher = 'https://dekanat.zu.edu.ua/cgi-bin/kaf.cgi?n=2&sesID=';
55
+ try {
56
+ const cookieString = generateCookieString(sessGUID);
57
+ const response = await fetch(`${type == 'student' ? urlStudent : urlTeacher}${sesId}`, {
58
+ headers: {
59
+ Cookie: cookieString,
60
+ },
61
+ });
62
+ const buffer = await response.arrayBuffer();
63
+ const html = iconv.decode(Buffer.from(buffer), 'windows-1251');
64
+ if (!isLoginPage(html)) {
65
+ return true;
66
+ }
67
+ return false;
68
+ }
69
+ catch {
70
+ return false;
71
+ }
72
+ }
73
+ /**
74
+ * Генерує cookie строку з DateTime та SessGUID
75
+ * @category Cabinet
76
+ * @param sessGUID - GUID сесії з cookie
77
+ * @returns cookie рядок
78
+ */
79
+ export function generateCookieString(sessGUID) {
80
+ const now = new Date();
81
+ const day = String(now.getDate()).padStart(2, '0');
82
+ const month = String(now.getMonth() + 1).padStart(2, '0');
83
+ const year = now.getFullYear();
84
+ const hours = String(now.getHours()).padStart(2, '0');
85
+ const minutes = String(now.getMinutes()).padStart(2, '0');
86
+ const seconds = String(now.getSeconds()).padStart(2, '0');
87
+ const dateTime = `${day}.${month}.${year}+${hours}%3A${minutes}%3A${seconds}`;
88
+ return `DateTime=${dateTime}; SessGUID=${sessGUID}`;
89
+ }
90
+ /**
91
+ * Перевірка чи є отримана сторінка сторінкою авторизації
92
+ * @category Cabinet
93
+ * @returns true | false
94
+ */
95
+ export function isLoginPage(html) {
96
+ return (html.includes('Авторизація користувача') ||
97
+ html.includes('user_name') ||
98
+ html.includes('Недійсний ідентифікатор сесії користувача'));
99
+ }
@@ -11,140 +11,3 @@ export interface SessionData {
11
11
  sesID: string;
12
12
  sessGUID: string;
13
13
  }
14
- /**
15
- * Анкетні дані студента
16
- * @category Cabinet
17
- * @remarks
18
- * **Статус запиту:**
19
- * - `ok` — Успіх отримання даних (true/false)
20
- *
21
- * **ПІБ студента:**
22
- * - `fullName` — Повне ім'я студента (Прізвище Ім'я По батькові)
23
- * - `lastName` — Прізвище
24
- * - `firstName` — Ім'я
25
- * - `middleName` — По батькові
26
- *
27
- * **Загальні дані:**
28
- * - `birthDate` — Дата народження (формат: DD.MM.YYYY)
29
- * - `gender` — Стать (Чол/Жін)
30
- * - `previousFullName` — Попереднє ПІБ студента (якщо змінювалось)
31
- * - `country` — Країна, з якої навчається студент
32
- * - `lastNameEng` — Прізвище англійською
33
- * - `firstNameEng` — Ім'я англійською
34
- * - `middleNameEng` — По батькові англійською (зазвичай немає)
35
- *
36
- * **Контактні дані:**
37
- * - `email` — Електронна пошта студента
38
- * - `phones` — Масив телефонних номерів студента
39
- *
40
- * **Дані про навчання:**
41
- * - `faculty` — Факультет
42
- * - `specialty` — Спеціальність (назва освітньої програми)
43
- * - `degree` — Ступінь / Освітньо-професійний ступінь (бакалавр, магістр тощо)
44
- * - `group` — Академічна група
45
- * - `studyForm` — Форма навчання (Денна, Заочна, Вечірня)
46
- * - `paymentForm` — Форма оплати навчання (Держ.замовлення, Контракт)
47
- * - `enrollmentOrder` — Номер наказу на зарахування
48
- * - `enrollmentDate` — Дата наказу на зарахування (формат: DD.MM.YYYY)
49
- * - `studyDuration` — Термін навчання (наприклад: "4 роки")
50
- * - `graduationDate` — Дата закінчення навчання (формат: DD.MM.YYYY)
51
- */
52
- export interface Data {
53
- ok: boolean;
54
- fullName?: string;
55
- lastName?: string;
56
- firstName?: string;
57
- middleName?: string;
58
- birthDate?: string;
59
- gender?: string;
60
- previousFullName?: string;
61
- country?: string;
62
- lastNameEng?: string;
63
- firstNameEng?: string;
64
- middleNameEng?: string;
65
- email?: string;
66
- phones?: string[];
67
- faculty?: string;
68
- specialty?: string;
69
- degree?: string;
70
- group?: string;
71
- studyForm?: string;
72
- paymentForm?: string;
73
- enrollmentOrder?: string;
74
- enrollmentDate?: string;
75
- studyDuration?: string;
76
- graduationDate?: string;
77
- }
78
- /**
79
- * name та prId дисципліни
80
- * @category Cabinet
81
- * @remarks
82
- * - `name` — Повна назва дисципліни
83
- * - `prId` — Айді дисципліни
84
- */
85
- export interface Discipline {
86
- name: string;
87
- prId: string;
88
- }
89
- /**
90
- * name та prId дисципліни
91
- * @category Cabinet
92
- * @remarks
93
- * - `ok` — Успіх отримання токену
94
- * - `disciplines` — Масив дисциплін {@link Discipline}
95
- */
96
- export interface Disciplines {
97
- ok: boolean;
98
- disciplines: Discipline[];
99
- }
100
- /**
101
- * Опис заняття у кабінеті студента
102
- * @category Cabinet
103
- * @remarks
104
- * - `teacher` — Прізвище та ініціали викладача
105
- * - `date` — Дата заняття у форматі "dd.mm.yyyy"
106
- * - `type` — Тип заняття: "Лек", "ПрСем", "Лаб", "МК", "Екз"
107
- * - `time` — Час заняття у форматі "HH:MM-HH:MM"
108
- * - `index` — Значення атрибута `data-ind`, унікальний ідентифікатор
109
- */
110
- export interface ScheduleItem {
111
- teacher: string;
112
- date: string;
113
- type: string;
114
- time: string;
115
- index: string;
116
- }
117
- /**
118
- * Список оцінок студента.
119
- * @category Cabinet
120
- * @remarks
121
- * - `id` — Унікальний ідентифікатор студента
122
- * - `scores` — Оцінки по днях, масив масивів рядків (перший елемент - основна оцінка, другий елемент - оцінка перездачі)
123
- * - `absences` — Кількість пропусків
124
- * - `uabsences` — Кількість невиправлених пропусків
125
- * - `finalScore` — Фінальна оцінка
126
- */
127
- export interface StudentScores {
128
- id: string;
129
- scores: string[][];
130
- absences: number;
131
- uabsences: number;
132
- finalScore: string;
133
- }
134
- /**
135
- * Об'єкт оцінок з предмету.
136
- * @category Cabinet
137
- * @remarks
138
- * - `ok` — Успіх отримання токену
139
- * - `prId` — Айді дисципліни
140
- * - `studentId` — Унікальний айді студента для предметів
141
- * - `scheduleItem` — Опис заняття у кабінеті студента {@link ScheduleItem}
142
- * - `studentScores` — Список оцінок студента {@link StudentScores}
143
- */
144
- export interface Scores {
145
- ok: boolean;
146
- prId: string;
147
- studentId: string;
148
- scheduleItem: ScheduleItem[];
149
- studentScores: StudentScores[];
150
- }
@@ -1,8 +1,8 @@
1
1
  /**
2
- * Перевіряє чи є це сторінка авторизації
2
+ * Отримати ймовірний семестр поточної дати
3
+ * @category Cabinet
4
+ * @remarks
5
+ * З 2 вересня по кінець січня - перший семестр
6
+ * З 1 лютого по 1 вересня - другий семестр
3
7
  */
4
- export declare function isLoginPage(html: string): boolean;
5
- /**
6
- * Генерує cookie строку з DateTime та SessGUID
7
- */
8
- export declare function generateCookieString(sessGUID: string): string;
8
+ export declare function getSemester(): 1 | 2;
@@ -1,22 +1,19 @@
1
1
  /**
2
- * Перевіряє чи є це сторінка авторизації
2
+ * Отримати ймовірний семестр поточної дати
3
+ * @category Cabinet
4
+ * @remarks
5
+ * З 2 вересня по кінець січня - перший семестр
6
+ * З 1 лютого по 1 вересня - другий семестр
3
7
  */
4
- export function isLoginPage(html) {
5
- return (html.includes('Авторизація користувача') ||
6
- html.includes('user_name') ||
7
- html.includes('Недійсний ідентифікатор сесії користувача'));
8
- }
9
- /**
10
- * Генерує cookie строку з DateTime та SessGUID
11
- */
12
- export function generateCookieString(sessGUID) {
13
- const now = new Date();
14
- const day = String(now.getDate()).padStart(2, '0');
15
- const month = String(now.getMonth() + 1).padStart(2, '0');
16
- const year = now.getFullYear();
17
- const hours = String(now.getHours()).padStart(2, '0');
18
- const minutes = String(now.getMinutes()).padStart(2, '0');
19
- const seconds = String(now.getSeconds()).padStart(2, '0');
20
- const dateTime = `${day}.${month}.${year}+${hours}%3A${minutes}%3A${seconds}`;
21
- return `DateTime=${dateTime}; SessGUID=${sessGUID}`;
8
+ export function getSemester() {
9
+ const year = new Date().getFullYear();
10
+ const febStart = new Date(year, 1, 1); // лютий = 1
11
+ const sepStart = new Date(year, 8, 1); // вересень = 8
12
+ const date = new Date();
13
+ if (!(date < febStart || date >= sepStart)) {
14
+ return 2;
15
+ }
16
+ else {
17
+ return 1;
18
+ }
22
19
  }
@@ -1,8 +1,8 @@
1
- /**
2
- * Перевірка на валідність сесії
3
- * @category Cabinet
4
- * @param sesId - ID сесії користувача
5
- * @param sessGUID - GUID сесії з cookie
6
- * @returns boolean значення.
7
- */
8
- export declare function isValidSession(sesId: string, sessGUID: string): Promise<boolean>;
1
+ /**
2
+ * Перевірка на валідність сесії
3
+ * @category Cabinet
4
+ * @param sesId - ID сесії користувача
5
+ * @param sessGUID - GUID сесії з cookie
6
+ * @returns boolean значення.
7
+ */
8
+ export declare function isValidSession(sesId: string, sessGUID: string): Promise<boolean>;
@@ -1,29 +1,29 @@
1
- import fetch from 'cross-fetch';
2
- import iconv from 'iconv-lite';
3
- import { generateCookieString, isLoginPage } from './utils.js';
4
- /**
5
- * Перевірка на валідність сесії
6
- * @category Cabinet
7
- * @param sesId - ID сесії користувача
8
- * @param sessGUID - GUID сесії з cookie
9
- * @returns boolean значення.
10
- */
11
- export async function isValidSession(sesId, sessGUID) {
12
- try {
13
- const cookieString = generateCookieString(sessGUID);
14
- const response = await fetch(`https://dekanat.zu.edu.ua/cgi-bin/classman.cgi?n=3&sesID=${sesId}`, {
15
- headers: {
16
- Cookie: cookieString,
17
- },
18
- });
19
- const buffer = await response.arrayBuffer();
20
- const html = iconv.decode(Buffer.from(buffer), 'windows-1251');
21
- if (!isLoginPage(html)) {
22
- return true;
23
- }
24
- return false;
25
- }
26
- catch {
27
- return false;
28
- }
29
- }
1
+ import fetch from 'cross-fetch';
2
+ import iconv from 'iconv-lite';
3
+ import { generateCookieString, isLoginPage } from './utils.js';
4
+ /**
5
+ * Перевірка на валідність сесії
6
+ * @category Cabinet
7
+ * @param sesId - ID сесії користувача
8
+ * @param sessGUID - GUID сесії з cookie
9
+ * @returns boolean значення.
10
+ */
11
+ export async function isValidSession(sesId, sessGUID) {
12
+ try {
13
+ const cookieString = generateCookieString(sessGUID);
14
+ const response = await fetch(`https://dekanat.zu.edu.ua/cgi-bin/classman.cgi?n=3&sesID=${sesId}`, {
15
+ headers: {
16
+ Cookie: cookieString,
17
+ },
18
+ });
19
+ const buffer = await response.arrayBuffer();
20
+ const html = iconv.decode(Buffer.from(buffer), 'windows-1251');
21
+ if (!isLoginPage(html)) {
22
+ return true;
23
+ }
24
+ return false;
25
+ }
26
+ catch {
27
+ return false;
28
+ }
29
+ }
@@ -0,0 +1,87 @@
1
+ import { Discipline, Disciplines, DataStudent, Scores } from './types.js';
2
+ /**
3
+ * Клас кабінету студента
4
+ * @category CabinetStudent
5
+ */
6
+ export declare class CabinetStudent {
7
+ /**
8
+ * Прізвище користувача
9
+ */
10
+ login: string;
11
+ /**
12
+ * Пароль від кабінету студента
13
+ */
14
+ password: string;
15
+ /**
16
+ * ID сесії користувача
17
+ */
18
+ sesID?: string;
19
+ /**
20
+ * GUID сесії з cookie
21
+ */
22
+ sessGUID?: string;
23
+ /**
24
+ * Семестр для пошуку оцінок (1 - перший, 2 - другий)
25
+ */
26
+ semester: 1 | 2;
27
+ /**
28
+ * Список дисциплін {@link Discipline}
29
+ */
30
+ disciplines: Discipline[];
31
+ /**
32
+ * Данні студента {@link Data}
33
+ */
34
+ data?: DataStudent;
35
+ /**
36
+ * Оціки з усіх предметів {@link Scores}
37
+ */
38
+ allScores?: Scores[];
39
+ /**
40
+ * Айді в системі оцінювання
41
+ */
42
+ private id?;
43
+ /**
44
+ * Конструктор
45
+ * @param login - Прізвище користувача
46
+ * @param password - Пароль
47
+ */
48
+ constructor(login: string, password: string);
49
+ /**
50
+ * Авторизація
51
+ */
52
+ auth(login?: string, password?: string): Promise<boolean>;
53
+ /**
54
+ * Базове значення семестру
55
+ */
56
+ private setSemester;
57
+ /**
58
+ * Отримання всіх данних
59
+ */
60
+ loadData(): Promise<boolean>;
61
+ /**
62
+ * Відновлення сесії
63
+ */
64
+ setSession(sesID: string, sessGUID: string): Promise<boolean>;
65
+ /**
66
+ * Перевірка валідності сесії
67
+ */
68
+ isValidSession(): Promise<boolean>;
69
+ /**
70
+ * Отримати дисципліни поточного семестру студента
71
+ * @returns Об'єкт дисциплін {@link Disciplines}
72
+ */
73
+ getDisciplines(): Promise<Disciplines>;
74
+ /**
75
+ * Отримати анкетні данні студента
76
+ * @returns Об'єкт {@link Data}
77
+ */
78
+ getData(): Promise<DataStudent>;
79
+ /**
80
+ * Отримати оцінки з всіх предметів
81
+ */
82
+ getAllScores(semester?: 1 | 2): Promise<Scores[]>;
83
+ /**
84
+ * Отримати айді в системі оцінювання
85
+ */
86
+ getId(): Promise<string | undefined>;
87
+ }