tradly 1.1.67 → 1.1.69
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.
- package/Constants/PathConstant.js +2 -0
- package/Roots/App.js +93 -0
- package/package.json +1 -1
|
@@ -98,6 +98,8 @@ export const FOLLOWINGLISTING = "/products/v1/feeds/following?type=listings&";
|
|
|
98
98
|
|
|
99
99
|
export const LAYER = "/v1/layers";
|
|
100
100
|
|
|
101
|
+
export const TAX = "/v1/taxes";
|
|
102
|
+
|
|
101
103
|
export const TRANSLATIONS = "/v1/translations";
|
|
102
104
|
|
|
103
105
|
export const CLIENTTRANSLATION_GROUPS = "/v1/client_translations/groups";
|
package/Roots/App.js
CHANGED
|
@@ -81,6 +81,7 @@ import {
|
|
|
81
81
|
SHIPMENTS,
|
|
82
82
|
STATES,
|
|
83
83
|
SUBSCRIPTION_LISTINGS,
|
|
84
|
+
TAX,
|
|
84
85
|
} from "./../Constants/PathConstant.js";
|
|
85
86
|
import serialization from "../Helper/Serialization.js";
|
|
86
87
|
import { ImageConfig } from "../Helper/APIParam.js";
|
|
@@ -3044,6 +3045,75 @@ class App {
|
|
|
3044
3045
|
return error;
|
|
3045
3046
|
}
|
|
3046
3047
|
}
|
|
3048
|
+
//MARK:- /v1/taxes
|
|
3049
|
+
async getListingTaxes(param = { authKey, bodyParam }) {
|
|
3050
|
+
let url =
|
|
3051
|
+
param.bodyParam == undefined || param.bodyParam == ""
|
|
3052
|
+
? ""
|
|
3053
|
+
: `?${serialization(param.bodyParam)}`;
|
|
3054
|
+
try {
|
|
3055
|
+
const [error, responseJson] = await network.networkCall({
|
|
3056
|
+
path: TAX + url,
|
|
3057
|
+
method: Method.GET,
|
|
3058
|
+
authKey: param.authKey,
|
|
3059
|
+
currency: param.currency,
|
|
3060
|
+
language: param.language,
|
|
3061
|
+
});
|
|
3062
|
+
if (error) {
|
|
3063
|
+
return error;
|
|
3064
|
+
} else {
|
|
3065
|
+
return responseJson;
|
|
3066
|
+
}
|
|
3067
|
+
} catch (error) {
|
|
3068
|
+
return error;
|
|
3069
|
+
}
|
|
3070
|
+
}
|
|
3071
|
+
|
|
3072
|
+
async addEditListingTax(param = { id, authKey, data }) {
|
|
3073
|
+
let method =
|
|
3074
|
+
param.id == undefined || param.id == ""
|
|
3075
|
+
? Method.POST
|
|
3076
|
+
: Method.PATCH;
|
|
3077
|
+
let path =
|
|
3078
|
+
param.id == undefined || param.id == ""
|
|
3079
|
+
? TAX
|
|
3080
|
+
: TAX + `/${param.id}`;
|
|
3081
|
+
try {
|
|
3082
|
+
const [error, responseJson] = await network.networkCall({
|
|
3083
|
+
path: path,
|
|
3084
|
+
method: method,
|
|
3085
|
+
authKey: param.authKey,
|
|
3086
|
+
currency: param.currency,
|
|
3087
|
+
language: param.language,
|
|
3088
|
+
param: param.data,
|
|
3089
|
+
});
|
|
3090
|
+
if (error) {
|
|
3091
|
+
return error;
|
|
3092
|
+
} else {
|
|
3093
|
+
return responseJson;
|
|
3094
|
+
}
|
|
3095
|
+
} catch (error) {
|
|
3096
|
+
return error;
|
|
3097
|
+
}
|
|
3098
|
+
}
|
|
3099
|
+
async deleteListingTax(param = { id, authKey }) {
|
|
3100
|
+
try {
|
|
3101
|
+
const [error, responseJson] = await network.networkCall({
|
|
3102
|
+
path: TAX + `/${param.id}`,
|
|
3103
|
+
method: Method.DELETE,
|
|
3104
|
+
authKey: param.authKey,
|
|
3105
|
+
currency: param.currency,
|
|
3106
|
+
language: param.language,
|
|
3107
|
+
});
|
|
3108
|
+
if (error) {
|
|
3109
|
+
return error;
|
|
3110
|
+
} else {
|
|
3111
|
+
return responseJson;
|
|
3112
|
+
}
|
|
3113
|
+
} catch (error) {
|
|
3114
|
+
return error;
|
|
3115
|
+
}
|
|
3116
|
+
}
|
|
3047
3117
|
|
|
3048
3118
|
// Translations
|
|
3049
3119
|
async translateData(param = { id, authKey, data }) {
|
|
@@ -3250,6 +3320,29 @@ class App {
|
|
|
3250
3320
|
return error;
|
|
3251
3321
|
}
|
|
3252
3322
|
}
|
|
3323
|
+
async likeUnlikeComments(param = { id, authKey, isLike, isDowngrade }) {
|
|
3324
|
+
let method = param.isDowngrade ? Method.PATCH : Method.POST;
|
|
3325
|
+
let path = param.isLike
|
|
3326
|
+
? CREATE_COMMENTS + `/${param.id}/likes`
|
|
3327
|
+
: CREATE_COMMENTS + `/${param.id}/unlikes`;
|
|
3328
|
+
try {
|
|
3329
|
+
const [error, responseJson] = await network.networkCall({
|
|
3330
|
+
path: path,
|
|
3331
|
+
method: method,
|
|
3332
|
+
authKey: param.authKey,
|
|
3333
|
+
currency: param.currency,
|
|
3334
|
+
language: param.language,
|
|
3335
|
+
param: param.data,
|
|
3336
|
+
});
|
|
3337
|
+
if (error) {
|
|
3338
|
+
return error;
|
|
3339
|
+
} else {
|
|
3340
|
+
return responseJson;
|
|
3341
|
+
}
|
|
3342
|
+
} catch (error) {
|
|
3343
|
+
return error;
|
|
3344
|
+
}
|
|
3345
|
+
}
|
|
3253
3346
|
|
|
3254
3347
|
//MARK:- Activites
|
|
3255
3348
|
async getActivities(param = { authKey, bodyParam }) {
|