@longvansoftware/storefront-js-client 4.7.8 → 4.8.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/src/graphql/cloudService/queries.d.ts +1 -0
- package/dist/src/graphql/cloudService/queries.js +71 -0
- package/dist/src/graphql/marketplace/queries.js +2 -5
- package/dist/src/graphql/product/queries.js +183 -34
- package/dist/src/lib/cloudService/index.d.ts +5 -0
- package/dist/src/lib/cloudService/index.js +35 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SEARCH_SERVICE: import("graphql").DocumentNode;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SEARCH_SERVICE = void 0;
|
|
4
|
+
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
+
exports.SEARCH_SERVICE = (0, graphql_tag_1.gql) `
|
|
6
|
+
query SearchService($filter: CloudServiceFilterInput) {
|
|
7
|
+
searchService(filter: $filter) {
|
|
8
|
+
total
|
|
9
|
+
offset
|
|
10
|
+
maxResult
|
|
11
|
+
resultList {
|
|
12
|
+
supplierId
|
|
13
|
+
serviceId
|
|
14
|
+
partnerId
|
|
15
|
+
serviceName
|
|
16
|
+
type
|
|
17
|
+
typeName
|
|
18
|
+
status
|
|
19
|
+
statusFulfillment
|
|
20
|
+
ownerId
|
|
21
|
+
startDate
|
|
22
|
+
endDate
|
|
23
|
+
serviceType
|
|
24
|
+
urlPrivate
|
|
25
|
+
urlPublic
|
|
26
|
+
username
|
|
27
|
+
password
|
|
28
|
+
attrs
|
|
29
|
+
description
|
|
30
|
+
productGroupId
|
|
31
|
+
orderId
|
|
32
|
+
actionRequest {
|
|
33
|
+
id
|
|
34
|
+
name
|
|
35
|
+
uri
|
|
36
|
+
type
|
|
37
|
+
}
|
|
38
|
+
billingCycle {
|
|
39
|
+
quantity
|
|
40
|
+
unit
|
|
41
|
+
}
|
|
42
|
+
productConfiguration {
|
|
43
|
+
productId
|
|
44
|
+
productTitle
|
|
45
|
+
productResources {
|
|
46
|
+
name
|
|
47
|
+
quantity
|
|
48
|
+
unit
|
|
49
|
+
productId
|
|
50
|
+
giftProductId
|
|
51
|
+
gift
|
|
52
|
+
giftQuantity
|
|
53
|
+
campaignId
|
|
54
|
+
campaignActionId
|
|
55
|
+
qualify
|
|
56
|
+
idParent
|
|
57
|
+
addQuantity
|
|
58
|
+
defaultQuantity
|
|
59
|
+
title
|
|
60
|
+
price
|
|
61
|
+
unitPrice
|
|
62
|
+
totalResource
|
|
63
|
+
unitGift
|
|
64
|
+
giftDuration
|
|
65
|
+
giftDurationUnit
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
`;
|
|
@@ -22,11 +22,7 @@ exports.GET_TAGS_BY_PRODUCT_ID = (0, graphql_tag_1.gql) `
|
|
|
22
22
|
`;
|
|
23
23
|
exports.SEARCH_TAG = (0, graphql_tag_1.gql) `
|
|
24
24
|
query SearchTag($keyword: String, $currentPage: Int, $maxResult: Int) {
|
|
25
|
-
searchTag(
|
|
26
|
-
keyword: $keyword
|
|
27
|
-
currentPage: $currentPage
|
|
28
|
-
maxResult: $maxResult
|
|
29
|
-
) {
|
|
25
|
+
searchTag(keyword: $keyword, currentPage: $currentPage, maxResult: $maxResult) {
|
|
30
26
|
total
|
|
31
27
|
maxResult
|
|
32
28
|
index
|
|
@@ -39,6 +35,7 @@ exports.SEARCH_TAG = (0, graphql_tag_1.gql) `
|
|
|
39
35
|
storeIds
|
|
40
36
|
selected
|
|
41
37
|
title
|
|
38
|
+
tagId
|
|
42
39
|
}
|
|
43
40
|
}
|
|
44
41
|
}
|
|
@@ -90,8 +90,16 @@ const graphql_tag_1 = require("graphql-tag");
|
|
|
90
90
|
// }
|
|
91
91
|
// `;
|
|
92
92
|
exports.GET_PRODUCT_BY_ID_QUERY = (0, graphql_tag_1.gql) `
|
|
93
|
-
query GetProductById(
|
|
94
|
-
|
|
93
|
+
query GetProductById(
|
|
94
|
+
$partnerId: String!
|
|
95
|
+
$storeChannel: String!
|
|
96
|
+
$productId: String!
|
|
97
|
+
) {
|
|
98
|
+
getProductById(
|
|
99
|
+
partnerId: $partnerId
|
|
100
|
+
storeChannel: $storeChannel
|
|
101
|
+
productId: $productId
|
|
102
|
+
) {
|
|
95
103
|
id
|
|
96
104
|
title
|
|
97
105
|
description
|
|
@@ -202,8 +210,16 @@ exports.GET_PRODUCT_BY_ID_QUERY = (0, graphql_tag_1.gql) `
|
|
|
202
210
|
}
|
|
203
211
|
`;
|
|
204
212
|
exports.GET_SIMPLE_PRODUCT_BY_ID_QUERY = (0, graphql_tag_1.gql) `
|
|
205
|
-
query GetSimpleProductById(
|
|
206
|
-
|
|
213
|
+
query GetSimpleProductById(
|
|
214
|
+
$partnerId: String!
|
|
215
|
+
$storeChannel: String!
|
|
216
|
+
$productId: String!
|
|
217
|
+
) {
|
|
218
|
+
getSimpleProductById(
|
|
219
|
+
partnerId: $partnerId
|
|
220
|
+
storeChannel: $storeChannel
|
|
221
|
+
productId: $productId
|
|
222
|
+
) {
|
|
207
223
|
id
|
|
208
224
|
title
|
|
209
225
|
description
|
|
@@ -324,8 +340,16 @@ exports.GET_SIMPLE_PRODUCT_BY_ID_QUERY = (0, graphql_tag_1.gql) `
|
|
|
324
340
|
}
|
|
325
341
|
`;
|
|
326
342
|
exports.GET_PRODUCT_BY_SLUG_QUERY = (0, graphql_tag_1.gql) `
|
|
327
|
-
query GetProductByHandle(
|
|
328
|
-
|
|
343
|
+
query GetProductByHandle(
|
|
344
|
+
$partnerId: String!
|
|
345
|
+
$storeChannel: String!
|
|
346
|
+
$handle: String!
|
|
347
|
+
) {
|
|
348
|
+
getProductByHandle(
|
|
349
|
+
partnerId: $partnerId
|
|
350
|
+
storeChannel: $storeChannel
|
|
351
|
+
handle: $handle
|
|
352
|
+
) {
|
|
329
353
|
id
|
|
330
354
|
title
|
|
331
355
|
subType
|
|
@@ -509,8 +533,18 @@ exports.GET_SIMPLE_PRODUCTS_QUERY = (0, graphql_tag_1.gql) `
|
|
|
509
533
|
}
|
|
510
534
|
`;
|
|
511
535
|
exports.GET_CATEGORIES_QUERY = (0, graphql_tag_1.gql) `
|
|
512
|
-
query GetCategories(
|
|
513
|
-
|
|
536
|
+
query GetCategories(
|
|
537
|
+
$partnerId: String!
|
|
538
|
+
$storeChannel: String!
|
|
539
|
+
$typeBuild: String!
|
|
540
|
+
$level: Int!
|
|
541
|
+
) {
|
|
542
|
+
getCategories(
|
|
543
|
+
partnerId: $partnerId
|
|
544
|
+
storeChannel: $storeChannel
|
|
545
|
+
typeBuild: $typeBuild
|
|
546
|
+
level: $level
|
|
547
|
+
) {
|
|
514
548
|
id
|
|
515
549
|
title
|
|
516
550
|
image
|
|
@@ -533,8 +567,16 @@ exports.GET_CATEGORIES_QUERY = (0, graphql_tag_1.gql) `
|
|
|
533
567
|
}
|
|
534
568
|
`;
|
|
535
569
|
exports.GET_CATEGORY_BY_HANDLE_QUERY = (0, graphql_tag_1.gql) `
|
|
536
|
-
query GetCategoryByHandle(
|
|
537
|
-
|
|
570
|
+
query GetCategoryByHandle(
|
|
571
|
+
$partnerId: String!
|
|
572
|
+
$storeChannel: String!
|
|
573
|
+
$handle: String!
|
|
574
|
+
) {
|
|
575
|
+
getCategoryByHandle(
|
|
576
|
+
partnerId: $partnerId
|
|
577
|
+
storeChannel: $storeChannel
|
|
578
|
+
handle: $handle
|
|
579
|
+
) {
|
|
538
580
|
id
|
|
539
581
|
title
|
|
540
582
|
image
|
|
@@ -555,8 +597,16 @@ exports.GET_CATEGORY_BY_HANDLE_QUERY = (0, graphql_tag_1.gql) `
|
|
|
555
597
|
}
|
|
556
598
|
`;
|
|
557
599
|
exports.GET_CATEGORY_BY_ID_QUERY = (0, graphql_tag_1.gql) `
|
|
558
|
-
query GetCategoryById(
|
|
559
|
-
|
|
600
|
+
query GetCategoryById(
|
|
601
|
+
$partnerId: String!
|
|
602
|
+
$storeChannel: String!
|
|
603
|
+
$categoryId: String!
|
|
604
|
+
) {
|
|
605
|
+
getCategoryById(
|
|
606
|
+
partnerId: $partnerId
|
|
607
|
+
storeChannel: $storeChannel
|
|
608
|
+
categoryId: $categoryId
|
|
609
|
+
) {
|
|
560
610
|
id
|
|
561
611
|
title
|
|
562
612
|
image
|
|
@@ -607,8 +657,16 @@ exports.GET_BRAND_DETAIL_QUERY = `
|
|
|
607
657
|
}
|
|
608
658
|
`;
|
|
609
659
|
exports.GET_PRODUCT_OPTION = (0, graphql_tag_1.gql) `
|
|
610
|
-
query GetProductOption(
|
|
611
|
-
|
|
660
|
+
query GetProductOption(
|
|
661
|
+
$partnerId: String!
|
|
662
|
+
$storeChannel: String!
|
|
663
|
+
$productId: String!
|
|
664
|
+
) {
|
|
665
|
+
getProductOption(
|
|
666
|
+
partnerId: $partnerId
|
|
667
|
+
storeChannel: $storeChannel
|
|
668
|
+
productId: $productId
|
|
669
|
+
) {
|
|
612
670
|
id
|
|
613
671
|
name
|
|
614
672
|
subType
|
|
@@ -656,8 +714,20 @@ exports.GET_STORES = (0, graphql_tag_1.gql) `
|
|
|
656
714
|
}
|
|
657
715
|
`;
|
|
658
716
|
exports.GET_STORES_V2 = (0, graphql_tag_1.gql) `
|
|
659
|
-
query GetStores(
|
|
660
|
-
|
|
717
|
+
query GetStores(
|
|
718
|
+
$partnerId: String!
|
|
719
|
+
$enable: Boolean
|
|
720
|
+
$type: String
|
|
721
|
+
$enablePortal: Boolean
|
|
722
|
+
$publicTenantStore: Boolean
|
|
723
|
+
) {
|
|
724
|
+
getStores(
|
|
725
|
+
partnerId: $partnerId
|
|
726
|
+
enable: $enable
|
|
727
|
+
type: $type
|
|
728
|
+
enablePortal: $enablePortal
|
|
729
|
+
publicTenantStore: $publicTenantStore
|
|
730
|
+
) {
|
|
661
731
|
id
|
|
662
732
|
createdStamp
|
|
663
733
|
name
|
|
@@ -679,6 +749,7 @@ exports.GET_STORES_V2 = (0, graphql_tag_1.gql) `
|
|
|
679
749
|
productStoreLink
|
|
680
750
|
applyVat
|
|
681
751
|
scope
|
|
752
|
+
publicTenantStore
|
|
682
753
|
description {
|
|
683
754
|
name
|
|
684
755
|
phone
|
|
@@ -735,8 +806,22 @@ exports.GET_PRODUCT_IMAGE = (0, graphql_tag_1.gql) `
|
|
|
735
806
|
}
|
|
736
807
|
`;
|
|
737
808
|
exports.GET_PRODUCT = (0, graphql_tag_1.gql) `
|
|
738
|
-
query GetProducts(
|
|
739
|
-
|
|
809
|
+
query GetProducts(
|
|
810
|
+
$partnerId: String!
|
|
811
|
+
$storeChannel: String!
|
|
812
|
+
$keyword: String
|
|
813
|
+
$category: String
|
|
814
|
+
$currentPage: Int
|
|
815
|
+
$maxResult: Int
|
|
816
|
+
) {
|
|
817
|
+
getProducts(
|
|
818
|
+
partnerId: $partnerId
|
|
819
|
+
storeChannel: $storeChannel
|
|
820
|
+
keyword: $keyword
|
|
821
|
+
category: $category
|
|
822
|
+
currentPage: $currentPage
|
|
823
|
+
maxResult: $maxResult
|
|
824
|
+
) {
|
|
740
825
|
total
|
|
741
826
|
currentPage
|
|
742
827
|
maxResult
|
|
@@ -800,8 +885,16 @@ exports.GET_UNITS = (0, graphql_tag_1.gql) `
|
|
|
800
885
|
}
|
|
801
886
|
`;
|
|
802
887
|
exports.GET_PRODUCT_VARIANT_BY_ID = (0, graphql_tag_1.gql) `
|
|
803
|
-
query GetProductVariantById(
|
|
804
|
-
|
|
888
|
+
query GetProductVariantById(
|
|
889
|
+
$partnerId: String!
|
|
890
|
+
$storeChannel: String!
|
|
891
|
+
$variantId: String!
|
|
892
|
+
) {
|
|
893
|
+
getProductVariantById(
|
|
894
|
+
partnerId: $partnerId
|
|
895
|
+
storeChannel: $storeChannel
|
|
896
|
+
variantId: $variantId
|
|
897
|
+
) {
|
|
805
898
|
id
|
|
806
899
|
title
|
|
807
900
|
subType
|
|
@@ -907,8 +1000,16 @@ exports.GET_TAGS = (0, graphql_tag_1.gql) `
|
|
|
907
1000
|
}
|
|
908
1001
|
`;
|
|
909
1002
|
exports.GET_PRODUCT_BY_GROUPID = (0, graphql_tag_1.gql) `
|
|
910
|
-
query GetProducts(
|
|
911
|
-
|
|
1003
|
+
query GetProducts(
|
|
1004
|
+
$partnerId: String!
|
|
1005
|
+
$storeChannel: String!
|
|
1006
|
+
$group: String
|
|
1007
|
+
) {
|
|
1008
|
+
getProducts(
|
|
1009
|
+
partnerId: $partnerId
|
|
1010
|
+
storeChannel: $storeChannel
|
|
1011
|
+
group: $group
|
|
1012
|
+
) {
|
|
912
1013
|
total
|
|
913
1014
|
currentPage
|
|
914
1015
|
maxResult
|
|
@@ -1005,8 +1106,16 @@ exports.GET_PRODUCT_BY_GROUPID = (0, graphql_tag_1.gql) `
|
|
|
1005
1106
|
}
|
|
1006
1107
|
`;
|
|
1007
1108
|
exports.GET_CATEGORY_BY_ID = (0, graphql_tag_1.gql) `
|
|
1008
|
-
query GetCategoryById(
|
|
1009
|
-
|
|
1109
|
+
query GetCategoryById(
|
|
1110
|
+
$partnerId: String!
|
|
1111
|
+
$storeChannel: String!
|
|
1112
|
+
$categoryId: String!
|
|
1113
|
+
) {
|
|
1114
|
+
getCategoryById(
|
|
1115
|
+
partnerId: $partnerId
|
|
1116
|
+
storeChannel: $storeChannel
|
|
1117
|
+
categoryId: $categoryId
|
|
1118
|
+
) {
|
|
1010
1119
|
id
|
|
1011
1120
|
title
|
|
1012
1121
|
image
|
|
@@ -1029,8 +1138,16 @@ exports.GET_CATEGORY_BY_ID = (0, graphql_tag_1.gql) `
|
|
|
1029
1138
|
}
|
|
1030
1139
|
`;
|
|
1031
1140
|
exports.GET_CATEGORY_BY_HANDLE = (0, graphql_tag_1.gql) `
|
|
1032
|
-
query GetCategoryByHandle(
|
|
1033
|
-
|
|
1141
|
+
query GetCategoryByHandle(
|
|
1142
|
+
$partnerId: String!
|
|
1143
|
+
$storeChannel: String!
|
|
1144
|
+
$handle: String!
|
|
1145
|
+
) {
|
|
1146
|
+
getCategoryByHandle(
|
|
1147
|
+
partnerId: $partnerId
|
|
1148
|
+
storeChannel: $storeChannel
|
|
1149
|
+
handle: $handle
|
|
1150
|
+
) {
|
|
1034
1151
|
id
|
|
1035
1152
|
title
|
|
1036
1153
|
image
|
|
@@ -1053,8 +1170,16 @@ exports.GET_CATEGORY_BY_HANDLE = (0, graphql_tag_1.gql) `
|
|
|
1053
1170
|
}
|
|
1054
1171
|
`;
|
|
1055
1172
|
exports.GET_TAGS_BY_PRODUCT = (0, graphql_tag_1.gql) `
|
|
1056
|
-
query GetTagsByProduct(
|
|
1057
|
-
|
|
1173
|
+
query GetTagsByProduct(
|
|
1174
|
+
$partnerId: String!
|
|
1175
|
+
$storeChannel: String!
|
|
1176
|
+
$productId: String!
|
|
1177
|
+
) {
|
|
1178
|
+
getTagsByProduct(
|
|
1179
|
+
partnerId: $partnerId
|
|
1180
|
+
storeChannel: $storeChannel
|
|
1181
|
+
productId: $productId
|
|
1182
|
+
) {
|
|
1058
1183
|
id
|
|
1059
1184
|
name
|
|
1060
1185
|
slug
|
|
@@ -1120,8 +1245,16 @@ exports.GET_PRODUCT_STORE_PUBLIC = (0, graphql_tag_1.gql) `
|
|
|
1120
1245
|
}
|
|
1121
1246
|
`;
|
|
1122
1247
|
exports.GET_PRODUCT_MARKET_PLACE = (0, graphql_tag_1.gql) `
|
|
1123
|
-
query GetProductMarketplace(
|
|
1124
|
-
|
|
1248
|
+
query GetProductMarketplace(
|
|
1249
|
+
$storeChannel: String!
|
|
1250
|
+
$currentPage: Int
|
|
1251
|
+
$maxResult: Int
|
|
1252
|
+
) {
|
|
1253
|
+
getProductMarketplace(
|
|
1254
|
+
storeChannel: $storeChannel
|
|
1255
|
+
currentPage: $currentPage
|
|
1256
|
+
maxResult: $maxResult
|
|
1257
|
+
) {
|
|
1125
1258
|
total
|
|
1126
1259
|
currentPage
|
|
1127
1260
|
maxResult
|
|
@@ -1233,8 +1366,14 @@ exports.GET_PRODUCT_MARKET_PLACE = (0, graphql_tag_1.gql) `
|
|
|
1233
1366
|
}
|
|
1234
1367
|
`;
|
|
1235
1368
|
exports.GET_PRODUCT_MARKET_PLACE_DETAIL_BY_SLUG = (0, graphql_tag_1.gql) `
|
|
1236
|
-
query GetProductMarketplaceDetailBySlug(
|
|
1237
|
-
|
|
1369
|
+
query GetProductMarketplaceDetailBySlug(
|
|
1370
|
+
$storeChannel: String!
|
|
1371
|
+
$slug: String!
|
|
1372
|
+
) {
|
|
1373
|
+
getProductMarketplaceDetailBySlug(
|
|
1374
|
+
storeChannel: $storeChannel
|
|
1375
|
+
slug: $slug
|
|
1376
|
+
) {
|
|
1238
1377
|
partyId
|
|
1239
1378
|
id
|
|
1240
1379
|
title
|
|
@@ -1473,8 +1612,18 @@ exports.GET_PRODUCT_MARKET_PLACE_BY_ID = (0, graphql_tag_1.gql) `
|
|
|
1473
1612
|
}
|
|
1474
1613
|
`;
|
|
1475
1614
|
exports.GET_PRODUCT_MARKET_PLACE_BY_SUPPLIER = (0, graphql_tag_1.gql) `
|
|
1476
|
-
query GetProductMarketplaceBySupplier(
|
|
1477
|
-
|
|
1615
|
+
query GetProductMarketplaceBySupplier(
|
|
1616
|
+
$storeChannel: String!
|
|
1617
|
+
$supplierId: String!
|
|
1618
|
+
$currentPage: Int
|
|
1619
|
+
$maxResult: Int
|
|
1620
|
+
) {
|
|
1621
|
+
getProductMarketplaceBySupplier(
|
|
1622
|
+
storeChannel: $storeChannel
|
|
1623
|
+
supplierId: $supplierId
|
|
1624
|
+
currentPage: $currentPage
|
|
1625
|
+
maxResult: $maxResult
|
|
1626
|
+
) {
|
|
1478
1627
|
total
|
|
1479
1628
|
currentPage
|
|
1480
1629
|
maxResult
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CloudServiceService = void 0;
|
|
13
|
+
const serviceSDK_1 = require("../serviceSDK");
|
|
14
|
+
const queries_1 = require("../../graphql/cloudService/queries");
|
|
15
|
+
class CloudServiceService extends serviceSDK_1.Service {
|
|
16
|
+
constructor(endpoint, orgId, storeId) {
|
|
17
|
+
super(endpoint, orgId, storeId);
|
|
18
|
+
}
|
|
19
|
+
searchService(data) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const query = queries_1.SEARCH_SERVICE;
|
|
22
|
+
const variables = {
|
|
23
|
+
filter: data,
|
|
24
|
+
};
|
|
25
|
+
try {
|
|
26
|
+
const response = yield this.graphqlQueryV4(query, variables);
|
|
27
|
+
return response.searchService;
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
throw error;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.CloudServiceService = CloudServiceService;
|