@longvansoftware/storefront-js-client 2.6.1 → 2.6.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.
@@ -9,4 +9,5 @@ export declare class PortalService extends Service {
9
9
  imageProduct(parentId: string, parentType: string, width?: number, height?: number): string;
10
10
  imagesProduct(parentId: string, parentType: string, width?: number, height?: number): string;
11
11
  completeOrder(orderId: string, byUser: string): Promise<any>;
12
+ pushMessage(message: any): Promise<any>;
12
13
  }
@@ -98,5 +98,20 @@ class PortalService extends serviceSDK_1.Service {
98
98
  }
99
99
  });
100
100
  }
101
+ pushMessage(message) {
102
+ return __awaiter(this, void 0, void 0, function* () {
103
+ const endpoint = `/dynamic-collection/public/v2/webhook/push_message`;
104
+ const method = "POST";
105
+ console.log("endpoint", endpoint);
106
+ const data = message;
107
+ try {
108
+ const response = yield this.restApiCallWithNoToken(endpoint, method, message);
109
+ return response;
110
+ }
111
+ catch (error) {
112
+ throw error;
113
+ }
114
+ });
115
+ }
101
116
  }
102
117
  exports.PortalService = PortalService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "2.6.1",
3
+ "version": "2.6.2",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [