@longvansoftware/storefront-js-client 3.2.2 → 3.2.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/src/graphql/crm/mutations.d.ts +1 -0
- package/dist/src/graphql/crm/mutations.js +195 -1
- package/dist/src/graphql/crm/queries.d.ts +1 -0
- package/dist/src/graphql/crm/queries.js +51 -6
- package/dist/src/lib/crm/index.d.ts +2 -0
- package/dist/src/lib/crm/index.js +38 -0
- package/package.json +1 -1
|
@@ -15,3 +15,4 @@ export declare const REMOVE_TAG: import("graphql").DocumentNode;
|
|
|
15
15
|
export declare const CLOSE_TOPIC: import("graphql").DocumentNode;
|
|
16
16
|
export declare const CREATE_TOPIC: import("graphql").DocumentNode;
|
|
17
17
|
export declare const ADD_TOPIC_RELATED_RESOURCE: import("graphql").DocumentNode;
|
|
18
|
+
export declare const CREATE_WORK_EFFORT_V2: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ADD_TOPIC_RELATED_RESOURCE = exports.CREATE_TOPIC = exports.CLOSE_TOPIC = exports.REMOVE_TAG = exports.UPDATE_CONNECTOR_DESCRIPTION = exports.ADD_TAG = exports.CREATE_CONNECTOR = exports.UPDATE_WORK_EFFORT_PROCESS_STATUS = exports.CREATE_WORK_EFFORT = exports.ADD_COMMENT = exports.ADD_TICKED = exports.ADD_ATTACHMENT_FOR_WORK_EFFORT = exports.UPDATE_WORK_EFFORT_STATUS = exports.UPDATE_WORK_EFFORT_NAME = exports.UPDATE_WORK_EFFORT_DESCRIPTION = exports.UPDATE_STATUS_ATTACHMENT_BY_ID = exports.ADD_OPPORTUNITY_MUTATION = void 0;
|
|
3
|
+
exports.CREATE_WORK_EFFORT_V2 = exports.ADD_TOPIC_RELATED_RESOURCE = exports.CREATE_TOPIC = exports.CLOSE_TOPIC = exports.REMOVE_TAG = exports.UPDATE_CONNECTOR_DESCRIPTION = exports.ADD_TAG = exports.CREATE_CONNECTOR = exports.UPDATE_WORK_EFFORT_PROCESS_STATUS = exports.CREATE_WORK_EFFORT = exports.ADD_COMMENT = exports.ADD_TICKED = exports.ADD_ATTACHMENT_FOR_WORK_EFFORT = exports.UPDATE_WORK_EFFORT_STATUS = exports.UPDATE_WORK_EFFORT_NAME = exports.UPDATE_WORK_EFFORT_DESCRIPTION = exports.UPDATE_STATUS_ATTACHMENT_BY_ID = exports.ADD_OPPORTUNITY_MUTATION = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.ADD_OPPORTUNITY_MUTATION = (0, graphql_tag_1.gql) `
|
|
6
6
|
mutation AddOpportunity(
|
|
@@ -832,3 +832,197 @@ exports.ADD_TOPIC_RELATED_RESOURCE = (0, graphql_tag_1.gql) `
|
|
|
832
832
|
)
|
|
833
833
|
}
|
|
834
834
|
`;
|
|
835
|
+
exports.CREATE_WORK_EFFORT_V2 = (0, graphql_tag_1.gql) `
|
|
836
|
+
mutation CreateWorkEffort(
|
|
837
|
+
$partnerId: String!
|
|
838
|
+
$createdBy: String!
|
|
839
|
+
$name: String
|
|
840
|
+
$description: String
|
|
841
|
+
$workEffortTypeId: String!
|
|
842
|
+
$source: String!
|
|
843
|
+
) {
|
|
844
|
+
createWorkEffort(
|
|
845
|
+
partnerId: $partnerId
|
|
846
|
+
createdBy: $createdBy
|
|
847
|
+
name: $name
|
|
848
|
+
description: $description
|
|
849
|
+
workEffortTypeId: $workEffortTypeId
|
|
850
|
+
source: $source
|
|
851
|
+
) {
|
|
852
|
+
id
|
|
853
|
+
createdStamp
|
|
854
|
+
updatedStamp
|
|
855
|
+
createdBy
|
|
856
|
+
updatedBy
|
|
857
|
+
name
|
|
858
|
+
partyId
|
|
859
|
+
targetId
|
|
860
|
+
targetType
|
|
861
|
+
targetUrl
|
|
862
|
+
description
|
|
863
|
+
status
|
|
864
|
+
parentId
|
|
865
|
+
workEffortTypeId
|
|
866
|
+
stmId
|
|
867
|
+
workflowId
|
|
868
|
+
endDateExpect
|
|
869
|
+
endDateActual
|
|
870
|
+
startDateActual
|
|
871
|
+
startDateExpect
|
|
872
|
+
source
|
|
873
|
+
owner {
|
|
874
|
+
id
|
|
875
|
+
fullName
|
|
876
|
+
name
|
|
877
|
+
type
|
|
878
|
+
phone
|
|
879
|
+
email
|
|
880
|
+
}
|
|
881
|
+
priorityName
|
|
882
|
+
priorityValue
|
|
883
|
+
connectorId
|
|
884
|
+
mode
|
|
885
|
+
partyGroupIds
|
|
886
|
+
tagIds
|
|
887
|
+
processResult
|
|
888
|
+
processStatus
|
|
889
|
+
subTasks {
|
|
890
|
+
id
|
|
891
|
+
createdStamp
|
|
892
|
+
updatedStamp
|
|
893
|
+
createdBy
|
|
894
|
+
updatedBy
|
|
895
|
+
name
|
|
896
|
+
partyId
|
|
897
|
+
targetId
|
|
898
|
+
targetType
|
|
899
|
+
targetUrl
|
|
900
|
+
description
|
|
901
|
+
status
|
|
902
|
+
parentId
|
|
903
|
+
workEffortTypeId
|
|
904
|
+
stmId
|
|
905
|
+
workflowId
|
|
906
|
+
endDateExpect
|
|
907
|
+
endDateActual
|
|
908
|
+
startDateActual
|
|
909
|
+
startDateExpect
|
|
910
|
+
source
|
|
911
|
+
owner {
|
|
912
|
+
id
|
|
913
|
+
fullName
|
|
914
|
+
name
|
|
915
|
+
type
|
|
916
|
+
phone
|
|
917
|
+
email
|
|
918
|
+
}
|
|
919
|
+
priorityName
|
|
920
|
+
priorityValue
|
|
921
|
+
connectorId
|
|
922
|
+
mode
|
|
923
|
+
partyGroupIds
|
|
924
|
+
tagIds
|
|
925
|
+
processResult
|
|
926
|
+
processStatus
|
|
927
|
+
processPipeline {
|
|
928
|
+
id
|
|
929
|
+
name
|
|
930
|
+
}
|
|
931
|
+
attachments {
|
|
932
|
+
id
|
|
933
|
+
createdStamp
|
|
934
|
+
updatedStamp
|
|
935
|
+
updatedBy
|
|
936
|
+
createdBy
|
|
937
|
+
partyId
|
|
938
|
+
path
|
|
939
|
+
srcId
|
|
940
|
+
srcName
|
|
941
|
+
srcPath
|
|
942
|
+
srcConfigPathId
|
|
943
|
+
name
|
|
944
|
+
fileType
|
|
945
|
+
type
|
|
946
|
+
status
|
|
947
|
+
referId
|
|
948
|
+
}
|
|
949
|
+
subTasks {
|
|
950
|
+
id
|
|
951
|
+
createdStamp
|
|
952
|
+
updatedStamp
|
|
953
|
+
createdBy
|
|
954
|
+
updatedBy
|
|
955
|
+
name
|
|
956
|
+
partyId
|
|
957
|
+
targetId
|
|
958
|
+
targetType
|
|
959
|
+
targetUrl
|
|
960
|
+
description
|
|
961
|
+
status
|
|
962
|
+
parentId
|
|
963
|
+
workEffortTypeId
|
|
964
|
+
stmId
|
|
965
|
+
workflowId
|
|
966
|
+
endDateExpect
|
|
967
|
+
endDateActual
|
|
968
|
+
startDateActual
|
|
969
|
+
startDateExpect
|
|
970
|
+
source
|
|
971
|
+
owner {
|
|
972
|
+
id
|
|
973
|
+
fullName
|
|
974
|
+
name
|
|
975
|
+
type
|
|
976
|
+
phone
|
|
977
|
+
email
|
|
978
|
+
}
|
|
979
|
+
priorityName
|
|
980
|
+
priorityValue
|
|
981
|
+
connectorId
|
|
982
|
+
mode
|
|
983
|
+
partyGroupIds
|
|
984
|
+
tagIds
|
|
985
|
+
processResult
|
|
986
|
+
processStatus
|
|
987
|
+
}
|
|
988
|
+
actionLink {
|
|
989
|
+
name
|
|
990
|
+
uri
|
|
991
|
+
type
|
|
992
|
+
partyId
|
|
993
|
+
fromCollection
|
|
994
|
+
toCollection
|
|
995
|
+
group
|
|
996
|
+
params
|
|
997
|
+
id
|
|
998
|
+
createdStamp
|
|
999
|
+
updatedStamp
|
|
1000
|
+
updatedBy
|
|
1001
|
+
createdBy
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
attachments {
|
|
1005
|
+
id
|
|
1006
|
+
createdStamp
|
|
1007
|
+
updatedStamp
|
|
1008
|
+
updatedBy
|
|
1009
|
+
createdBy
|
|
1010
|
+
partyId
|
|
1011
|
+
path
|
|
1012
|
+
srcId
|
|
1013
|
+
srcName
|
|
1014
|
+
srcPath
|
|
1015
|
+
srcConfigPathId
|
|
1016
|
+
name
|
|
1017
|
+
fileType
|
|
1018
|
+
type
|
|
1019
|
+
status
|
|
1020
|
+
referId
|
|
1021
|
+
}
|
|
1022
|
+
processPipeline {
|
|
1023
|
+
id
|
|
1024
|
+
name
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
`;
|
|
@@ -6,6 +6,7 @@ export declare const GET_TICKET_BY_ID: import("graphql").DocumentNode;
|
|
|
6
6
|
export declare const GET_ATTACHMENT_BY_WORK_EFFORT_ID: import("graphql").DocumentNode;
|
|
7
7
|
export declare const GET_LIST_COMMENT: import("graphql").DocumentNode;
|
|
8
8
|
export declare const GET_WORK_EFFORTS: import("graphql").DocumentNode;
|
|
9
|
+
export declare const GET_WORK_EFFORTS_V2: import("graphql").DocumentNode;
|
|
9
10
|
export declare const GET_WORK_EFFORT_BY_ID: import("graphql").DocumentNode;
|
|
10
11
|
export declare const GET_CONNECTOR_BY_RESOURCE: import("graphql").DocumentNode;
|
|
11
12
|
export declare const GET_TAG: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
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 = 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_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 = exports.GET_WORK_EFFORTS_V2 = 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(
|
|
@@ -401,6 +401,54 @@ exports.GET_WORK_EFFORTS = (0, graphql_tag_1.gql) `
|
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
403
|
`;
|
|
404
|
+
exports.GET_WORK_EFFORTS_V2 = (0, graphql_tag_1.gql) `
|
|
405
|
+
query GetWorkEfforts(
|
|
406
|
+
$partnerId: String!
|
|
407
|
+
$performerId: String!
|
|
408
|
+
$source: String!
|
|
409
|
+
$workEffortTypeId: String
|
|
410
|
+
) {
|
|
411
|
+
getWorkEfforts(
|
|
412
|
+
partnerId: $partnerId
|
|
413
|
+
performerId: $performerId
|
|
414
|
+
source: $source
|
|
415
|
+
workEffortTypeId: $workEffortTypeId
|
|
416
|
+
) {
|
|
417
|
+
total
|
|
418
|
+
data {
|
|
419
|
+
id
|
|
420
|
+
createdStamp
|
|
421
|
+
updatedStamp
|
|
422
|
+
createdBy
|
|
423
|
+
updatedBy
|
|
424
|
+
name
|
|
425
|
+
partyId
|
|
426
|
+
targetId
|
|
427
|
+
targetType
|
|
428
|
+
targetUrl
|
|
429
|
+
description
|
|
430
|
+
status
|
|
431
|
+
parentId
|
|
432
|
+
workEffortTypeId
|
|
433
|
+
stmId
|
|
434
|
+
workflowId
|
|
435
|
+
endDateExpect
|
|
436
|
+
endDateActual
|
|
437
|
+
startDateActual
|
|
438
|
+
startDateExpect
|
|
439
|
+
source
|
|
440
|
+
priorityName
|
|
441
|
+
priorityValue
|
|
442
|
+
connectorId
|
|
443
|
+
mode
|
|
444
|
+
partyGroupIds
|
|
445
|
+
tagIds
|
|
446
|
+
processResult
|
|
447
|
+
processStatus
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
`;
|
|
404
452
|
exports.GET_WORK_EFFORT_BY_ID = (0, graphql_tag_1.gql) `
|
|
405
453
|
query GetWorkEffortById($id: String!) {
|
|
406
454
|
getWorkEffortById(id: $id) {
|
|
@@ -671,10 +719,7 @@ exports.GET_MESSAGES = (0, graphql_tag_1.gql) `
|
|
|
671
719
|
}
|
|
672
720
|
`;
|
|
673
721
|
exports.GET_RESOURCE_RELATED_TOPIC = (0, graphql_tag_1.gql) `
|
|
674
|
-
query GetResourceRelatedTopic(
|
|
675
|
-
$topicId: String!
|
|
676
|
-
$resourceType: String!
|
|
677
|
-
){
|
|
722
|
+
query GetResourceRelatedTopic($topicId: String!, $resourceType: String!) {
|
|
678
723
|
getResourceRelatedTopic(topicId: $topicId, resourceType: $resourceType)
|
|
679
|
-
}
|
|
724
|
+
}
|
|
680
725
|
`;
|
|
@@ -19,7 +19,9 @@ export declare class CrmService extends Service {
|
|
|
19
19
|
getListComment(getCommentRequest: GetCommentRequest): Promise<any>;
|
|
20
20
|
addComment(params: any): Promise<any>;
|
|
21
21
|
createWorkEffort(createdBy: string, name: String, decription: string, workEffortTypeId: string, source: string, attributes: object, addAttachmentRequest: AddAttachmentRequest, parentId?: string): Promise<any>;
|
|
22
|
+
createWorkEffortV2(createdBy: string, name: string, decription: string, workEffortTypeId: string, source: string): Promise<any>;
|
|
22
23
|
getWorkEfforts(performerId: string, workEffortTypeId: string, source: string, pageNumber: number, pageSize: number, sorts: BaseSort, attributes: object): Promise<any>;
|
|
24
|
+
getWorkEffortsV2(performerId: string, workEffortTypeId: string, source: string, fromDate: string, toDate: string): Promise<any>;
|
|
23
25
|
getWorkEffortById(id: string): Promise<any>;
|
|
24
26
|
updateWorkEffortProcessStatus(workEffortId: string, processStatus: string, performerId: string): Promise<any>;
|
|
25
27
|
getConnectorByResource(resourceId: string, resourceType: string, type: string): Promise<any>;
|
|
@@ -315,6 +315,26 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
315
315
|
}
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
|
+
createWorkEffortV2(createdBy, name, decription, workEffortTypeId, source) {
|
|
319
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
320
|
+
const mutation = mutations_1.CREATE_WORK_EFFORT_V2;
|
|
321
|
+
const variables = {
|
|
322
|
+
partnerId: this.orgId,
|
|
323
|
+
createdBy,
|
|
324
|
+
name,
|
|
325
|
+
decription,
|
|
326
|
+
workEffortTypeId,
|
|
327
|
+
source,
|
|
328
|
+
};
|
|
329
|
+
try {
|
|
330
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
331
|
+
return response.createWorkEffort;
|
|
332
|
+
}
|
|
333
|
+
catch (error) {
|
|
334
|
+
throw error;
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
}
|
|
318
338
|
getWorkEfforts(performerId, workEffortTypeId, source, pageNumber, pageSize, sorts, attributes) {
|
|
319
339
|
return __awaiter(this, void 0, void 0, function* () {
|
|
320
340
|
const query = queries_1.GET_WORK_EFFORTS;
|
|
@@ -337,6 +357,24 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
337
357
|
}
|
|
338
358
|
});
|
|
339
359
|
}
|
|
360
|
+
getWorkEffortsV2(performerId, workEffortTypeId, source, fromDate, toDate) {
|
|
361
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
362
|
+
const query = queries_1.GET_WORK_EFFORTS_V2;
|
|
363
|
+
const variables = {
|
|
364
|
+
partnerId: this.orgId,
|
|
365
|
+
performerId,
|
|
366
|
+
workEffortTypeId,
|
|
367
|
+
source,
|
|
368
|
+
};
|
|
369
|
+
try {
|
|
370
|
+
const repsonse = yield this.graphqlQueryV2(query, variables);
|
|
371
|
+
return repsonse.getWorkEfforts;
|
|
372
|
+
}
|
|
373
|
+
catch (error) {
|
|
374
|
+
throw error;
|
|
375
|
+
}
|
|
376
|
+
});
|
|
377
|
+
}
|
|
340
378
|
getWorkEffortById(id) {
|
|
341
379
|
return __awaiter(this, void 0, void 0, function* () {
|
|
342
380
|
const query = queries_1.GET_WORK_EFFORT_BY_ID;
|