@longvansoftware/storefront-js-client 1.9.4 → 1.9.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.
@@ -6,6 +6,8 @@ exports.PAYMENTS_BY_ORDERS = (0, graphql_tag_1.gql) `
6
6
  query PaymentsByOrders($orderIds: [String!]!) {
7
7
  paymentsByOrders(orderIds: $orderIds) {
8
8
  methodCode
9
+ methodTypeCode
10
+ gatewayConfigId
9
11
  partnerCode
10
12
  totalAmount
11
13
  fee
@@ -34,6 +36,10 @@ exports.PAYMENTS_BY_ORDERS = (0, graphql_tag_1.gql) `
34
36
  methodDescription
35
37
  methodMapping
36
38
  baseMethodCode
39
+ confirmPaidBy
40
+ confirmPaidDate
41
+ qrCode
42
+ payUrl
37
43
  }
38
44
  }
39
45
  `;
@@ -10,5 +10,5 @@ export declare class CampaignService extends Service {
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
12
  checkValidVoucher(customerId: string, voucherCode: string): Promise<any>;
13
- getCampaignActiveNow(productStoreId?: string, campaignActionType?: string, customerId?: string): Promise<any>;
13
+ getCampaignActiveNow(campaignActionType: string, customerId: string): Promise<any>;
14
14
  }
@@ -53,7 +53,7 @@ class CampaignService extends serviceSDK_1.Service {
53
53
  customerId,
54
54
  excludeExpired,
55
55
  pageNumber,
56
- pageSize
56
+ pageSize,
57
57
  };
58
58
  try {
59
59
  const response = yield this.graphqlQuery(query, variables);
@@ -83,12 +83,12 @@ class CampaignService extends serviceSDK_1.Service {
83
83
  }
84
84
  });
85
85
  }
86
- getCampaignActiveNow(productStoreId, campaignActionType, customerId) {
86
+ getCampaignActiveNow(campaignActionType, customerId) {
87
87
  return __awaiter(this, void 0, void 0, function* () {
88
88
  const query = queries_1.GET_CAMPAIGN_ACTIVE_NOW;
89
89
  const variables = {
90
90
  partyId: this.orgId,
91
- productStoreId,
91
+ productStoreId: this.storeId,
92
92
  campaignActionType,
93
93
  customerId,
94
94
  };
@@ -455,4 +455,5 @@ export declare class OrderService extends Service {
455
455
  getInfoReceiver(ownerId: string): Promise<any>;
456
456
  updateInfoReceiver(ownerId: string, receiverId: string, updatedBy: string, dataRequest: ShippingAddress): Promise<any>;
457
457
  deleteInfoReceiver(ownerId: string, receiverId: string, deletedBy: string): Promise<any>;
458
+ enableProductDiary(orderId: string, orderItemId: string): Promise<any>;
458
459
  }
@@ -1283,5 +1283,18 @@ class OrderService extends serviceSDK_1.Service {
1283
1283
  }
1284
1284
  });
1285
1285
  }
1286
+ enableProductDiary(orderId, orderItemId) {
1287
+ return __awaiter(this, void 0, void 0, function* () {
1288
+ const endpoint = `/orders/${this.orgId}/${orderId}/${orderItemId}/enable`;
1289
+ const method = "PUT";
1290
+ try {
1291
+ const response = yield this.restApiCallWithToken(endpoint, method);
1292
+ return response;
1293
+ }
1294
+ catch (error) {
1295
+ throw error;
1296
+ }
1297
+ });
1298
+ }
1286
1299
  }
1287
1300
  exports.OrderService = OrderService;
@@ -37,7 +37,7 @@ class PaymentService extends serviceSDK_1.Service {
37
37
  return __awaiter(this, void 0, void 0, function* () {
38
38
  const data = Object.assign({ orgId: this.orgId, storeId: this.storeId }, paymentOrderData);
39
39
  try {
40
- const response = yield this.graphqlMutation(mutations_1.CREATE_PAYMENT_ORDER_MUTATION, data);
40
+ const response = yield this.graphqlMutationV3(mutations_1.CREATE_PAYMENT_ORDER_MUTATION, data);
41
41
  return response.createPaymentOrder;
42
42
  }
43
43
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "1.9.4",
3
+ "version": "1.9.6",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [