tradly 1.0.39 → 1.0.40

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,29 +1,29 @@
1
- import { APPCONSTANT } from "../Constants/AppConstant.js";
2
- import {REFRESH} from "../Constants/PathConstant.js";
3
- import { EVN } from "../Helper/APIParam.js";
4
- import network, { Method } from "./../NetworkManager/NetworkManager.js"
5
- import app from './App.js';
6
-
7
-
8
-
9
- class InitializeSDK {
10
- async config(init={token,environment}) {
11
- APPCONSTANT.TOKEN = init.token;
12
- APPCONSTANT.ENVIRONMENT = init.environment;
13
- console.log('Success!!');
14
- }
15
- async refreshAPI(refreshKey) {
16
- try {
17
- const [error,responseJson] = await network.networkCall({path:REFRESH,method:Method.GET,refreshKey:refreshKey})
18
- if (error) {
19
- return error;
20
- }else {
21
- return responseJson;
22
- }
23
- } catch (error) {
24
- return error;
25
- }
26
- }
27
- }
28
- const initSdk = new InitializeSDK();
29
- export default initSdk;
1
+ import { APPCONSTANT } from "../Constants/AppConstant.js";
2
+ import {REFRESH} from "../Constants/PathConstant.js";
3
+ import { EVN } from "../Helper/APIParam.js";
4
+ import network, { Method } from "./../NetworkManager/NetworkManager.js"
5
+ import app from './App.js';
6
+
7
+
8
+
9
+ class InitializeSDK {
10
+ async config(init={token,environment}) {
11
+ APPCONSTANT.TOKEN = init.token;
12
+ APPCONSTANT.ENVIRONMENT = init.environment;
13
+ console.log('Success!!');
14
+ }
15
+ async refreshAPI(refreshKey) {
16
+ try {
17
+ const [error,responseJson] = await network.networkCall({path:REFRESH,method:Method.GET,refreshKey:refreshKey})
18
+ if (error) {
19
+ return error;
20
+ }else {
21
+ return responseJson;
22
+ }
23
+ } catch (error) {
24
+ return error;
25
+ }
26
+ }
27
+ }
28
+ const initSdk = new InitializeSDK();
29
+ export default initSdk;
package/Roots/Roots.js CHANGED
@@ -1,6 +1,6 @@
1
-
2
-
3
- import user from "./User.js";
4
- import init from "./Initialize.js";
5
- import app from './App.js';
6
- export default {init,user,app};
1
+
2
+
3
+ import user from "./User.js";
4
+ import init from "./Initialize.js";
5
+ import app from './App.js';
6
+ export default {init,user,app};
package/Roots/User.js CHANGED
@@ -1,44 +1,44 @@
1
-
2
- import network, { Method } from "./../NetworkManager/NetworkManager.js"
3
- import {FORGOTPASSWORD, LOGIN, REGISTER,SETPASSWORD,VERIFY} from './../Constants/PathConstant.js'
4
- import { UserParameter } from "../Helper/APIParam.js";
5
-
6
- class User {
7
- async login(param = UserParameter) {
8
- try { const [error,responseJson] = await network.networkCall({path:LOGIN,method:Method.POST,param:param.data});
9
- if (error) { return error
10
- } else { return responseJson}
11
- } catch (error) { return error}
12
- }
13
- async register(param = UserParameter) {
14
- try { const [error,responseJson] = await network.networkCall({path:REGISTER,method:Method.POST,param:param.data});
15
- if (error) { return error} else { return responseJson }
16
- } catch (error) { return error }
17
- }
18
- async verify(param = UserParameter) {
19
- try { const [error,responseJson] = await network.networkCall({path:VERIFY,method:Method.POST,param:param.data});
20
- if (error) {return error
21
- } else { return responseJson }
22
- } catch (error) { return error}
23
- }
24
- async resendOTP(param = UserParameter) {
25
- try { const [error,responseJson] = await network.networkCall({path:REGISTER,method:Method.POST,param:param.data});
26
- if (error) { return error
27
- } else { return responseJson}
28
- } catch (error) { return error}
29
- }
30
- async forgotPassword(param = UserParameter) {
31
- try { const [error,responseJson] = await network.networkCall({path:FORGOTPASSWORD,method:Method.POST,param:param.data});
32
- if (error) { return error
33
- } else { return responseJson}
34
- } catch (error) { return error}
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
- }
42
- }
43
- const user = new User();
1
+
2
+ import network, { Method } from "./../NetworkManager/NetworkManager.js"
3
+ import {FORGOTPASSWORD, LOGIN, REGISTER,SETPASSWORD,VERIFY} from './../Constants/PathConstant.js'
4
+ import { UserParameter } from "../Helper/APIParam.js";
5
+
6
+ class User {
7
+ async login(param = UserParameter) {
8
+ try { const [error,responseJson] = await network.networkCall({path:LOGIN,method:Method.POST,param:param.data});
9
+ if (error) { return error
10
+ } else { return responseJson}
11
+ } catch (error) { return error}
12
+ }
13
+ async register(param = UserParameter) {
14
+ try { const [error,responseJson] = await network.networkCall({path:REGISTER,method:Method.POST,param:param.data});
15
+ if (error) { return error} else { return responseJson }
16
+ } catch (error) { return error }
17
+ }
18
+ async verify(param = UserParameter) {
19
+ try { const [error,responseJson] = await network.networkCall({path:VERIFY,method:Method.POST,param:param.data});
20
+ if (error) {return error
21
+ } else { return responseJson }
22
+ } catch (error) { return error}
23
+ }
24
+ async resendOTP(param = UserParameter) {
25
+ try { const [error,responseJson] = await network.networkCall({path:REGISTER,method:Method.POST,param:param.data});
26
+ if (error) { return error
27
+ } else { return responseJson}
28
+ } catch (error) { return error}
29
+ }
30
+ async forgotPassword(param = UserParameter) {
31
+ try { const [error,responseJson] = await network.networkCall({path:FORGOTPASSWORD,method:Method.POST,param:param.data});
32
+ if (error) { return error
33
+ } else { return responseJson}
34
+ } catch (error) { return error}
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
+ }
42
+ }
43
+ const user = new User();
44
44
  export default user;
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import root from "./Roots/Roots.js"
1
+ import root from "./Roots/Roots.js"
2
2
  export default root;
