tradly 1.0.32 → 1.0.36

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.
@@ -19,6 +19,8 @@ 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
 
@@ -40,7 +42,7 @@ export const REPORT = '/report';
40
42
  export const LISTINGS = 'products/v1/listings';
41
43
  export const LIKE = '/likes';
42
44
  export const SCHEDULE = '/schedules';
43
- export const SCHEDULEPERDAY = 'schedules_per_day?';
45
+ export const SCHEDULEPERDAY = '/schedules_per_day?';
44
46
 
45
47
  export const VARIANTTYPES = 'products/v1/variant_types';
46
48
  export const VARIANTS = '/variants';
@@ -3,6 +3,7 @@
3
3
  import {to} from 'await-to-js';
4
4
  import axios from 'axios';
5
5
  import { APPCONSTANT} from '../Constants/AppConstant.js';
6
+ import { REFRESH } from '../Constants/PathConstant.js';
6
7
  import Environment, { ImageConfig } from '../Helper/APIParam.js';
7
8
 
8
9
  var header = {
package/Roots/App.js CHANGED
@@ -18,7 +18,7 @@ import { ImageConfig } from "../Helper/APIParam.js";
18
18
  class App {
19
19
  async getCountries() {
20
20
  try { const [error, responseJson] = await network.networkCall({path:COUNTRIES,method:Method.GET});
21
- if (error) { return error }
21
+ if (error) { return error }
22
22
  else { return responseJson }
23
23
  } catch (error) { return error }
24
24
  }
@@ -41,8 +41,8 @@ class App {
41
41
  } else { return responseJson}
42
42
  } catch (error) {return error}
43
43
  }
44
- async updateUserInfo(param = {data,authKey}) {
45
- try { const [error,responseJson] = await network.networkCall({path:USERS,method:Method.POST,param:param.data,authKey:param.authKey});
44
+ async updateUserInfo(param = {id,data,authKey}) {
45
+ try { const [error,responseJson] = await network.networkCall({path:USERS + `/${param.id}`,method:Method.PATCH,param:param.data,authKey:param.authKey});
46
46
  if (error) { return error;
47
47
  } else { return responseJson}
48
48
  } catch (error) {return error}
@@ -183,6 +183,19 @@ class App {
183
183
  else { return responseJson }
184
184
  } catch (error) { return error }
185
185
  }
186
+ async getMyListingsLikes(param={bodyParam,authKey}) {
187
+ let url = param.bodyParam == undefined || param.bodyParam == '' ? '' : `?${serialization(param.bodyParam)}`;
188
+ try { const [error, responseJson] = await network.networkCall({path:LISTINGS + LIKE+ url,method:Method.GET,authKey:param.authKey});
189
+ if (error) { return error }
190
+ else { return responseJson }
191
+ } catch (error) { return error }
192
+ }
193
+ async commonFuntion(param={path,bodyParam,authKey,Method}) {
194
+ try { const [error, responseJson] = await network.networkCall({path:path.param,method:Method,authKey:param.authKey});
195
+ if (error) { return error }
196
+ else { return responseJson }
197
+ } catch (error) { return error }
198
+ }
186
199
  //MARK:-  Schedules 
187
200
  async createSchedule(param={id,authKey,data}) {
188
201
  let path = LISTINGS + `/${param.id}` + SCHEDULE;
@@ -192,7 +205,7 @@ class App {
192
205
  } catch (error) { return error }
193
206
  }
194
207
  async getSchedule(param = {id,bodyParam,authKey}) {
195
- let url = param.bodyParam == undefined || param.bodyParam == '' ? '' : `?${serialization(param.bodyParam)}`;
208
+ let url = param.bodyParam == undefined || param.bodyParam == '' ? '' : `${serialization(param.bodyParam)}`;
196
209
  let path = LISTINGS + `/${param.id}` + SCHEDULEPERDAY;
197
210
  try { const [error, responseJson] = await network.networkCall({path:path + url, method:Method.GET,authKey:param.authKey});
198
211
  if (error) { return error }
package/Roots/Roots.js CHANGED
@@ -3,4 +3,4 @@
3
3
  import user from "./User.js";
4
4
  import init from "./Initialize.js";
5
5
  import app from './App.js';
6
- export default {init,user,app};
6
+ export default {init,user,app};
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tradly",
3
- "version": "1.0.32",
3
+ "version": "1.0.36",
4
4
  "description": "Tradly JS SDK",
5
5
  "main": "index.js",
6
6
  "type": "module",