@longvansoftware/storefront-js-client 3.2.1 → 3.2.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.
@@ -18,4 +18,6 @@ export declare class PortalService extends Service {
18
18
  connectShipment(orderId: string, byUser: string): Promise<any>;
19
19
  ffmStage(orderId: string): Promise<any>;
20
20
  completeCancelFFMOrder(orderId: string, note: string, reason: string): Promise<any>;
21
+ saveTextEditor(saveTextEditor: any): Promise<any>;
22
+ getContent(type: string, relativeId: string): Promise<any>;
21
23
  }
@@ -221,5 +221,32 @@ class PortalService extends serviceSDK_1.Service {
221
221
  }
222
222
  });
223
223
  }
224
+ // save text editor
225
+ saveTextEditor(saveTextEditor) {
226
+ return __awaiter(this, void 0, void 0, function* () {
227
+ const method = "POST";
228
+ const endpoint = `/content/public/rich-text-editor/save`;
229
+ try {
230
+ const response = yield this.restApiCallWithNoToken(endpoint, method, saveTextEditor);
231
+ return response;
232
+ }
233
+ catch (error) {
234
+ throw error;
235
+ }
236
+ });
237
+ }
238
+ getContent(type, relativeId) {
239
+ return __awaiter(this, void 0, void 0, function* () {
240
+ const method = "GET";
241
+ const endpoint = `/content/public/rich-text-editor/contentCurrent/${type}/${relativeId}`;
242
+ try {
243
+ const response = yield this.restApiCallWithNoToken(endpoint, method);
244
+ return response;
245
+ }
246
+ catch (error) {
247
+ throw error;
248
+ }
249
+ });
250
+ }
224
251
  }
225
252
  exports.PortalService = PortalService;
@@ -381,7 +381,7 @@ class UserService extends serviceSDK_1.Service {
381
381
  ownerPartyId,
382
382
  };
383
383
  try {
384
- const response = yield this.graphqlQuery(query, variables);
384
+ const response = yield this.graphqlQueryV2(query, variables);
385
385
  return response.getVatInfoByOwnerPartyId;
386
386
  }
387
387
  catch (error) {
@@ -401,7 +401,7 @@ class UserService extends serviceSDK_1.Service {
401
401
  createdBy,
402
402
  };
403
403
  try {
404
- const response = yield this.graphqlMutation(mutation, variables);
404
+ const response = yield this.graphqlMutationV2(mutation, variables);
405
405
  return response.createVatInfo;
406
406
  }
407
407
  catch (error) {
@@ -0,0 +1,7 @@
1
+ export interface SaveTextEditor {
2
+ type: string;
3
+ relativeId: string;
4
+ content: string;
5
+ version: string;
6
+ createdBy: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "3.2.1",
3
+ "version": "3.2.2",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [