@longvansoftware/storefront-js-client 3.4.9 → 3.5.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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const ADD_OPPORTUNITY_MUTATION: import("graphql").DocumentNode;
|
|
2
|
+
export declare const ADD_OPPORTUNITY_MUTATION_V2: import("graphql").DocumentNode;
|
|
2
3
|
export declare const UPDATE_STATUS_ATTACHMENT_BY_ID: import("graphql").DocumentNode;
|
|
3
4
|
export declare const UPDATE_WORK_EFFORT_DESCRIPTION: import("graphql").DocumentNode;
|
|
4
5
|
export declare const UPDATE_WORK_EFFORT_NAME: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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;
|
|
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_V2 = 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(
|
|
@@ -44,6 +44,48 @@ exports.ADD_OPPORTUNITY_MUTATION = (0, graphql_tag_1.gql) `
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
`;
|
|
47
|
+
exports.ADD_OPPORTUNITY_MUTATION_V2 = (0, graphql_tag_1.gql) `
|
|
48
|
+
mutation AddOpportunity(
|
|
49
|
+
$partyId: String!
|
|
50
|
+
$addOpportunityRequest: AddOpportunityRequest
|
|
51
|
+
$performerId: String!
|
|
52
|
+
) {
|
|
53
|
+
addOpportunity(
|
|
54
|
+
partyId: $partyId
|
|
55
|
+
addOpportunityRequest: $addOpportunityRequest
|
|
56
|
+
performerId: $performerId
|
|
57
|
+
) {
|
|
58
|
+
goal
|
|
59
|
+
campaignId
|
|
60
|
+
valueReal
|
|
61
|
+
valueExpect
|
|
62
|
+
successRate
|
|
63
|
+
referName
|
|
64
|
+
referPhone
|
|
65
|
+
referEmail
|
|
66
|
+
id
|
|
67
|
+
createdBy
|
|
68
|
+
ownerId
|
|
69
|
+
workEffortTypeId
|
|
70
|
+
partyId
|
|
71
|
+
name
|
|
72
|
+
description
|
|
73
|
+
parentId
|
|
74
|
+
status
|
|
75
|
+
stmId
|
|
76
|
+
createdStamp
|
|
77
|
+
updatedStamp
|
|
78
|
+
endDateExpect
|
|
79
|
+
priorityName
|
|
80
|
+
targetId
|
|
81
|
+
targetType
|
|
82
|
+
targetUrl
|
|
83
|
+
extSource
|
|
84
|
+
connectorId
|
|
85
|
+
processResult
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
`;
|
|
47
89
|
exports.UPDATE_STATUS_ATTACHMENT_BY_ID = (0, graphql_tag_1.gql) `
|
|
48
90
|
mutation UpdateStatusAttachmentById(
|
|
49
91
|
$performerId: String!
|
|
@@ -4,6 +4,7 @@ export declare class CrmService extends Service {
|
|
|
4
4
|
constructor(endpoint: string, orgId: string, storeId: string);
|
|
5
5
|
setToken(token: string): void;
|
|
6
6
|
addOpportunity(performerId: string, addOpportunityRequest?: AddOpportunityRequest): Promise<any>;
|
|
7
|
+
addOpportunityV2(performerId: string, addOpportunityRequest: any): Promise<any>;
|
|
7
8
|
getListOpportunity(performerId: string, getOpportunityRequest: GetOpportunityRequest): Promise<any>;
|
|
8
9
|
getListTodo(workEffortId: string[]): Promise<any>;
|
|
9
10
|
getListWorkEffortType(id: string): Promise<any>;
|
|
@@ -38,6 +38,24 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
+
addOpportunityV2(performerId, addOpportunityRequest) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
const mutation = mutations_1.ADD_OPPORTUNITY_MUTATION_V2;
|
|
44
|
+
const variables = {
|
|
45
|
+
partyId: this.orgId,
|
|
46
|
+
performerId,
|
|
47
|
+
addOpportunityRequest,
|
|
48
|
+
};
|
|
49
|
+
try {
|
|
50
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
51
|
+
return response.addOpportunity;
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
console.log(`Error in addOpportunity: ${error}`);
|
|
55
|
+
throw error;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
41
59
|
getListOpportunity(performerId, getOpportunityRequest) {
|
|
42
60
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
61
|
const query = queries_1.GET_LIST_OPPORTUNITY_QUERY;
|