tradly 1.1.99 → 1.2.1

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.
@@ -1,22 +1,26 @@
1
- import {DEV, PRO, SANDBOX } from "../Constants/PathConstant.js"
1
+ import { DEV, PRO, SANDBOX } from "../Constants/PathConstant.js";
2
2
 
3
3
  export var EVN = {
4
- DEV:'development',
5
- PRO: 'production',
6
- SANDBOX: 'sandbox',
7
- }
8
- export var UserParameter = {data:{}}
4
+ DEV: "development",
5
+ PRO: "production",
6
+ SANDBOX: "sandbox",
7
+ };
8
+ export var UserParameter = { data: {} };
9
9
  export default function Environment(evn) {
10
- switch(evn) {
11
- case EVN.DEV : return DEV
12
- case EVN.SANDBOX : return SANDBOX
13
- case EVN.PRO : return PRO
14
- default : return DEV
15
- }
10
+ switch (evn) {
11
+ case EVN.DEV:
12
+ return DEV;
13
+ case EVN.SANDBOX:
14
+ return SANDBOX;
15
+ case EVN.PRO:
16
+ return PRO;
17
+ default:
18
+ return PRO;
19
+ }
16
20
  }
17
21
 
18
22
  export var ImageConfig = {
19
- signedUrl:'',
20
- mime:'',
21
- blob_body:''
22
- }
23
+ signedUrl: "",
24
+ mime: "",
25
+ blob_body: "",
26
+ };
@@ -29,6 +29,7 @@ export var TradlyConfig = {
29
29
  currency: "",
30
30
  language: "",
31
31
  barrow_access_key: "",
32
+ pkKey: "",
32
33
  };
33
34
 
34
35
  class NetworkManager {
@@ -58,7 +59,7 @@ class NetworkManager {
58
59
  };
59
60
 
60
61
  // Auto-get PK key from auth if not provided and auth is available
61
- let pkKey = APPCONSTANT.TOKEN;
62
+ let pkKey = APPCONSTANT.TOKEN || config.pkKey;
62
63
  if (!pkKey && !APPCONSTANT.IS_SKIP_PK_BY_DOMAIN) {
63
64
  const authPKKey = getPKKeyFromAuth();
64
65
  if (authPKKey) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tradly",
3
- "version": "1.1.99",
3
+ "version": "1.2.1",
4
4
  "description": "Tradly JS SDK",
5
5
  "main": "index.js",
6
6
  "type": "module",