@longvansoftware/storefront-js-client 2.1.6 → 2.1.8

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.
@@ -2,5 +2,5 @@ import { Service } from "../serviceSDK";
2
2
  export declare class ComhubService extends Service {
3
3
  constructor(endpoint: string, orgId: string, storeId: string);
4
4
  shareOrder(dataRequet: any, OAId: string): Promise<any>;
5
- sendMessage(OAId: string, content: string, contentType: string, senderId: string, receiveContactIds: [string]): Promise<any>;
5
+ sendMessage(OAId: string, content: string, contentType: string, senderPartyId: string, receivePartyIds: [string]): Promise<any>;
6
6
  }
@@ -28,15 +28,15 @@ class ComhubService extends serviceSDK_1.Service {
28
28
  }
29
29
  });
30
30
  }
31
- sendMessage(OAId, content, contentType, senderId, receiveContactIds) {
31
+ sendMessage(OAId, content, contentType, senderPartyId, receivePartyIds) {
32
32
  return __awaiter(this, void 0, void 0, function* () {
33
33
  const endpoint = `/web-hook/message/send/social/app/${OAId}`;
34
34
  const method = "POST";
35
35
  const dataRequet = {
36
36
  content,
37
37
  contentType,
38
- senderId,
39
- receiveContactIds,
38
+ senderPartyId,
39
+ receivePartyIds,
40
40
  };
41
41
  try {
42
42
  const response = yield this.restApiCallWithNoHeader(endpoint, method, dataRequet);
@@ -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
@@ -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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "2.1.6",
3
+ "version": "2.1.8",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [