@longvansoftware/storefront-js-client 2.1.7 → 2.1.9
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.
|
@@ -304,6 +304,7 @@ export declare class OrderService extends Service {
|
|
|
304
304
|
* @throws If an error occurs while updating the customer and shipping address.
|
|
305
305
|
*/
|
|
306
306
|
getListSellOrder(requestData: OrderQuery): Promise<any>;
|
|
307
|
+
getListSellOrderAll(requestData: OrderQuery): Promise<any>;
|
|
307
308
|
getDiaries(requestData: OrderQuery): Promise<any>;
|
|
308
309
|
/**
|
|
309
310
|
* Get list sale order status
|
|
@@ -457,4 +458,5 @@ export declare class OrderService extends Service {
|
|
|
457
458
|
deleteInfoReceiver(ownerId: string, receiverId: string, deletedBy: string): Promise<any>;
|
|
458
459
|
enableProductDiary(orderId: string, orderItemId: string): Promise<any>;
|
|
459
460
|
removeMemberDiscount(orderId: string): Promise<any>;
|
|
461
|
+
getInfoChatApp(attributesName: string): Promise<any>;
|
|
460
462
|
}
|
|
@@ -783,6 +783,26 @@ class OrderService extends serviceSDK_1.Service {
|
|
|
783
783
|
}
|
|
784
784
|
});
|
|
785
785
|
}
|
|
786
|
+
// get list all store
|
|
787
|
+
getListSellOrderAll(requestData) {
|
|
788
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
789
|
+
// Convert requestData to a format suitable for URLSearchParams
|
|
790
|
+
const params = new URLSearchParams(Object.entries(requestData).reduce((acc, [key, value]) => {
|
|
791
|
+
acc[key] = Array.isArray(value) ? value.join(",") : value.toString();
|
|
792
|
+
return acc;
|
|
793
|
+
}, {})).toString();
|
|
794
|
+
const endpoint = `/orders/${this.orgId}/ALL/sell_order?${params}`;
|
|
795
|
+
const method = "GET";
|
|
796
|
+
try {
|
|
797
|
+
const response = yield this.restApiCallWithToken(endpoint, method);
|
|
798
|
+
return response;
|
|
799
|
+
}
|
|
800
|
+
catch (error) {
|
|
801
|
+
console.error(`Error in getListSellOrder: ${error}`);
|
|
802
|
+
throw error;
|
|
803
|
+
}
|
|
804
|
+
});
|
|
805
|
+
}
|
|
786
806
|
getDiaries(requestData) {
|
|
787
807
|
return __awaiter(this, void 0, void 0, function* () {
|
|
788
808
|
// Convert requestData to a format suitable for URLSearchParams
|
|
@@ -1310,5 +1330,18 @@ class OrderService extends serviceSDK_1.Service {
|
|
|
1310
1330
|
}
|
|
1311
1331
|
});
|
|
1312
1332
|
}
|
|
1333
|
+
getInfoChatApp(attributesName) {
|
|
1334
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1335
|
+
const endpoint = `/store-channels/${this.orgId}/${this.storeId}/attributes/${attributesName}`;
|
|
1336
|
+
const method = "GET";
|
|
1337
|
+
try {
|
|
1338
|
+
const response = yield this.restApiCallWithToken(endpoint, method);
|
|
1339
|
+
return response;
|
|
1340
|
+
}
|
|
1341
|
+
catch (error) {
|
|
1342
|
+
throw error;
|
|
1343
|
+
}
|
|
1344
|
+
});
|
|
1345
|
+
}
|
|
1313
1346
|
}
|
|
1314
1347
|
exports.OrderService = OrderService;
|