@longvansoftware/storefront-js-client 3.2.0 → 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.
@@ -267,16 +267,18 @@ exports.SUGGEST_VOUCHER = (0, graphql_tag_1.gql) `
267
267
  $partyId: String
268
268
  $customerId: String
269
269
  $excludeExpired: Boolean
270
- $campaignId:String
271
- $campaignActionId:String
270
+ $campaignId: String
271
+ $campaignActionId: String
272
+ $isBirthday: Boolean
272
273
  ) {
273
274
  suggestVoucher(
274
275
  searchVoucherRequest: {
275
276
  partyId: $partyId
276
277
  customerId: $customerId
277
278
  excludeExpired: $excludeExpired
278
- campaignId:$campaignId
279
- campaignActionId:$campaignActionId
279
+ campaignId: $campaignId
280
+ campaignActionId: $campaignActionId
281
+ isBirthday: $isBirthday
280
282
  }
281
283
  ) {
282
284
  total
@@ -14,7 +14,7 @@ export declare class CampaignService extends Service {
14
14
  getPromotionProductPrice(productId: String, productPrice: number): Promise<any>;
15
15
  getVoucherAvailableForCustomer(campaignId: string, campaignActionId: string, customerId: string, excludeExpired: Boolean, isPageAble: Boolean): Promise<any>;
16
16
  addCustomerToVoucher(voucherCode: string, userId: string, affiliateId: string): Promise<any>;
17
- suggestVoucher(customerId: string, campaignId: string, campaignActionId: string): Promise<any>;
17
+ suggestVoucher(customerId: string, campaignId: string, campaignActionId: string, isBirthday: Boolean): Promise<any>;
18
18
  getCampaignActionById(id: string): Promise<any>;
19
19
  searchProductGiftPromotionResponse(productIds: string[], campaignActionId: string): Promise<any>;
20
20
  }
@@ -160,7 +160,7 @@ class CampaignService extends serviceSDK_1.Service {
160
160
  }
161
161
  });
162
162
  }
163
- suggestVoucher(customerId, campaignId, campaignActionId) {
163
+ suggestVoucher(customerId, campaignId, campaignActionId, isBirthday) {
164
164
  return __awaiter(this, void 0, void 0, function* () {
165
165
  const query = queries_1.SUGGEST_VOUCHER;
166
166
  const variables = {
@@ -169,6 +169,7 @@ class CampaignService extends serviceSDK_1.Service {
169
169
  campaignId: campaignId,
170
170
  campaignActionId: campaignActionId,
171
171
  excludeExpired: true,
172
+ isBirthday: isBirthday,
172
173
  };
173
174
  try {
174
175
  const response = yield this.graphqlQuery(query, variables);
@@ -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.0",
3
+ "version": "3.2.2",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [