@longvansoftware/storefront-js-client 2.2.7-beta.5 → 2.2.7-beta.6

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.
@@ -92,12 +92,12 @@ exports.CHECK_VALID_VOUCHER = (0, graphql_tag_1.gql) `
92
92
  query CheckValidVoucher(
93
93
  $partyId: String
94
94
  $customerId: String
95
- $voucherCode: String!
95
+ $campaignActionId: String!
96
96
  ) {
97
97
  checkValidVoucher(
98
98
  checkValidVoucherRequest: {
99
99
  customerId: $customerId
100
- voucherCode: $voucherCode
100
+ campaignActionId: $campaignActionId
101
101
  }
102
102
  partyId: $partyId
103
103
  ) {
@@ -9,7 +9,7 @@ export declare class CampaignService extends Service {
9
9
  constructor(endpoint: string, orgId: string, storeId: string);
10
10
  getCampaignActionActiveNow(customerId: string, campaignActionType: string): Promise<any>;
11
11
  searchVouchers(campaignId: String, campaignActionId: String, campaignActionType: String, customerId: String, excludeExpired: Boolean, pageNumber: number, pageSize: number): Promise<any>;
12
- checkValidVoucher(customerId: string, voucherCode: string): Promise<any>;
12
+ checkValidVoucher(customerId: string, campaignActionId: string): Promise<any>;
13
13
  getCampaignActiveNow(campaignActionType: string, customerId: string): Promise<any>;
14
14
  getPromotionProductPrice(productId: String, productPrice: number): Promise<any>;
15
15
  getVoucherAvailableForCustomer(campaignId: string, customerId: string, excludeExpired: Boolean): Promise<any>;
@@ -66,13 +66,13 @@ class CampaignService extends serviceSDK_1.Service {
66
66
  }
67
67
  });
68
68
  }
69
- checkValidVoucher(customerId, voucherCode) {
69
+ checkValidVoucher(customerId, campaignActionId) {
70
70
  return __awaiter(this, void 0, void 0, function* () {
71
71
  const query = queries_1.CHECK_VALID_VOUCHER;
72
72
  const variables = {
73
73
  partyId: this.orgId,
74
74
  customerId,
75
- voucherCode,
75
+ campaignActionId,
76
76
  };
77
77
  try {
78
78
  const response = yield this.graphqlQuery(query, variables);
@@ -459,4 +459,5 @@ export declare class OrderService extends Service {
459
459
  enableProductDiary(orderId: string, orderItemId: string): Promise<any>;
460
460
  removeMemberDiscount(orderId: string): Promise<any>;
461
461
  getInfoChatApp(attributesName: string): Promise<any>;
462
+ getCustomerInfo(orderId: string): Promise<any>;
462
463
  }
@@ -1343,5 +1343,18 @@ class OrderService extends serviceSDK_1.Service {
1343
1343
  }
1344
1344
  });
1345
1345
  }
1346
+ getCustomerInfo(orderId) {
1347
+ return __awaiter(this, void 0, void 0, function* () {
1348
+ const endpoint = `/front/orders/${this.orgId}/${this.storeId}/${orderId}/customerInfo`;
1349
+ const method = "GET";
1350
+ try {
1351
+ const response = yield this.restApiCallWithToken(endpoint, method);
1352
+ return response;
1353
+ }
1354
+ catch (error) {
1355
+ throw error;
1356
+ }
1357
+ });
1358
+ }
1346
1359
  }
1347
1360
  exports.OrderService = OrderService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "2.2.7-beta.5",
3
+ "version": "2.2.7-beta.6",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [