@longvansoftware/storefront-js-client 2.3.3 → 2.3.5
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/queries.d.ts +1 -0
- package/dist/src/graphql/crm/queries.js +32 -1
- package/dist/src/graphql/paymentV2/mutations.js +10 -2
- package/dist/src/lib/crm/index.d.ts +1 -0
- package/dist/src/lib/crm/index.js +17 -0
- package/dist/src/lib/paymentV2/index.d.ts +1 -1
- package/dist/src/lib/paymentV2/index.js +3 -2
- package/package.json +1 -1
|
@@ -11,3 +11,4 @@ export declare const GET_CONNECTOR_BY_RESOURCE: import("graphql").DocumentNode;
|
|
|
11
11
|
export declare const GET_TAG: import("graphql").DocumentNode;
|
|
12
12
|
export declare const SEARCH_TOPIC: import("graphql").DocumentNode;
|
|
13
13
|
export declare const GET_MY_WORK_EFFORT_TODAY: import("graphql").DocumentNode;
|
|
14
|
+
export declare const GET_MESSAGES: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
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_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;
|
|
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(
|
|
@@ -630,3 +630,34 @@ exports.GET_MY_WORK_EFFORT_TODAY = (0, graphql_tag_1.gql) `
|
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
632
|
`;
|
|
633
|
+
exports.GET_MESSAGES = (0, graphql_tag_1.gql) `
|
|
634
|
+
query GetMessages($topicId: String!, $pageSize: Int, $pageNumber: Int) {
|
|
635
|
+
getMessages(
|
|
636
|
+
topicId: $topicId
|
|
637
|
+
pageSize: $pageSize
|
|
638
|
+
pageNumber: $pageNumber
|
|
639
|
+
) {
|
|
640
|
+
total
|
|
641
|
+
data {
|
|
642
|
+
id
|
|
643
|
+
createdStamp
|
|
644
|
+
updatedStamp
|
|
645
|
+
updatedBy
|
|
646
|
+
type
|
|
647
|
+
format
|
|
648
|
+
content
|
|
649
|
+
referId
|
|
650
|
+
referSource
|
|
651
|
+
attachId
|
|
652
|
+
createdBy {
|
|
653
|
+
id
|
|
654
|
+
fullName
|
|
655
|
+
name
|
|
656
|
+
type
|
|
657
|
+
phone
|
|
658
|
+
email
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
`;
|
|
@@ -8,8 +8,16 @@ exports.CANCEL_PAYMENT = (0, graphql_tag_1.gql) `
|
|
|
8
8
|
}
|
|
9
9
|
`;
|
|
10
10
|
exports.CONFIRM_TO_GATEWAY = (0, graphql_tag_1.gql) `
|
|
11
|
-
mutation ConfirmToGateWay(
|
|
12
|
-
|
|
11
|
+
mutation ConfirmToGateWay(
|
|
12
|
+
$paymentId: String!
|
|
13
|
+
$methodCode: String
|
|
14
|
+
$returnUrl: String
|
|
15
|
+
) {
|
|
16
|
+
confirmToGateway(
|
|
17
|
+
paymentId: $paymentId
|
|
18
|
+
methodCode: $methodCode
|
|
19
|
+
returnUrl: $returnUrl
|
|
20
|
+
) {
|
|
13
21
|
code
|
|
14
22
|
message
|
|
15
23
|
data
|
|
@@ -33,4 +33,5 @@ export declare class CrmService extends Service {
|
|
|
33
33
|
createTopic(socialAppId: String, customerId: string, message: string): Promise<any>;
|
|
34
34
|
getTopicByCustomerId(filterTopicRequest: any, pageSize: number, currentPage: number): Promise<any>;
|
|
35
35
|
getMyWorkEffortToday(performerId: string, source: string): Promise<any>;
|
|
36
|
+
getMessages(topicId: String, pageSize: Number, pageNumber: Number): Promise<any>;
|
|
36
37
|
}
|
|
@@ -559,5 +559,22 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
559
559
|
}
|
|
560
560
|
});
|
|
561
561
|
}
|
|
562
|
+
getMessages(topicId, pageSize, pageNumber) {
|
|
563
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
564
|
+
const query = queries_1.GET_MESSAGES;
|
|
565
|
+
const variables = {
|
|
566
|
+
topicId,
|
|
567
|
+
pageSize,
|
|
568
|
+
pageNumber,
|
|
569
|
+
};
|
|
570
|
+
try {
|
|
571
|
+
const response = yield this.graphqlQuery(query, variables);
|
|
572
|
+
return response.getMessages;
|
|
573
|
+
}
|
|
574
|
+
catch (error) {
|
|
575
|
+
throw error;
|
|
576
|
+
}
|
|
577
|
+
});
|
|
578
|
+
}
|
|
562
579
|
}
|
|
563
580
|
exports.CrmService = CrmService;
|
|
@@ -6,6 +6,6 @@ export declare class PaymentServiceV2 extends Service {
|
|
|
6
6
|
paymentMethods(): Promise<any>;
|
|
7
7
|
getPaymentMethodTypes(): Promise<any>;
|
|
8
8
|
paymentInfo(paymentId: string): Promise<any>;
|
|
9
|
-
confirmToGateway(paymentId: string, methodCode: string): Promise<any>;
|
|
9
|
+
confirmToGateway(paymentId: string, methodCode: string, returnUrl: string): Promise<any>;
|
|
10
10
|
paymentStatus(paymentId: string): Promise<any>;
|
|
11
11
|
}
|
|
@@ -94,12 +94,13 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
|
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
-
confirmToGateway(paymentId, methodCode) {
|
|
97
|
+
confirmToGateway(paymentId, methodCode, returnUrl) {
|
|
98
98
|
return __awaiter(this, void 0, void 0, function* () {
|
|
99
99
|
const mutation = mutations_1.CONFIRM_TO_GATEWAY;
|
|
100
100
|
const variables = {
|
|
101
101
|
paymentId,
|
|
102
102
|
methodCode,
|
|
103
|
+
returnUrl,
|
|
103
104
|
};
|
|
104
105
|
try {
|
|
105
106
|
const response = yield this.graphqlMutationV3(mutation, variables);
|
|
@@ -114,7 +115,7 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
|
|
|
114
115
|
return __awaiter(this, void 0, void 0, function* () {
|
|
115
116
|
const query = queries_1.PAYMENT_STATUS;
|
|
116
117
|
const variables = {
|
|
117
|
-
paymentId
|
|
118
|
+
paymentId,
|
|
118
119
|
};
|
|
119
120
|
try {
|
|
120
121
|
const response = yield this.graphqlQueryV3(query, variables);
|