@itutoring/itutoring_application_js_api 1.22.10 → 1.23.0
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 -1
- package/modules/CustomerAuth.js +11 -0
- package/objects/RegistrationForm.js +15 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ import BillingInfo from "./objects/billingInfo";
|
|
|
56
56
|
import InquiryContactInfo from "./objects/InquiryContactInfo";
|
|
57
57
|
import InquiryAdditionalInfo from "./objects/InquiryAdditionalInfo";
|
|
58
58
|
import PlainInquiryInfo from "./objects/PlainInquiryInfo";
|
|
59
|
+
import RegistrationForm from "./objects/RegistrationForm";
|
|
59
60
|
|
|
60
61
|
import { InitializeDebugConsole } from "./dist/debugConsole";
|
|
61
62
|
|
|
@@ -119,6 +120,7 @@ export
|
|
|
119
120
|
InquiryContactInfo,
|
|
120
121
|
InquiryAdditionalInfo,
|
|
121
122
|
PlainInquiryInfo,
|
|
123
|
+
RegistrationForm,
|
|
122
124
|
|
|
123
125
|
BookReturn,
|
|
124
126
|
AuthResult,
|
package/index.js
CHANGED
|
@@ -54,6 +54,7 @@ import BillingInfo from "./objects/billingInfo";
|
|
|
54
54
|
import InquiryContactInfo from "./objects/InquiryContactInfo";
|
|
55
55
|
import InquiryAdditionalInfo from "./objects/InquiryAdditionalInfo";
|
|
56
56
|
import PlainInquiryInfo from "./objects/PlainInquiryInfo";
|
|
57
|
+
import RegistrationForm from "./objects/RegistrationForm";
|
|
57
58
|
|
|
58
59
|
import { InitializeDebugConsole } from "./dist/debugConsole";
|
|
59
60
|
|
|
@@ -117,7 +118,7 @@ export
|
|
|
117
118
|
InquiryContactInfo,
|
|
118
119
|
InquiryAdditionalInfo,
|
|
119
120
|
PlainInquiryInfo,
|
|
120
|
-
|
|
121
|
+
RegistrationForm,
|
|
121
122
|
BookReturn,
|
|
122
123
|
AuthResult,
|
|
123
124
|
PaymentType,
|
package/modules/CustomerAuth.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
import RegistrationForm from "../objects/RegistrationForm";
|
|
9
10
|
import APIController from "./../apiController";
|
|
10
11
|
|
|
11
12
|
class CustomerAuth
|
|
@@ -17,9 +18,18 @@ class CustomerAuth
|
|
|
17
18
|
|
|
18
19
|
// All method names
|
|
19
20
|
static #SIGN_IN = "SignIn";
|
|
21
|
+
static $REGISTER = "Register";
|
|
20
22
|
static #RESEND_CONFIRMATION_EMAIL = 'ResendConfirmationEmail';
|
|
21
23
|
static #REQUEST_PASSWORD_CHANGE = 'RequestPasswordChange';
|
|
22
24
|
|
|
25
|
+
static async Register(registrationForm = new RegistrationForm())
|
|
26
|
+
{
|
|
27
|
+
var result = await APIController.Post(this.#MODULE, this.$REGISTER, {
|
|
28
|
+
'form': JSON.stringify(registrationForm)
|
|
29
|
+
});
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
|
|
23
33
|
static async RequestPasswordChange(email)
|
|
24
34
|
{
|
|
25
35
|
var result = await APIController.Get(this.#MODULE, this.#REQUEST_PASSWORD_CHANGE, {
|
|
@@ -43,6 +53,7 @@ class CustomerAuth
|
|
|
43
53
|
* @param {*} email
|
|
44
54
|
* @param {*} pass
|
|
45
55
|
* @returns Int (AuthResult)
|
|
56
|
+
* @deprecated Use Register instead
|
|
46
57
|
*/
|
|
47
58
|
static async SignIn(email, pass)
|
|
48
59
|
{
|