tradly 1.0.33 → 1.0.37

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.
@@ -42,7 +42,7 @@ export const REPORT = '/report';
42
42
  export const LISTINGS = 'products/v1/listings';
43
43
  export const LIKE = '/likes';
44
44
  export const SCHEDULE = '/schedules';
45
- export const SCHEDULEPERDAY = 'schedules_per_day?';
45
+ export const SCHEDULEPERDAY = '/schedules_per_day?';
46
46
 
47
47
  export const VARIANTTYPES = 'products/v1/variant_types';
48
48
  export const VARIANTS = '/variants';
package/Roots/App.js CHANGED
@@ -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:param.path,method:param.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tradly",
3
- "version": "1.0.33",
3
+ "version": "1.0.37",
4
4
  "description": "Tradly JS SDK",
5
5
  "main": "index.js",
6
6
  "type": "module",