@longvansoftware/storefront-js-client 2.2.6 → 2.2.7-beta-13
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/config/config.d.ts +2 -0
- package/dist/config/config.js +2 -0
- package/dist/src/graphql/campaign/mutations.d.ts +1 -0
- package/dist/src/graphql/campaign/mutations.js +31 -0
- package/dist/src/graphql/campaign/queries.d.ts +2 -0
- package/dist/src/graphql/campaign/queries.js +94 -1
- package/dist/src/graphql/crm/mutations.d.ts +1 -0
- package/dist/src/graphql/crm/mutations.js +18 -3
- package/dist/src/graphql/crm/queries.d.ts +2 -0
- package/dist/src/graphql/crm/queries.js +51 -3
- package/dist/src/graphql/payment/mutations.js +1 -0
- package/dist/src/graphql/paymentV2/mutations.d.ts +2 -0
- package/dist/src/graphql/paymentV2/mutations.js +46 -1
- package/dist/src/graphql/paymentV2/queries.d.ts +3 -0
- package/dist/src/graphql/paymentV2/queries.js +121 -1
- package/dist/src/graphql/product/queries.js +22 -0
- package/dist/src/lib/SDK.d.ts +3 -0
- package/dist/src/lib/SDK.js +5 -0
- package/dist/src/lib/campaign/index.d.ts +3 -0
- package/dist/src/lib/campaign/index.js +50 -0
- package/dist/src/lib/comhub/index.d.ts +1 -1
- package/dist/src/lib/comhub/index.js +3 -3
- package/dist/src/lib/crm/index.d.ts +4 -1
- package/dist/src/lib/crm/index.js +53 -2
- package/dist/src/lib/omnigateway/index.d.ts +1 -1
- package/dist/src/lib/omnigateway/index.js +3 -3
- package/dist/src/lib/order/index.d.ts +50 -0
- package/dist/src/lib/order/index.js +151 -0
- package/dist/src/lib/paymentV2/index.d.ts +5 -0
- package/dist/src/lib/paymentV2/index.js +80 -0
- package/dist/src/lib/portal/index.d.ts +3 -0
- package/dist/src/lib/portal/index.js +13 -0
- package/dist/src/lib/product/index.d.ts +2 -1
- package/dist/src/lib/product/index.js +23 -2
- package/dist/src/lib/token/index.d.ts +5 -0
- package/dist/src/lib/token/index.js +32 -0
- package/dist/src/utils/validatePhoneNumber.d.ts +1 -0
- package/dist/src/utils/validatePhoneNumber.js +20 -0
- package/package.json +1 -1
package/dist/config/config.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export declare const environmentEndpoints: {
|
|
|
20
20
|
getImage: string;
|
|
21
21
|
accounting: string;
|
|
22
22
|
omnigateway: string;
|
|
23
|
+
authorization: string;
|
|
23
24
|
};
|
|
24
25
|
live: {
|
|
25
26
|
product: string;
|
|
@@ -42,5 +43,6 @@ export declare const environmentEndpoints: {
|
|
|
42
43
|
getImage: string;
|
|
43
44
|
accounting: string;
|
|
44
45
|
omnigateway: string;
|
|
46
|
+
authorization: string;
|
|
45
47
|
};
|
|
46
48
|
};
|
package/dist/config/config.js
CHANGED
|
@@ -23,6 +23,7 @@ exports.environmentEndpoints = {
|
|
|
23
23
|
getImage: "https://s3-img-gw.longvan.net/img/omnichannel",
|
|
24
24
|
accounting: "https://api-gateway.dev.longvan.vn/accounting-service",
|
|
25
25
|
omnigateway: "https://omni-gateway.dev.longvan.vn/omni-gateway/v1",
|
|
26
|
+
authorization: "https://id.dev.longvan.vn/authorization/public"
|
|
26
27
|
},
|
|
27
28
|
live: {
|
|
28
29
|
product: "https://product-service.longvan.vn/product-service/graphql",
|
|
@@ -45,5 +46,6 @@ exports.environmentEndpoints = {
|
|
|
45
46
|
getImage: "https://s3-img-gw.longvan.net/img/omnichannel",
|
|
46
47
|
accounting: "https://api-gateway.dev.longvan.vn/accounting-service",
|
|
47
48
|
omnigateway: "https://omni-gateway.longvan.vn/omni-gateway/v1",
|
|
49
|
+
authorization: "https://id.longvan.vn/authorization/public"
|
|
48
50
|
},
|
|
49
51
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ADD_CUSTOMER_ID_INTO_VOUCHER: import("graphql").DocumentNode;
|
|
@@ -1 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ADD_CUSTOMER_ID_INTO_VOUCHER = void 0;
|
|
7
|
+
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
+
exports.ADD_CUSTOMER_ID_INTO_VOUCHER = (0, graphql_tag_1.default) `
|
|
9
|
+
mutation AddCustomerToVoucher(
|
|
10
|
+
$partyId: String!
|
|
11
|
+
$voucherCode: String!
|
|
12
|
+
$userId: String!
|
|
13
|
+
) {
|
|
14
|
+
addCustomerToVoucher(
|
|
15
|
+
partyId: $partyId
|
|
16
|
+
voucherCode: $voucherCode
|
|
17
|
+
userId: $userId
|
|
18
|
+
) {
|
|
19
|
+
id
|
|
20
|
+
customerId
|
|
21
|
+
campaignActionId
|
|
22
|
+
campaignId
|
|
23
|
+
partyId
|
|
24
|
+
voucherCode
|
|
25
|
+
voucherType
|
|
26
|
+
status
|
|
27
|
+
discountAmount
|
|
28
|
+
discountPercent
|
|
29
|
+
usageLimitPerVoucher
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
@@ -4,3 +4,5 @@ export declare const CHECK_VALID_VOUCHER: import("graphql").DocumentNode;
|
|
|
4
4
|
export declare const GET_CAMPAIGN_ACTIVE_NOW: import("graphql").DocumentNode;
|
|
5
5
|
export declare const GET_PROMOTION_PRODUCT_PRICE: import("graphql").DocumentNode;
|
|
6
6
|
export declare const GET_VOUCHER_AVAILABLE_FOR_CUSTOMER: import("graphql").DocumentNode;
|
|
7
|
+
export declare const SUGGEST_VOUCHER: import("graphql").DocumentNode;
|
|
8
|
+
export declare const GET_CAMPAIGN_ACTION_BY_ID: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GET_VOUCHER_AVAILABLE_FOR_CUSTOMER = exports.GET_PROMOTION_PRODUCT_PRICE = exports.GET_CAMPAIGN_ACTIVE_NOW = exports.CHECK_VALID_VOUCHER = exports.GET_VOUCHERS = exports.GET_CAMPAIGN_ACTION_ACTIVE_NOW = void 0;
|
|
3
|
+
exports.GET_CAMPAIGN_ACTION_BY_ID = exports.SUGGEST_VOUCHER = exports.GET_VOUCHER_AVAILABLE_FOR_CUSTOMER = exports.GET_PROMOTION_PRODUCT_PRICE = exports.GET_CAMPAIGN_ACTIVE_NOW = exports.CHECK_VALID_VOUCHER = exports.GET_VOUCHERS = exports.GET_CAMPAIGN_ACTION_ACTIVE_NOW = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.GET_CAMPAIGN_ACTION_ACTIVE_NOW = (0, graphql_tag_1.gql) `
|
|
6
6
|
query GetCampaignActionActiveNow(
|
|
@@ -91,6 +91,7 @@ exports.GET_VOUCHERS = (0, graphql_tag_1.gql) `
|
|
|
91
91
|
exports.CHECK_VALID_VOUCHER = (0, graphql_tag_1.gql) `
|
|
92
92
|
query CheckValidVoucher(
|
|
93
93
|
$partyId: String
|
|
94
|
+
$productStoreId: String
|
|
94
95
|
$customerId: String
|
|
95
96
|
$voucherCode: String!
|
|
96
97
|
) {
|
|
@@ -98,6 +99,7 @@ exports.CHECK_VALID_VOUCHER = (0, graphql_tag_1.gql) `
|
|
|
98
99
|
checkValidVoucherRequest: {
|
|
99
100
|
customerId: $customerId
|
|
100
101
|
voucherCode: $voucherCode
|
|
102
|
+
productStoreId: $productStoreId
|
|
101
103
|
}
|
|
102
104
|
partyId: $partyId
|
|
103
105
|
) {
|
|
@@ -256,3 +258,94 @@ exports.GET_VOUCHER_AVAILABLE_FOR_CUSTOMER = (0, graphql_tag_1.gql) `
|
|
|
256
258
|
}
|
|
257
259
|
}
|
|
258
260
|
`;
|
|
261
|
+
exports.SUGGEST_VOUCHER = (0, graphql_tag_1.gql) `
|
|
262
|
+
query SuggestVoucher($partyId: String, $excludeExpired: Boolean) {
|
|
263
|
+
suggestVoucher(
|
|
264
|
+
searchVoucherRequest: {
|
|
265
|
+
partyId: $partyId
|
|
266
|
+
excludeExpired: $excludeExpired
|
|
267
|
+
}
|
|
268
|
+
) {
|
|
269
|
+
total
|
|
270
|
+
totalPages
|
|
271
|
+
totalElements
|
|
272
|
+
last
|
|
273
|
+
first
|
|
274
|
+
number
|
|
275
|
+
numberOfElements
|
|
276
|
+
size
|
|
277
|
+
empty
|
|
278
|
+
content {
|
|
279
|
+
campaignActionId
|
|
280
|
+
campaignId
|
|
281
|
+
partyId
|
|
282
|
+
voucherCode
|
|
283
|
+
voucherType
|
|
284
|
+
status
|
|
285
|
+
discountAmount
|
|
286
|
+
discountPercent
|
|
287
|
+
usageLimitPerVoucher
|
|
288
|
+
maximumDiscount
|
|
289
|
+
numberOfTimeUsed
|
|
290
|
+
id
|
|
291
|
+
createdStamp
|
|
292
|
+
updatedStamp
|
|
293
|
+
updatedBy
|
|
294
|
+
createdBy
|
|
295
|
+
isBirthday
|
|
296
|
+
customerId
|
|
297
|
+
scope
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
`;
|
|
302
|
+
// query GetCampaignActionById {
|
|
303
|
+
// getCampaignActionById(id: "20.1273.888") {
|
|
304
|
+
// name
|
|
305
|
+
// description
|
|
306
|
+
// partyId
|
|
307
|
+
// type
|
|
308
|
+
// viewTemplateId
|
|
309
|
+
// urlTemplate
|
|
310
|
+
// shortCode
|
|
311
|
+
// uriPattern
|
|
312
|
+
// parameterPattern
|
|
313
|
+
// status
|
|
314
|
+
// extendDaysForHeadReview
|
|
315
|
+
// priorityLevel
|
|
316
|
+
// positionConnectionType
|
|
317
|
+
// baseCommissionPercent
|
|
318
|
+
// targetType
|
|
319
|
+
// id
|
|
320
|
+
// createdStamp
|
|
321
|
+
// updatedStamp
|
|
322
|
+
// updatedBy
|
|
323
|
+
// createdBy
|
|
324
|
+
// }
|
|
325
|
+
// }
|
|
326
|
+
exports.GET_CAMPAIGN_ACTION_BY_ID = (0, graphql_tag_1.gql) `
|
|
327
|
+
query GetCampaignActionById($id: String!) {
|
|
328
|
+
getCampaignActionById(id: $id) {
|
|
329
|
+
name
|
|
330
|
+
description
|
|
331
|
+
partyId
|
|
332
|
+
type
|
|
333
|
+
viewTemplateId
|
|
334
|
+
urlTemplate
|
|
335
|
+
shortCode
|
|
336
|
+
uriPattern
|
|
337
|
+
parameterPattern
|
|
338
|
+
status
|
|
339
|
+
extendDaysForHeadReview
|
|
340
|
+
priorityLevel
|
|
341
|
+
positionConnectionType
|
|
342
|
+
baseCommissionPercent
|
|
343
|
+
targetType
|
|
344
|
+
id
|
|
345
|
+
createdStamp
|
|
346
|
+
updatedStamp
|
|
347
|
+
updatedBy
|
|
348
|
+
createdBy
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
`;
|
|
@@ -14,3 +14,4 @@ export declare const UPDATE_CONNECTOR_DESCRIPTION: import("graphql").DocumentNod
|
|
|
14
14
|
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
|
+
export declare const ADD_TOPIC_RELATED_RESOURCE: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
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.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(
|
|
@@ -782,13 +782,13 @@ exports.CLOSE_TOPIC = (0, graphql_tag_1.gql) `
|
|
|
782
782
|
status
|
|
783
783
|
name
|
|
784
784
|
communicationChannel
|
|
785
|
-
customerId
|
|
786
785
|
accountableId
|
|
787
786
|
accountableName
|
|
788
|
-
customerName
|
|
789
787
|
createdStamp
|
|
790
788
|
threadId
|
|
791
789
|
roomId
|
|
790
|
+
channelId
|
|
791
|
+
channelType
|
|
792
792
|
}
|
|
793
793
|
}
|
|
794
794
|
`;
|
|
@@ -817,3 +817,18 @@ exports.CREATE_TOPIC = (0, graphql_tag_1.gql) `
|
|
|
817
817
|
}
|
|
818
818
|
}
|
|
819
819
|
`;
|
|
820
|
+
exports.ADD_TOPIC_RELATED_RESOURCE = (0, graphql_tag_1.gql) `
|
|
821
|
+
mutation AddTopicRelatedResource(
|
|
822
|
+
$topicId: String!
|
|
823
|
+
$resourceId: String!
|
|
824
|
+
$resourceType: String!
|
|
825
|
+
$createdBy: String!
|
|
826
|
+
) {
|
|
827
|
+
addTopicRelatedResource(
|
|
828
|
+
topicId: $topicId
|
|
829
|
+
resourceId: $resourceId
|
|
830
|
+
resourceType: $resourceType
|
|
831
|
+
createdBy: $createdBy
|
|
832
|
+
)
|
|
833
|
+
}
|
|
834
|
+
`;
|
|
@@ -11,3 +11,5 @@ 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;
|
|
15
|
+
export declare const GET_RESOURCE_RELATED_TOPIC: 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_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;
|
|
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(
|
|
@@ -568,13 +568,21 @@ exports.SEARCH_TOPIC = (0, graphql_tag_1.gql) `
|
|
|
568
568
|
status
|
|
569
569
|
name
|
|
570
570
|
communicationChannel
|
|
571
|
-
customerId
|
|
572
571
|
accountableId
|
|
573
572
|
accountableName
|
|
574
|
-
customerName
|
|
575
573
|
createdStamp
|
|
576
574
|
threadId
|
|
577
575
|
roomId
|
|
576
|
+
channelId
|
|
577
|
+
channelType
|
|
578
|
+
customer {
|
|
579
|
+
id
|
|
580
|
+
fullName
|
|
581
|
+
name
|
|
582
|
+
type
|
|
583
|
+
phone
|
|
584
|
+
email
|
|
585
|
+
}
|
|
578
586
|
}
|
|
579
587
|
}
|
|
580
588
|
}
|
|
@@ -630,3 +638,43 @@ exports.GET_MY_WORK_EFFORT_TODAY = (0, graphql_tag_1.gql) `
|
|
|
630
638
|
}
|
|
631
639
|
}
|
|
632
640
|
`;
|
|
641
|
+
exports.GET_MESSAGES = (0, graphql_tag_1.gql) `
|
|
642
|
+
query GetMessages($topicId: String!, $pageSize: Int, $pageNumber: Int) {
|
|
643
|
+
getMessages(
|
|
644
|
+
topicId: $topicId
|
|
645
|
+
pageSize: $pageSize
|
|
646
|
+
pageNumber: $pageNumber
|
|
647
|
+
) {
|
|
648
|
+
total
|
|
649
|
+
data {
|
|
650
|
+
id
|
|
651
|
+
createdStamp
|
|
652
|
+
updatedStamp
|
|
653
|
+
updatedBy
|
|
654
|
+
type
|
|
655
|
+
format
|
|
656
|
+
content
|
|
657
|
+
referId
|
|
658
|
+
referSource
|
|
659
|
+
attachId
|
|
660
|
+
createdBy {
|
|
661
|
+
id
|
|
662
|
+
fullName
|
|
663
|
+
name
|
|
664
|
+
type
|
|
665
|
+
phone
|
|
666
|
+
email
|
|
667
|
+
}
|
|
668
|
+
attachmentUrl
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
`;
|
|
673
|
+
exports.GET_RESOURCE_RELATED_TOPIC = (0, graphql_tag_1.gql) `
|
|
674
|
+
query GetResourceRelatedTopic(
|
|
675
|
+
$topicId: String!
|
|
676
|
+
$resourceType: String!
|
|
677
|
+
){
|
|
678
|
+
getResourceRelatedTopic(topicId: $topicId, resourceType: $resourceType)
|
|
679
|
+
}
|
|
680
|
+
`;
|
|
@@ -1,9 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CANCEL_PAYMENT = void 0;
|
|
3
|
+
exports.CONFIRM_PAYMENT_SUCCESS_MANUAL = exports.CONFIRM_TO_GATEWAY = exports.CANCEL_PAYMENT = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.CANCEL_PAYMENT = (0, graphql_tag_1.gql) `
|
|
6
6
|
mutation CancelPayment($paymentId: String!, $reason: String!) {
|
|
7
7
|
cancelPayment(paymentId: $paymentId, reason: $reason)
|
|
8
8
|
}
|
|
9
9
|
`;
|
|
10
|
+
exports.CONFIRM_TO_GATEWAY = (0, graphql_tag_1.gql) `
|
|
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
|
+
) {
|
|
21
|
+
code
|
|
22
|
+
message
|
|
23
|
+
data
|
|
24
|
+
qrCodeUrl
|
|
25
|
+
deeplink
|
|
26
|
+
deeplinkMiniApp
|
|
27
|
+
paymentId
|
|
28
|
+
gwConfigId
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
exports.CONFIRM_PAYMENT_SUCCESS_MANUAL = (0, graphql_tag_1.gql) `
|
|
33
|
+
mutation ConfirmPaymentSuccessManual(
|
|
34
|
+
$paymentId: String!
|
|
35
|
+
$transactionNo: String!
|
|
36
|
+
$note: String
|
|
37
|
+
$confirmBy: String!
|
|
38
|
+
) {
|
|
39
|
+
confirmPaymentSuccessManual(
|
|
40
|
+
paymentId: $paymentId
|
|
41
|
+
transactionNo: $transactionNo
|
|
42
|
+
note: $note
|
|
43
|
+
confirmBy: $confirmBy
|
|
44
|
+
) {
|
|
45
|
+
code
|
|
46
|
+
message
|
|
47
|
+
data
|
|
48
|
+
qrCodeUrl
|
|
49
|
+
deeplink
|
|
50
|
+
deeplinkMiniApp
|
|
51
|
+
paymentId
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export declare const PAYMENTS_BY_ORDERS: import("graphql").DocumentNode;
|
|
2
2
|
export declare const PAYMENT_METHODS: import("graphql").DocumentNode;
|
|
3
3
|
export declare const GET_PAYMENT_METHOD_TYPES: import("graphql").DocumentNode;
|
|
4
|
+
export declare const PAYMENT_INFO: import("graphql").DocumentNode;
|
|
5
|
+
export declare const PAYMENT_STATUS: import("graphql").DocumentNode;
|
|
6
|
+
export declare const GW_CONFIG_DETAIL: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GET_PAYMENT_METHOD_TYPES = exports.PAYMENT_METHODS = exports.PAYMENTS_BY_ORDERS = void 0;
|
|
3
|
+
exports.GW_CONFIG_DETAIL = exports.PAYMENT_STATUS = exports.PAYMENT_INFO = exports.GET_PAYMENT_METHOD_TYPES = exports.PAYMENT_METHODS = exports.PAYMENTS_BY_ORDERS = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.PAYMENTS_BY_ORDERS = (0, graphql_tag_1.gql) `
|
|
6
6
|
query PaymentsByOrders($orderIds: [String!]!) {
|
|
@@ -40,6 +40,7 @@ exports.PAYMENTS_BY_ORDERS = (0, graphql_tag_1.gql) `
|
|
|
40
40
|
confirmPaidDate
|
|
41
41
|
qrCode
|
|
42
42
|
payUrl
|
|
43
|
+
paymentNote
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
`;
|
|
@@ -64,3 +65,122 @@ exports.GET_PAYMENT_METHOD_TYPES = (0, graphql_tag_1.gql) `
|
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
67
|
`;
|
|
68
|
+
exports.PAYMENT_INFO = (0, graphql_tag_1.gql) `
|
|
69
|
+
query PaymentInfo($paymentId: String!) {
|
|
70
|
+
paymentInfo(paymentId: $paymentId) {
|
|
71
|
+
id
|
|
72
|
+
payType
|
|
73
|
+
payDate
|
|
74
|
+
dueDate
|
|
75
|
+
completePayment
|
|
76
|
+
paymentTerm
|
|
77
|
+
methodCode
|
|
78
|
+
methodTypeCode
|
|
79
|
+
gatewayConfigId
|
|
80
|
+
partnerCode
|
|
81
|
+
totalAmount
|
|
82
|
+
remain
|
|
83
|
+
currCode
|
|
84
|
+
invoiceId
|
|
85
|
+
orderId
|
|
86
|
+
orderInfo
|
|
87
|
+
orderGroup
|
|
88
|
+
orderType
|
|
89
|
+
returnUrl
|
|
90
|
+
ipnUrl
|
|
91
|
+
merchantIp
|
|
92
|
+
extraData
|
|
93
|
+
storeID
|
|
94
|
+
bankCode
|
|
95
|
+
appUser
|
|
96
|
+
phone
|
|
97
|
+
email
|
|
98
|
+
address
|
|
99
|
+
signature
|
|
100
|
+
createBy
|
|
101
|
+
transactionId
|
|
102
|
+
baseMethodCode
|
|
103
|
+
retry
|
|
104
|
+
postToOrder
|
|
105
|
+
editAble
|
|
106
|
+
approved
|
|
107
|
+
statusCode
|
|
108
|
+
paymentGroup
|
|
109
|
+
userId
|
|
110
|
+
type
|
|
111
|
+
attributes
|
|
112
|
+
items {
|
|
113
|
+
id
|
|
114
|
+
partnerCode
|
|
115
|
+
paymentId
|
|
116
|
+
type
|
|
117
|
+
orderId
|
|
118
|
+
invoiceId
|
|
119
|
+
orderGroup
|
|
120
|
+
orderType
|
|
121
|
+
orderInfo
|
|
122
|
+
totalAmount
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
`;
|
|
127
|
+
exports.PAYMENT_STATUS = (0, graphql_tag_1.gql) `
|
|
128
|
+
query PaymentStatus($paymentId: String!) {
|
|
129
|
+
paymentStatus(paymentId: $paymentId) {
|
|
130
|
+
methodCode
|
|
131
|
+
methodTypeCode
|
|
132
|
+
gatewayConfigId
|
|
133
|
+
partnerCode
|
|
134
|
+
totalAmount
|
|
135
|
+
fee
|
|
136
|
+
discountAmount
|
|
137
|
+
payDate
|
|
138
|
+
payType
|
|
139
|
+
transactionDate
|
|
140
|
+
paymentId
|
|
141
|
+
invoiceId
|
|
142
|
+
orderInfo
|
|
143
|
+
orderType
|
|
144
|
+
locale
|
|
145
|
+
merchantIp
|
|
146
|
+
extraData
|
|
147
|
+
storeID
|
|
148
|
+
bankCode
|
|
149
|
+
appUser
|
|
150
|
+
phone
|
|
151
|
+
email
|
|
152
|
+
address
|
|
153
|
+
statusCode
|
|
154
|
+
statusDescription
|
|
155
|
+
transactionId
|
|
156
|
+
createBy
|
|
157
|
+
methodDescription
|
|
158
|
+
methodMapping
|
|
159
|
+
baseMethodCode
|
|
160
|
+
confirmPaidBy
|
|
161
|
+
confirmPaidDate
|
|
162
|
+
qrCode
|
|
163
|
+
payUrl
|
|
164
|
+
attributes
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
`;
|
|
168
|
+
exports.GW_CONFIG_DETAIL = (0, graphql_tag_1.gql) `
|
|
169
|
+
query GwConfigDetail($configId: String!) {
|
|
170
|
+
gwConfigDetail(configId: $configId) {
|
|
171
|
+
id
|
|
172
|
+
name
|
|
173
|
+
methodCode
|
|
174
|
+
partnerCode
|
|
175
|
+
subMethodCode
|
|
176
|
+
gwPartnerCode
|
|
177
|
+
gwPartnerName
|
|
178
|
+
gwSubChannel
|
|
179
|
+
gwMethodVersion
|
|
180
|
+
accessKey
|
|
181
|
+
secretKey
|
|
182
|
+
description
|
|
183
|
+
activated
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
`;
|
|
@@ -493,12 +493,18 @@ exports.GET_PRODUCT = (0, graphql_tag_1.gql) `
|
|
|
493
493
|
query GetProducts(
|
|
494
494
|
$partnerId: String!
|
|
495
495
|
$storeChannel: String!
|
|
496
|
+
$keyword: String
|
|
496
497
|
$category: String
|
|
498
|
+
$currentPage: Int
|
|
499
|
+
$maxResult: Int
|
|
497
500
|
) {
|
|
498
501
|
getProducts(
|
|
499
502
|
partnerId: $partnerId
|
|
500
503
|
storeChannel: $storeChannel
|
|
504
|
+
keyword: $keyword
|
|
501
505
|
category: $category
|
|
506
|
+
currentPage: $currentPage
|
|
507
|
+
maxResult: $maxResult
|
|
502
508
|
) {
|
|
503
509
|
total
|
|
504
510
|
currentPage
|
|
@@ -531,6 +537,22 @@ exports.GET_PRODUCT = (0, graphql_tag_1.gql) `
|
|
|
531
537
|
compareAtPrice
|
|
532
538
|
featuredImage
|
|
533
539
|
images
|
|
540
|
+
categories {
|
|
541
|
+
id
|
|
542
|
+
title
|
|
543
|
+
image
|
|
544
|
+
icon
|
|
545
|
+
parentId
|
|
546
|
+
level
|
|
547
|
+
handle
|
|
548
|
+
description
|
|
549
|
+
}
|
|
550
|
+
groups {
|
|
551
|
+
id
|
|
552
|
+
name
|
|
553
|
+
policy
|
|
554
|
+
image
|
|
555
|
+
}
|
|
534
556
|
}
|
|
535
557
|
}
|
|
536
558
|
}
|
package/dist/src/lib/SDK.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { UploadService } from "./upload";
|
|
|
18
18
|
import { GetImageService } from "./getImage";
|
|
19
19
|
import { AccountingService } from "./accounting";
|
|
20
20
|
import { OmnigatewayService } from './omnigateway';
|
|
21
|
+
import { AuthorizationService } from "./token";
|
|
21
22
|
export interface Endpoints {
|
|
22
23
|
product: string;
|
|
23
24
|
crm: string;
|
|
@@ -39,6 +40,7 @@ export interface Endpoints {
|
|
|
39
40
|
getImage: string;
|
|
40
41
|
accounting: string;
|
|
41
42
|
omnigateway: string;
|
|
43
|
+
authorization: string;
|
|
42
44
|
}
|
|
43
45
|
export declare class SDK {
|
|
44
46
|
orgId: string;
|
|
@@ -64,6 +66,7 @@ export declare class SDK {
|
|
|
64
66
|
getImage: GetImageService;
|
|
65
67
|
accounting: AccountingService;
|
|
66
68
|
omnigateway: OmnigatewayService;
|
|
69
|
+
authorization: AuthorizationService;
|
|
67
70
|
token: string | null;
|
|
68
71
|
constructor(orgId: string, storeId: string, environment: "dev" | "live");
|
|
69
72
|
setToken(token: string): void;
|
package/dist/src/lib/SDK.js
CHANGED
|
@@ -23,6 +23,7 @@ const upload_1 = require("./upload");
|
|
|
23
23
|
const getImage_1 = require("./getImage");
|
|
24
24
|
const accounting_1 = require("./accounting");
|
|
25
25
|
const omnigateway_1 = require("./omnigateway");
|
|
26
|
+
const token_1 = require("./token");
|
|
26
27
|
class SDK {
|
|
27
28
|
constructor(orgId, storeId, environment) {
|
|
28
29
|
this.orgId = orgId;
|
|
@@ -50,6 +51,7 @@ class SDK {
|
|
|
50
51
|
this.getImage = new getImage_1.GetImageService(endpoints.getImage, orgId, storeId);
|
|
51
52
|
this.accounting = new accounting_1.AccountingService(endpoints.accounting, orgId, storeId);
|
|
52
53
|
this.omnigateway = new omnigateway_1.OmnigatewayService(endpoints.omnigateway, orgId, storeId);
|
|
54
|
+
this.authorization = new token_1.AuthorizationService(endpoints.authorization, orgId, storeId);
|
|
53
55
|
// Initialize other services here
|
|
54
56
|
}
|
|
55
57
|
setToken(token) {
|
|
@@ -76,6 +78,7 @@ class SDK {
|
|
|
76
78
|
// Set token for other services here
|
|
77
79
|
this.accounting.setToken(token);
|
|
78
80
|
this.omnigateway.setToken(token);
|
|
81
|
+
this.authorization.setToken(token);
|
|
79
82
|
}
|
|
80
83
|
// các module export từ serviceSDK.ts set storeId vào serviceSDK.ts
|
|
81
84
|
// src/service.ts
|
|
@@ -99,6 +102,7 @@ class SDK {
|
|
|
99
102
|
this.getImage.setStoreId(storeId);
|
|
100
103
|
this.accounting.setStoreId(storeId);
|
|
101
104
|
this.omnigateway.setStoreId(storeId);
|
|
105
|
+
this.auth.setStoreId(storeId);
|
|
102
106
|
// Set storeId for other services here
|
|
103
107
|
}
|
|
104
108
|
setOrgId(orgId) {
|
|
@@ -121,6 +125,7 @@ class SDK {
|
|
|
121
125
|
this.getImage.setOrgId(orgId);
|
|
122
126
|
this.accounting.setOrgId(orgId);
|
|
123
127
|
this.omnigateway.setOrgId(orgId);
|
|
128
|
+
this.auth.setOrgId(orgId);
|
|
124
129
|
}
|
|
125
130
|
}
|
|
126
131
|
exports.SDK = SDK;
|
|
@@ -13,4 +13,7 @@ export declare class CampaignService extends Service {
|
|
|
13
13
|
getCampaignActiveNow(campaignActionType: string, customerId: string): Promise<any>;
|
|
14
14
|
getPromotionProductPrice(productId: String, productPrice: number): Promise<any>;
|
|
15
15
|
getVoucherAvailableForCustomer(campaignId: string, customerId: string, excludeExpired: Boolean): Promise<any>;
|
|
16
|
+
addCustomerToVoucher(voucherCode: string, userId: string): Promise<any>;
|
|
17
|
+
suggestVoucher(): Promise<any>;
|
|
18
|
+
getCampaignActionById(id: string): Promise<any>;
|
|
16
19
|
}
|