@longvansoftware/storefront-js-client 1.6.2 → 1.6.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.
- package/dist/config/config.js +1 -1
- package/dist/src/graphql/payment/mutations.js +6 -1
- package/dist/src/graphql/payment/queries.d.ts +1 -0
- package/dist/src/graphql/payment/queries.js +21 -1
- package/dist/src/graphql/product/queries.d.ts +1 -0
- package/dist/src/graphql/product/queries.js +6 -1
- package/dist/src/lib/payment/index.d.ts +1 -0
- package/dist/src/lib/payment/index.js +15 -0
- package/dist/src/lib/product/index.d.ts +1 -0
- package/dist/src/lib/product/index.js +14 -0
- package/package.json +1 -1
package/dist/config/config.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.environmentEndpoints = {
|
|
|
13
13
|
warehouse: "https://portal.dev.longvan.vn/facility-api/public-facility/1.0.0",
|
|
14
14
|
computing: "https://api-gateway.dev.longvan.vn/computing-service/graphql",
|
|
15
15
|
campaign: "https://crm.dev.longvan.vn/campaign-gateway/graphql",
|
|
16
|
-
image: "https://product-service.dev.longvan.vn/product-service/v1/products"
|
|
16
|
+
image: "https://product-service.dev.longvan.vn/product-service/v1/products",
|
|
17
17
|
},
|
|
18
18
|
live: {
|
|
19
19
|
product: "https://product-service.longvan.vn/product-service/graphql",
|
|
@@ -9,7 +9,7 @@ exports.CREATE_PAYMENT_ORDER_MUTATION = (0, graphql_tag_1.gql) `
|
|
|
9
9
|
$paymentMethod: String!
|
|
10
10
|
$storeId: String!
|
|
11
11
|
$source: String!
|
|
12
|
-
$appliedAmount: BigDecimal
|
|
12
|
+
$appliedAmount: BigDecimal
|
|
13
13
|
$payDate: String!
|
|
14
14
|
$returnUrl: String
|
|
15
15
|
$paymentType: String!
|
|
@@ -32,6 +32,11 @@ exports.CREATE_PAYMENT_ORDER_MUTATION = (0, graphql_tag_1.gql) `
|
|
|
32
32
|
code
|
|
33
33
|
message
|
|
34
34
|
data
|
|
35
|
+
qrCodeUrl
|
|
36
|
+
deeplink
|
|
37
|
+
deeplinkMiniApp
|
|
38
|
+
invoiceId
|
|
39
|
+
orderId
|
|
35
40
|
}
|
|
36
41
|
}
|
|
37
42
|
`;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const GET_PAYMENT_METHOD: import("graphql").DocumentNode;
|
|
2
2
|
export declare const GEN_QR_PAYMENT: import("graphql").DocumentNode;
|
|
3
3
|
export declare const GET_PAYMENT_METHOD_OF_STORE_CHANNEL: import("graphql").DocumentNode;
|
|
4
|
+
export declare const GET_INVOICE_DETAIL: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GET_PAYMENT_METHOD_OF_STORE_CHANNEL = exports.GEN_QR_PAYMENT = exports.GET_PAYMENT_METHOD = void 0;
|
|
3
|
+
exports.GET_INVOICE_DETAIL = exports.GET_PAYMENT_METHOD_OF_STORE_CHANNEL = exports.GEN_QR_PAYMENT = exports.GET_PAYMENT_METHOD = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.GET_PAYMENT_METHOD = (0, graphql_tag_1.gql) `
|
|
6
6
|
query GetPaymentMethod($orgId: String!, $storeChannelId: String) {
|
|
@@ -43,3 +43,23 @@ exports.GET_PAYMENT_METHOD_OF_STORE_CHANNEL = (0, graphql_tag_1.gql) `
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
`;
|
|
46
|
+
exports.GET_INVOICE_DETAIL = (0, graphql_tag_1.gql) `
|
|
47
|
+
query GetInvoiceDetail($invoiceId: String!) {
|
|
48
|
+
getInvoiceDetail(invoiceId: $invoiceId) {
|
|
49
|
+
id
|
|
50
|
+
orderId
|
|
51
|
+
type
|
|
52
|
+
partyIdFrom
|
|
53
|
+
partyIdTo
|
|
54
|
+
status
|
|
55
|
+
invoiceDate
|
|
56
|
+
invoiceDueDate
|
|
57
|
+
createdBy
|
|
58
|
+
createdStamp
|
|
59
|
+
paymentId
|
|
60
|
+
originalTotalPrice
|
|
61
|
+
totalVAT
|
|
62
|
+
appliedAmount
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
`;
|
|
@@ -11,3 +11,4 @@ export declare const GET_PRODUCT_OPTION: import("graphql").DocumentNode;
|
|
|
11
11
|
export declare const GET_POLICY: import("graphql").DocumentNode;
|
|
12
12
|
export declare const GET_STORES: import("graphql").DocumentNode;
|
|
13
13
|
export declare const GET_DETAIL_STORES: import("graphql").DocumentNode;
|
|
14
|
+
export declare const GET_PRODUCT_IMAGE: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GET_DETAIL_STORES = exports.GET_STORES = exports.GET_POLICY = exports.GET_PRODUCT_OPTION = exports.GET_BRAND_DETAIL_QUERY = exports.GET_BRANDS_BY_CATEGORY_QUERY = exports.GET_BRANDS_QUERY = exports.GET_CATEGORY_BY_ID_QUERY = exports.GET_CATEGORY_BY_HANDLE_QUERY = exports.GET_CATEGORIES_QUERY = exports.GET_SIMPLE_PRODUCTS_QUERY = exports.GET_PRODUCT_BY_SLUG_QUERY = exports.GET_PRODUCT_BY_ID_QUERY = void 0;
|
|
3
|
+
exports.GET_PRODUCT_IMAGE = exports.GET_DETAIL_STORES = exports.GET_STORES = exports.GET_POLICY = exports.GET_PRODUCT_OPTION = exports.GET_BRAND_DETAIL_QUERY = exports.GET_BRANDS_BY_CATEGORY_QUERY = exports.GET_BRANDS_QUERY = exports.GET_CATEGORY_BY_ID_QUERY = exports.GET_CATEGORY_BY_HANDLE_QUERY = exports.GET_CATEGORIES_QUERY = exports.GET_SIMPLE_PRODUCTS_QUERY = exports.GET_PRODUCT_BY_SLUG_QUERY = exports.GET_PRODUCT_BY_ID_QUERY = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
// export const GET_PRODUCT_BY_ID_QUERY = gql`
|
|
6
6
|
// query GetProductById(
|
|
@@ -440,3 +440,8 @@ exports.GET_DETAIL_STORES = (0, graphql_tag_1.gql) `
|
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
442
|
`;
|
|
443
|
+
exports.GET_PRODUCT_IMAGE = (0, graphql_tag_1.gql) `
|
|
444
|
+
query GetProductImage($partnerId: String!, $productId: String!) {
|
|
445
|
+
getProductImage(partnerId: $partnerId, productId: $productId)
|
|
446
|
+
}
|
|
447
|
+
`;
|
|
@@ -5,4 +5,5 @@ export declare class PaymentService extends Service {
|
|
|
5
5
|
createPaymentOrder(paymentOrderData: any): Promise<any>;
|
|
6
6
|
genQRPayment(orderId: any, totalAmount: any): Promise<any>;
|
|
7
7
|
getPaymentMethodOfStoreChannel(): Promise<any>;
|
|
8
|
+
getInvoiceDetail(invoiceId: string): Promise<any>;
|
|
8
9
|
}
|
|
@@ -81,5 +81,20 @@ class PaymentService extends serviceSDK_1.Service {
|
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
+
getInvoiceDetail(invoiceId) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
const query = queries_1.GET_INVOICE_DETAIL;
|
|
87
|
+
const variables = {
|
|
88
|
+
invoiceId: invoiceId,
|
|
89
|
+
};
|
|
90
|
+
try {
|
|
91
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
|
92
|
+
return response.getInvoiceDetail;
|
|
93
|
+
}
|
|
94
|
+
catch (error) {
|
|
95
|
+
throw error;
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
84
99
|
}
|
|
85
100
|
exports.PaymentService = PaymentService;
|
|
@@ -24,6 +24,20 @@ class ProductService extends serviceSDK_1.Service {
|
|
|
24
24
|
*/
|
|
25
25
|
constructor(endpoint, orgId, storeId) {
|
|
26
26
|
super(endpoint, orgId, storeId);
|
|
27
|
+
this.getProductImage = (productId) => __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
const query = queries_1.GET_PRODUCT_IMAGE;
|
|
29
|
+
const variables = {
|
|
30
|
+
partnerId: this.orgId,
|
|
31
|
+
productId,
|
|
32
|
+
};
|
|
33
|
+
try {
|
|
34
|
+
const response = yield this.graphqlQuery(query, variables);
|
|
35
|
+
return response.getProductImage;
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
27
41
|
}
|
|
28
42
|
// ...
|
|
29
43
|
/**
|