tradly 1.0.78 → 1.0.80
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 +4 -0
- package/Roots/App.js +67 -0
- package/package.json +1 -1
|
@@ -28,6 +28,7 @@ export const DEVICES = "/v1/devices";
|
|
|
28
28
|
export const ADDRESS = "/v1/addresses";
|
|
29
29
|
export const CURRENCY = "/v1/currencies";
|
|
30
30
|
export const LANGUAGES = "/v1/languages";
|
|
31
|
+
export const TENANTLANGUAGES = "/v1/tenants/languages";
|
|
31
32
|
export const COUNTRIES = "/v1/countries";
|
|
32
33
|
export const TENANTSCOUNTRIES = "/v1/tenants/countries";
|
|
33
34
|
|
|
@@ -84,3 +85,6 @@ export const FOLLOWINGACCOUNT = "/v1/accounts/feeds/following?type=accounts&";
|
|
|
84
85
|
export const FOLLOWINGLISTING = "/products/v1/feeds/following?type=listings&";
|
|
85
86
|
|
|
86
87
|
export const LAYER = "/v1/layers";
|
|
88
|
+
|
|
89
|
+
export const CLIENTTRANSLATION_GROUPS = "/v1/client_translations/groups";
|
|
90
|
+
export const CLIENTTRANSLATION_VALUES = "/v1/client_translations/values";
|
package/Roots/App.js
CHANGED
|
@@ -48,6 +48,9 @@ import {
|
|
|
48
48
|
GROUPCONFIGLIST,
|
|
49
49
|
TENANTSHIPPINGMETHOD,
|
|
50
50
|
LISTINGSUNIQUELOCATIONS,
|
|
51
|
+
TENANTLANGUAGES,
|
|
52
|
+
CLIENTTRANSLATION_GROUPS,
|
|
53
|
+
CLIENTTRANSLATION_VALUES,
|
|
51
54
|
} from "./../Constants/PathConstant.js";
|
|
52
55
|
import serialization from "../Helper/Serialization.js";
|
|
53
56
|
import { ImageConfig } from "../Helper/APIParam.js";
|
|
@@ -185,6 +188,9 @@ class App {
|
|
|
185
188
|
return error;
|
|
186
189
|
}
|
|
187
190
|
}
|
|
191
|
+
|
|
192
|
+
// Language
|
|
193
|
+
|
|
188
194
|
async getLanguages(param = { authKey }) {
|
|
189
195
|
try {
|
|
190
196
|
const [error, responseJson] = await network.networkCall({
|
|
@@ -201,6 +207,25 @@ class App {
|
|
|
201
207
|
return error;
|
|
202
208
|
}
|
|
203
209
|
}
|
|
210
|
+
|
|
211
|
+
async getTenantLanguages(param = { authKey }) {
|
|
212
|
+
try {
|
|
213
|
+
const [error, responseJson] = await network.networkCall({
|
|
214
|
+
path: TENANTLANGUAGES,
|
|
215
|
+
method: Method.GET,
|
|
216
|
+
authKey: param.authKey,
|
|
217
|
+
});
|
|
218
|
+
if (error) {
|
|
219
|
+
return error;
|
|
220
|
+
} else {
|
|
221
|
+
return responseJson;
|
|
222
|
+
}
|
|
223
|
+
} catch (error) {
|
|
224
|
+
return error;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
//
|
|
204
229
|
async generateS3ImageURL(param = { authKey, data }) {
|
|
205
230
|
try {
|
|
206
231
|
const [error, responseJson] = await network.networkCall({
|
|
@@ -1871,6 +1896,48 @@ class App {
|
|
|
1871
1896
|
return error;
|
|
1872
1897
|
}
|
|
1873
1898
|
}
|
|
1899
|
+
|
|
1900
|
+
// Client Translation
|
|
1901
|
+
async getClientTranslationsGroups(param = { paramBody, authKey }) {
|
|
1902
|
+
let url =
|
|
1903
|
+
param.bodyParam == undefined || param.bodyParam == ""
|
|
1904
|
+
? ""
|
|
1905
|
+
: `?${serialization(param.bodyParam)}`;
|
|
1906
|
+
try {
|
|
1907
|
+
const [error, responseJson] = await network.networkCall({
|
|
1908
|
+
path: CLIENTTRANSLATION_GROUPS + url,
|
|
1909
|
+
method: Method.GET,
|
|
1910
|
+
authKey: param.authKey,
|
|
1911
|
+
});
|
|
1912
|
+
if (error) {
|
|
1913
|
+
return error;
|
|
1914
|
+
} else {
|
|
1915
|
+
return responseJson;
|
|
1916
|
+
}
|
|
1917
|
+
} catch (error) {
|
|
1918
|
+
return error;
|
|
1919
|
+
}
|
|
1920
|
+
}
|
|
1921
|
+
async getClientTranslationsValues(param = { bodyParam, authKey }) {
|
|
1922
|
+
let url =
|
|
1923
|
+
param.bodyParam == undefined || param.bodyParam == ""
|
|
1924
|
+
? ""
|
|
1925
|
+
: `?${serialization(param.bodyParam)}`;
|
|
1926
|
+
try {
|
|
1927
|
+
const [error, responseJson] = await network.networkCall({
|
|
1928
|
+
path: CLIENTTRANSLATION_VALUES + url,
|
|
1929
|
+
method: Method.GET,
|
|
1930
|
+
authKey: param.authKey,
|
|
1931
|
+
});
|
|
1932
|
+
if (error) {
|
|
1933
|
+
return error;
|
|
1934
|
+
} else {
|
|
1935
|
+
return responseJson;
|
|
1936
|
+
}
|
|
1937
|
+
} catch (error) {
|
|
1938
|
+
return error;
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1874
1941
|
}
|
|
1875
1942
|
const app = new App();
|
|
1876
1943
|
export default app;
|