@longvansoftware/storefront-js-client 3.5.5 → 3.5.7
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.
|
@@ -5,6 +5,7 @@ export declare class CrmService extends Service {
|
|
|
5
5
|
setToken(token: string): void;
|
|
6
6
|
addOpportunity(performerId: string, addOpportunityRequest?: AddOpportunityRequest): Promise<any>;
|
|
7
7
|
addOpportunityV2(performerId: string, addOpportunityRequest: any): Promise<any>;
|
|
8
|
+
addOpportuniyV3(partyId: string, performerId: string, addOpportunityRequest: any): Promise<any>;
|
|
8
9
|
getListOpportunity(performerId: string, getOpportunityRequest: GetOpportunityRequest): Promise<any>;
|
|
9
10
|
getListTodo(workEffortId: string[]): Promise<any>;
|
|
10
11
|
getListWorkEffortType(id: string): Promise<any>;
|
|
@@ -56,6 +56,23 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
+
addOpportuniyV3(partyId, performerId, addOpportunityRequest) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
const mutation = mutations_1.ADD_OPPORTUNITY_MUTATION_V2;
|
|
62
|
+
const variables = {
|
|
63
|
+
partyId,
|
|
64
|
+
performerId,
|
|
65
|
+
addOpportunityRequest,
|
|
66
|
+
};
|
|
67
|
+
try {
|
|
68
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
69
|
+
return response.addOpportunity;
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
throw error;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
59
76
|
getListOpportunity(performerId, getOpportunityRequest) {
|
|
60
77
|
return __awaiter(this, void 0, void 0, function* () {
|
|
61
78
|
const query = queries_1.GET_LIST_OPPORTUNITY_QUERY;
|
|
@@ -49,7 +49,7 @@ export declare class ProductService extends Service {
|
|
|
49
49
|
getUnits(): Promise<any>;
|
|
50
50
|
clearAllCaches(): Promise<any>;
|
|
51
51
|
getProductVariantById(variantId: string): Promise<any>;
|
|
52
|
-
createProductTemplatesByPartner(): Promise<any>;
|
|
52
|
+
createProductTemplatesByPartner(partnerId: string): Promise<any>;
|
|
53
53
|
createProductFromTemplate(templateId: string, createdBy: string): Promise<any>;
|
|
54
54
|
getProductTemplates(groupId: string): Promise<any>;
|
|
55
55
|
getGroups(): Promise<any>;
|
|
@@ -382,11 +382,11 @@ class ProductService extends serviceSDK_1.Service {
|
|
|
382
382
|
}
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
|
-
createProductTemplatesByPartner() {
|
|
385
|
+
createProductTemplatesByPartner(partnerId) {
|
|
386
386
|
return __awaiter(this, void 0, void 0, function* () {
|
|
387
387
|
const mutation = mutations_1.CREATE_PRODUCT_TEMPLATES_BY_PARTNER;
|
|
388
388
|
const variables = {
|
|
389
|
-
partnerId:
|
|
389
|
+
partnerId: partnerId,
|
|
390
390
|
};
|
|
391
391
|
try {
|
|
392
392
|
const response = yield this.graphqlMutation(mutation, variables);
|
|
@@ -670,7 +670,7 @@ class ProductService extends serviceSDK_1.Service {
|
|
|
670
670
|
const mutation = mutations_1.CREATE_UNIT;
|
|
671
671
|
const variables = {
|
|
672
672
|
partnerId: this.orgId,
|
|
673
|
-
name
|
|
673
|
+
name,
|
|
674
674
|
};
|
|
675
675
|
try {
|
|
676
676
|
const response = yield this.graphqlMutation(mutation, variables);
|