@itutoring/itutoring_application_js_api 1.11.4 → 1.12.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 +6 -0
- package/index.js +6 -0
- package/modules/InquiryCheckout.js +76 -0
- package/objects/InquiryAdditionalInfo.js +22 -0
- package/objects/InquiryContactInfo.js +17 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ import MarketplaceController from "./modules/MarketplaceController";
|
|
|
33
33
|
import LessonInventory from "./modules/LessonInventory";
|
|
34
34
|
import Cart from "./modules/Cart";
|
|
35
35
|
import Checkout from "./modules/Checkout";
|
|
36
|
+
import InquiryCheckout from "./modules/InquiryCheckout";
|
|
36
37
|
|
|
37
38
|
import Course from "./objects/Course";
|
|
38
39
|
import CourseReservation from "./objects/CourseReservation";
|
|
@@ -51,6 +52,8 @@ import Reviews from "./modules/Reviews";
|
|
|
51
52
|
import FAQ from "./modules/FAQ";
|
|
52
53
|
import Inventory from "./modules/Inventory";
|
|
53
54
|
import BillingInfo from "./objects/billingInfo";
|
|
55
|
+
import InquiryContactInfo from "./objects/InquiryContactInfo";
|
|
56
|
+
import InquiryAdditionalInfo from "./objects/InquiryAdditionalInfo";
|
|
54
57
|
|
|
55
58
|
import
|
|
56
59
|
{
|
|
@@ -93,6 +96,7 @@ export
|
|
|
93
96
|
LessonInventory,
|
|
94
97
|
Cart,
|
|
95
98
|
Checkout,
|
|
99
|
+
InquiryCheckout,
|
|
96
100
|
|
|
97
101
|
Course,
|
|
98
102
|
CourseReservation,
|
|
@@ -105,6 +109,8 @@ export
|
|
|
105
109
|
AuthUser,
|
|
106
110
|
AttendanceEvent,
|
|
107
111
|
BillingInfo,
|
|
112
|
+
InquiryContactInfo,
|
|
113
|
+
InquiryAdditionalInfo,
|
|
108
114
|
|
|
109
115
|
BookReturn,
|
|
110
116
|
AuthResult,
|
package/index.js
CHANGED
|
@@ -30,6 +30,7 @@ import MarketplaceController from "./modules/MarketplaceController";
|
|
|
30
30
|
import LessonInventory from "./modules/LessonInventory";
|
|
31
31
|
import Cart from "./modules/Cart";
|
|
32
32
|
import Checkout from "./modules/Checkout";
|
|
33
|
+
import InquiryCheckout from "./modules/InquiryCheckout";
|
|
33
34
|
|
|
34
35
|
import Course from "./objects/Course";
|
|
35
36
|
import CourseReservation from "./objects/CourseReservation";
|
|
@@ -49,6 +50,8 @@ import Reviews from "./modules/Reviews";
|
|
|
49
50
|
import FAQ from "./modules/FAQ";
|
|
50
51
|
import Inventory from "./modules/Inventory";
|
|
51
52
|
import BillingInfo from "./objects/billingInfo";
|
|
53
|
+
import InquiryContactInfo from "./objects/InquiryContactInfo";
|
|
54
|
+
import InquiryAdditionalInfo from "./objects/InquiryAdditionalInfo";
|
|
52
55
|
|
|
53
56
|
import
|
|
54
57
|
{
|
|
@@ -91,6 +94,7 @@ export
|
|
|
91
94
|
LessonInventory,
|
|
92
95
|
Cart,
|
|
93
96
|
Checkout,
|
|
97
|
+
InquiryCheckout,
|
|
94
98
|
|
|
95
99
|
Course,
|
|
96
100
|
CourseReservation,
|
|
@@ -103,6 +107,8 @@ export
|
|
|
103
107
|
AuthUser,
|
|
104
108
|
AttendanceEvent,
|
|
105
109
|
BillingInfo,
|
|
110
|
+
InquiryContactInfo,
|
|
111
|
+
InquiryAdditionalInfo,
|
|
106
112
|
|
|
107
113
|
BookReturn,
|
|
108
114
|
AuthResult,
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2025 iTutoring s.r.o.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import APIController from "../apiController";
|
|
9
|
+
|
|
10
|
+
class InquiryCheckout
|
|
11
|
+
{
|
|
12
|
+
static #MODULE = "InquiryCheckout";
|
|
13
|
+
|
|
14
|
+
static #ADD_SUBJECT = "AddSubject";
|
|
15
|
+
static #REMOVE_SUBJECT = "RemoveSubject";
|
|
16
|
+
static #GET_CHECKOUT_SUBJECTS = "GetCheckoutSubjects";
|
|
17
|
+
static #CLEAR_CHECKOUT = "ClearCheckout";
|
|
18
|
+
static #SEND_INQUIRY = "SendInquiry";
|
|
19
|
+
static #FINISH_INQUIRY = "FinishInquiry";
|
|
20
|
+
static #IS_SUBJECT_IN_CHECKOUT = "IsSubjectInCheckout";
|
|
21
|
+
|
|
22
|
+
static async isSubjectInCheckout(subjectId)
|
|
23
|
+
{
|
|
24
|
+
var res = await APIController.Get(this.#MODULE, this.#IS_SUBJECT_IN_CHECKOUT, {
|
|
25
|
+
'subjectId': subjectId
|
|
26
|
+
});
|
|
27
|
+
return res
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
static async addSubject(subjectId, level = 0)
|
|
31
|
+
{
|
|
32
|
+
var res = await APIController.Post(this.#MODULE, this.#ADD_SUBJECT, {
|
|
33
|
+
'subjectId': subjectId,
|
|
34
|
+
'level': level
|
|
35
|
+
});
|
|
36
|
+
return res;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
static async removeSubject(subjectId)
|
|
40
|
+
{
|
|
41
|
+
var res = await APIController.Post(this.#MODULE, this.#REMOVE_SUBJECT, {
|
|
42
|
+
'subjectId': subjectId,
|
|
43
|
+
});
|
|
44
|
+
return res;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
static async getCheckoutSubjects()
|
|
48
|
+
{
|
|
49
|
+
var res = await APIController.Get(this.#MODULE, this.#GET_CHECKOUT_SUBJECTS);
|
|
50
|
+
return res;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
static async clearCheckout()
|
|
54
|
+
{
|
|
55
|
+
await APIController.Post(this.#MODULE, this.#CLEAR_CHECKOUT);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
static async sendInquiry(contactInfo)
|
|
59
|
+
{
|
|
60
|
+
var res = await APIController.Post(this.#MODULE, this.#SEND_INQUIRY, {
|
|
61
|
+
'contactInfo': JSON.stringify(contactInfo)
|
|
62
|
+
});
|
|
63
|
+
return res;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
static async finishInquiry(inquiryId, additionalInfo)
|
|
67
|
+
{
|
|
68
|
+
var res = await APIController.Post(this.#MODULE, this.#FINISH_INQUIRY, {
|
|
69
|
+
'inquiryId': inquiryId,
|
|
70
|
+
'additionalInfo': JSON.stringify(additionalInfo)
|
|
71
|
+
});
|
|
72
|
+
return res;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export default InquiryCheckout;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2025 iTutoring s.r.o.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
class InquiryAdditionalInfo
|
|
9
|
+
{
|
|
10
|
+
StudentName = "";
|
|
11
|
+
StudentAge = 1;
|
|
12
|
+
ClassId = "";
|
|
13
|
+
Gender = 2;
|
|
14
|
+
TutoringDetails = "";
|
|
15
|
+
Note = "";
|
|
16
|
+
/**
|
|
17
|
+
* Json string
|
|
18
|
+
*/
|
|
19
|
+
Availability = "";
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default InquiryAdditionalInfo;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2025 iTutoring s.r.o.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
class InquiryContactInfo
|
|
9
|
+
{
|
|
10
|
+
FirstName = "";
|
|
11
|
+
LastName = "";
|
|
12
|
+
Email = "";
|
|
13
|
+
Phone = "";
|
|
14
|
+
PlaceId = "online";
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default InquiryContactInfo;
|