@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/Payments.js
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
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 Payments
|
|
13
|
-
{
|
|
14
|
-
/**
|
|
15
|
-
* Respective module name for this class
|
|
16
|
-
*/
|
|
17
|
-
static #MODULE = "Payments";
|
|
18
|
-
|
|
19
|
-
// All method names
|
|
20
|
-
static #PURCHASE = "Purchase";
|
|
21
|
-
static #VALIDATE_PURCHASE = "ValidatePurchase";
|
|
22
|
-
static #GET_AVAILABLE_ITEMS = "GetAvailableItems";
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* @deprecated
|
|
26
|
-
* Purchase specific product. After calling you'll be redirected depending on the result to success or cancel (failed) url
|
|
27
|
-
* @param {*} product product name as defined in php such as HOUR_LESSON
|
|
28
|
-
* @param {*} type payment type (credits, card), use PaymentType enum
|
|
29
|
-
* @param {*} successUrl
|
|
30
|
-
* @param {*} cancelUrl
|
|
31
|
-
* @param {*} successUrlParams additional query string to success url - optional
|
|
32
|
-
* @returns if stripe payment; returns stripe page url
|
|
33
|
-
*/
|
|
34
|
-
static async Purchase(product, isSaled, type, successUrl, cancelUrl, successUrlParams = "")
|
|
35
|
-
{
|
|
36
|
-
var url = await APIController.Post(this.#MODULE, this.#PURCHASE, {
|
|
37
|
-
'product': product,
|
|
38
|
-
'saled': APIController.BoolToInt(isSaled),
|
|
39
|
-
'type': type,
|
|
40
|
-
'successUrl': successUrl,
|
|
41
|
-
'cancelUrl': cancelUrl,
|
|
42
|
-
'successUrlParams': successUrlParams,
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
return url;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* @deprecated
|
|
50
|
-
* Call on success page after purchase to mark the payment as successful.
|
|
51
|
-
*
|
|
52
|
-
* Will return false if is already marked.
|
|
53
|
-
* @param {*} id
|
|
54
|
-
* @returns bool
|
|
55
|
-
*/
|
|
56
|
-
static async ValidatePurchase(transactionId)
|
|
57
|
-
{
|
|
58
|
-
var res = await APIController.Get(this.#MODULE, this.#VALIDATE_PURCHASE, { 'id': transactionId });
|
|
59
|
-
|
|
60
|
-
return APIController.IntToBool(res);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Array of avaialable item names. returned as parsed json.
|
|
64
|
-
/**
|
|
65
|
-
* @deprecated
|
|
66
|
-
* @returns
|
|
67
|
-
*/
|
|
68
|
-
static async GetAvailableItems()
|
|
69
|
-
{
|
|
70
|
-
var res = await APIController.Get(this.#MODULE, this.#GET_AVAILABLE_ITEMS);
|
|
71
|
-
|
|
72
|
-
return JSON.parse(res);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
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 Payments
|
|
13
|
+
{
|
|
14
|
+
/**
|
|
15
|
+
* Respective module name for this class
|
|
16
|
+
*/
|
|
17
|
+
static #MODULE = "Payments";
|
|
18
|
+
|
|
19
|
+
// All method names
|
|
20
|
+
static #PURCHASE = "Purchase";
|
|
21
|
+
static #VALIDATE_PURCHASE = "ValidatePurchase";
|
|
22
|
+
static #GET_AVAILABLE_ITEMS = "GetAvailableItems";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated
|
|
26
|
+
* Purchase specific product. After calling you'll be redirected depending on the result to success or cancel (failed) url
|
|
27
|
+
* @param {*} product product name as defined in php such as HOUR_LESSON
|
|
28
|
+
* @param {*} type payment type (credits, card), use PaymentType enum
|
|
29
|
+
* @param {*} successUrl
|
|
30
|
+
* @param {*} cancelUrl
|
|
31
|
+
* @param {*} successUrlParams additional query string to success url - optional
|
|
32
|
+
* @returns if stripe payment; returns stripe page url
|
|
33
|
+
*/
|
|
34
|
+
static async Purchase(product, isSaled, type, successUrl, cancelUrl, successUrlParams = "")
|
|
35
|
+
{
|
|
36
|
+
var url = await APIController.Post(this.#MODULE, this.#PURCHASE, {
|
|
37
|
+
'product': product,
|
|
38
|
+
'saled': APIController.BoolToInt(isSaled),
|
|
39
|
+
'type': type,
|
|
40
|
+
'successUrl': successUrl,
|
|
41
|
+
'cancelUrl': cancelUrl,
|
|
42
|
+
'successUrlParams': successUrlParams,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
return url;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated
|
|
50
|
+
* Call on success page after purchase to mark the payment as successful.
|
|
51
|
+
*
|
|
52
|
+
* Will return false if is already marked.
|
|
53
|
+
* @param {*} id
|
|
54
|
+
* @returns bool
|
|
55
|
+
*/
|
|
56
|
+
static async ValidatePurchase(transactionId)
|
|
57
|
+
{
|
|
58
|
+
var res = await APIController.Get(this.#MODULE, this.#VALIDATE_PURCHASE, { 'id': transactionId });
|
|
59
|
+
|
|
60
|
+
return APIController.IntToBool(res);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Array of avaialable item names. returned as parsed json.
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated
|
|
66
|
+
* @returns
|
|
67
|
+
*/
|
|
68
|
+
static async GetAvailableItems()
|
|
69
|
+
{
|
|
70
|
+
var res = await APIController.Get(this.#MODULE, this.#GET_AVAILABLE_ITEMS);
|
|
71
|
+
|
|
72
|
+
return JSON.parse(res);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
76
|
export default Payments;
|
package/modules/Pricing.js
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
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 Pricing
|
|
13
|
-
{
|
|
14
|
-
static #MODULE = 'Pricing';
|
|
15
|
-
|
|
16
|
-
static #GET_PRICE_TABLE = 'GetPriceTable';
|
|
17
|
-
static #GET_LESSON_PRICE = 'GetLessonPrice';
|
|
18
|
-
static #GET_LESSON_PRICE_OFFER = 'GetLessonPriceOffer';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* desc: Get price table
|
|
22
|
-
*
|
|
23
|
-
* @returns
|
|
24
|
-
*/
|
|
25
|
-
static async getPriceTable()
|
|
26
|
-
{
|
|
27
|
-
var priceTable = await APIController.Get(this.#MODULE, this.#GET_PRICE_TABLE, {}, true);
|
|
28
|
-
|
|
29
|
-
return priceTable;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* desc: Get lesson price
|
|
34
|
-
*
|
|
35
|
-
* @param {*} type
|
|
36
|
-
* @param {*} len
|
|
37
|
-
* @param {*} count
|
|
38
|
-
* @returns
|
|
39
|
-
*/
|
|
40
|
-
static async getLessonPrice(type, len, count)
|
|
41
|
-
{
|
|
42
|
-
var price = await APIController.Get(this.#MODULE, this.#GET_LESSON_PRICE, {
|
|
43
|
-
'type': type,
|
|
44
|
-
'len': len,
|
|
45
|
-
'count': count,
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
return price;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* desc: Get lesson price offer
|
|
53
|
-
*
|
|
54
|
-
* @param {*} type
|
|
55
|
-
* @param {*} len
|
|
56
|
-
* @param {*} count
|
|
57
|
-
* @returns
|
|
58
|
-
*/
|
|
59
|
-
static async getLessonPriceOffer(type, len, count)
|
|
60
|
-
{
|
|
61
|
-
var price = await APIController.Get(this.#MODULE, this.#GET_LESSON_PRICE_OFFER, {
|
|
62
|
-
'type': type,
|
|
63
|
-
'len': len,
|
|
64
|
-
'count': count,
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
return price;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
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 Pricing
|
|
13
|
+
{
|
|
14
|
+
static #MODULE = 'Pricing';
|
|
15
|
+
|
|
16
|
+
static #GET_PRICE_TABLE = 'GetPriceTable';
|
|
17
|
+
static #GET_LESSON_PRICE = 'GetLessonPrice';
|
|
18
|
+
static #GET_LESSON_PRICE_OFFER = 'GetLessonPriceOffer';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* desc: Get price table
|
|
22
|
+
*
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
static async getPriceTable()
|
|
26
|
+
{
|
|
27
|
+
var priceTable = await APIController.Get(this.#MODULE, this.#GET_PRICE_TABLE, {}, true);
|
|
28
|
+
|
|
29
|
+
return priceTable;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* desc: Get lesson price
|
|
34
|
+
*
|
|
35
|
+
* @param {*} type
|
|
36
|
+
* @param {*} len
|
|
37
|
+
* @param {*} count
|
|
38
|
+
* @returns
|
|
39
|
+
*/
|
|
40
|
+
static async getLessonPrice(type, len, count)
|
|
41
|
+
{
|
|
42
|
+
var price = await APIController.Get(this.#MODULE, this.#GET_LESSON_PRICE, {
|
|
43
|
+
'type': type,
|
|
44
|
+
'len': len,
|
|
45
|
+
'count': count,
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
return price;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* desc: Get lesson price offer
|
|
53
|
+
*
|
|
54
|
+
* @param {*} type
|
|
55
|
+
* @param {*} len
|
|
56
|
+
* @param {*} count
|
|
57
|
+
* @returns
|
|
58
|
+
*/
|
|
59
|
+
static async getLessonPriceOffer(type, len, count)
|
|
60
|
+
{
|
|
61
|
+
var price = await APIController.Get(this.#MODULE, this.#GET_LESSON_PRICE_OFFER, {
|
|
62
|
+
'type': type,
|
|
63
|
+
'len': len,
|
|
64
|
+
'count': count,
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
return price;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
71
|
export default Pricing;
|
|
@@ -1,160 +1,49 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (C) 2024 iTutoring s.r.o.
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import BillingInfo from "../objects/billingInfo";
|
|
11
|
-
import APIController from "./../apiController";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
static #
|
|
22
|
-
|
|
23
|
-
static #
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
static async removeItemFromCart(itemSku)
|
|
50
|
-
{
|
|
51
|
-
await APIController.Post(this.#MODULE, this.#REMOVE_ITEM_FROM_CART, { 'sku': itemSku });
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
static async getCartItemsCount()
|
|
55
|
-
{
|
|
56
|
-
var count = await APIController.Get(this.#MODULE, this.#GET_CART_ITEMS_COUNT);
|
|
57
|
-
return count;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
static async addItemToCart(itemSku)
|
|
62
|
-
{
|
|
63
|
-
await APIController.Post(this.#MODULE, this.#ADD_ITEM_TO_CART, { 'itemSku': itemSku });
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
static async getCartItems()
|
|
67
|
-
{
|
|
68
|
-
var items = await APIController.Get(this.#MODULE, this.#GET_CART_ITEMS);
|
|
69
|
-
|
|
70
|
-
return items;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
static async getTotalPrice()
|
|
74
|
-
{
|
|
75
|
-
var price = await APIController.Get(this.#MODULE, this.#GET_TOTAL_PRICE);
|
|
76
|
-
|
|
77
|
-
return price;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
*
|
|
82
|
-
* @param {BillingInfo} billingInfo - BillingInfo model expected. You can use prepared js object or create just array.
|
|
83
|
-
* @param {*} proforma
|
|
84
|
-
* @param {*} vopAgree
|
|
85
|
-
* @param {*} gdprAgree
|
|
86
|
-
* @returns order id
|
|
87
|
-
*/
|
|
88
|
-
static async placeOrder(billingInfo, proforma = 1, vopAgree = 0, gdprAgree = 0)
|
|
89
|
-
{
|
|
90
|
-
var orderId = await APIController.Post(this.#MODULE, this.#PLACE_ORDER, {
|
|
91
|
-
'billingInfo': JSON.stringify(billingInfo),
|
|
92
|
-
'proforma': proforma,
|
|
93
|
-
'vopAgree': vopAgree,
|
|
94
|
-
'gdprAgree': gdprAgree
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
return orderId;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
static async sendOrderConfirmationEmail()
|
|
101
|
-
{
|
|
102
|
-
await APIController.Get(this.#MODULE, this.#SEND_ORDER_CONFIRMATION_EMAIL);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
static async clearCart()
|
|
106
|
-
{
|
|
107
|
-
await APIController.Post(this.#MODULE, this.#CLEAR_CART);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
static async applySaleCoupon(code)
|
|
111
|
-
{
|
|
112
|
-
await APIController.Post(this.#MODULE, this.#APPLY_SALE_COUPON, { 'code': code });
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
static async getAppliedSaleCoupons()
|
|
116
|
-
{
|
|
117
|
-
var coupons = await APIController.Get(this.#MODULE, this.#GET_APPLIED_SALE_COUPONS);
|
|
118
|
-
|
|
119
|
-
return coupons;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
static async removeSaleCoupon(code)
|
|
123
|
-
{
|
|
124
|
-
await APIController.Post(this.#MODULE, this.#REMOVE_SALE_COUPON, { 'code': code });
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
*
|
|
129
|
-
* @returns {Promise<array>} - array - sale amounts as sku=>amount
|
|
130
|
-
*/
|
|
131
|
-
static async getSaleAmounts()
|
|
132
|
-
{
|
|
133
|
-
var amounts = await APIController.Get(this.#MODULE, this.#GET_SALE_AMOUNTS);
|
|
134
|
-
|
|
135
|
-
return amounts;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Send request for tutoring. Will register as inquiry and it's id will be returned.
|
|
140
|
-
* @param {*} name
|
|
141
|
-
* @param {*} email
|
|
142
|
-
* @param {*} tel
|
|
143
|
-
* @param {*} msg
|
|
144
|
-
* @param {*} place must be PlaceID !
|
|
145
|
-
*/
|
|
146
|
-
static async SendRequest(fname, lname, email, tel, msg, place)
|
|
147
|
-
{
|
|
148
|
-
var id = await APIController.Post(this.#MODULE, this.#SEND_REQUEST, {
|
|
149
|
-
"fname": fname,
|
|
150
|
-
"lname": lname,
|
|
151
|
-
"email": email,
|
|
152
|
-
"tel": tel,
|
|
153
|
-
"msg": msg,
|
|
154
|
-
"place": place
|
|
155
|
-
})
|
|
156
|
-
return id;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2024 iTutoring s.r.o.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
import BillingInfo from "../objects/billingInfo";
|
|
11
|
+
import APIController from "./../apiController";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated
|
|
15
|
+
*/
|
|
16
|
+
class ReservationSystem
|
|
17
|
+
{
|
|
18
|
+
/**
|
|
19
|
+
* Respective module name for this class
|
|
20
|
+
*/
|
|
21
|
+
static #MODULE = "ReservationSystem";
|
|
22
|
+
|
|
23
|
+
static #SEND_REQUEST = "SendRequest";
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Send request for tutoring. Will register as inquiry and it's id will be returned.
|
|
29
|
+
* @param {*} name
|
|
30
|
+
* @param {*} email
|
|
31
|
+
* @param {*} tel
|
|
32
|
+
* @param {*} msg
|
|
33
|
+
* @param {*} place must be PlaceID !
|
|
34
|
+
*/
|
|
35
|
+
static async SendRequest(fname, lname, email, tel, msg, place)
|
|
36
|
+
{
|
|
37
|
+
var id = await APIController.Post(this.#MODULE, this.#SEND_REQUEST, {
|
|
38
|
+
"fname": fname,
|
|
39
|
+
"lname": lname,
|
|
40
|
+
"email": email,
|
|
41
|
+
"tel": tel,
|
|
42
|
+
"msg": msg,
|
|
43
|
+
"place": place
|
|
44
|
+
})
|
|
45
|
+
return id;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
160
49
|
export default ReservationSystem;
|
package/modules/Reviews.js
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
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 Reviews
|
|
13
|
-
{
|
|
14
|
-
static #MODULE = "Reviews";
|
|
15
|
-
|
|
16
|
-
static #GET_RANDOM_REVIEW = "GetRandomReview";
|
|
17
|
-
static #GET_REVIEWS = "GetReviews";
|
|
18
|
-
static #GET_RATING = "GetRating";
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* desc: Get random review
|
|
22
|
-
* @returns
|
|
23
|
-
*/
|
|
24
|
-
static async GetRandomReview()
|
|
25
|
-
{
|
|
26
|
-
const review = await APIController.Get(this.#MODULE, this.#GET_RANDOM_REVIEW, {});
|
|
27
|
-
|
|
28
|
-
return review;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* desc: Get reviews
|
|
33
|
-
* @returns
|
|
34
|
-
*/
|
|
35
|
-
static async GetReviews()
|
|
36
|
-
{
|
|
37
|
-
const reviews = await APIController.Get(this.#MODULE, this.#GET_REVIEWS, {}, true);
|
|
38
|
-
|
|
39
|
-
return reviews;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* desc: Get rating
|
|
44
|
-
* @returns
|
|
45
|
-
*/
|
|
46
|
-
static async GetRating()
|
|
47
|
-
{
|
|
48
|
-
const rating = await APIController.Get(this.#MODULE, this.#GET_RATING, {}, true);
|
|
49
|
-
|
|
50
|
-
return rating;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
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 Reviews
|
|
13
|
+
{
|
|
14
|
+
static #MODULE = "Reviews";
|
|
15
|
+
|
|
16
|
+
static #GET_RANDOM_REVIEW = "GetRandomReview";
|
|
17
|
+
static #GET_REVIEWS = "GetReviews";
|
|
18
|
+
static #GET_RATING = "GetRating";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* desc: Get random review
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
static async GetRandomReview()
|
|
25
|
+
{
|
|
26
|
+
const review = await APIController.Get(this.#MODULE, this.#GET_RANDOM_REVIEW, {});
|
|
27
|
+
|
|
28
|
+
return review;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* desc: Get reviews
|
|
33
|
+
* @returns
|
|
34
|
+
*/
|
|
35
|
+
static async GetReviews()
|
|
36
|
+
{
|
|
37
|
+
const reviews = await APIController.Get(this.#MODULE, this.#GET_REVIEWS, {}, true);
|
|
38
|
+
|
|
39
|
+
return reviews;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* desc: Get rating
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
static async GetRating()
|
|
47
|
+
{
|
|
48
|
+
const rating = await APIController.Get(this.#MODULE, this.#GET_RATING, {}, true);
|
|
49
|
+
|
|
50
|
+
return rating;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
54
|
export default Reviews;
|