tradly 1.1.31 → 1.1.33
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 +64 -0
- package/package.json +1 -1
|
@@ -96,6 +96,8 @@ export const FOLLOWINGLISTING = "/products/v1/feeds/following?type=listings&";
|
|
|
96
96
|
|
|
97
97
|
export const LAYER = "/v1/layers";
|
|
98
98
|
|
|
99
|
+
export const TRANSLATIONS = "/v1/translations";
|
|
100
|
+
|
|
99
101
|
export const CLIENTTRANSLATION_GROUPS = "/v1/client_translations/groups";
|
|
100
102
|
export const CLIENTTRANSLATION_VALUES = "/v1/client_translations/values";
|
|
101
103
|
export const CLIENTTRANSLATION_VALUES_GROUP =
|
package/Roots/App.js
CHANGED
|
@@ -75,6 +75,7 @@ import {
|
|
|
75
75
|
NEGOTIATE,
|
|
76
76
|
SSO_RETURN,
|
|
77
77
|
SSO_ENABLED,
|
|
78
|
+
TRANSLATIONS,
|
|
78
79
|
} from "./../Constants/PathConstant.js";
|
|
79
80
|
import serialization from "../Helper/Serialization.js";
|
|
80
81
|
import { ImageConfig } from "../Helper/APIParam.js";
|
|
@@ -342,6 +343,24 @@ class App {
|
|
|
342
343
|
return error;
|
|
343
344
|
}
|
|
344
345
|
}
|
|
346
|
+
async getUserProfile(param = { authKey, id }) {
|
|
347
|
+
try {
|
|
348
|
+
const [error, responseJson] = await network.networkCall({
|
|
349
|
+
path: USERS + `/profile`,
|
|
350
|
+
method: Method.GET,
|
|
351
|
+
authKey: param.authKey,
|
|
352
|
+
currency: param.currency,
|
|
353
|
+
language: param.language,
|
|
354
|
+
});
|
|
355
|
+
if (error) {
|
|
356
|
+
return error;
|
|
357
|
+
} else {
|
|
358
|
+
return responseJson;
|
|
359
|
+
}
|
|
360
|
+
} catch (error) {
|
|
361
|
+
return error;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
345
364
|
//MARK:- ADDRESS APIS
|
|
346
365
|
async addEditAddress(param = { id, data, authKey }) {
|
|
347
366
|
let path =
|
|
@@ -2513,6 +2532,51 @@ class App {
|
|
|
2513
2532
|
}
|
|
2514
2533
|
}
|
|
2515
2534
|
|
|
2535
|
+
// Translations
|
|
2536
|
+
async translateData(param = { id, authKey, data }) {
|
|
2537
|
+
try {
|
|
2538
|
+
const [error, responseJson] = await network.networkCall({
|
|
2539
|
+
path: TRANSLATIONS + "/translate",
|
|
2540
|
+
method: Method.POST,
|
|
2541
|
+
authKey: param.authKey,
|
|
2542
|
+
currency: param.currency,
|
|
2543
|
+
language: param.language,
|
|
2544
|
+
param: param.data,
|
|
2545
|
+
});
|
|
2546
|
+
if (error) {
|
|
2547
|
+
return error;
|
|
2548
|
+
} else {
|
|
2549
|
+
return responseJson;
|
|
2550
|
+
}
|
|
2551
|
+
} catch (error) {
|
|
2552
|
+
return error;
|
|
2553
|
+
}
|
|
2554
|
+
}
|
|
2555
|
+
|
|
2556
|
+
//
|
|
2557
|
+
async getTranslations(param = { bodyParam, authKey }) {
|
|
2558
|
+
let url =
|
|
2559
|
+
param.bodyParam == undefined || param.bodyParam == ""
|
|
2560
|
+
? ""
|
|
2561
|
+
: `?${serialization(param.bodyParam)}`;
|
|
2562
|
+
try {
|
|
2563
|
+
const [error, responseJson] = await network.networkCall({
|
|
2564
|
+
path: TRANSLATIONS + url,
|
|
2565
|
+
method: Method.GET,
|
|
2566
|
+
authKey: param.authKey,
|
|
2567
|
+
currency: param.currency,
|
|
2568
|
+
language: param.language,
|
|
2569
|
+
});
|
|
2570
|
+
if (error) {
|
|
2571
|
+
return error;
|
|
2572
|
+
} else {
|
|
2573
|
+
return responseJson;
|
|
2574
|
+
}
|
|
2575
|
+
} catch (error) {
|
|
2576
|
+
return error;
|
|
2577
|
+
}
|
|
2578
|
+
}
|
|
2579
|
+
|
|
2516
2580
|
// Client Translation
|
|
2517
2581
|
async getClientTranslationsGroups(param = { paramBody, authKey }) {
|
|
2518
2582
|
let url =
|