package/package.json CHANGED
@@ -1,31 +1,31 @@
1
- {
2
- "name": "tradly",
3
- "version": "1.0.39",
4
- "description": "Tradly JS SDK",
5
- "main": "index.js",
6
- "type": "module",
7
- "dependencies": {
8
- "@types/node": "^16.11.1",
9
- "await-to-js": "^3.0.0",
10
- "axios": "^0.23.0",
11
- "esm": "^3.2.25",
12
- "typescript": "^4.4.4"
13
- },
14
- "homepage": "https://tradly.app/",
15
- "repository": {
16
- "type": "git",
17
- "url": "https://github.com/TRADLY-PLATFORM"
18
- },
19
- "devDependencies": {},
20
- "keywords": [
21
- "tradly",
22
- "headless",
23
- "api",
24
- "commerce",
25
- "platform",
26
- "marketplace",
27
- "mpos"
28
- ],
29
- "author": "tradly",
30
- "license": "ISC"
31
- }
1
+ {
2
+ "name": "tradly",
3
+ "version": "1.0.40",
4
+ "description": "Tradly JS SDK",
5
+ "main": "index.js",
6
+ "type": "module",
7
+ "dependencies": {
8
+ "@types/node": "^16.11.1",
9
+ "await-to-js": "^3.0.0",
10
+ "axios": "^0.23.0",
11
+ "esm": "^3.2.25",
12
+ "typescript": "^4.4.4"
13
+ },
14
+ "homepage": "https://tradly.app/",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/TRADLY-PLATFORM"
18
+ },
19
+ "devDependencies": {},
20
+ "keywords": [
21
+ "tradly",
22
+ "headless",
23
+ "api",
24
+ "commerce",
25
+ "platform",
26
+ "marketplace",
27
+ "mpos"
28
+ ],
29
+ "author": "tradly",
30
+ "license": "ISC"
31
+ }