tradly 1.0.21 → 1.0.25

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.
@@ -55,6 +55,10 @@ export const CHECKOUT = '/checkout';
55
55
  export const EPHERMERALKEY = 'v1/payments/stripe/ephemeralKey';
56
56
  export const PAYMENTINTENT = 'v1/payments/stripe/paymentIntent';
57
57
 
58
+ export const STRIPECONNECTACCOUNT = 'v1/payments/stripe/connect/account?account_id=';
59
+ export const CREATEACCOUNTLINK = 'v1/payments/stripe/connect/account_links';
60
+ export const CREATEEXPRESSLOGINLINK = 'v1/payments/stripe/connect/login_links';
61
+
58
62
 
59
63
  export const STATUS = '/status';
60
64
  export const REVIEW = '/v1/reviews';
package/Roots/App.js CHANGED
@@ -6,7 +6,10 @@ import {
6
6
  LANGUAGES, LIKE, LISTINGS, ORDERS,REVIEW,
7
7
  PAYMENTSMETHODS,ADDRESS, FOLLOW, COLLECTIONS, PROMO,
8
8
  SHIPPINGMETHOD, VARIANTS,CART, CHECKOUT,
9
- VALUES, TRANSACTIONS, EARNINGS, VARIANTTYPES, EPHERMERALKEY, PAYMENTINTENT, CONFIGLIST, STATUS,
9
+ VALUES, TRANSACTIONS, EARNINGS, VARIANTTYPES,
10
+ EPHERMERALKEY, PAYMENTINTENT, CONFIGLIST, STATUS,
11
+ S3SIGNEDURL, STRIPECONNECTACCOUNT,
12
+ CREATEACCOUNTLINK, CREATEEXPRESSLOGINLINK,
10
13
  } from './../Constants/PathConstant.js'
11
14
  import serialization from "../Helper/Serialization.js";
12
15
  import { APPCONSTANT } from "../Constants/AppConstant.js";
@@ -44,6 +47,12 @@ class App {
44
47
  else { return responseJson }
45
48
  } catch (error) { return error }
46
49
  }
50
+ async generateS3ImageURL(param = {authKey,data}) {
51
+ try { const [error, responseJson] = await network.networkCall({path:S3SIGNEDURL,method:Method.POST,param:param.data,authKey:param.authKey})
52
+ if (error) { return error }
53
+ else { return responseJson }
54
+ } catch (error) { return error }
55
+ }
47
56
  async uploadS3Image(param = ImageConfig) {
48
57
  try { const [error, responseJson] = await network.uploadImage(param)
49
58
  if (error) { return error }
@@ -362,6 +371,25 @@ class App {
362
371
  else { return responseJson }
363
372
  } catch (error) { return error }
364
373
  }
374
+ //MARK:-  KYC 
375
+ async getStripeConnectAccount(param={authKey,id}) {
376
+ try { const [error, responseJson] = await network.networkCall({path:STRIPECONNECTACCOUNT + `/${param.id}` ,method:Method.GET,authKey:param.authKey});
377
+ if (error) { return error }
378
+ else { return responseJson }
379
+ } catch (error) { return error }
380
+ }
381
+ async createAccountLink(param={authKey,data}) {
382
+ try { const [error, responseJson] = await network.networkCall({path:CREATEACCOUNTLINK,method:Method.POST,authKey:param.authKey,param:param.data});
383
+ if (error) { return error }
384
+ else { return responseJson }
385
+ } catch (error) { return error }
386
+ }
387
+ async createExpressLoginLink(param={authKey,data}) {
388
+ try { const [error, responseJson] = await network.networkCall({path:CREATEEXPRESSLOGINLINK,method:Method.POST,authKey:param.authKey,param:param.data});
389
+ if (error) { return error }
390
+ else { return responseJson }
391
+ } catch (error) { return error }
392
+ }
365
393
  //MARK:-  ORDERS API 
366
394
  async getOrders(param={authKey,bodyParam}) {
367
395
  let url = param.bodyParam == undefined || param.bodyParam == '' ? '' : `?${serialization(param.bodyParam)}`;
@@ -370,20 +398,23 @@ class App {
370
398
  else { return responseJson }
371
399
  } catch (error) { return error }
372
400
  }
373
- async getOrderDetail(param={authKey,id}) {
374
- try { const [error, responseJson] = await network.networkCall({path:ORDERS + `/${param.id}`,method:Method.GET,authKey:param.authKey});
401
+ async getOrderDetail(param={authKey,id,bodyParam}) {
402
+ let url = param.bodyParam == undefined || param.bodyParam == '' ? '' : `?${serialization(param.bodyParam)}`;
403
+ try { const [error, responseJson] = await network.networkCall({path:ORDERS + `/${param.id}` + url,method:Method.GET,authKey:param.authKey});
375
404
  if (error) { return error }
376
405
  else { return responseJson }
377
406
  } catch (error) { return error }
378
407
  }
379
- async updateOrderStatus(param={authKey,id,data}) {
380
- try { const [error, responseJson] = await network.networkCall({path:ORDERS + `/${param.id}` + STATUS,method:Method.PATCH,authKey:param.authKey,param:param.data});
408
+ async updateOrderStatus(param={authKey,id,data,bodyParam}) {
409
+ let url = param.bodyParam == undefined || param.bodyParam == '' ? '' : `?${serialization(param.bodyParam)}`;
410
+ try { const [error, responseJson] = await network.networkCall({path:ORDERS + `/${param.id}` + STATUS + url,method:Method.PATCH,authKey:param.authKey,param:param.data});
381
411
  if (error) { return error }
382
412
  else { return responseJson }
383
413
  } catch (error) { return error }
384
414
  }
385
- async updateOrderDetail(param={authKey,id,data}) {
386
- try { const [error, responseJson] = await network.networkCall({path:ORDERS + `/${param.id}`,method:Method.PATCH,authKey:param.authKey,param:param.data});
415
+ async updateOrderDetail(param={authKey,id,data,bodyParam}) {
416
+ let url = param.bodyParam == undefined || param.bodyParam == '' ? '' : `?${serialization(param.bodyParam)}`;
417
+ try { const [error, responseJson] = await network.networkCall({path:ORDERS + `/${param.id}` + url,method:Method.PATCH,authKey:param.authKey,param:param.data});
387
418
  if (error) { return error }
388
419
  else { return responseJson }
389
420
  } catch (error) { return error }
@@ -504,6 +535,8 @@ class App {
504
535
  else { return responseJson }
505
536
  } catch (error) { return error }
506
537
  }
538
+
539
+
507
540
  }
508
541
  const app = new App();
509
542
  export default app;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tradly",
3
- "version": "1.0.21",
3
+ "version": "1.0.25",
4
4
  "description": "Tradly JS SDK",
5
5
  "main": "index.js",
6
6
  "type": "module",