@longvansoftware/service-js-client 1.9.7 → 1.9.8
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/src/graphql/computing/queries.js +2 -0
- package/dist/src/graphql/orderGraphQL/queries.js +49 -0
- package/dist/src/graphql/product/queries.d.ts +2 -0
- package/dist/src/graphql/product/queries.js +35 -1
- package/dist/src/lib/product/index.d.ts +2 -0
- package/dist/src/lib/product/index.js +35 -0
- package/package.json +1 -1
@@ -54,6 +54,7 @@ exports.PORTNATS = (0, graphql_tag_1.gql) `
|
|
54
54
|
description
|
55
55
|
status
|
56
56
|
domain
|
57
|
+
computingId
|
57
58
|
}
|
58
59
|
}
|
59
60
|
`;
|
@@ -408,6 +409,7 @@ exports.GET_PORT_NATS_BY_SERVICE_ID = (0, graphql_tag_1.gql) `
|
|
408
409
|
description
|
409
410
|
status
|
410
411
|
domain
|
412
|
+
computingId
|
411
413
|
}
|
412
414
|
}
|
413
415
|
`;
|
@@ -6,18 +6,51 @@ exports.GET_ORDER_DETAIL = (0, graphql_tag_1.gql) `
|
|
6
6
|
query getOrderDetail($orderId: String!) {
|
7
7
|
orderDetail(orderId: $orderId) {
|
8
8
|
order {
|
9
|
+
cancelReason
|
10
|
+
currencyCode
|
11
|
+
orderStatus
|
12
|
+
totalPrice {
|
13
|
+
amount
|
14
|
+
}
|
15
|
+
discountTotalPrice {
|
16
|
+
amount
|
17
|
+
}
|
18
|
+
totalVAT {
|
19
|
+
amount
|
20
|
+
}
|
21
|
+
currentTotalPrice {
|
22
|
+
amount
|
23
|
+
}
|
9
24
|
currentSubtotalPrice {
|
10
25
|
amount
|
11
26
|
currencyCode
|
12
27
|
}
|
28
|
+
createdStamp
|
29
|
+
edited
|
13
30
|
financialStatus
|
31
|
+
fulfillmentStatus
|
14
32
|
orderStatus
|
33
|
+
id
|
34
|
+
partnerId
|
15
35
|
ownerName
|
16
36
|
ownerEmail
|
17
37
|
ownerPhone
|
18
38
|
ownerPartyId
|
39
|
+
orderNumber
|
40
|
+
rawData
|
19
41
|
orderId
|
20
42
|
id
|
43
|
+
note
|
44
|
+
pending
|
45
|
+
checkCommodities
|
46
|
+
shipmentNote
|
47
|
+
shopId
|
48
|
+
facilityId
|
49
|
+
orderType
|
50
|
+
shippingServiceId
|
51
|
+
carrierId
|
52
|
+
fromOrderId
|
53
|
+
externalCode
|
21
54
|
createdAt
|
22
55
|
currentTotalPrice {
|
23
56
|
amount
|
@@ -25,10 +58,26 @@ exports.GET_ORDER_DETAIL = (0, graphql_tag_1.gql) `
|
|
25
58
|
}
|
26
59
|
createdStamp
|
27
60
|
customAttribute
|
61
|
+
canceledAt
|
62
|
+
updatedAt
|
63
|
+
approvedAt
|
64
|
+
processedAt
|
65
|
+
completedAt
|
66
|
+
createdBy
|
67
|
+
saleName
|
68
|
+
salePartyId
|
69
|
+
ownerPartyId
|
70
|
+
customerLocale
|
71
|
+
orderParentId
|
72
|
+
shopName
|
73
|
+
version
|
28
74
|
description
|
29
75
|
}
|
30
76
|
lineItems {
|
31
77
|
orderLineItem {
|
78
|
+
originalTotalPrice {
|
79
|
+
amount
|
80
|
+
}
|
32
81
|
description
|
33
82
|
unitType
|
34
83
|
customAttributes {
|
@@ -16,3 +16,5 @@ export declare const GET_PRODUCT_VARIANT_BY_ID: import("graphql").DocumentNode;
|
|
16
16
|
export declare const GET_RELATED_INFOR: import("graphql").DocumentNode;
|
17
17
|
export declare const GET_DETAIL_STORES: import("graphql").DocumentNode;
|
18
18
|
export declare const GET_LIST_PRICE: import("graphql").DocumentNode;
|
19
|
+
export declare const GET_TAGS: import("graphql").DocumentNode;
|
20
|
+
export declare const GET_TAGS_BY_CATEGORY: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.GET_LIST_PRICE = exports.GET_DETAIL_STORES = exports.GET_RELATED_INFOR = exports.GET_PRODUCT_VARIANT_BY_ID = exports.GET_RESOURCE_BY_PRODUCT = exports.GET_HANDLE_BY_SERVICETYPE = exports.GET_PRODUCTS = 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_TAGS_BY_CATEGORY = exports.GET_TAGS = exports.GET_LIST_PRICE = exports.GET_DETAIL_STORES = exports.GET_RELATED_INFOR = exports.GET_PRODUCT_VARIANT_BY_ID = exports.GET_RESOURCE_BY_PRODUCT = exports.GET_HANDLE_BY_SERVICETYPE = exports.GET_PRODUCTS = 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(
|
@@ -851,3 +851,37 @@ exports.GET_LIST_PRICE = (0, graphql_tag_1.gql) `
|
|
851
851
|
)
|
852
852
|
}
|
853
853
|
`;
|
854
|
+
exports.GET_TAGS = (0, graphql_tag_1.gql) `
|
855
|
+
query GetTags($partnerId: String!, $storeChannel: String!) {
|
856
|
+
getTags(partnerId: $partnerId, storeChannel: $storeChannel) {
|
857
|
+
id
|
858
|
+
name
|
859
|
+
slug
|
860
|
+
type
|
861
|
+
scope
|
862
|
+
storeIds
|
863
|
+
selected
|
864
|
+
}
|
865
|
+
}
|
866
|
+
`;
|
867
|
+
exports.GET_TAGS_BY_CATEGORY = (0, graphql_tag_1.gql) `
|
868
|
+
query GetTagsByCategory(
|
869
|
+
$partnerId: String!
|
870
|
+
$storeChannel: String!
|
871
|
+
$categoryId: String!
|
872
|
+
) {
|
873
|
+
getTagsByCategory(
|
874
|
+
partnerId: $partnerId
|
875
|
+
storeChannel: $storeChannel
|
876
|
+
categoryId: $categoryId
|
877
|
+
) {
|
878
|
+
id
|
879
|
+
name
|
880
|
+
slug
|
881
|
+
type
|
882
|
+
scope
|
883
|
+
storeIds
|
884
|
+
selected
|
885
|
+
}
|
886
|
+
}
|
887
|
+
`;
|
@@ -44,4 +44,6 @@ export declare class ProductService extends Service {
|
|
44
44
|
getRelatedInfor(id: string): Promise<any>;
|
45
45
|
getDetailStores(storeId: string): Promise<any>;
|
46
46
|
getListPrice(productIds: string[], storeId: string): Promise<any>;
|
47
|
+
getTags(storeId: string): Promise<any>;
|
48
|
+
getTagsByCategory(categoryId: string, storeId: string): Promise<any>;
|
47
49
|
}
|
@@ -250,5 +250,40 @@ class ProductService extends serviceSDK_1.Service {
|
|
250
250
|
}
|
251
251
|
});
|
252
252
|
}
|
253
|
+
getTags(storeId) {
|
254
|
+
return __awaiter(this, void 0, void 0, function* () {
|
255
|
+
const query = queries_1.GET_TAGS;
|
256
|
+
const variablesHandle = {
|
257
|
+
partnerId: this.orgId,
|
258
|
+
storeChannel: storeId ? storeId : this.storeId,
|
259
|
+
};
|
260
|
+
try {
|
261
|
+
const response = yield this.graphqlQueryV2(query, variablesHandle);
|
262
|
+
return response.getTags;
|
263
|
+
}
|
264
|
+
catch (error) {
|
265
|
+
console.log(`Error fetching getTags error : ${error}`);
|
266
|
+
throw error;
|
267
|
+
}
|
268
|
+
});
|
269
|
+
}
|
270
|
+
getTagsByCategory(categoryId, storeId) {
|
271
|
+
return __awaiter(this, void 0, void 0, function* () {
|
272
|
+
const query = queries_1.GET_TAGS_BY_CATEGORY;
|
273
|
+
const variablesHandle = {
|
274
|
+
partnerId: this.orgId,
|
275
|
+
storeChannel: storeId ? storeId : this.storeId,
|
276
|
+
categoryId,
|
277
|
+
};
|
278
|
+
try {
|
279
|
+
const response = yield this.graphqlQueryV2(query, variablesHandle);
|
280
|
+
return response.getTagsByCategory;
|
281
|
+
}
|
282
|
+
catch (error) {
|
283
|
+
console.log(`Error fetching getTagsByCategory error : ${error}`);
|
284
|
+
throw error;
|
285
|
+
}
|
286
|
+
});
|
287
|
+
}
|
253
288
|
}
|
254
289
|
exports.ProductService = ProductService;
|