tradly 1.0.30 → 1.0.34
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 +5 -1
- package/NetworkManager/NetworkManager.js +1 -0
- package/Roots/App.js +16 -4
- package/Roots/Roots.js +1 -1
- package/Roots/User.js +7 -1
- package/package.json +1 -1
|
@@ -19,12 +19,16 @@ export const LOGIN = 'v1/users/login';
|
|
|
19
19
|
export const REGISTER = 'v1/users/register';
|
|
20
20
|
export const VERIFY = 'v1/users/verify';
|
|
21
21
|
export const FORGOTPASSWORD = 'v1/users/password/recovery';
|
|
22
|
+
export const SETPASSWORD = 'v1/users/password/set';
|
|
23
|
+
|
|
22
24
|
export const USERS = 'v1/users';
|
|
23
25
|
export const DEVICES = 'v1/devices';
|
|
24
26
|
|
|
25
27
|
export const ADDRESS = '/v1/addresses'
|
|
26
28
|
export const CURRENCY = 'v1/currencies';
|
|
27
29
|
export const LANGUAGES = 'v1/languages';
|
|
30
|
+
export const COUNTRIES = 'v1/countries';
|
|
31
|
+
export const TENANTSCOUNTRIES = 'v1/tenants/countries';
|
|
28
32
|
|
|
29
33
|
export const CATEGORY = 'v1/categories';
|
|
30
34
|
export const ATTRIBUTE= 'v1/attributes';
|
|
@@ -38,7 +42,7 @@ export const REPORT = '/report';
|
|
|
38
42
|
export const LISTINGS = 'products/v1/listings';
|
|
39
43
|
export const LIKE = '/likes';
|
|
40
44
|
export const SCHEDULE = '/schedules';
|
|
41
|
-
export const SCHEDULEPERDAY = 'schedules_per_day?';
|
|
45
|
+
export const SCHEDULEPERDAY = '/schedules_per_day?';
|
|
42
46
|
|
|
43
47
|
export const VARIANTTYPES = 'products/v1/variant_types';
|
|
44
48
|
export const VARIANTS = '/variants';
|
package/Roots/App.js
CHANGED
|
@@ -9,13 +9,25 @@ import {
|
|
|
9
9
|
VALUES, TRANSACTIONS, EARNINGS, VARIANTTYPES,
|
|
10
10
|
EPHERMERALKEY, PAYMENTINTENT, CONFIGLIST, STATUS,
|
|
11
11
|
S3SIGNEDURL, STRIPECONNECTACCOUNT,
|
|
12
|
-
CREATEACCOUNTLINK, CREATEEXPRESSLOGINLINK, SCHEDULE, SCHEDULEPERDAY,
|
|
12
|
+
CREATEACCOUNTLINK, CREATEEXPRESSLOGINLINK, SCHEDULE, SCHEDULEPERDAY, COUNTRIES, TENANTSCOUNTRIES,
|
|
13
13
|
} from './../Constants/PathConstant.js'
|
|
14
14
|
import serialization from "../Helper/Serialization.js";
|
|
15
15
|
import { APPCONSTANT } from "../Constants/AppConstant.js";
|
|
16
16
|
import { ImageConfig } from "../Helper/APIParam.js";
|
|
17
17
|
|
|
18
18
|
class App {
|
|
19
|
+
async getCountries() {
|
|
20
|
+
try { const [error, responseJson] = await network.networkCall({path:COUNTRIES,method:Method.GET});
|
|
21
|
+
if (error) { return error }
|
|
22
|
+
else { return responseJson }
|
|
23
|
+
} catch (error) { return error }
|
|
24
|
+
}
|
|
25
|
+
async getTenantCountries(param = {authKey}) {
|
|
26
|
+
try { const [error, responseJson] = await network.networkCall({path:TENANTSCOUNTRIES,method:Method.GET,authKey:param.authKey});
|
|
27
|
+
if (error) { return error }
|
|
28
|
+
else { return responseJson }
|
|
29
|
+
} catch (error) { return error }
|
|
30
|
+
}
|
|
19
31
|
async getConfigList(param = {paramBody,authKey}) {
|
|
20
32
|
let url = `${CONFIGLIST}${param.paramBody}`
|
|
21
33
|
try { const [error, responseJson] = await network.networkCall({path:url,method:Method.GET,authKey:param.authKey});
|
|
@@ -180,7 +192,7 @@ class App {
|
|
|
180
192
|
} catch (error) { return error }
|
|
181
193
|
}
|
|
182
194
|
async getSchedule(param = {id,bodyParam,authKey}) {
|
|
183
|
-
let url = param.bodyParam == undefined || param.bodyParam == '' ? '' :
|
|
195
|
+
let url = param.bodyParam == undefined || param.bodyParam == '' ? '' : `${serialization(param.bodyParam)}`;
|
|
184
196
|
let path = LISTINGS + `/${param.id}` + SCHEDULEPERDAY;
|
|
185
197
|
try { const [error, responseJson] = await network.networkCall({path:path + url, method:Method.GET,authKey:param.authKey});
|
|
186
198
|
if (error) { return error }
|
|
@@ -196,14 +208,14 @@ class App {
|
|
|
196
208
|
}
|
|
197
209
|
async addEditVariants(param={authKey,listingId,id,data}) {
|
|
198
210
|
let method = param.id == undefined || param.id == '' ? Method.POST : Method.PUT
|
|
199
|
-
let path = param.id == undefined || param.id == '' ? LISTINGS + `/${param.listingId}
|
|
211
|
+
let path = param.id == undefined || param.id == '' ? LISTINGS + `/${param.listingId}` + VARIANTS : LISTINGS + `/${param.listingId}` + VARIANTS + `/${param.id}`
|
|
200
212
|
try { const [error, responseJson] = await network.networkCall({path:path,method:method,param:param.data,authKey:param.authKey});
|
|
201
213
|
if (error) { return error }
|
|
202
214
|
else { return responseJson }
|
|
203
215
|
} catch (error) { return error }
|
|
204
216
|
}
|
|
205
217
|
async deleteVariant(param={id,listingId,authKey}) {
|
|
206
|
-
let url = LISTINGS + `/${param.listingId}
|
|
218
|
+
let url = LISTINGS + `/${param.listingId}` + VARIANTS + `/${param.id}`
|
|
207
219
|
try { const [error, responseJson] = await network.networkCall({path:url,method:Method.DELETE,authKey:param.authKey});
|
|
208
220
|
if (error) { return error }
|
|
209
221
|
else { return responseJson }
|
package/Roots/Roots.js
CHANGED
package/Roots/User.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import network, { Method } from "./../NetworkManager/NetworkManager.js"
|
|
3
|
-
import {FORGOTPASSWORD, LOGIN, REGISTER,VERIFY} from './../Constants/PathConstant.js'
|
|
3
|
+
import {FORGOTPASSWORD, LOGIN, REGISTER,SETPASSWORD,VERIFY} from './../Constants/PathConstant.js'
|
|
4
4
|
import { UserParameter } from "../Helper/APIParam.js";
|
|
5
5
|
|
|
6
6
|
class User {
|
|
@@ -33,6 +33,12 @@ class User {
|
|
|
33
33
|
} else { return responseJson}
|
|
34
34
|
} catch (error) { return error}
|
|
35
35
|
}
|
|
36
|
+
async setPassword(param = UserParameter) {
|
|
37
|
+
try { const [error,responseJson] = await network.networkCall({path:SETPASSWORD,method:Method.POST,param:param.data});
|
|
38
|
+
if (error) { return error
|
|
39
|
+
} else { return responseJson}
|
|
40
|
+
} catch (error) { return error}
|
|
41
|
+
}
|
|
36
42
|
}
|
|
37
43
|
const user = new User();
|
|
38
44
|
export default user;
|