tradly 1.2.9 → 1.2.11
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/Constants/PathConstant.js +1 -0
- package/Roots/App.js +6 -1
- package/Roots/User.js +22 -0
- package/package.json +1 -1
|
@@ -21,6 +21,7 @@ export const REGISTER = "/v1/users/register";
|
|
|
21
21
|
export const VERIFY = "/v1/users/verify";
|
|
22
22
|
export const FORGOTPASSWORD = "/v1/users/password/recovery";
|
|
23
23
|
export const SETPASSWORD = "/v1/users/password/set";
|
|
24
|
+
export const RESETPASSWORD = "/v1/users/password/change";
|
|
24
25
|
|
|
25
26
|
export const USERS = "/v1/users";
|
|
26
27
|
export const DEVICES = "/v1/devices";
|
package/Roots/App.js
CHANGED
|
@@ -111,11 +111,14 @@ class App {
|
|
|
111
111
|
return error;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
async getCountries() {
|
|
114
|
+
async getCountries(param = { authKey }) {
|
|
115
115
|
try {
|
|
116
116
|
const [error, responseJson] = await network.networkCall({
|
|
117
117
|
path: COUNTRIES,
|
|
118
118
|
method: Method.GET,
|
|
119
|
+
pkKey: param.pkKey,
|
|
120
|
+
authKey: param.authKey,
|
|
121
|
+
baseURL: param.baseURL,
|
|
119
122
|
});
|
|
120
123
|
if (error) {
|
|
121
124
|
return error;
|
|
@@ -3243,6 +3246,8 @@ class App {
|
|
|
3243
3246
|
path: CURRENCY,
|
|
3244
3247
|
method: Method.GET,
|
|
3245
3248
|
authKey: param.authKey,
|
|
3249
|
+
pkKey: param.pkKey,
|
|
3250
|
+
baseURL: param.baseURL,
|
|
3246
3251
|
});
|
|
3247
3252
|
if (error) {
|
|
3248
3253
|
return error;
|
package/Roots/User.js
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
LOGIN,
|
|
5
5
|
LOGOUT,
|
|
6
6
|
REGISTER,
|
|
7
|
+
RESETPASSWORD,
|
|
7
8
|
SETPASSWORD,
|
|
8
9
|
SOCIAL_LOGIN,
|
|
9
10
|
VERIFY,
|
|
@@ -136,6 +137,27 @@ class User {
|
|
|
136
137
|
}
|
|
137
138
|
}
|
|
138
139
|
|
|
140
|
+
async resetPassword(param = UserParameter) {
|
|
141
|
+
try {
|
|
142
|
+
const [error, responseJson] = await network.networkCall({
|
|
143
|
+
path: RESETPASSWORD,
|
|
144
|
+
method: Method.POST,
|
|
145
|
+
param: param.data,
|
|
146
|
+
currency: param.currency,
|
|
147
|
+
language: param.language,
|
|
148
|
+
pkKey: param.pkKey,
|
|
149
|
+
authKey: param.authKey,
|
|
150
|
+
});
|
|
151
|
+
if (error) {
|
|
152
|
+
return error;
|
|
153
|
+
} else {
|
|
154
|
+
return responseJson;
|
|
155
|
+
}
|
|
156
|
+
} catch (error) {
|
|
157
|
+
return error;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
139
161
|
async logout(param = { data }) {
|
|
140
162
|
try {
|
|
141
163
|
const [error, responseJson] = await network.networkCall({
|