tradly 1.0.8-2.3 → 1.0.8-4.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.
- package/Constants/PathConstant.js +6 -1
- package/Roots/App.js +82 -1
- package/package.json +1 -1
|
@@ -26,6 +26,9 @@ export const USERS = "/v1/users";
|
|
|
26
26
|
export const DEVICES = "/v1/devices";
|
|
27
27
|
|
|
28
28
|
export const ADDRESS = "/v1/addresses";
|
|
29
|
+
export const SEARCHADDRESS = "/v1/addresses/search?key=";
|
|
30
|
+
export const PLACES_ADDRESS = "/v1/addresses/places_search";
|
|
31
|
+
export const PLACES_ADDRESS_DETAIL = "/v1/addresses/place_detail";
|
|
29
32
|
export const CURRENCY = "/v1/currencies";
|
|
30
33
|
export const LANGUAGES = "/v1/languages";
|
|
31
34
|
export const TENANTLANGUAGES = "/v1/tenants/languages";
|
|
@@ -56,7 +59,6 @@ export const TENANTSHIPPINGMETHOD = "/v1/tenants/shipping_methods";
|
|
|
56
59
|
export const SHIPPINGMETHOD = "/v1/shipping_methods";
|
|
57
60
|
|
|
58
61
|
export const S3SIGNEDURL = "/v1/utils/S3signedUploadURL";
|
|
59
|
-
export const SEARCHADDRESS = "/v1/addresses/search?key=";
|
|
60
62
|
|
|
61
63
|
export const HOME = "/products/v1/home";
|
|
62
64
|
export const ORDERS = "/products/v1/orders";
|
|
@@ -90,3 +92,6 @@ export const CLIENTTRANSLATION_GROUPS = "/v1/client_translations/groups";
|
|
|
90
92
|
export const CLIENTTRANSLATION_VALUES = "/v1/client_translations/values";
|
|
91
93
|
export const CLIENTTRANSLATION_VALUES_GROUP =
|
|
92
94
|
"/v1/client_translations/values_grouped";
|
|
95
|
+
|
|
96
|
+
export const CREATE_FEEDBACK = "/v1/utils/feedback";
|
|
97
|
+
export const FEEDBACK_CATEGORIES = "/v1/utils/feedback_categories";
|
package/Roots/App.js
CHANGED
|
@@ -52,6 +52,10 @@ import {
|
|
|
52
52
|
CLIENTTRANSLATION_GROUPS,
|
|
53
53
|
CLIENTTRANSLATION_VALUES,
|
|
54
54
|
CLIENTTRANSLATION_VALUES_GROUP,
|
|
55
|
+
PLACES_ADDRESS,
|
|
56
|
+
PLACES_ADDRESS_DETAIL,
|
|
57
|
+
FEEDBACK_CATEGORIES,
|
|
58
|
+
CREATE_FEEDBACK,
|
|
55
59
|
} from "./../Constants/PathConstant.js";
|
|
56
60
|
import serialization from "../Helper/Serialization.js";
|
|
57
61
|
import { ImageConfig } from "../Helper/APIParam.js";
|
|
@@ -320,6 +324,48 @@ class App {
|
|
|
320
324
|
return error;
|
|
321
325
|
}
|
|
322
326
|
}
|
|
327
|
+
|
|
328
|
+
async getPlacesAddress(param = { bodyParam, authKey }) {
|
|
329
|
+
let url =
|
|
330
|
+
param.bodyParam == undefined || param.bodyParam == ""
|
|
331
|
+
? ""
|
|
332
|
+
: `?${serialization(param.bodyParam)}`;
|
|
333
|
+
try {
|
|
334
|
+
const [error, responseJson] = await network.networkCall({
|
|
335
|
+
path: PLACES_ADDRESS + url,
|
|
336
|
+
method: Method.GET,
|
|
337
|
+
authKey: param.authKey,
|
|
338
|
+
});
|
|
339
|
+
if (error) {
|
|
340
|
+
return error;
|
|
341
|
+
} else {
|
|
342
|
+
return responseJson;
|
|
343
|
+
}
|
|
344
|
+
} catch (error) {
|
|
345
|
+
return error;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
async getPlacesAddressDetails(param = { bodyParam, authKey }) {
|
|
349
|
+
let url =
|
|
350
|
+
param.bodyParam == undefined || param.bodyParam == ""
|
|
351
|
+
? ""
|
|
352
|
+
: `?${serialization(param.bodyParam)}`;
|
|
353
|
+
try {
|
|
354
|
+
const [error, responseJson] = await network.networkCall({
|
|
355
|
+
path: PLACES_ADDRESS_DETAIL + url,
|
|
356
|
+
method: Method.GET,
|
|
357
|
+
authKey: param.authKey,
|
|
358
|
+
});
|
|
359
|
+
if (error) {
|
|
360
|
+
return error;
|
|
361
|
+
} else {
|
|
362
|
+
return responseJson;
|
|
363
|
+
}
|
|
364
|
+
} catch (error) {
|
|
365
|
+
return error;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
323
369
|
async searchAddress(param = { searchKey, authKey }) {
|
|
324
370
|
let url = param.searchKey;
|
|
325
371
|
try {
|
|
@@ -1860,7 +1906,7 @@ class App {
|
|
|
1860
1906
|
let method =
|
|
1861
1907
|
param.id == undefined || param.id == ""
|
|
1862
1908
|
? Method.POST
|
|
1863
|
-
: Method.
|
|
1909
|
+
: Method.PATCH;
|
|
1864
1910
|
let path =
|
|
1865
1911
|
param.id == undefined || param.id == ""
|
|
1866
1912
|
? LAYER
|
|
@@ -1961,6 +2007,41 @@ class App {
|
|
|
1961
2007
|
return error;
|
|
1962
2008
|
}
|
|
1963
2009
|
}
|
|
2010
|
+
|
|
2011
|
+
//MARK:- Feedback
|
|
2012
|
+
async getFeedbackCategories(param = { authKey, bodyParam }) {
|
|
2013
|
+
try {
|
|
2014
|
+
const [error, responseJson] = await network.networkCall({
|
|
2015
|
+
path: FEEDBACK_CATEGORIES,
|
|
2016
|
+
method: Method.GET,
|
|
2017
|
+
authKey: param.authKey,
|
|
2018
|
+
});
|
|
2019
|
+
if (error) {
|
|
2020
|
+
return error;
|
|
2021
|
+
} else {
|
|
2022
|
+
return responseJson;
|
|
2023
|
+
}
|
|
2024
|
+
} catch (error) {
|
|
2025
|
+
return error;
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
2028
|
+
async createFeedback(param = { authKey, data }) {
|
|
2029
|
+
try {
|
|
2030
|
+
const [error, responseJson] = await network.networkCall({
|
|
2031
|
+
path: CREATE_FEEDBACK,
|
|
2032
|
+
method: Method.POST,
|
|
2033
|
+
authKey: param.authKey,
|
|
2034
|
+
param: param.data,
|
|
2035
|
+
});
|
|
2036
|
+
if (error) {
|
|
2037
|
+
return error;
|
|
2038
|
+
} else {
|
|
2039
|
+
return responseJson;
|
|
2040
|
+
}
|
|
2041
|
+
} catch (error) {
|
|
2042
|
+
return error;
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
1964
2045
|
}
|
|
1965
2046
|
const app = new App();
|
|
1966
2047
|
export default app;
|