@longvansoftware/storefront-js-client 1.6.8 → 1.6.9

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 PAYMENTS_BY_ORDERS: import("graphql").DocumentNode;
2
2
  export declare const PAYMENT_METHODS: import("graphql").DocumentNode;
3
+ export declare const GET_PAYMENT_METHOD_TYPES: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PAYMENT_METHODS = exports.PAYMENTS_BY_ORDERS = void 0;
3
+ exports.GET_PAYMENT_METHOD_TYPES = exports.PAYMENT_METHODS = exports.PAYMENTS_BY_ORDERS = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.PAYMENTS_BY_ORDERS = (0, graphql_tag_1.gql) `
6
6
  query PaymentsByOrders($orderIds: [String!]!) {
@@ -48,3 +48,13 @@ exports.PAYMENT_METHODS = (0, graphql_tag_1.gql) `
48
48
  }
49
49
  }
50
50
  `;
51
+ exports.GET_PAYMENT_METHOD_TYPES = (0, graphql_tag_1.gql) `
52
+ query GetPaymentMethodTypes($partnerId: String!, $storeId: String!) {
53
+ getPaymentMethodTypes(partnerId: $partnerId, storeId: $storeId) {
54
+ code
55
+ name
56
+ description
57
+ image
58
+ }
59
+ }
60
+ `;
@@ -4,4 +4,5 @@ export declare class PaymentServiceV2 extends Service {
4
4
  paymentsByOrders(orderIds: [string]): Promise<any>;
5
5
  cancelPayment(paymentId: string, reason: string): Promise<any>;
6
6
  paymentMethods(): Promise<any>;
7
+ getPaymentMethodTypes(): Promise<any>;
7
8
  }
@@ -52,7 +52,7 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
52
52
  return __awaiter(this, void 0, void 0, function* () {
53
53
  const query = queries_1.PAYMENT_METHODS;
54
54
  const variables = {
55
- partnerCode: this.orgId
55
+ partnerCode: this.orgId,
56
56
  };
57
57
  try {
58
58
  const response = yield this.graphqlQueryV3(query, variables);
@@ -63,5 +63,21 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
63
63
  }
64
64
  });
65
65
  }
66
+ getPaymentMethodTypes() {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ const query = queries_1.GET_PAYMENT_METHOD_TYPES;
69
+ const variables = {
70
+ partnerId: this.orgId,
71
+ storeId: this.storeId,
72
+ };
73
+ try {
74
+ const response = yield this.graphqlQueryV3(query, variables);
75
+ return response.getPaymentMethodTypes;
76
+ }
77
+ catch (error) {
78
+ throw error;
79
+ }
80
+ });
81
+ }
66
82
  }
67
83
  exports.PaymentServiceV2 = PaymentServiceV2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "1.6.8",
3
+ "version": "1.6.9",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [