@longvansoftware/storefront-js-client 4.7.1 → 4.7.3
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.d.ts +2 -0
- package/dist/config/config.js +2 -0
- package/dist/src/graphql/cloudService/queries.d.ts +1 -0
- package/dist/src/graphql/cloudService/queries.js +71 -0
- package/dist/src/graphql/crm/queries.d.ts +1 -0
- package/dist/src/graphql/crm/queries.js +13 -1
- package/dist/src/graphql/product/queries.js +180 -35
- package/dist/src/graphql/tag/mutations.d.ts +2 -0
- package/dist/src/graphql/tag/mutations.js +44 -0
- package/dist/src/graphql/tag/queries.d.ts +1 -0
- package/dist/src/graphql/tag/queries.js +20 -0
- package/dist/src/lib/SDK.d.ts +3 -0
- package/dist/src/lib/SDK.js +5 -0
- package/dist/src/lib/cloudService/index.d.ts +5 -0
- package/dist/src/lib/cloudService/index.js +35 -0
- package/dist/src/lib/crm/index.d.ts +1 -0
- package/dist/src/lib/crm/index.js +62 -47
- package/dist/src/lib/portal/index.d.ts +3 -0
- package/dist/src/lib/portal/index.js +50 -0
- package/dist/src/lib/tag/index.d.ts +7 -0
- package/dist/src/lib/tag/index.js +61 -0
- package/package.json +1 -1
package/dist/config/config.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export declare const environmentEndpoints: {
|
|
|
33
33
|
cloudCloud: string;
|
|
34
34
|
truedoc: string;
|
|
35
35
|
marketplace: string;
|
|
36
|
+
tag: string;
|
|
36
37
|
};
|
|
37
38
|
live: {
|
|
38
39
|
product: string;
|
|
@@ -64,5 +65,6 @@ export declare const environmentEndpoints: {
|
|
|
64
65
|
cloudCloud: string;
|
|
65
66
|
truedoc: string;
|
|
66
67
|
marketplace: string;
|
|
68
|
+
tag: string;
|
|
67
69
|
};
|
|
68
70
|
};
|
package/dist/config/config.js
CHANGED
|
@@ -36,6 +36,7 @@ exports.environmentEndpoints = {
|
|
|
36
36
|
cloudCloud: "https://api-gateway.dev.longvan.vn/cloud-service-api/graphql",
|
|
37
37
|
truedoc: "https://api-gateway.dev.truedoc.vn/bmlconnector/graphql",
|
|
38
38
|
marketplace: "https://api-gateway.dev.longvan.vn/marketplace/graphql",
|
|
39
|
+
tag: "https://portal.dev.longvan.vn/tag-api/graphql",
|
|
39
40
|
},
|
|
40
41
|
live: {
|
|
41
42
|
product: "https://product-service.longvan.vn/product-service/graphql",
|
|
@@ -67,5 +68,6 @@ exports.environmentEndpoints = {
|
|
|
67
68
|
cloudCloud: "https://api-gateway.longvan.vn/cloud-service-api/graphql",
|
|
68
69
|
truedoc: "https://api-gateway.truedoc.vn/bmlconnector/graphql",
|
|
69
70
|
marketplace: "https://api-gateway.longvan.vn/marketplace/graphql",
|
|
71
|
+
tag: "https://portal.longvan.vn/tag-api/graphql",
|
|
70
72
|
},
|
|
71
73
|
};
|
|
@@ -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
|
+
`;
|
|
@@ -19,3 +19,4 @@ export declare const GET_RESOURCE_RELATED_TOPIC: import("graphql").DocumentNode;
|
|
|
19
19
|
export declare const GET_WORK_FLOWS: import("graphql").DocumentNode;
|
|
20
20
|
export declare const GET_RESUMES_BY_FIELD_NAME_AND_VALUE: import("graphql").DocumentNode;
|
|
21
21
|
export declare const GET_RESUMES_BY_FIELD_NAME_AND_VALUES: import("graphql").DocumentNode;
|
|
22
|
+
export declare const GET_RESUME_BY_ID: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GET_RESUMES_BY_FIELD_NAME_AND_VALUES = exports.GET_RESUMES_BY_FIELD_NAME_AND_VALUE = exports.GET_WORK_FLOWS = exports.GET_RESOURCE_RELATED_TOPIC = exports.GET_MESSAGES = exports.GET_MY_WORK_EFFORT_TODAY = exports.SEARCH_TOPIC = exports.GET_TAG = exports.GET_CONNECTOR_BY_RESOURCE = exports.GET_WORK_EFFORT_BY_ID_V2 = exports.GET_WORK_EFFORT_BY_ID = exports.GET_WORK_EFFORTS_V2 = exports.GET_WORK_EFFORTS_V3 = exports.GET_WORK_EFFORTS = exports.GET_LIST_COMMENT = exports.GET_ATTACHMENT_BY_WORK_EFFORT_ID = exports.GET_TICKET_BY_ID = exports.GET_LIST_TICKET = exports.GET_LIST_WORK_EFFORT_TYPE = exports.GET_LIST_TODO = exports.GET_LIST_OPPORTUNITY_QUERY = void 0;
|
|
3
|
+
exports.GET_RESUME_BY_ID = exports.GET_RESUMES_BY_FIELD_NAME_AND_VALUES = exports.GET_RESUMES_BY_FIELD_NAME_AND_VALUE = exports.GET_WORK_FLOWS = exports.GET_RESOURCE_RELATED_TOPIC = exports.GET_MESSAGES = exports.GET_MY_WORK_EFFORT_TODAY = exports.SEARCH_TOPIC = exports.GET_TAG = exports.GET_CONNECTOR_BY_RESOURCE = exports.GET_WORK_EFFORT_BY_ID_V2 = exports.GET_WORK_EFFORT_BY_ID = exports.GET_WORK_EFFORTS_V2 = exports.GET_WORK_EFFORTS_V3 = exports.GET_WORK_EFFORTS = exports.GET_LIST_COMMENT = exports.GET_ATTACHMENT_BY_WORK_EFFORT_ID = exports.GET_TICKET_BY_ID = exports.GET_LIST_TICKET = exports.GET_LIST_WORK_EFFORT_TYPE = exports.GET_LIST_TODO = exports.GET_LIST_OPPORTUNITY_QUERY = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.GET_LIST_OPPORTUNITY_QUERY = (0, graphql_tag_1.gql) `
|
|
6
6
|
query GetListOpportunity(
|
|
@@ -983,3 +983,15 @@ exports.GET_RESUMES_BY_FIELD_NAME_AND_VALUES = (0, graphql_tag_1.gql) `
|
|
|
983
983
|
}
|
|
984
984
|
}
|
|
985
985
|
`;
|
|
986
|
+
exports.GET_RESUME_BY_ID = (0, graphql_tag_1.gql) `
|
|
987
|
+
query GetResumeById($resumeId: String) {
|
|
988
|
+
getResumeById(resumeId: $resumeId) {
|
|
989
|
+
resumeId
|
|
990
|
+
resumeName
|
|
991
|
+
status
|
|
992
|
+
statusCode
|
|
993
|
+
level
|
|
994
|
+
data
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
`;
|
|
@@ -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,18 @@ 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
|
+
) {
|
|
723
|
+
getStores(
|
|
724
|
+
partnerId: $partnerId
|
|
725
|
+
enable: $enable
|
|
726
|
+
type: $type
|
|
727
|
+
enablePortal: $enablePortal
|
|
728
|
+
) {
|
|
661
729
|
id
|
|
662
730
|
createdStamp
|
|
663
731
|
name
|
|
@@ -735,8 +803,22 @@ exports.GET_PRODUCT_IMAGE = (0, graphql_tag_1.gql) `
|
|
|
735
803
|
}
|
|
736
804
|
`;
|
|
737
805
|
exports.GET_PRODUCT = (0, graphql_tag_1.gql) `
|
|
738
|
-
query GetProducts(
|
|
739
|
-
|
|
806
|
+
query GetProducts(
|
|
807
|
+
$partnerId: String!
|
|
808
|
+
$storeChannel: String!
|
|
809
|
+
$keyword: String
|
|
810
|
+
$category: String
|
|
811
|
+
$currentPage: Int
|
|
812
|
+
$maxResult: Int
|
|
813
|
+
) {
|
|
814
|
+
getProducts(
|
|
815
|
+
partnerId: $partnerId
|
|
816
|
+
storeChannel: $storeChannel
|
|
817
|
+
keyword: $keyword
|
|
818
|
+
category: $category
|
|
819
|
+
currentPage: $currentPage
|
|
820
|
+
maxResult: $maxResult
|
|
821
|
+
) {
|
|
740
822
|
total
|
|
741
823
|
currentPage
|
|
742
824
|
maxResult
|
|
@@ -800,8 +882,16 @@ exports.GET_UNITS = (0, graphql_tag_1.gql) `
|
|
|
800
882
|
}
|
|
801
883
|
`;
|
|
802
884
|
exports.GET_PRODUCT_VARIANT_BY_ID = (0, graphql_tag_1.gql) `
|
|
803
|
-
query GetProductVariantById(
|
|
804
|
-
|
|
885
|
+
query GetProductVariantById(
|
|
886
|
+
$partnerId: String!
|
|
887
|
+
$storeChannel: String!
|
|
888
|
+
$variantId: String!
|
|
889
|
+
) {
|
|
890
|
+
getProductVariantById(
|
|
891
|
+
partnerId: $partnerId
|
|
892
|
+
storeChannel: $storeChannel
|
|
893
|
+
variantId: $variantId
|
|
894
|
+
) {
|
|
805
895
|
id
|
|
806
896
|
title
|
|
807
897
|
subType
|
|
@@ -907,8 +997,16 @@ exports.GET_TAGS = (0, graphql_tag_1.gql) `
|
|
|
907
997
|
}
|
|
908
998
|
`;
|
|
909
999
|
exports.GET_PRODUCT_BY_GROUPID = (0, graphql_tag_1.gql) `
|
|
910
|
-
query GetProducts(
|
|
911
|
-
|
|
1000
|
+
query GetProducts(
|
|
1001
|
+
$partnerId: String!
|
|
1002
|
+
$storeChannel: String!
|
|
1003
|
+
$group: String
|
|
1004
|
+
) {
|
|
1005
|
+
getProducts(
|
|
1006
|
+
partnerId: $partnerId
|
|
1007
|
+
storeChannel: $storeChannel
|
|
1008
|
+
group: $group
|
|
1009
|
+
) {
|
|
912
1010
|
total
|
|
913
1011
|
currentPage
|
|
914
1012
|
maxResult
|
|
@@ -1005,8 +1103,16 @@ exports.GET_PRODUCT_BY_GROUPID = (0, graphql_tag_1.gql) `
|
|
|
1005
1103
|
}
|
|
1006
1104
|
`;
|
|
1007
1105
|
exports.GET_CATEGORY_BY_ID = (0, graphql_tag_1.gql) `
|
|
1008
|
-
query GetCategoryById(
|
|
1009
|
-
|
|
1106
|
+
query GetCategoryById(
|
|
1107
|
+
$partnerId: String!
|
|
1108
|
+
$storeChannel: String!
|
|
1109
|
+
$categoryId: String!
|
|
1110
|
+
) {
|
|
1111
|
+
getCategoryById(
|
|
1112
|
+
partnerId: $partnerId
|
|
1113
|
+
storeChannel: $storeChannel
|
|
1114
|
+
categoryId: $categoryId
|
|
1115
|
+
) {
|
|
1010
1116
|
id
|
|
1011
1117
|
title
|
|
1012
1118
|
image
|
|
@@ -1029,8 +1135,16 @@ exports.GET_CATEGORY_BY_ID = (0, graphql_tag_1.gql) `
|
|
|
1029
1135
|
}
|
|
1030
1136
|
`;
|
|
1031
1137
|
exports.GET_CATEGORY_BY_HANDLE = (0, graphql_tag_1.gql) `
|
|
1032
|
-
query GetCategoryByHandle(
|
|
1033
|
-
|
|
1138
|
+
query GetCategoryByHandle(
|
|
1139
|
+
$partnerId: String!
|
|
1140
|
+
$storeChannel: String!
|
|
1141
|
+
$handle: String!
|
|
1142
|
+
) {
|
|
1143
|
+
getCategoryByHandle(
|
|
1144
|
+
partnerId: $partnerId
|
|
1145
|
+
storeChannel: $storeChannel
|
|
1146
|
+
handle: $handle
|
|
1147
|
+
) {
|
|
1034
1148
|
id
|
|
1035
1149
|
title
|
|
1036
1150
|
image
|
|
@@ -1053,8 +1167,16 @@ exports.GET_CATEGORY_BY_HANDLE = (0, graphql_tag_1.gql) `
|
|
|
1053
1167
|
}
|
|
1054
1168
|
`;
|
|
1055
1169
|
exports.GET_TAGS_BY_PRODUCT = (0, graphql_tag_1.gql) `
|
|
1056
|
-
query GetTagsByProduct(
|
|
1057
|
-
|
|
1170
|
+
query GetTagsByProduct(
|
|
1171
|
+
$partnerId: String!
|
|
1172
|
+
$storeChannel: String!
|
|
1173
|
+
$productId: String!
|
|
1174
|
+
) {
|
|
1175
|
+
getTagsByProduct(
|
|
1176
|
+
partnerId: $partnerId
|
|
1177
|
+
storeChannel: $storeChannel
|
|
1178
|
+
productId: $productId
|
|
1179
|
+
) {
|
|
1058
1180
|
id
|
|
1059
1181
|
name
|
|
1060
1182
|
slug
|
|
@@ -1120,8 +1242,16 @@ exports.GET_PRODUCT_STORE_PUBLIC = (0, graphql_tag_1.gql) `
|
|
|
1120
1242
|
}
|
|
1121
1243
|
`;
|
|
1122
1244
|
exports.GET_PRODUCT_MARKET_PLACE = (0, graphql_tag_1.gql) `
|
|
1123
|
-
query GetProductMarketplace(
|
|
1124
|
-
|
|
1245
|
+
query GetProductMarketplace(
|
|
1246
|
+
$storeChannel: String!
|
|
1247
|
+
$currentPage: Int
|
|
1248
|
+
$maxResult: Int
|
|
1249
|
+
) {
|
|
1250
|
+
getProductMarketplace(
|
|
1251
|
+
storeChannel: $storeChannel
|
|
1252
|
+
currentPage: $currentPage
|
|
1253
|
+
maxResult: $maxResult
|
|
1254
|
+
) {
|
|
1125
1255
|
total
|
|
1126
1256
|
currentPage
|
|
1127
1257
|
maxResult
|
|
@@ -1142,7 +1272,6 @@ exports.GET_PRODUCT_MARKET_PLACE = (0, graphql_tag_1.gql) `
|
|
|
1142
1272
|
qualify
|
|
1143
1273
|
parentId
|
|
1144
1274
|
handle
|
|
1145
|
-
slug
|
|
1146
1275
|
price
|
|
1147
1276
|
displayPrice
|
|
1148
1277
|
hint
|
|
@@ -1234,8 +1363,14 @@ exports.GET_PRODUCT_MARKET_PLACE = (0, graphql_tag_1.gql) `
|
|
|
1234
1363
|
}
|
|
1235
1364
|
`;
|
|
1236
1365
|
exports.GET_PRODUCT_MARKET_PLACE_DETAIL_BY_SLUG = (0, graphql_tag_1.gql) `
|
|
1237
|
-
query GetProductMarketplaceDetailBySlug(
|
|
1238
|
-
|
|
1366
|
+
query GetProductMarketplaceDetailBySlug(
|
|
1367
|
+
$storeChannel: String!
|
|
1368
|
+
$slug: String!
|
|
1369
|
+
) {
|
|
1370
|
+
getProductMarketplaceDetailBySlug(
|
|
1371
|
+
storeChannel: $storeChannel
|
|
1372
|
+
slug: $slug
|
|
1373
|
+
) {
|
|
1239
1374
|
partyId
|
|
1240
1375
|
id
|
|
1241
1376
|
title
|
|
@@ -1474,8 +1609,18 @@ exports.GET_PRODUCT_MARKET_PLACE_BY_ID = (0, graphql_tag_1.gql) `
|
|
|
1474
1609
|
}
|
|
1475
1610
|
`;
|
|
1476
1611
|
exports.GET_PRODUCT_MARKET_PLACE_BY_SUPPLIER = (0, graphql_tag_1.gql) `
|
|
1477
|
-
query GetProductMarketplaceBySupplier(
|
|
1478
|
-
|
|
1612
|
+
query GetProductMarketplaceBySupplier(
|
|
1613
|
+
$storeChannel: String!
|
|
1614
|
+
$supplierId: String!
|
|
1615
|
+
$currentPage: Int
|
|
1616
|
+
$maxResult: Int
|
|
1617
|
+
) {
|
|
1618
|
+
getProductMarketplaceBySupplier(
|
|
1619
|
+
storeChannel: $storeChannel
|
|
1620
|
+
supplierId: $supplierId
|
|
1621
|
+
currentPage: $currentPage
|
|
1622
|
+
maxResult: $maxResult
|
|
1623
|
+
) {
|
|
1479
1624
|
total
|
|
1480
1625
|
currentPage
|
|
1481
1626
|
maxResult
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.REMOVE_TAG_TO_TAG_GROUP = exports.ADD_TAG_TO_TAG_GROUP = void 0;
|
|
4
|
+
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
+
exports.ADD_TAG_TO_TAG_GROUP = (0, graphql_tag_1.gql) `
|
|
6
|
+
mutation AddTagToTagGroup(
|
|
7
|
+
$resourceId: String!
|
|
8
|
+
$resourceType: String!
|
|
9
|
+
$tagId: String!
|
|
10
|
+
$tagGroupId: String
|
|
11
|
+
$addedBy: String!
|
|
12
|
+
) {
|
|
13
|
+
addTagToTagGroup(
|
|
14
|
+
resourceId: $resourceId
|
|
15
|
+
resourceType: $resourceType
|
|
16
|
+
tagId: $tagId
|
|
17
|
+
tagGroupId: $tagGroupId
|
|
18
|
+
addedBy: $addedBy
|
|
19
|
+
) {
|
|
20
|
+
code
|
|
21
|
+
message
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
exports.REMOVE_TAG_TO_TAG_GROUP = (0, graphql_tag_1.gql) `
|
|
26
|
+
mutation RemoveTagToTagGroup(
|
|
27
|
+
$resourceId: String!
|
|
28
|
+
$resourceType: String!
|
|
29
|
+
$tagId: String!
|
|
30
|
+
$tagGroupId: String
|
|
31
|
+
$updateBy: String!
|
|
32
|
+
) {
|
|
33
|
+
removeTagToTagGroup(
|
|
34
|
+
resourceId: $resourceId
|
|
35
|
+
resourceType: $resourceType
|
|
36
|
+
tagId: $tagId
|
|
37
|
+
tagGroupId: $tagGroupId
|
|
38
|
+
updateBy: $updateBy
|
|
39
|
+
) {
|
|
40
|
+
code
|
|
41
|
+
message
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GET_RESULT_TAG: import("graphql").DocumentNode;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GET_RESULT_TAG = void 0;
|
|
4
|
+
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
+
exports.GET_RESULT_TAG = (0, graphql_tag_1.gql) `
|
|
6
|
+
query GetResultTag($resourceId: String!, $resourceType: String!) {
|
|
7
|
+
getResultTag(resourceId: $resourceId, resourceType: $resourceType) {
|
|
8
|
+
id
|
|
9
|
+
title
|
|
10
|
+
items {
|
|
11
|
+
id
|
|
12
|
+
title
|
|
13
|
+
items {
|
|
14
|
+
id
|
|
15
|
+
title
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`;
|
package/dist/src/lib/SDK.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ import { OrderCloudService } from "./orderCloud";
|
|
|
27
27
|
import { CloudCloudService } from "./cloudCloud";
|
|
28
28
|
import { TruedocService } from "./truedoc";
|
|
29
29
|
import { MarketPlaceService } from "./marketplace";
|
|
30
|
+
import { TagService } from "./tag";
|
|
30
31
|
export interface Endpoints {
|
|
31
32
|
product: string;
|
|
32
33
|
crm: string;
|
|
@@ -57,6 +58,7 @@ export interface Endpoints {
|
|
|
57
58
|
cloudCloud: string;
|
|
58
59
|
truedoc: string;
|
|
59
60
|
marketplace: string;
|
|
61
|
+
tag: string;
|
|
60
62
|
}
|
|
61
63
|
export declare class SDK {
|
|
62
64
|
orgId: string;
|
|
@@ -91,6 +93,7 @@ export declare class SDK {
|
|
|
91
93
|
cloudCloud: CloudCloudService;
|
|
92
94
|
truedoc: TruedocService;
|
|
93
95
|
marketplace: MarketPlaceService;
|
|
96
|
+
tag: TagService;
|
|
94
97
|
token: string | null;
|
|
95
98
|
constructor(orgId: string, storeId: string, environment: "dev" | "live");
|
|
96
99
|
setToken(token: string): void;
|
package/dist/src/lib/SDK.js
CHANGED
|
@@ -32,6 +32,7 @@ const orderCloud_1 = require("./orderCloud");
|
|
|
32
32
|
const cloudCloud_1 = require("./cloudCloud");
|
|
33
33
|
const truedoc_1 = require("./truedoc");
|
|
34
34
|
const marketplace_1 = require("./marketplace");
|
|
35
|
+
const tag_1 = require("./tag");
|
|
35
36
|
class SDK {
|
|
36
37
|
constructor(orgId, storeId, environment) {
|
|
37
38
|
this.orgId = orgId;
|
|
@@ -68,6 +69,7 @@ class SDK {
|
|
|
68
69
|
this.cloudCloud = new cloudCloud_1.CloudCloudService(endpoints.cloudCloud, orgId, storeId);
|
|
69
70
|
this.truedoc = new truedoc_1.TruedocService(endpoints.truedoc, orgId, storeId);
|
|
70
71
|
this.marketplace = new marketplace_1.MarketPlaceService(endpoints.marketplace, orgId, storeId);
|
|
72
|
+
this.tag = new tag_1.TagService(endpoints.tag, orgId, storeId);
|
|
71
73
|
// Initialize other services here
|
|
72
74
|
}
|
|
73
75
|
setToken(token) {
|
|
@@ -103,6 +105,7 @@ class SDK {
|
|
|
103
105
|
this.cloudCloud.setToken(token);
|
|
104
106
|
this.truedoc.setToken(token);
|
|
105
107
|
this.marketplace.setToken(token);
|
|
108
|
+
this.tag.setToken(token);
|
|
106
109
|
}
|
|
107
110
|
// các module export từ serviceSDK.ts set storeId vào serviceSDK.ts
|
|
108
111
|
// src/service.ts
|
|
@@ -135,6 +138,7 @@ class SDK {
|
|
|
135
138
|
this.cloudCloud.setStoreId(storeId);
|
|
136
139
|
this.truedoc.setStoreId(storeId);
|
|
137
140
|
this.marketplace.setStoreId(storeId);
|
|
141
|
+
this.tag.setStoreId(storeId);
|
|
138
142
|
// Set storeId for other services here
|
|
139
143
|
}
|
|
140
144
|
setOrgId(orgId) {
|
|
@@ -166,6 +170,7 @@ class SDK {
|
|
|
166
170
|
this.cloudCloud.setOrgId(orgId);
|
|
167
171
|
this.truedoc.setOrgId(orgId);
|
|
168
172
|
this.marketplace.setOrgId(orgId);
|
|
173
|
+
this.tag.setOrgId(orgId);
|
|
169
174
|
}
|
|
170
175
|
}
|
|
171
176
|
exports.SDK = SDK;
|
|
@@ -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;
|
|
@@ -50,4 +50,5 @@ export declare class CrmService extends Service {
|
|
|
50
50
|
createResume(resumeTemplateId: string, partyId: string, createdBy: string, name: string): Promise<any>;
|
|
51
51
|
createSupportRequest(title: string, content: string, fileUrl: string, source: string, userId: string, uri: string): Promise<any>;
|
|
52
52
|
getResumesByFieldNameAndValues(resumeTemplateId: string, orgId: string, fieldNameValues: any): Promise<any>;
|
|
53
|
+
getResumeById(resumeId: string): Promise<any>;
|
|
53
54
|
}
|
|
@@ -26,7 +26,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
26
26
|
const variables = {
|
|
27
27
|
partyId: this.orgId,
|
|
28
28
|
performerId,
|
|
29
|
-
addOpportunityRequest
|
|
29
|
+
addOpportunityRequest,
|
|
30
30
|
};
|
|
31
31
|
try {
|
|
32
32
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -44,7 +44,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
44
44
|
const variables = {
|
|
45
45
|
partyId: this.orgId,
|
|
46
46
|
performerId,
|
|
47
|
-
addOpportunityRequest
|
|
47
|
+
addOpportunityRequest,
|
|
48
48
|
};
|
|
49
49
|
try {
|
|
50
50
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -62,7 +62,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
62
62
|
const variables = {
|
|
63
63
|
partyId,
|
|
64
64
|
performerId,
|
|
65
|
-
addOpportunityRequest
|
|
65
|
+
addOpportunityRequest,
|
|
66
66
|
};
|
|
67
67
|
try {
|
|
68
68
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -79,7 +79,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
79
79
|
const variables = {
|
|
80
80
|
partyId: this.orgId,
|
|
81
81
|
performerId,
|
|
82
|
-
getOpportunityRequest
|
|
82
|
+
getOpportunityRequest,
|
|
83
83
|
};
|
|
84
84
|
try {
|
|
85
85
|
const response = yield this.graphqlQueryV2(query, variables);
|
|
@@ -96,7 +96,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
96
96
|
const query = queries_1.GET_LIST_TODO;
|
|
97
97
|
const variables = {
|
|
98
98
|
partyId: this.orgId,
|
|
99
|
-
workEffortId
|
|
99
|
+
workEffortId,
|
|
100
100
|
};
|
|
101
101
|
try {
|
|
102
102
|
const response = yield this.graphqlQueryV2(query, variables);
|
|
@@ -113,7 +113,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
113
113
|
const query = queries_1.GET_LIST_WORK_EFFORT_TYPE;
|
|
114
114
|
const variables = {
|
|
115
115
|
partyId: this.orgId,
|
|
116
|
-
id
|
|
116
|
+
id,
|
|
117
117
|
};
|
|
118
118
|
try {
|
|
119
119
|
const response = yield this.graphqlQueryV2(query, variables);
|
|
@@ -131,7 +131,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
131
131
|
const variables = {
|
|
132
132
|
performerId,
|
|
133
133
|
attachmentId,
|
|
134
|
-
status
|
|
134
|
+
status,
|
|
135
135
|
};
|
|
136
136
|
try {
|
|
137
137
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -149,7 +149,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
149
149
|
const variables = {
|
|
150
150
|
performerId,
|
|
151
151
|
workEffortId,
|
|
152
|
-
description
|
|
152
|
+
description,
|
|
153
153
|
};
|
|
154
154
|
try {
|
|
155
155
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -168,7 +168,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
168
168
|
partyId: this.orgId,
|
|
169
169
|
performerId,
|
|
170
170
|
workEffortId,
|
|
171
|
-
newName: name
|
|
171
|
+
newName: name,
|
|
172
172
|
};
|
|
173
173
|
try {
|
|
174
174
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -188,7 +188,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
188
188
|
performerId,
|
|
189
189
|
workEffortId,
|
|
190
190
|
group,
|
|
191
|
-
status
|
|
191
|
+
status,
|
|
192
192
|
};
|
|
193
193
|
try {
|
|
194
194
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -207,7 +207,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
207
207
|
partyId: this.orgId,
|
|
208
208
|
performerId,
|
|
209
209
|
workEffortId,
|
|
210
|
-
addAttachmentRequest
|
|
210
|
+
addAttachmentRequest,
|
|
211
211
|
};
|
|
212
212
|
try {
|
|
213
213
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -225,7 +225,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
225
225
|
const variables = {
|
|
226
226
|
partyId: this.orgId,
|
|
227
227
|
performerId,
|
|
228
|
-
getTicketRequest
|
|
228
|
+
getTicketRequest,
|
|
229
229
|
};
|
|
230
230
|
try {
|
|
231
231
|
const response = yield this.graphqlQueryV2(query, variables);
|
|
@@ -244,7 +244,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
244
244
|
partyId: this.orgId,
|
|
245
245
|
performerId,
|
|
246
246
|
addTicketRequest,
|
|
247
|
-
addAttachmentRequest
|
|
247
|
+
addAttachmentRequest,
|
|
248
248
|
};
|
|
249
249
|
try {
|
|
250
250
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -260,7 +260,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
260
260
|
return __awaiter(this, void 0, void 0, function* () {
|
|
261
261
|
const query = queries_1.GET_TICKET_BY_ID;
|
|
262
262
|
const variables = {
|
|
263
|
-
ticketId
|
|
263
|
+
ticketId,
|
|
264
264
|
};
|
|
265
265
|
try {
|
|
266
266
|
const response = yield this.graphqlQueryV2(query, variables);
|
|
@@ -277,7 +277,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
277
277
|
const query = queries_1.GET_ATTACHMENT_BY_WORK_EFFORT_ID;
|
|
278
278
|
const variables = {
|
|
279
279
|
partyId: this.orgId,
|
|
280
|
-
workEffortIds
|
|
280
|
+
workEffortIds,
|
|
281
281
|
};
|
|
282
282
|
try {
|
|
283
283
|
const response = yield this.graphqlQueryV2(query, variables);
|
|
@@ -294,7 +294,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
294
294
|
const query = queries_1.GET_LIST_COMMENT;
|
|
295
295
|
const variables = {
|
|
296
296
|
partyId: this.orgId,
|
|
297
|
-
getCommentRequest
|
|
297
|
+
getCommentRequest,
|
|
298
298
|
};
|
|
299
299
|
try {
|
|
300
300
|
const response = yield this.graphqlQueryV2(query, variables);
|
|
@@ -315,7 +315,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
315
315
|
format: params.addAttachmentRequest ? "ATTACHMENT" : "TEXT",
|
|
316
316
|
content: params.content,
|
|
317
317
|
referId: params.referId,
|
|
318
|
-
addAttachmentRequest: params.addAttachmentRequest
|
|
318
|
+
addAttachmentRequest: params.addAttachmentRequest,
|
|
319
319
|
};
|
|
320
320
|
try {
|
|
321
321
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -339,7 +339,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
339
339
|
group,
|
|
340
340
|
attributes,
|
|
341
341
|
addAttachmentRequest,
|
|
342
|
-
parentId
|
|
342
|
+
parentId,
|
|
343
343
|
};
|
|
344
344
|
try {
|
|
345
345
|
const response = yield this.graphqlMutationV2(query, variables);
|
|
@@ -359,7 +359,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
359
359
|
name,
|
|
360
360
|
decription,
|
|
361
361
|
workEffortTypeId,
|
|
362
|
-
source
|
|
362
|
+
source,
|
|
363
363
|
};
|
|
364
364
|
try {
|
|
365
365
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -383,7 +383,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
383
383
|
sorts,
|
|
384
384
|
attributes,
|
|
385
385
|
fromDate,
|
|
386
|
-
toDate
|
|
386
|
+
toDate,
|
|
387
387
|
};
|
|
388
388
|
try {
|
|
389
389
|
const response = yield this.graphqlQueryV2(query, variables);
|
|
@@ -406,7 +406,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
406
406
|
pageSize,
|
|
407
407
|
sorts,
|
|
408
408
|
fromDate,
|
|
409
|
-
toDate
|
|
409
|
+
toDate,
|
|
410
410
|
};
|
|
411
411
|
try {
|
|
412
412
|
const response = yield this.graphqlQueryV2(query, variables);
|
|
@@ -424,7 +424,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
424
424
|
partnerId: this.orgId,
|
|
425
425
|
performerId,
|
|
426
426
|
workEffortTypeId,
|
|
427
|
-
source
|
|
427
|
+
source,
|
|
428
428
|
};
|
|
429
429
|
try {
|
|
430
430
|
const repsonse = yield this.graphqlQueryV2(query, variables);
|
|
@@ -439,7 +439,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
439
439
|
return __awaiter(this, void 0, void 0, function* () {
|
|
440
440
|
const query = queries_1.GET_WORK_EFFORT_BY_ID;
|
|
441
441
|
const variables = {
|
|
442
|
-
id
|
|
442
|
+
id,
|
|
443
443
|
};
|
|
444
444
|
try {
|
|
445
445
|
const response = yield this.graphqlMutationV2(query, variables);
|
|
@@ -454,7 +454,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
454
454
|
return __awaiter(this, void 0, void 0, function* () {
|
|
455
455
|
const query = queries_1.GET_WORK_EFFORT_BY_ID_V2;
|
|
456
456
|
const variables = {
|
|
457
|
-
id
|
|
457
|
+
id,
|
|
458
458
|
};
|
|
459
459
|
try {
|
|
460
460
|
const response = yield this.graphqlMutationV2(query, variables);
|
|
@@ -471,7 +471,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
471
471
|
const variables = {
|
|
472
472
|
workEffortId,
|
|
473
473
|
processStatus,
|
|
474
|
-
performerId
|
|
474
|
+
performerId,
|
|
475
475
|
};
|
|
476
476
|
try {
|
|
477
477
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -489,7 +489,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
489
489
|
const variables = {
|
|
490
490
|
resourceId,
|
|
491
491
|
resourceType,
|
|
492
|
-
type
|
|
492
|
+
type,
|
|
493
493
|
};
|
|
494
494
|
try {
|
|
495
495
|
const response = yield this.graphqlQueryV2(query, variables);
|
|
@@ -508,7 +508,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
508
508
|
resourceType,
|
|
509
509
|
description,
|
|
510
510
|
type,
|
|
511
|
-
createdBy
|
|
511
|
+
createdBy,
|
|
512
512
|
};
|
|
513
513
|
try {
|
|
514
514
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -526,7 +526,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
526
526
|
connectorId,
|
|
527
527
|
tagTitle,
|
|
528
528
|
tagId,
|
|
529
|
-
addedBy
|
|
529
|
+
addedBy,
|
|
530
530
|
};
|
|
531
531
|
try {
|
|
532
532
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -543,7 +543,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
543
543
|
const variables = {
|
|
544
544
|
connectorId,
|
|
545
545
|
description,
|
|
546
|
-
updatedBy
|
|
546
|
+
updatedBy,
|
|
547
547
|
};
|
|
548
548
|
try {
|
|
549
549
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -558,7 +558,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
558
558
|
return __awaiter(this, void 0, void 0, function* () {
|
|
559
559
|
const queries = queries_1.GET_TAG;
|
|
560
560
|
const variables = {
|
|
561
|
-
connectorId
|
|
561
|
+
connectorId,
|
|
562
562
|
};
|
|
563
563
|
try {
|
|
564
564
|
const response = yield this.graphqlQueryV2(queries, variables);
|
|
@@ -575,7 +575,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
575
575
|
const variables = {
|
|
576
576
|
connectorId,
|
|
577
577
|
tagId,
|
|
578
|
-
removedBy
|
|
578
|
+
removedBy,
|
|
579
579
|
};
|
|
580
580
|
try {
|
|
581
581
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -593,7 +593,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
593
593
|
filterTopicRequest: filterTopicRequest,
|
|
594
594
|
partnerId: this.orgId,
|
|
595
595
|
pageSize,
|
|
596
|
-
currentPage
|
|
596
|
+
currentPage,
|
|
597
597
|
};
|
|
598
598
|
try {
|
|
599
599
|
const response = yield this.graphqlMutationV2(query, variables);
|
|
@@ -609,7 +609,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
609
609
|
const mutation = mutations_1.CLOSE_TOPIC;
|
|
610
610
|
const variables = {
|
|
611
611
|
id,
|
|
612
|
-
updatedBy
|
|
612
|
+
updatedBy,
|
|
613
613
|
};
|
|
614
614
|
try {
|
|
615
615
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -626,7 +626,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
626
626
|
const variables = {
|
|
627
627
|
socialAppId,
|
|
628
628
|
customerId,
|
|
629
|
-
message
|
|
629
|
+
message,
|
|
630
630
|
};
|
|
631
631
|
try {
|
|
632
632
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -644,7 +644,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
644
644
|
filterTopicRequest,
|
|
645
645
|
partnerId: this.orgId,
|
|
646
646
|
pageSize,
|
|
647
|
-
currentPage
|
|
647
|
+
currentPage,
|
|
648
648
|
};
|
|
649
649
|
try {
|
|
650
650
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -661,7 +661,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
661
661
|
const variables = {
|
|
662
662
|
partnerId: this.orgId,
|
|
663
663
|
performerId,
|
|
664
|
-
source
|
|
664
|
+
source,
|
|
665
665
|
};
|
|
666
666
|
try {
|
|
667
667
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -678,7 +678,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
678
678
|
const variables = {
|
|
679
679
|
topicId,
|
|
680
680
|
pageSize,
|
|
681
|
-
pageNumber
|
|
681
|
+
pageNumber,
|
|
682
682
|
};
|
|
683
683
|
try {
|
|
684
684
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -694,7 +694,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
694
694
|
const query = queries_1.GET_RESOURCE_RELATED_TOPIC;
|
|
695
695
|
const variables = {
|
|
696
696
|
topicId,
|
|
697
|
-
resourceType
|
|
697
|
+
resourceType,
|
|
698
698
|
};
|
|
699
699
|
try {
|
|
700
700
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -712,7 +712,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
712
712
|
topicId,
|
|
713
713
|
resourceId,
|
|
714
714
|
resourceType,
|
|
715
|
-
createdBy
|
|
715
|
+
createdBy,
|
|
716
716
|
};
|
|
717
717
|
try {
|
|
718
718
|
const response = yield this.graphqlMutation(mutation, variables);
|
|
@@ -729,7 +729,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
729
729
|
const variables = {
|
|
730
730
|
partnerId: this.orgId,
|
|
731
731
|
group,
|
|
732
|
-
keyword
|
|
732
|
+
keyword,
|
|
733
733
|
};
|
|
734
734
|
try {
|
|
735
735
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -745,7 +745,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
745
745
|
const variables = {
|
|
746
746
|
orgName,
|
|
747
747
|
providerId,
|
|
748
|
-
groupTenantId
|
|
748
|
+
groupTenantId,
|
|
749
749
|
};
|
|
750
750
|
try {
|
|
751
751
|
const response = yield this.graphqlMutationV2(mutations_1.CREATE_ORG_MUTATION, variables);
|
|
@@ -763,7 +763,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
763
763
|
const variables = {
|
|
764
764
|
resumeId,
|
|
765
765
|
updateResumeRequests,
|
|
766
|
-
updatedBy
|
|
766
|
+
updatedBy,
|
|
767
767
|
};
|
|
768
768
|
try {
|
|
769
769
|
const response = yield this.graphqlMutation(mutation, variables);
|
|
@@ -781,7 +781,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
781
781
|
orgId,
|
|
782
782
|
fieldName,
|
|
783
783
|
value,
|
|
784
|
-
resumeTemplateId
|
|
784
|
+
resumeTemplateId,
|
|
785
785
|
};
|
|
786
786
|
try {
|
|
787
787
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -799,7 +799,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
799
799
|
resumeId,
|
|
800
800
|
fieldName,
|
|
801
801
|
uploadImageInput,
|
|
802
|
-
updatedBy
|
|
802
|
+
updatedBy,
|
|
803
803
|
};
|
|
804
804
|
try {
|
|
805
805
|
const response = yield this.graphqlMutation(mutation, variables);
|
|
@@ -817,7 +817,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
817
817
|
resumeTemplateId,
|
|
818
818
|
partyId,
|
|
819
819
|
createdBy,
|
|
820
|
-
name
|
|
820
|
+
name,
|
|
821
821
|
};
|
|
822
822
|
try {
|
|
823
823
|
const response = yield this.graphqlMutation(mutation, variables);
|
|
@@ -838,7 +838,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
838
838
|
source,
|
|
839
839
|
orgId: this.orgId,
|
|
840
840
|
userId,
|
|
841
|
-
uri
|
|
841
|
+
uri,
|
|
842
842
|
};
|
|
843
843
|
try {
|
|
844
844
|
const response = yield this.graphqlMutation(mutation, variables);
|
|
@@ -855,7 +855,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
855
855
|
const variables = {
|
|
856
856
|
resumeTemplateId,
|
|
857
857
|
orgId,
|
|
858
|
-
fieldNameValues
|
|
858
|
+
fieldNameValues,
|
|
859
859
|
};
|
|
860
860
|
try {
|
|
861
861
|
const response = yield this.graphqlQuery(queries, variables);
|
|
@@ -866,5 +866,20 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
866
866
|
}
|
|
867
867
|
});
|
|
868
868
|
}
|
|
869
|
+
getResumeById(resumeId) {
|
|
870
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
871
|
+
const queries = queries_1.GET_RESUME_BY_ID;
|
|
872
|
+
const variables = {
|
|
873
|
+
resumeId
|
|
874
|
+
};
|
|
875
|
+
try {
|
|
876
|
+
const response = yield this.graphqlQuery(queries, variables);
|
|
877
|
+
return response.getResumeById;
|
|
878
|
+
}
|
|
879
|
+
catch (error) {
|
|
880
|
+
throw error;
|
|
881
|
+
}
|
|
882
|
+
});
|
|
883
|
+
}
|
|
869
884
|
}
|
|
870
885
|
exports.CrmService = CrmService;
|
|
@@ -30,4 +30,7 @@ export declare class PortalService extends Service {
|
|
|
30
30
|
getPosition(query?: Record<string, any>): Promise<any>;
|
|
31
31
|
getPositionForTime(query?: Record<string, any>): Promise<any>;
|
|
32
32
|
getBookingCount(query?: Record<string, any>): Promise<any>;
|
|
33
|
+
getSlugPathFromDynamicFrom(query?: Record<string, any>): Promise<any>;
|
|
34
|
+
putSlugPathFromDynamicFrom(data: any): Promise<any>;
|
|
35
|
+
postSlugPathFromDynamicFrom(data: any): Promise<any>;
|
|
33
36
|
}
|
|
@@ -452,5 +452,55 @@ class PortalService extends serviceSDK_1.Service {
|
|
|
452
452
|
}
|
|
453
453
|
});
|
|
454
454
|
}
|
|
455
|
+
getSlugPathFromDynamicFrom(query) {
|
|
456
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
457
|
+
const method = "GET";
|
|
458
|
+
const baseUrl = `/dynamic-collection/public/v2/records/slug_path/slug_path_view`;
|
|
459
|
+
const params = new URLSearchParams();
|
|
460
|
+
if (query) {
|
|
461
|
+
Object.entries(query).forEach(([key, value]) => {
|
|
462
|
+
if (value !== undefined && value !== null) {
|
|
463
|
+
params.append(key, String(value));
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
const endpoint = params.toString()
|
|
468
|
+
? `${baseUrl}?${params.toString()}`
|
|
469
|
+
: baseUrl;
|
|
470
|
+
try {
|
|
471
|
+
const response = yield this.restApiCallWithNoToken(endpoint, method);
|
|
472
|
+
return response;
|
|
473
|
+
}
|
|
474
|
+
catch (error) {
|
|
475
|
+
throw error;
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
putSlugPathFromDynamicFrom(data) {
|
|
480
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
481
|
+
const method = "PUT";
|
|
482
|
+
const endpoint = `/dynamic-collection/public/v2/records/slug_path/slug_path_form`;
|
|
483
|
+
try {
|
|
484
|
+
const response = yield this.restApiCallWithNoToken(endpoint, method, data);
|
|
485
|
+
return response;
|
|
486
|
+
}
|
|
487
|
+
catch (error) {
|
|
488
|
+
throw error;
|
|
489
|
+
}
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
postSlugPathFromDynamicFrom(data) {
|
|
493
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
494
|
+
const method = "POST";
|
|
495
|
+
const endpoint = `/dynamic-collection/public/v2/records/slug_path/slug_path_form`;
|
|
496
|
+
try {
|
|
497
|
+
const response = yield this.restApiCallWithNoHeader(endpoint, method, data);
|
|
498
|
+
return response;
|
|
499
|
+
}
|
|
500
|
+
catch (error) {
|
|
501
|
+
throw error;
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
}
|
|
455
505
|
}
|
|
456
506
|
exports.PortalService = PortalService;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Service } from "../serviceSDK";
|
|
2
|
+
export declare class TagService extends Service {
|
|
3
|
+
constructor(endpoint: string, orgId: string, storeId: string);
|
|
4
|
+
addTagToTagGroup(data: any): Promise<any>;
|
|
5
|
+
removeTagToTagGroup(data: any): Promise<any>;
|
|
6
|
+
getResultTag(resourceId: string, resourceType: string): Promise<any>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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.TagService = void 0;
|
|
13
|
+
const serviceSDK_1 = require("../serviceSDK");
|
|
14
|
+
const mutations_1 = require("../../graphql/tag/mutations");
|
|
15
|
+
const queries_1 = require("../../graphql/tag/queries");
|
|
16
|
+
class TagService extends serviceSDK_1.Service {
|
|
17
|
+
constructor(endpoint, orgId, storeId) {
|
|
18
|
+
super(endpoint, orgId, storeId);
|
|
19
|
+
}
|
|
20
|
+
addTagToTagGroup(data) {
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const mutation = mutations_1.ADD_TAG_TO_TAG_GROUP;
|
|
23
|
+
try {
|
|
24
|
+
const response = yield this.graphqlMutation(mutation, data);
|
|
25
|
+
return response.addTagToTagGroup;
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
throw error;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
removeTagToTagGroup(data) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
const mutation = mutations_1.REMOVE_TAG_TO_TAG_GROUP;
|
|
35
|
+
try {
|
|
36
|
+
const response = yield this.graphqlMutation(mutation, data);
|
|
37
|
+
return response.removeTagToTagGroup;
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
throw error;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
getResultTag(resourceId, resourceType) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
const queries = queries_1.GET_RESULT_TAG;
|
|
47
|
+
const variables = {
|
|
48
|
+
resourceId,
|
|
49
|
+
resourceType,
|
|
50
|
+
};
|
|
51
|
+
try {
|
|
52
|
+
const response = yield this.graphqlMutationV3(queries, variables);
|
|
53
|
+
return response.getResultTag;
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
throw error;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.TagService = TagService;
|