@longvansoftware/storefront-js-client 3.1.9 → 3.2.1

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,12 +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
272
+ $isBirthday: Boolean
270
273
  ) {
271
274
  suggestVoucher(
272
275
  searchVoucherRequest: {
273
276
  partyId: $partyId
274
277
  customerId: $customerId
275
278
  excludeExpired: $excludeExpired
279
+ campaignId: $campaignId
280
+ campaignActionId: $campaignActionId
281
+ isBirthday: $isBirthday
276
282
  }
277
283
  ) {
278
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): 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,13 +160,16 @@ class CampaignService extends serviceSDK_1.Service {
160
160
  }
161
161
  });
162
162
  }
163
- suggestVoucher(customerId) {
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 = {
167
167
  partyId: this.orgId,
168
168
  customerId: customerId,
169
+ campaignId: campaignId,
170
+ campaignActionId: campaignActionId,
169
171
  excludeExpired: true,
172
+ isBirthday: isBirthday,
170
173
  };
171
174
  try {
172
175
  const response = yield this.graphqlQuery(query, variables);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "3.1.9",
3
+ "version": "3.2.1",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [