@longvansoftware/storefront-js-client 3.3.3 → 3.3.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.
@@ -6,3 +6,4 @@ export declare const PAYMENT_STATUS: import("graphql").DocumentNode;
6
6
  export declare const GW_CONFIG_DETAIL: import("graphql").DocumentNode;
7
7
  export declare const GET_PAYMENT_METHOD_TITLES: import("graphql").DocumentNode;
8
8
  export declare const GET_PAYEMNT_GATEWAYS_BY_METHOD_CODE: import("graphql").DocumentNode;
9
+ export declare const GET_PAYMENT_METHOD_TYPES_V2: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_PAYEMNT_GATEWAYS_BY_METHOD_CODE = exports.GET_PAYMENT_METHOD_TITLES = exports.GW_CONFIG_DETAIL = exports.PAYMENT_STATUS = exports.PAYMENT_INFO = exports.GET_PAYMENT_METHOD_TYPES = exports.PAYMENT_METHODS = exports.PAYMENTS_BY_ORDERS = void 0;
3
+ exports.GET_PAYMENT_METHOD_TYPES_V2 = exports.GET_PAYEMNT_GATEWAYS_BY_METHOD_CODE = exports.GET_PAYMENT_METHOD_TITLES = exports.GW_CONFIG_DETAIL = exports.PAYMENT_STATUS = exports.PAYMENT_INFO = 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!]!) {
@@ -208,10 +208,12 @@ exports.GET_PAYEMNT_GATEWAYS_BY_METHOD_CODE = (0, graphql_tag_1.gql) `
208
208
  query GetPaymentGatewaysByMethodCode(
209
209
  $partnerId: String!
210
210
  $methodCode: String!
211
+ $storeId: String
211
212
  ) {
212
213
  getPaymentGatewaysByMethodCode(
213
214
  partnerId: $partnerId
214
215
  methodCode: $methodCode
216
+ storeId: $storeId
215
217
  ) {
216
218
  id
217
219
  name
@@ -228,6 +230,26 @@ exports.GET_PAYEMNT_GATEWAYS_BY_METHOD_CODE = (0, graphql_tag_1.gql) `
228
230
  requestUrl
229
231
  description
230
232
  activated
233
+ storeActive
234
+ }
235
+ }
236
+ `;
237
+ exports.GET_PAYMENT_METHOD_TYPES_V2 = (0, graphql_tag_1.gql) `
238
+ query GetPaymentMethodTypes(
239
+ $partnerId: String!
240
+ $storeId: String!
241
+ $storeActive: StoreActive
242
+ ) {
243
+ getPaymentMethodTypes(
244
+ partnerId: $partnerId
245
+ storeId: $storeId
246
+ storeActive: $storeActive
247
+ ) {
248
+ code
249
+ name
250
+ description
251
+ image
252
+ storeActive
231
253
  }
232
254
  }
233
255
  `;
@@ -14,4 +14,5 @@ export declare class PaymentServiceV2 extends Service {
14
14
  handleCreateGatewayConfig(input: any, cassoApiKey: string): Promise<any>;
15
15
  handleUpdateGatewayConfig(input: any, cassoApiKey: string): Promise<any>;
16
16
  getPaymentGatewaysByMethodCode(methodCode: string): Promise<any>;
17
+ getPaymentMethodTypesV2(storeActive: any): Promise<any>;
17
18
  }
@@ -214,6 +214,7 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
214
214
  const variables = {
215
215
  partnerId: this.orgId,
216
216
  methodCode,
217
+ storeId: this.storeId
217
218
  };
218
219
  try {
219
220
  const response = yield this.graphqlQueryV3(query, variables);
@@ -224,5 +225,22 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
224
225
  }
225
226
  });
226
227
  }
228
+ getPaymentMethodTypesV2(storeActive) {
229
+ return __awaiter(this, void 0, void 0, function* () {
230
+ const queries = queries_1.GET_PAYMENT_METHOD_TYPES_V2;
231
+ const variables = {
232
+ partnerId: this.orgId,
233
+ storeId: this.storeId,
234
+ storeActive: storeActive
235
+ };
236
+ try {
237
+ const response = yield this.graphqlQueryV3(queries, variables);
238
+ return response.getPaymentMethodTypes;
239
+ }
240
+ catch (error) {
241
+ throw error;
242
+ }
243
+ });
244
+ }
227
245
  }
228
246
  exports.PaymentServiceV2 = PaymentServiceV2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "3.3.3",
3
+ "version": "3.3.4",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [