@longvansoftware/storefront-js-client 1.9.7 → 1.9.9
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 +24 -1
- package/dist/src/graphql/crm/queries.d.ts +1 -0
- package/dist/src/graphql/crm/queries.js +33 -1
- package/dist/src/lib/crm/index.d.ts +2 -0
- package/dist/src/lib/crm/index.js +34 -0
- package/dist/src/lib/order/index.d.ts +1 -0
- package/dist/src/lib/order/index.js +14 -0
- package/package.json +1 -1
|
@@ -12,3 +12,4 @@ export declare const CREATE_CONNECTOR: import("graphql").DocumentNode;
|
|
|
12
12
|
export declare const ADD_TAG: import("graphql").DocumentNode;
|
|
13
13
|
export declare const UPDATE_CONNECTOR_DESCRIPTION: import("graphql").DocumentNode;
|
|
14
14
|
export declare const REMOVE_TAG: import("graphql").DocumentNode;
|
|
15
|
+
export declare const CLOSE_TOPIC: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
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.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(
|
|
@@ -784,3 +784,26 @@ exports.REMOVE_TAG = (0, graphql_tag_1.gql) `
|
|
|
784
784
|
removeTag(connectorId: $connectorId, tagId: $tagId, removedBy: $removedBy)
|
|
785
785
|
}
|
|
786
786
|
`;
|
|
787
|
+
exports.CLOSE_TOPIC = (0, graphql_tag_1.gql) `
|
|
788
|
+
mutation CloseTopic(
|
|
789
|
+
$id: String!
|
|
790
|
+
$updatedBy: String
|
|
791
|
+
) {
|
|
792
|
+
closeTopic(
|
|
793
|
+
id: $id
|
|
794
|
+
updatedBy: $updatedBy
|
|
795
|
+
) {
|
|
796
|
+
id
|
|
797
|
+
status
|
|
798
|
+
name
|
|
799
|
+
communicationChannel
|
|
800
|
+
customerId
|
|
801
|
+
accountableId
|
|
802
|
+
accountableName
|
|
803
|
+
customerName
|
|
804
|
+
createdStamp
|
|
805
|
+
threadId
|
|
806
|
+
roomId
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
`;
|
|
@@ -9,3 +9,4 @@ export declare const GET_WORK_EFFORTS: import("graphql").DocumentNode;
|
|
|
9
9
|
export declare const GET_WORK_EFFORT_BY_ID: import("graphql").DocumentNode;
|
|
10
10
|
export declare const GET_CONNECTOR_BY_RESOURCE: import("graphql").DocumentNode;
|
|
11
11
|
export declare const GET_TAG: import("graphql").DocumentNode;
|
|
12
|
+
export declare const SEARCH_TOPIC: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
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.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;
|
|
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(
|
|
@@ -562,3 +562,35 @@ exports.GET_TAG = (0, graphql_tag_1.gql) `
|
|
|
562
562
|
getTags(connectorId: $connectorId)
|
|
563
563
|
}
|
|
564
564
|
`;
|
|
565
|
+
exports.SEARCH_TOPIC = (0, graphql_tag_1.gql) `
|
|
566
|
+
query SearchTopic(
|
|
567
|
+
$filterTopicRequest: FilterTopicRequest!
|
|
568
|
+
$partnerId: String!
|
|
569
|
+
$pageSize: Int!
|
|
570
|
+
$currentPage: Int!
|
|
571
|
+
) {
|
|
572
|
+
searchTopic(
|
|
573
|
+
filterTopicRequest: $filterTopicRequest
|
|
574
|
+
partnerId: $partnerId
|
|
575
|
+
pageSize: $pageSize
|
|
576
|
+
currentPage: $currentPage
|
|
577
|
+
) {
|
|
578
|
+
totalPages
|
|
579
|
+
totalElements
|
|
580
|
+
currentPage
|
|
581
|
+
content {
|
|
582
|
+
id
|
|
583
|
+
status
|
|
584
|
+
name
|
|
585
|
+
communicationChannel
|
|
586
|
+
customerId
|
|
587
|
+
accountableId
|
|
588
|
+
accountableName
|
|
589
|
+
customerName
|
|
590
|
+
createdStamp
|
|
591
|
+
threadId
|
|
592
|
+
roomId
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
`;
|
|
@@ -28,4 +28,6 @@ export declare class CrmService extends Service {
|
|
|
28
28
|
updateConnectorDescription(connectorId: string, description: string, updatedBy: string): Promise<any>;
|
|
29
29
|
getTags(connectorId: string): Promise<any>;
|
|
30
30
|
removeTag(connectorId: string, tagId: string, removedBy: string): Promise<any>;
|
|
31
|
+
searchTopic(accountTableId: string, pageSize: number, currentPage: number): Promise<any>;
|
|
32
|
+
closeTopic(id: string, updatedBy: string): Promise<any>;
|
|
31
33
|
}
|
|
@@ -472,5 +472,39 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
472
472
|
}
|
|
473
473
|
});
|
|
474
474
|
}
|
|
475
|
+
searchTopic(accountTableId, pageSize, currentPage) {
|
|
476
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
477
|
+
const query = queries_1.SEARCH_TOPIC;
|
|
478
|
+
const variables = {
|
|
479
|
+
filterTopicRequest: { accountableId: accountTableId, status: "OPENED" },
|
|
480
|
+
partnerId: "LONGVAN",
|
|
481
|
+
pageSize,
|
|
482
|
+
currentPage,
|
|
483
|
+
};
|
|
484
|
+
try {
|
|
485
|
+
const response = yield this.graphqlMutationV2(query, variables);
|
|
486
|
+
return response.searchTopic;
|
|
487
|
+
}
|
|
488
|
+
catch (error) {
|
|
489
|
+
throw error;
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
closeTopic(id, updatedBy) {
|
|
494
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
495
|
+
const mutation = mutations_1.CLOSE_TOPIC;
|
|
496
|
+
const variables = {
|
|
497
|
+
id,
|
|
498
|
+
updatedBy,
|
|
499
|
+
};
|
|
500
|
+
try {
|
|
501
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
502
|
+
return response.closeTopic;
|
|
503
|
+
}
|
|
504
|
+
catch (error) {
|
|
505
|
+
throw error;
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
}
|
|
475
509
|
}
|
|
476
510
|
exports.CrmService = CrmService;
|
|
@@ -456,4 +456,5 @@ export declare class OrderService extends Service {
|
|
|
456
456
|
updateInfoReceiver(ownerId: string, receiverId: string, updatedBy: string, dataRequest: ShippingAddress): Promise<any>;
|
|
457
457
|
deleteInfoReceiver(ownerId: string, receiverId: string, deletedBy: string): Promise<any>;
|
|
458
458
|
enableProductDiary(orderId: string, orderItemId: string): Promise<any>;
|
|
459
|
+
removeMemberDiscount(orderId: string): Promise<any>;
|
|
459
460
|
}
|
|
@@ -1296,5 +1296,19 @@ class OrderService extends serviceSDK_1.Service {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
});
|
|
1298
1298
|
}
|
|
1299
|
+
// remove mamber discount
|
|
1300
|
+
removeMemberDiscount(orderId) {
|
|
1301
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1302
|
+
const endpoint = `/orders/${this.orgId}/${orderId}/discountMember`;
|
|
1303
|
+
const method = "DELETE";
|
|
1304
|
+
try {
|
|
1305
|
+
const response = yield this.restApiCallWithToken(endpoint, method);
|
|
1306
|
+
return response;
|
|
1307
|
+
}
|
|
1308
|
+
catch (error) {
|
|
1309
|
+
throw error;
|
|
1310
|
+
}
|
|
1311
|
+
});
|
|
1312
|
+
}
|
|
1299
1313
|
}
|
|
1300
1314
|
exports.OrderService = OrderService;
|