@itutoring/itutoring_application_js_api 1.10.4 → 1.11.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/.idea/iTutoring_Application_API-js.iml +11 -11
- package/.idea/modules.xml +7 -7
- package/.idea/vcs.xml +5 -5
- package/CookiesManager.js +47 -47
- package/LICENSE +21 -21
- package/README.md +6 -6
- package/apiController.js +436 -436
- package/cache.js +31 -31
- package/index.d.ts +116 -112
- package/index.js +114 -110
- package/modules/AiAssist.js +31 -31
- package/modules/Authentication.js +86 -86
- package/modules/Cart.js +84 -0
- package/modules/Checkout.js +51 -0
- package/modules/CustomerAuth.js +57 -57
- package/modules/CustomerLessonManager.js +29 -29
- package/modules/CustomerPortal.js +31 -31
- package/modules/FAQ.js +39 -39
- package/modules/GoogleReviews.js +36 -36
- package/modules/Inventory.js +51 -51
- package/modules/LectorDatabase.js +185 -185
- package/modules/LectorsCalendar.js +67 -67
- package/modules/LessonInventory.js +47 -47
- package/modules/MarketplaceController.js +86 -86
- package/modules/Models.js +380 -380
- package/modules/Payments.js +75 -75
- package/modules/Pricing.js +70 -70
- package/modules/ReservationSystem.js +48 -159
- package/modules/Reviews.js +53 -53
- package/modules/SubjectManager.js +139 -139
- package/modules/TableExplorer.js +246 -246
- package/modules/TeacherAuth.js +57 -57
- package/modules/TeacherProfileModule.js +299 -299
- package/modules/TeacherProfiles.js +60 -60
- package/modules/Version.js +24 -24
- package/modules/WebController.js +37 -37
- package/objects/AttendanceEvent.js +39 -39
- package/objects/AuthUser.js +24 -24
- package/objects/Course.js +38 -38
- package/objects/CourseReservation.js +22 -22
- package/objects/Customer.js +20 -20
- package/objects/Enums.js +62 -62
- package/objects/Event.js +125 -125
- package/objects/Reservation.js +42 -42
- package/objects/Subject.js +24 -24
- package/objects/Teacher.js +18 -18
- package/objects/TeacherProfile.js +17 -17
- package/objects/Webinar.js +25 -25
- package/objects/billingInfo.js +29 -29
- package/package.json +1 -1
- package/toolkit/Toolkit.jsx +51 -51
package/modules/GoogleReviews.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (C) 2024 iTutoring s.r.o.
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import APIController from "../apiController";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @deprecated Use general Reviews class instead.
|
|
15
|
-
*/
|
|
16
|
-
class GoogleReviews
|
|
17
|
-
{
|
|
18
|
-
static #MODULE = "Reviews";
|
|
19
|
-
|
|
20
|
-
static #GET_RANDOM_REVIEW = "GetRandomReview";
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* @deprecated Use general Reviews class instead.
|
|
24
|
-
* @param {*} last_review_timestamp
|
|
25
|
-
* @returns
|
|
26
|
-
*/
|
|
27
|
-
static async GetRandomReview(last_review_timestamp = -1)
|
|
28
|
-
{
|
|
29
|
-
var review = await APIController.Get(this.#MODULE, this.#GET_RANDOM_REVIEW, {
|
|
30
|
-
"last_review": last_review_timestamp,
|
|
31
|
-
}, true);
|
|
32
|
-
|
|
33
|
-
return JSON.parse(review);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2024 iTutoring s.r.o.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
import APIController from "../apiController";
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Use general Reviews class instead.
|
|
15
|
+
*/
|
|
16
|
+
class GoogleReviews
|
|
17
|
+
{
|
|
18
|
+
static #MODULE = "Reviews";
|
|
19
|
+
|
|
20
|
+
static #GET_RANDOM_REVIEW = "GetRandomReview";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Use general Reviews class instead.
|
|
24
|
+
* @param {*} last_review_timestamp
|
|
25
|
+
* @returns
|
|
26
|
+
*/
|
|
27
|
+
static async GetRandomReview(last_review_timestamp = -1)
|
|
28
|
+
{
|
|
29
|
+
var review = await APIController.Get(this.#MODULE, this.#GET_RANDOM_REVIEW, {
|
|
30
|
+
"last_review": last_review_timestamp,
|
|
31
|
+
}, true);
|
|
32
|
+
|
|
33
|
+
return JSON.parse(review);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
37
|
export default GoogleReviews;
|
package/modules/Inventory.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (C) 2024 iTutoring s.r.o.
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import APIController from "../apiController";
|
|
11
|
-
|
|
12
|
-
class Inventory
|
|
13
|
-
{
|
|
14
|
-
static #MODULE = "Inventory";
|
|
15
|
-
|
|
16
|
-
static #GET_AVAILABLE_ITEMS = "GetAvailableItems";
|
|
17
|
-
static #SALE_COUPON_EXISTS = "SaleCouponExists";
|
|
18
|
-
static #SEARCH = "Search";
|
|
19
|
-
|
|
20
|
-
static async saleCouponExists(code)
|
|
21
|
-
{
|
|
22
|
-
var exists = await APIController.Get(this.#MODULE, this.#SALE_COUPON_EXISTS, {
|
|
23
|
-
'code': code,
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
return exists;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
static async getAvailableItems(category = "ANY", max = -1, offset = 0, filter = {}, startingWithinHours = -1)
|
|
30
|
-
{
|
|
31
|
-
var items = await APIController.Get(this.#MODULE, this.#GET_AVAILABLE_ITEMS, {
|
|
32
|
-
'category': category,
|
|
33
|
-
'max': max,
|
|
34
|
-
'offset': offset,
|
|
35
|
-
'filter': JSON.stringify(filter),
|
|
36
|
-
'startingWithinHours': startingWithinHours
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
return items;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
static async search(query)
|
|
43
|
-
{
|
|
44
|
-
var items = await APIController.Get(this.#MODULE, this.#SEARCH, {
|
|
45
|
-
'query': query
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
return items;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2024 iTutoring s.r.o.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
import APIController from "../apiController";
|
|
11
|
+
|
|
12
|
+
class Inventory
|
|
13
|
+
{
|
|
14
|
+
static #MODULE = "Inventory";
|
|
15
|
+
|
|
16
|
+
static #GET_AVAILABLE_ITEMS = "GetAvailableItems";
|
|
17
|
+
static #SALE_COUPON_EXISTS = "SaleCouponExists";
|
|
18
|
+
static #SEARCH = "Search";
|
|
19
|
+
|
|
20
|
+
static async saleCouponExists(code)
|
|
21
|
+
{
|
|
22
|
+
var exists = await APIController.Get(this.#MODULE, this.#SALE_COUPON_EXISTS, {
|
|
23
|
+
'code': code,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
return exists;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
static async getAvailableItems(category = "ANY", max = -1, offset = 0, filter = {}, startingWithinHours = -1)
|
|
30
|
+
{
|
|
31
|
+
var items = await APIController.Get(this.#MODULE, this.#GET_AVAILABLE_ITEMS, {
|
|
32
|
+
'category': category,
|
|
33
|
+
'max': max,
|
|
34
|
+
'offset': offset,
|
|
35
|
+
'filter': JSON.stringify(filter),
|
|
36
|
+
'startingWithinHours': startingWithinHours
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
return items;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
static async search(query)
|
|
43
|
+
{
|
|
44
|
+
var items = await APIController.Get(this.#MODULE, this.#SEARCH, {
|
|
45
|
+
'query': query
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
return items;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
52
|
export default Inventory;
|
|
@@ -1,186 +1,186 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (C) 2024 iTutoring s.r.o.
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import APIController from "../apiController";
|
|
11
|
-
|
|
12
|
-
class LectorDatabase
|
|
13
|
-
{
|
|
14
|
-
/**
|
|
15
|
-
* Respective module name for this class
|
|
16
|
-
*/
|
|
17
|
-
static #MODULE = "LectorDatabase";
|
|
18
|
-
|
|
19
|
-
// All method names
|
|
20
|
-
static #GET_LECTORS = "GetLectors";
|
|
21
|
-
static #GET_LECTOR_INFO = "GetLectorInfo";
|
|
22
|
-
static #QUERY_LECTOR_DSS = "QueryLectorDSS";
|
|
23
|
-
static #REMOVE_LECTOR = "RemoveLector";
|
|
24
|
-
static #ADD_LECTOR = "AddLector";
|
|
25
|
-
static #RESET_PASSWORD = "ResetPassword";
|
|
26
|
-
static #ADD_MODULE_ACCESS = "AddModuleAccess";
|
|
27
|
-
static #REMOVE_MODULE_ACCESS = "RemoveModuleAccess";
|
|
28
|
-
static #GET_COUNT_OF_LECTORS = "GetCountOfLectors";
|
|
29
|
-
static #GET_PUBLIC_PROFILES = "GetPublicProfiles";
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* @deprecated use CRM (Table Explorer, Modles) instead
|
|
33
|
-
*
|
|
34
|
-
* desc: Get count of lectors
|
|
35
|
-
*
|
|
36
|
-
* @returns {int} count of lectors
|
|
37
|
-
*/
|
|
38
|
-
static async getCountOfLectors()
|
|
39
|
-
{
|
|
40
|
-
var count = await APIController.Get(this.#MODULE, this.#GET_COUNT_OF_LECTORS);
|
|
41
|
-
|
|
42
|
-
return count;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* @deprecated use CRM (Table Explorer, Modles) instead
|
|
47
|
-
*
|
|
48
|
-
* desc: Remove module access
|
|
49
|
-
* @param {string} lectorId
|
|
50
|
-
* @param {string} moduleId
|
|
51
|
-
*/
|
|
52
|
-
static async removeModuleAccess(lectorId, moduleId)
|
|
53
|
-
{
|
|
54
|
-
await APIController.Post(this.#MODULE, this.#REMOVE_MODULE_ACCESS, {
|
|
55
|
-
'lectorId': lectorId,
|
|
56
|
-
'module': moduleId,
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* @deprecated use CRM (Table Explorer, Modles) instead
|
|
62
|
-
*
|
|
63
|
-
* desc: Get all lectors
|
|
64
|
-
* @param {int} listOffset
|
|
65
|
-
* @param {int} maxCount
|
|
66
|
-
* @returns
|
|
67
|
-
*/
|
|
68
|
-
static async getLectors(listOffset = 0, maxCount = -1)
|
|
69
|
-
{
|
|
70
|
-
var lectors = await APIController.Get(this.#MODULE, this.#GET_LECTORS, {
|
|
71
|
-
'listOffset': listOffset,
|
|
72
|
-
'maxCount': maxCount,
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
return lectors;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* @deprecated use CRM (Table Explorer, Modles) instead
|
|
80
|
-
*
|
|
81
|
-
* desc: Get lector info
|
|
82
|
-
* @param {string} lectorId
|
|
83
|
-
* @returns
|
|
84
|
-
*/
|
|
85
|
-
static async getLectorInfo(lectorId)
|
|
86
|
-
{
|
|
87
|
-
var lector = await APIController.Get(this.#MODULE, this.#GET_LECTOR_INFO, {
|
|
88
|
-
'lectorId': lectorId,
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
return lector;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* @deprecated use CRM (Table Explorer, Modles) instead
|
|
97
|
-
*
|
|
98
|
-
* desc: Query lector DSS
|
|
99
|
-
* @param {string} dssQuery
|
|
100
|
-
* @returns
|
|
101
|
-
*/
|
|
102
|
-
static async queryLectorDSS(dssQuery)
|
|
103
|
-
{
|
|
104
|
-
var lector = await APIController.Get(this.#MODULE, this.#QUERY_LECTOR_DSS, {
|
|
105
|
-
"query": dssQuery
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
return lector;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* @deprecated use CRM (Table Explorer, Modles) instead
|
|
114
|
-
*
|
|
115
|
-
* desc: Remove lector
|
|
116
|
-
* @param {string} lectorId
|
|
117
|
-
*/
|
|
118
|
-
static async removeLector(lectorId)
|
|
119
|
-
{
|
|
120
|
-
await APIController.Post(this.#MODULE, this.#REMOVE_LECTOR, {
|
|
121
|
-
'lectorId': lectorId,
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* desc: Add lector
|
|
127
|
-
* @param {string} name
|
|
128
|
-
* @param {string} email
|
|
129
|
-
*
|
|
130
|
-
* @returns {string} lectorId
|
|
131
|
-
*/
|
|
132
|
-
static async addLector(name, email)
|
|
133
|
-
{
|
|
134
|
-
var id = await APIController.Post(this.#MODULE, this.#ADD_LECTOR, {
|
|
135
|
-
'name': name,
|
|
136
|
-
'email': email,
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
return id;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* desc: Reset password
|
|
144
|
-
* @param {string} lectorId
|
|
145
|
-
*/
|
|
146
|
-
static async resetPassword(lectorId)
|
|
147
|
-
{
|
|
148
|
-
await APIController.Post(this.#MODULE, this.#RESET_PASSWORD, {
|
|
149
|
-
'lectorId': lectorId,
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* @deprecated use CRM (Table Explorer, Modles) instead
|
|
155
|
-
*
|
|
156
|
-
* desc: Add module access
|
|
157
|
-
* @param {string} lectorId
|
|
158
|
-
* @param {string} moduleId
|
|
159
|
-
* @param {int} access
|
|
160
|
-
*/
|
|
161
|
-
static async addModuleAccess(lectorId, moduleId, access)
|
|
162
|
-
{
|
|
163
|
-
await APIController.Post(this.#MODULE, this.#ADD_MODULE_ACCESS, {
|
|
164
|
-
'lectorId': lectorId,
|
|
165
|
-
'module': moduleId,
|
|
166
|
-
'access': access,
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* desc: Get public profiles
|
|
172
|
-
* @param {number} offset
|
|
173
|
-
* @param {number} maxCount
|
|
174
|
-
* @returns {Promise<array>}
|
|
175
|
-
*/
|
|
176
|
-
static async getPublicProfiles(offset = 0, maxCount = -1, onlyWithProfilePictures = false, useCache = true)
|
|
177
|
-
{
|
|
178
|
-
return await APIController.Get(this.#MODULE, this.#GET_PUBLIC_PROFILES, {
|
|
179
|
-
'offset': offset,
|
|
180
|
-
'max': maxCount,
|
|
181
|
-
'onlyWithProfilePictures': onlyWithProfilePictures,
|
|
182
|
-
}, useCache, (onlyWithProfilePictures ? "onlyWithProfilePictures" : ""));
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2024 iTutoring s.r.o.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
import APIController from "../apiController";
|
|
11
|
+
|
|
12
|
+
class LectorDatabase
|
|
13
|
+
{
|
|
14
|
+
/**
|
|
15
|
+
* Respective module name for this class
|
|
16
|
+
*/
|
|
17
|
+
static #MODULE = "LectorDatabase";
|
|
18
|
+
|
|
19
|
+
// All method names
|
|
20
|
+
static #GET_LECTORS = "GetLectors";
|
|
21
|
+
static #GET_LECTOR_INFO = "GetLectorInfo";
|
|
22
|
+
static #QUERY_LECTOR_DSS = "QueryLectorDSS";
|
|
23
|
+
static #REMOVE_LECTOR = "RemoveLector";
|
|
24
|
+
static #ADD_LECTOR = "AddLector";
|
|
25
|
+
static #RESET_PASSWORD = "ResetPassword";
|
|
26
|
+
static #ADD_MODULE_ACCESS = "AddModuleAccess";
|
|
27
|
+
static #REMOVE_MODULE_ACCESS = "RemoveModuleAccess";
|
|
28
|
+
static #GET_COUNT_OF_LECTORS = "GetCountOfLectors";
|
|
29
|
+
static #GET_PUBLIC_PROFILES = "GetPublicProfiles";
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated use CRM (Table Explorer, Modles) instead
|
|
33
|
+
*
|
|
34
|
+
* desc: Get count of lectors
|
|
35
|
+
*
|
|
36
|
+
* @returns {int} count of lectors
|
|
37
|
+
*/
|
|
38
|
+
static async getCountOfLectors()
|
|
39
|
+
{
|
|
40
|
+
var count = await APIController.Get(this.#MODULE, this.#GET_COUNT_OF_LECTORS);
|
|
41
|
+
|
|
42
|
+
return count;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated use CRM (Table Explorer, Modles) instead
|
|
47
|
+
*
|
|
48
|
+
* desc: Remove module access
|
|
49
|
+
* @param {string} lectorId
|
|
50
|
+
* @param {string} moduleId
|
|
51
|
+
*/
|
|
52
|
+
static async removeModuleAccess(lectorId, moduleId)
|
|
53
|
+
{
|
|
54
|
+
await APIController.Post(this.#MODULE, this.#REMOVE_MODULE_ACCESS, {
|
|
55
|
+
'lectorId': lectorId,
|
|
56
|
+
'module': moduleId,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @deprecated use CRM (Table Explorer, Modles) instead
|
|
62
|
+
*
|
|
63
|
+
* desc: Get all lectors
|
|
64
|
+
* @param {int} listOffset
|
|
65
|
+
* @param {int} maxCount
|
|
66
|
+
* @returns
|
|
67
|
+
*/
|
|
68
|
+
static async getLectors(listOffset = 0, maxCount = -1)
|
|
69
|
+
{
|
|
70
|
+
var lectors = await APIController.Get(this.#MODULE, this.#GET_LECTORS, {
|
|
71
|
+
'listOffset': listOffset,
|
|
72
|
+
'maxCount': maxCount,
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
return lectors;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @deprecated use CRM (Table Explorer, Modles) instead
|
|
80
|
+
*
|
|
81
|
+
* desc: Get lector info
|
|
82
|
+
* @param {string} lectorId
|
|
83
|
+
* @returns
|
|
84
|
+
*/
|
|
85
|
+
static async getLectorInfo(lectorId)
|
|
86
|
+
{
|
|
87
|
+
var lector = await APIController.Get(this.#MODULE, this.#GET_LECTOR_INFO, {
|
|
88
|
+
'lectorId': lectorId,
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
return lector;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* @deprecated use CRM (Table Explorer, Modles) instead
|
|
97
|
+
*
|
|
98
|
+
* desc: Query lector DSS
|
|
99
|
+
* @param {string} dssQuery
|
|
100
|
+
* @returns
|
|
101
|
+
*/
|
|
102
|
+
static async queryLectorDSS(dssQuery)
|
|
103
|
+
{
|
|
104
|
+
var lector = await APIController.Get(this.#MODULE, this.#QUERY_LECTOR_DSS, {
|
|
105
|
+
"query": dssQuery
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
return lector;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* @deprecated use CRM (Table Explorer, Modles) instead
|
|
114
|
+
*
|
|
115
|
+
* desc: Remove lector
|
|
116
|
+
* @param {string} lectorId
|
|
117
|
+
*/
|
|
118
|
+
static async removeLector(lectorId)
|
|
119
|
+
{
|
|
120
|
+
await APIController.Post(this.#MODULE, this.#REMOVE_LECTOR, {
|
|
121
|
+
'lectorId': lectorId,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* desc: Add lector
|
|
127
|
+
* @param {string} name
|
|
128
|
+
* @param {string} email
|
|
129
|
+
*
|
|
130
|
+
* @returns {string} lectorId
|
|
131
|
+
*/
|
|
132
|
+
static async addLector(name, email)
|
|
133
|
+
{
|
|
134
|
+
var id = await APIController.Post(this.#MODULE, this.#ADD_LECTOR, {
|
|
135
|
+
'name': name,
|
|
136
|
+
'email': email,
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
return id;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* desc: Reset password
|
|
144
|
+
* @param {string} lectorId
|
|
145
|
+
*/
|
|
146
|
+
static async resetPassword(lectorId)
|
|
147
|
+
{
|
|
148
|
+
await APIController.Post(this.#MODULE, this.#RESET_PASSWORD, {
|
|
149
|
+
'lectorId': lectorId,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @deprecated use CRM (Table Explorer, Modles) instead
|
|
155
|
+
*
|
|
156
|
+
* desc: Add module access
|
|
157
|
+
* @param {string} lectorId
|
|
158
|
+
* @param {string} moduleId
|
|
159
|
+
* @param {int} access
|
|
160
|
+
*/
|
|
161
|
+
static async addModuleAccess(lectorId, moduleId, access)
|
|
162
|
+
{
|
|
163
|
+
await APIController.Post(this.#MODULE, this.#ADD_MODULE_ACCESS, {
|
|
164
|
+
'lectorId': lectorId,
|
|
165
|
+
'module': moduleId,
|
|
166
|
+
'access': access,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* desc: Get public profiles
|
|
172
|
+
* @param {number} offset
|
|
173
|
+
* @param {number} maxCount
|
|
174
|
+
* @returns {Promise<array>}
|
|
175
|
+
*/
|
|
176
|
+
static async getPublicProfiles(offset = 0, maxCount = -1, onlyWithProfilePictures = false, useCache = true)
|
|
177
|
+
{
|
|
178
|
+
return await APIController.Get(this.#MODULE, this.#GET_PUBLIC_PROFILES, {
|
|
179
|
+
'offset': offset,
|
|
180
|
+
'max': maxCount,
|
|
181
|
+
'onlyWithProfilePictures': onlyWithProfilePictures,
|
|
182
|
+
}, useCache, (onlyWithProfilePictures ? "onlyWithProfilePictures" : ""));
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
186
|
export default LectorDatabase;
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (C) 2024 iTutoring s.r.o.
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import APIController from "../apiController";
|
|
11
|
-
|
|
12
|
-
class LectorsCalendar
|
|
13
|
-
{
|
|
14
|
-
static #MODULE = 'LectorsCalendar';
|
|
15
|
-
|
|
16
|
-
static #GET_CALENDAR = 'GetCalendar';
|
|
17
|
-
static #GET_LECTORS_FOR_TIME = 'GetLectorsForTime';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
* @param {*} lectorIds
|
|
22
|
-
* @param {*} day
|
|
23
|
-
* @param {*} month
|
|
24
|
-
* @param {*} year
|
|
25
|
-
* @param {*} length
|
|
26
|
-
* @param {*} lesson - minutes60 or minutes45
|
|
27
|
-
* @returns
|
|
28
|
-
*/
|
|
29
|
-
static async getCalendar(lectorIds, day, month, year, length, lesson)
|
|
30
|
-
{
|
|
31
|
-
var data = await APIController.Get(this.#MODULE, this.#GET_CALENDAR, {
|
|
32
|
-
'lectorIds': lectorIds,
|
|
33
|
-
'day': day,
|
|
34
|
-
'month': month,
|
|
35
|
-
'year': year,
|
|
36
|
-
'length': length,
|
|
37
|
-
'lesson': lesson,
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
return data;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @param {*} lectorIds
|
|
46
|
-
* @param {*} day
|
|
47
|
-
* @param {*} month
|
|
48
|
-
* @param {*} year
|
|
49
|
-
* @param {*} time
|
|
50
|
-
* @param {*} lesson - minutes60 or minutes45
|
|
51
|
-
* @returns
|
|
52
|
-
*/
|
|
53
|
-
static async getLectorsForTime(lectorIds, day, month, year, time, lesson)
|
|
54
|
-
{
|
|
55
|
-
var data = await APIController.Get(this.#MODULE, this.#GET_LECTORS_FOR_TIME, {
|
|
56
|
-
'lectorIds': lectorIds,
|
|
57
|
-
'day': day,
|
|
58
|
-
'month': month,
|
|
59
|
-
'year': year,
|
|
60
|
-
'time': time,
|
|
61
|
-
'lesson': lesson,
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
return data;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2024 iTutoring s.r.o.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
import APIController from "../apiController";
|
|
11
|
+
|
|
12
|
+
class LectorsCalendar
|
|
13
|
+
{
|
|
14
|
+
static #MODULE = 'LectorsCalendar';
|
|
15
|
+
|
|
16
|
+
static #GET_CALENDAR = 'GetCalendar';
|
|
17
|
+
static #GET_LECTORS_FOR_TIME = 'GetLectorsForTime';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @param {*} lectorIds
|
|
22
|
+
* @param {*} day
|
|
23
|
+
* @param {*} month
|
|
24
|
+
* @param {*} year
|
|
25
|
+
* @param {*} length
|
|
26
|
+
* @param {*} lesson - minutes60 or minutes45
|
|
27
|
+
* @returns
|
|
28
|
+
*/
|
|
29
|
+
static async getCalendar(lectorIds, day, month, year, length, lesson)
|
|
30
|
+
{
|
|
31
|
+
var data = await APIController.Get(this.#MODULE, this.#GET_CALENDAR, {
|
|
32
|
+
'lectorIds': lectorIds,
|
|
33
|
+
'day': day,
|
|
34
|
+
'month': month,
|
|
35
|
+
'year': year,
|
|
36
|
+
'length': length,
|
|
37
|
+
'lesson': lesson,
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
return data;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @param {*} lectorIds
|
|
46
|
+
* @param {*} day
|
|
47
|
+
* @param {*} month
|
|
48
|
+
* @param {*} year
|
|
49
|
+
* @param {*} time
|
|
50
|
+
* @param {*} lesson - minutes60 or minutes45
|
|
51
|
+
* @returns
|
|
52
|
+
*/
|
|
53
|
+
static async getLectorsForTime(lectorIds, day, month, year, time, lesson)
|
|
54
|
+
{
|
|
55
|
+
var data = await APIController.Get(this.#MODULE, this.#GET_LECTORS_FOR_TIME, {
|
|
56
|
+
'lectorIds': lectorIds,
|
|
57
|
+
'day': day,
|
|
58
|
+
'month': month,
|
|
59
|
+
'year': year,
|
|
60
|
+
'time': time,
|
|
61
|
+
'lesson': lesson,
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
return data;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
68
|
export default LectorsCalendar;
|