@itutoring/itutoring_application_js_api 1.8.1 → 1.9.1
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.
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/modules/FAQ.js +10 -0
- package/modules/LectorDatabase.js +2 -2
- package/modules/WebController.js +38 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ import LectorDatabase from "./modules/LectorDatabase";
|
|
|
28
28
|
import LectorsCalendar from "./modules/LectorsCalendar";
|
|
29
29
|
import AiAssist from "./modules/AiAssist";
|
|
30
30
|
import CustomerLessonManager from "./modules/CustomerLessonManager";
|
|
31
|
+
import WebController from "./modules/WebController";
|
|
31
32
|
|
|
32
33
|
import Course from "./objects/Course";
|
|
33
34
|
import CourseReservation from "./objects/CourseReservation";
|
|
@@ -83,6 +84,7 @@ export
|
|
|
83
84
|
LectorsCalendar,
|
|
84
85
|
AiAssist,
|
|
85
86
|
CustomerLessonManager,
|
|
87
|
+
WebController,
|
|
86
88
|
|
|
87
89
|
Course,
|
|
88
90
|
CourseReservation,
|
package/index.js
CHANGED
|
@@ -25,6 +25,7 @@ import LectorDatabase from "./modules/LectorDatabase";
|
|
|
25
25
|
import LectorsCalendar from "./modules/LectorsCalendar";
|
|
26
26
|
import AiAssist from "./modules/AiAssist";
|
|
27
27
|
import CustomerLessonManager from "./modules/CustomerLessonManager";
|
|
28
|
+
import WebController from "./modules/WebController";
|
|
28
29
|
|
|
29
30
|
import Course from "./objects/Course";
|
|
30
31
|
import CourseReservation from "./objects/CourseReservation";
|
|
@@ -81,6 +82,7 @@ export
|
|
|
81
82
|
LectorsCalendar,
|
|
82
83
|
AiAssist,
|
|
83
84
|
CustomerLessonManager,
|
|
85
|
+
WebController,
|
|
84
86
|
|
|
85
87
|
Course,
|
|
86
88
|
CourseReservation,
|
package/modules/FAQ.js
CHANGED
|
@@ -14,6 +14,7 @@ class FAQ
|
|
|
14
14
|
static #MODULE = "Faq";
|
|
15
15
|
|
|
16
16
|
static #GET_FAQ = "GetFAQ";
|
|
17
|
+
static #ASK_QUESTION = "AskQuestion";
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
20
|
* desc: Get FAQ
|
|
@@ -25,6 +26,15 @@ class FAQ
|
|
|
25
26
|
|
|
26
27
|
return faq;
|
|
27
28
|
}
|
|
29
|
+
|
|
30
|
+
static async AskQuestion(question)
|
|
31
|
+
{
|
|
32
|
+
const res = await APIController.Post(this.#MODULE, this.#ASK_QUESTION, {
|
|
33
|
+
'question': question
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
return res;
|
|
37
|
+
}
|
|
28
38
|
}
|
|
29
39
|
|
|
30
40
|
export default FAQ;
|
|
@@ -173,13 +173,13 @@ class LectorDatabase
|
|
|
173
173
|
* @param {number} maxCount
|
|
174
174
|
* @returns {Promise<array>}
|
|
175
175
|
*/
|
|
176
|
-
static async getPublicProfiles(offset = 0, maxCount = -1, onlyWithProfilePictures = false)
|
|
176
|
+
static async getPublicProfiles(offset = 0, maxCount = -1, onlyWithProfilePictures = false, useCache = true)
|
|
177
177
|
{
|
|
178
178
|
return await APIController.Get(this.#MODULE, this.#GET_PUBLIC_PROFILES, {
|
|
179
179
|
'offset': offset,
|
|
180
180
|
'max': maxCount,
|
|
181
181
|
'onlyWithProfilePictures': onlyWithProfilePictures,
|
|
182
|
-
},
|
|
182
|
+
}, useCache, (onlyWithProfilePictures ? "onlyWithProfilePictures" : ""));
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2025 iTutoring s.r.o.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import APIController from "../apiController";
|
|
10
|
+
|
|
11
|
+
class WebController
|
|
12
|
+
{
|
|
13
|
+
static #MODULE = "WebController";
|
|
14
|
+
|
|
15
|
+
static #GET_GENERAL_PAGE_CONTENT = "GetGeneralPageContent";
|
|
16
|
+
static #GET_PZK_PAGE_CONTENT = "GetPzkPage";
|
|
17
|
+
static #GET_PRICING_PAGE = "GetPricingPage";
|
|
18
|
+
|
|
19
|
+
static async GetGeneralPageContent()
|
|
20
|
+
{
|
|
21
|
+
var res = await APIController.Get(this.#MODULE, this.#GET_GENERAL_PAGE_CONTENT);
|
|
22
|
+
return JSON.parse(res);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
static async GetPzkPageContent()
|
|
26
|
+
{
|
|
27
|
+
var res = await APIController.Get(this.#MODULE, this.#GET_PZK_PAGE_CONTENT);
|
|
28
|
+
return JSON.parse(res);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
static async GetPricingPage()
|
|
32
|
+
{
|
|
33
|
+
var res = await APIController.Get(this.#MODULE, this.#GET_PRICING_PAGE);
|
|
34
|
+
return JSON.parse(res);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export default WebController;
|