@longvansoftware/storefront-js-client 2.5.2 → 2.5.4

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.
@@ -1,2 +1,3 @@
1
1
  export declare const CANCEL_PAYMENT: import("graphql").DocumentNode;
2
2
  export declare const CONFIRM_TO_GATEWAY: import("graphql").DocumentNode;
3
+ export declare const CONFIRM_PAYMENT_SUCCESS_MANUAL: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CONFIRM_TO_GATEWAY = exports.CANCEL_PAYMENT = void 0;
3
+ exports.CONFIRM_PAYMENT_SUCCESS_MANUAL = exports.CONFIRM_TO_GATEWAY = exports.CANCEL_PAYMENT = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.CANCEL_PAYMENT = (0, graphql_tag_1.gql) `
6
6
  mutation CancelPayment($paymentId: String!, $reason: String!) {
@@ -29,3 +29,16 @@ exports.CONFIRM_TO_GATEWAY = (0, graphql_tag_1.gql) `
29
29
  }
30
30
  }
31
31
  `;
32
+ exports.CONFIRM_PAYMENT_SUCCESS_MANUAL = (0, graphql_tag_1.gql) `
33
+ mutation ConfirmPaymentSuccessManual($paymentId: String!, $transactionNo: String!, $confirmBy: String!) {
34
+ confirmPaymentSuccessManual(paymentId: $paymentId, transactionNo: $transactionNo, confirmBy: $confirmBy) {
35
+ code
36
+ message
37
+ data
38
+ qrCodeUrl
39
+ deeplink
40
+ deeplinkMiniApp
41
+ paymentId
42
+ }
43
+ }
44
+ `;
@@ -506,4 +506,5 @@ export declare class OrderService extends Service {
506
506
  * @throws If an error occurs while creating the order.
507
507
  */
508
508
  reporByStores(date_from: number, date_to: number): Promise<any>;
509
+ updateExchangeOrder(exchangeOrder: string, returnOrder: string, sellOrder: string): Promise<any>;
509
510
  }
@@ -1455,5 +1455,18 @@ class OrderService extends serviceSDK_1.Service {
1455
1455
  }
1456
1456
  });
1457
1457
  }
1458
+ updateExchangeOrder(exchangeOrder, returnOrder, sellOrder) {
1459
+ return __awaiter(this, void 0, void 0, function* () {
1460
+ const endpoint = `/orders/${this.orgId}/${exchangeOrder}/${returnOrder}/${sellOrder}/updateExchangeOrder`;
1461
+ const method = "PUT";
1462
+ try {
1463
+ const response = yield this.restApiCallWithToken(endpoint, method);
1464
+ return response;
1465
+ }
1466
+ catch (error) {
1467
+ throw error;
1468
+ }
1469
+ });
1470
+ }
1458
1471
  }
1459
1472
  exports.OrderService = OrderService;
@@ -9,4 +9,5 @@ export declare class PaymentServiceV2 extends Service {
9
9
  confirmToGateway(paymentId: string, methodCode: string, returnUrl: string): Promise<any>;
10
10
  paymentStatus(paymentId: string): Promise<any>;
11
11
  gwConfigDetail(configId: string): Promise<any>;
12
+ confirmPaymentSuccessManual(paymentId: string, transactionNo: string, confirmBy: string): Promise<any>;
12
13
  }
@@ -141,5 +141,22 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
141
141
  }
142
142
  });
143
143
  }
144
+ confirmPaymentSuccessManual(paymentId, transactionNo, confirmBy) {
145
+ return __awaiter(this, void 0, void 0, function* () {
146
+ const mutation = mutations_1.CONFIRM_PAYMENT_SUCCESS_MANUAL;
147
+ const variables = {
148
+ paymentId: paymentId,
149
+ transactionNo: transactionNo,
150
+ confirmBy: confirmBy,
151
+ };
152
+ try {
153
+ const response = yield this.graphqlMutationV3(mutation, variables);
154
+ return response.confirmPaymentSuccessManual;
155
+ }
156
+ catch (error) {
157
+ throw error;
158
+ }
159
+ });
160
+ }
144
161
  }
145
162
  exports.PaymentServiceV2 = PaymentServiceV2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "2.5.2",
3
+ "version": "2.5.4",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [