tradly 1.0.99 → 1.1.2

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.
File without changes
@@ -79,6 +79,7 @@ export const STATUS = "/status";
79
79
  export const REVIEW = "/v1/reviews";
80
80
 
81
81
  export const COLLECTIONS = "/v1/collections";
82
+ export const COLLECTIONS_DATA = "/v1/collections_data";
82
83
  export const PROMO = "/v1/promos";
83
84
  export const TRANSACTIONS = "/v1/transactions";
84
85
  export const EARNINGS = "/v1/earnings";
File without changes
File without changes
File without changes
File without changes
package/README.md CHANGED
File without changes
package/Roots/App.js CHANGED
@@ -70,6 +70,7 @@ import {
70
70
  OPP_MERCHANT,
71
71
  DIGITAL_CONTENT,
72
72
  S3SIGNEDGETURL,
73
+ COLLECTIONS_DATA,
73
74
  } from "./../Constants/PathConstant.js";
74
75
  import serialization from "../Helper/Serialization.js";
75
76
  import { ImageConfig } from "../Helper/APIParam.js";
@@ -1262,6 +1263,29 @@ class App {
1262
1263
  return error;
1263
1264
  }
1264
1265
  }
1266
+
1267
+ async getSingleCategoryByID(param = { bodyParam, authKey, categoryID }) {
1268
+ let url =
1269
+ param.bodyParam == undefined || param.bodyParam == ""
1270
+ ? ""
1271
+ : `?${serialization(param.bodyParam)}`;
1272
+ try {
1273
+ const [error, responseJson] = await network.networkCall({
1274
+ path: CATEGORY + `/${param.categoryID}` + url,
1275
+ method: Method.GET,
1276
+ authKey: param.authKey,
1277
+ currency: param.currency,
1278
+ language: param.language,
1279
+ });
1280
+ if (error) {
1281
+ return error;
1282
+ } else {
1283
+ return responseJson;
1284
+ }
1285
+ } catch (error) {
1286
+ return error;
1287
+ }
1288
+ }
1265
1289
  async addEditCategory(param = { id, data, authKey }) {
1266
1290
  let path =
1267
1291
  param.id == undefined || param.id == ""
@@ -2109,6 +2133,30 @@ class App {
2109
2133
  return error;
2110
2134
  }
2111
2135
  }
2136
+
2137
+ //MARK:-  Collections DATA
2138
+ async getCollectionData(param = { authKey, bodyParam }) {
2139
+ let url =
2140
+ param.bodyParam == undefined || param.bodyParam == ""
2141
+ ? ""
2142
+ : `?${serialization(param.bodyParam)}`;
2143
+ try {
2144
+ const [error, responseJson] = await network.networkCall({
2145
+ path: COLLECTIONS_DATA + url,
2146
+ method: Method.GET,
2147
+ authKey: param.authKey,
2148
+ currency: param.currency,
2149
+ language: param.language,
2150
+ });
2151
+ if (error) {
2152
+ return error;
2153
+ } else {
2154
+ return responseJson;
2155
+ }
2156
+ } catch (error) {
2157
+ return error;
2158
+ }
2159
+ }
2112
2160
  //MARK:-  Promo banner 
2113
2161
  async getPromoBanner(param = { authKey, bodyParam }) {
2114
2162
  let url =
File without changes
package/Roots/Roots.js CHANGED
File without changes
package/Roots/SetSDK.js CHANGED
@@ -4,40 +4,6 @@ import Environment from "../Helper/APIParam.js";
4
4
  import Cookies from "js-cookie";
5
5
  import CryptoJS from "crypto-js";
6
6
 
7
- /*export default set_sdk = (domain, env) => {
8
- axios({
9
- url: `${Environment(
10
- env
11
- )}/skua/tenants/pk_by_domain?domain=${domain}&env=${env}`,
12
- method: "GET",
13
- responseType: "json",
14
- headers: {
15
- "Content-Type": "application/json",
16
- },
17
- })
18
- .then((response) => {
19
- if (response.data.status) {
20
- APPCONSTANT.TOKEN = response.data.data.key;
21
- APPCONSTANT.ENVIRONMENT = env;
22
- APPCONSTANT.DOMAIN = domain;
23
-
24
- Cookies.set(
25
- `pk_key`,
26
- CryptoJS.AES.encrypt(
27
- response.data.data.key,
28
- "2ae86116e90f965c0e4d37376a0089cb76a61f99246faf2c95d13d3af7824977"
29
- ).toString()
30
- );
31
- Cookies.set(`user_domain`, domain.toString());
32
- return true;
33
- }
34
- })
35
- .catch((error) => {
36
- console.log(error.response.data);
37
- return error.response;
38
- });
39
- };*/
40
-
41
7
  import { EVN } from "../Helper/APIParam.js";
42
8
  import network, { Method } from "./../NetworkManager/NetworkManager.js";
43
9
  import app from "./App.js";
package/Roots/User.js CHANGED
File without changes
package/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tradly",
3
- "version": "1.0.99",
3
+ "version": "1.1.2",
4
4
  "description": "Tradly JS SDK",
5
5
  "main": "index.js",
6
6
  "type": "module",