tradly 1.0.57 → 1.0.60

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.
@@ -77,6 +77,11 @@ export const TRANSACTIONS = '/v1/transactions';
77
77
  export const EARNINGS = '/v1/earnings';
78
78
 
79
79
  export const BLOCKEDACCOUNT = '/v1/accounts/feeds/blocked?type=accounts&'
80
+ export const FOLLOWINGACCOUNT = '/v1/accounts/feeds/following?type=accounts&'
81
+
82
+ export const FOLLOWINGLISTING = '/v1/accounts/feeds/following?type=listings&'
83
+
84
+ export const LAYER = '/v1/layers';
80
85
 
81
86
 
82
87
 
package/Roots/App.js CHANGED
@@ -9,10 +9,11 @@ import {
9
9
  VALUES, TRANSACTIONS, EARNINGS, VARIANTTYPES,
10
10
  EPHERMERALKEY, PAYMENTINTENT, CONFIGLIST, STATUS,
11
11
  S3SIGNEDURL, STRIPECONNECTACCOUNT,
12
- CREATEACCOUNTLINK, CREATEEXPRESSLOGINLINK, SCHEDULE, SCHEDULEPERDAY, COUNTRIES, TENANTSCOUNTRIES, SLUG, BLOCKEDACCOUNT,
12
+ CREATEACCOUNTLINK, CREATEEXPRESSLOGINLINK, SCHEDULE,
13
+ SCHEDULEPERDAY, COUNTRIES, TENANTSCOUNTRIES, SLUG,
14
+ BLOCKEDACCOUNT, FOLLOWINGACCOUNT, LAYER, FOLLOWINGLISTING,
13
15
  } from './../Constants/PathConstant.js'
14
16
  import serialization from "../Helper/Serialization.js";
15
- import { APPCONSTANT } from "../Constants/AppConstant.js";
16
17
  import { ImageConfig } from "../Helper/APIParam.js";
17
18
 
18
19
  class App {
@@ -179,16 +180,16 @@ class App {
179
180
  else { return responseJson }
180
181
  } catch (error) { return error }
181
182
  }
182
- async getBlockedAccounts(param={bodyParam,authKey}) {
183
+ async getBlockAccounts(param={bodyParam,authKey}) {
183
184
  let url = `${serialization(param.bodyParam)}`
184
- try { const [error, responseJson] = await network.networkCall({path:BLOCKEDACCOUNT + `${url}`,method:Method.GET,authKey:param.authKey})
185
+ try { const [error, responseJson] = await network.networkCall({path:BLOCKEDACCOUNT + `${url}`,method:Method.GET,authKey:param.authKey});
185
186
  if (error) { return error }
186
187
  else { return responseJson }
187
188
  } catch (error) { return error }
188
189
  }
189
- async getBlockAccounts(param={bodyParam,authKey}) {
190
- let url = `${serialization(param.bodyParam)}`;
191
- try { const [error, responseJson] = await network.networkCall({path:BLOCKEDACCOUNT + `${url}`,method:Method.GET,authKey:param.authKey});
190
+ async getFollowingAccounts(param={bodyParam,authKey}) {
191
+ let url = `${serialization(param.bodyParam)}`
192
+ try { const [error, responseJson] = await network.networkCall({path:FOLLOWINGACCOUNT + `${url}`,method:Method.GET,authKey:param.authKey});
192
193
  if (error) { return error }
193
194
  else { return responseJson }
194
195
  } catch (error) { return error }
@@ -254,6 +255,14 @@ class App {
254
255
  else { return responseJson }
255
256
  } catch (error) { return error }
256
257
  }
258
+ async reportListing(param={id,authKey,data}) {
259
+ let method = Method.POST
260
+ let path = LISTINGS + `/${param.id}` + REPORT
261
+ try { const [error, responseJson] = await network.networkCall({path:path,method:method,authKey:param.authKey,param:param.data});
262
+ if (error) { return error }
263
+ else { return responseJson }
264
+ } catch (error) { return error }
265
+ }
257
266
  async commonFuntion(param={path,bodyParam,data,authKey,Method}) {
258
267
  let url = param.bodyParam == undefined || param.bodyParam == '' ? '' : `?${serialization(param.bodyParam)}`;
259
268
  try { const [error, responseJson] = await network.networkCall({path:param.path + url,method:param.Method,authKey:param.authKey,param:param.data});
@@ -261,6 +270,13 @@ class App {
261
270
  else { return responseJson }
262
271
  } catch (error) { return error }
263
272
  }
273
+ async getFollowingListings(param={bodyParam,authKey}) {
274
+ let url = `${serialization(param.bodyParam)}`
275
+ try { const [error, responseJson] = await network.networkCall({path:FOLLOWINGLISTING + `${url}`,method:Method.GET,authKey:param.authKey});
276
+ if (error) { return error }
277
+ else { return responseJson }
278
+ } catch (error) { return error }
279
+ }
264
280
  //MARK:-  Schedules 
265
281
  async createSchedule(param={id,authKey,data}) {
266
282
  let path = LISTINGS + `/${param.id}` + SCHEDULE;
@@ -642,8 +658,40 @@ class App {
642
658
  else { return responseJson }
643
659
  } catch (error) { return error }
644
660
  }
645
-
646
-
661
+ //MARK:-  Layer 
662
+ async getLayer(param={authKey,bodyParam}) {
663
+ let url = param.bodyParam == undefined || param.bodyParam == '' ? '' : `?${serialization(param.bodyParam)}`;
664
+ try { const [error, responseJson] = await network.networkCall({path:LAYER + url,method:Method.GET,authKey:param.authKey});
665
+ if (error) { return error }
666
+ else { return responseJson }
667
+ } catch (error) { return error }
668
+ }
669
+ async getLayerDetail(param={authKey,id}) {
670
+ try { const [error, responseJson] = await network.networkCall({path:LAYER + `/${param.id}`,method:Method.GET,authKey:param.authKey});
671
+ if (error) { return error }
672
+ else { return responseJson }
673
+ } catch (error) { return error }
674
+ }
675
+ async getLayerDetailBySlug(param={authKey,id}) {
676
+ try { const [error, responseJson] = await network.networkCall({path:LAYER + SLUG + `${param.id}`,method:Method.GET,authKey:param.authKey});
677
+ if (error) { return error }
678
+ else { return responseJson }
679
+ } catch (error) { return error }
680
+ }
681
+ async addEditLayer(param={id,authKey,data}) {
682
+ let method = param.id == undefined || param.id == '' ? Method.POST : Method.PUT
683
+ let path = param.id == undefined || param.id == '' ? LAYER : LAYER + `/${param.id}`
684
+ try { const [error, responseJson] = await network.networkCall({path:path,method:method,authKey:param.authKey,param:param.data});
685
+ if (error) { return error }
686
+ else { return responseJson }
687
+ } catch (error) { return error }
688
+ }
689
+ async deleteLayer(param={id,authKey}) {
690
+ try { const [error, responseJson] = await network.networkCall({path:LAYER + `/${param.id}`,method:Method.DELETE,authKey:param.authKey});
691
+ if (error) { return error }
692
+ else { return responseJson }
693
+ } catch (error) { return error }
694
+ }
647
695
  }
648
696
  const app = new App();
649
697
  export default app;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tradly",
3
- "version": "1.0.57",
3
+ "version": "1.0.60",
4
4
  "description": "Tradly JS SDK",
5
5
  "main": "index.js",
6
6
  "type": "module",