@itutoring/itutoring_application_js_api 1.11.0 → 1.11.2

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 (51) hide show
  1. package/.idea/iTutoring_Application_API-js.iml +11 -11
  2. package/.idea/modules.xml +7 -7
  3. package/.idea/vcs.xml +5 -5
  4. package/CookiesManager.js +47 -47
  5. package/LICENSE +21 -21
  6. package/README.md +6 -6
  7. package/apiController.js +436 -436
  8. package/cache.js +31 -31
  9. package/index.d.ts +116 -116
  10. package/index.js +114 -114
  11. package/modules/AiAssist.js +31 -31
  12. package/modules/Authentication.js +86 -86
  13. package/modules/Cart.js +83 -81
  14. package/modules/Checkout.js +60 -50
  15. package/modules/CustomerAuth.js +57 -57
  16. package/modules/CustomerLessonManager.js +29 -29
  17. package/modules/CustomerPortal.js +31 -31
  18. package/modules/FAQ.js +39 -39
  19. package/modules/GoogleReviews.js +36 -36
  20. package/modules/Inventory.js +51 -51
  21. package/modules/LectorDatabase.js +185 -185
  22. package/modules/LectorsCalendar.js +67 -67
  23. package/modules/LessonInventory.js +47 -47
  24. package/modules/MarketplaceController.js +86 -86
  25. package/modules/Models.js +380 -380
  26. package/modules/Payments.js +75 -75
  27. package/modules/Pricing.js +70 -70
  28. package/modules/ReservationSystem.js +48 -48
  29. package/modules/Reviews.js +53 -53
  30. package/modules/SubjectManager.js +139 -139
  31. package/modules/TableExplorer.js +246 -246
  32. package/modules/TeacherAuth.js +57 -57
  33. package/modules/TeacherProfileModule.js +299 -299
  34. package/modules/TeacherProfiles.js +60 -60
  35. package/modules/Version.js +24 -24
  36. package/modules/WebController.js +37 -37
  37. package/objects/AttendanceEvent.js +39 -39
  38. package/objects/AuthUser.js +24 -24
  39. package/objects/Course.js +38 -38
  40. package/objects/CourseReservation.js +22 -22
  41. package/objects/Customer.js +20 -20
  42. package/objects/Enums.js +62 -62
  43. package/objects/Event.js +125 -125
  44. package/objects/Reservation.js +42 -42
  45. package/objects/Subject.js +24 -24
  46. package/objects/Teacher.js +18 -18
  47. package/objects/TeacherProfile.js +17 -17
  48. package/objects/Webinar.js +25 -25
  49. package/objects/billingInfo.js +29 -29
  50. package/package.json +1 -1
  51. package/toolkit/Toolkit.jsx +51 -51
@@ -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;
@@ -1,48 +1,48 @@
1
- /*
2
- * Copyright (C) 2025 iTutoring s.r.o.
3
- * All rights reserved.
4
- *
5
- *
6
- */
7
-
8
- class LessonInventory
9
- {
10
- static #MODULE = "LessonInventory";
11
-
12
- static #GET_AVAILABLE_SUBJECTS = "GetAvailableSubjects";
13
- static #GET_SUBJECT = "GetSubject";
14
- static #GET_SUBJECT_NAME = "GetSubjectName";
15
- static #SEARCH = "Search";
16
-
17
- static async getAvailableSubjects()
18
- {
19
- var subjects = await APIController.Get(this.#MODULE, this.#GET_AVAILABLE_SUBJECTS);
20
- return JSON.parse(subjects);
21
- }
22
-
23
- static async getSubject(id)
24
- {
25
- var subject = await APIController.Get(this.#MODULE, this.#GET_SUBJECT, {
26
- 'id': id
27
- });
28
- return JSON.parse(subject);
29
- }
30
-
31
- static async getSubjectName(id)
32
- {
33
- var name = await APIController.Get(this.#MODULE, this.#GET_SUBJECT_NAME, {
34
- 'id': id
35
- });
36
- return JSON.parse(name);
37
- }
38
-
39
- static async search(query)
40
- {
41
- var subjects = await APIController.Get(this.#MODULE, this.#SEARCH, {
42
- 'query': query
43
- });
44
- return JSON.parse(subjects);
45
- }
46
- }
47
-
1
+ /*
2
+ * Copyright (C) 2025 iTutoring s.r.o.
3
+ * All rights reserved.
4
+ *
5
+ *
6
+ */
7
+
8
+ class LessonInventory
9
+ {
10
+ static #MODULE = "LessonInventory";
11
+
12
+ static #GET_AVAILABLE_SUBJECTS = "GetAvailableSubjects";
13
+ static #GET_SUBJECT = "GetSubject";
14
+ static #GET_SUBJECT_NAME = "GetSubjectName";
15
+ static #SEARCH = "Search";
16
+
17
+ static async getAvailableSubjects()
18
+ {
19
+ var subjects = await APIController.Get(this.#MODULE, this.#GET_AVAILABLE_SUBJECTS);
20
+ return JSON.parse(subjects);
21
+ }
22
+
23
+ static async getSubject(id)
24
+ {
25
+ var subject = await APIController.Get(this.#MODULE, this.#GET_SUBJECT, {
26
+ 'id': id
27
+ });
28
+ return JSON.parse(subject);
29
+ }
30
+
31
+ static async getSubjectName(id)
32
+ {
33
+ var name = await APIController.Get(this.#MODULE, this.#GET_SUBJECT_NAME, {
34
+ 'id': id
35
+ });
36
+ return JSON.parse(name);
37
+ }
38
+
39
+ static async search(query)
40
+ {
41
+ var subjects = await APIController.Get(this.#MODULE, this.#SEARCH, {
42
+ 'query': query
43
+ });
44
+ return JSON.parse(subjects);
45
+ }
46
+ }
47
+
48
48
  export default LessonInventory;