@longvansoftware/storefront-js-client 1.6.8 → 1.7.0
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.
package/dist/config/config.js
CHANGED
|
@@ -14,7 +14,7 @@ exports.environmentEndpoints = {
|
|
|
14
14
|
computing: "https://api-gateway.dev.longvan.vn/computing-service/graphql",
|
|
15
15
|
campaign: "https://crm.dev.longvan.vn/campaign-gateway/graphql",
|
|
16
16
|
image: "https://product-service.dev.longvan.vn/product-service/v1/products",
|
|
17
|
-
paymentV2: "https://payment.dev.longvan.vn/graphql"
|
|
17
|
+
paymentV2: "https://payment.dev.longvan.vn/graphql",
|
|
18
18
|
},
|
|
19
19
|
live: {
|
|
20
20
|
product: "https://product-service.longvan.vn/product-service/graphql",
|
|
@@ -22,12 +22,12 @@ exports.environmentEndpoints = {
|
|
|
22
22
|
auth: "https://crm.longvan.vn/authorization-gateway/graphql",
|
|
23
23
|
order: "https://storefront.longvan.vn/v2",
|
|
24
24
|
user: "https://user.longvan.vn/user-gateway/graphql",
|
|
25
|
-
payment: "https://portal.longvan.vn/invoice-gateway/graphql",
|
|
25
|
+
payment: "https://portal-staging.longvan.vn/invoice-gateway/graphql",
|
|
26
26
|
service: "https://portal.longvan.vn/service-api/graphql",
|
|
27
27
|
warehouse: "https://portal.longvan.vn/facility-api/public-facility/1.0.0/inventory-item",
|
|
28
28
|
computing: "https://api-gateway.longvan.vn/computing-service/graphql",
|
|
29
29
|
campaign: "https://crm.longvan.vn/campaign-gateway/graphql",
|
|
30
30
|
image: "https://product-service.dev.longvan.vn/product-service/v1/products",
|
|
31
|
-
paymentV2: "https://payment.
|
|
31
|
+
paymentV2: "https://payment-staging.longvan.vn/graphql",
|
|
32
32
|
},
|
|
33
33
|
};
|
|
@@ -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
|
+
`;
|
|
@@ -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;
|