@longvansoftware/service-js-client 2.7.3 → 2.7.4
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/campaign/queries.d.ts +13 -11
- package/dist/src/graphql/campaign/queries.js +39 -111
- package/dist/src/graphql/marketplace/mutations.d.ts +3 -0
- package/dist/src/graphql/marketplace/mutations.js +54 -0
- package/dist/src/graphql/marketplace/queries.d.ts +2 -0
- package/dist/src/graphql/marketplace/queries.js +42 -0
- package/dist/src/graphql/paymentV2/mutations.d.ts +1 -0
- package/dist/src/graphql/paymentV2/mutations.js +15 -1
- package/dist/src/graphql/paymentV2/queries.d.ts +2 -0
- package/dist/src/graphql/paymentV2/queries.js +58 -1
- package/dist/src/graphql/quicklab_service/mutations.d.ts +4 -0
- package/dist/src/graphql/quicklab_service/mutations.js +61 -53
- package/dist/src/graphql/quicklab_service/queries.d.ts +3 -0
- package/dist/src/graphql/quicklab_service/queries.js +58 -9
- package/dist/src/graphql/storefont/mutation.d.ts +0 -0
- package/dist/src/graphql/storefont/mutation.js +1 -0
- package/dist/src/graphql/storefont/queries.d.ts +2 -0
- package/dist/src/graphql/storefont/queries.js +46 -0
- package/dist/src/graphql/tag/mutations.d.ts +2 -0
- package/dist/src/graphql/tag/mutations.js +44 -0
- package/dist/src/graphql/tag/queries.d.ts +1 -0
- package/dist/src/graphql/tag/queries.js +20 -0
- package/dist/src/lib/campaign/index.d.ts +1 -0
- package/dist/src/lib/campaign/index.js +69 -12
- package/dist/src/lib/marketplace/index.d.ts +9 -0
- package/dist/src/lib/marketplace/index.js +106 -0
- package/dist/src/lib/paymentV2/index.d.ts +10 -0
- package/dist/src/lib/paymentV2/index.js +39 -0
- package/dist/src/lib/portal/index.d.ts +3 -0
- package/dist/src/lib/portal/index.js +50 -0
- package/dist/src/lib/quicklab_service/index.d.ts +7 -0
- package/dist/src/lib/quicklab_service/index.js +140 -1
- package/dist/src/lib/storefont/index.d.ts +6 -0
- package/dist/src/lib/storefont/index.js +51 -0
- package/dist/src/lib/tag/index.d.ts +7 -0
- package/dist/src/lib/tag/index.js +61 -0
- package/package.json +1 -1
- package/dist/src/lib/service.d.ts +0 -14
- package/dist/src/lib/service.js +0 -101
- package/dist/src/utils/build-field-string.d.ts +0 -1
- package/dist/src/utils/build-field-string.js +0 -16
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
1
|
+
import { DocumentNode } from "graphql";
|
|
2
|
+
export declare const GET_CAMPAIGN_ACTION_ACTIVE_NOW: DocumentNode;
|
|
3
|
+
export declare const GET_VOUCHERS: DocumentNode;
|
|
4
|
+
export declare const CHECK_VALID_VOUCHER: DocumentNode;
|
|
5
|
+
export declare const GET_CAMPAIGN_ACTIVE_NOW: DocumentNode;
|
|
6
|
+
export declare const GET_PROMOTION_PRODUCT_PRICE: DocumentNode;
|
|
7
|
+
export declare const GET_VOUCHER_AVAILABLE_FOR_CUSTOMER: DocumentNode;
|
|
8
|
+
export declare const SUGGEST_VOUCHER: DocumentNode;
|
|
9
|
+
export declare const GET_CAMPAIGN_ACTION_BY_ID: DocumentNode;
|
|
10
|
+
export declare const SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE: DocumentNode;
|
|
11
|
+
export declare const GET_CAMPAIGN: DocumentNode;
|
|
12
|
+
export declare const SEARCH_PRODUCT_PRICE_PROMOTION_RESPONSE: DocumentNode;
|
|
13
|
+
export declare const GET_VOUCHER_FOR_USER: (fields?: string[]) => DocumentNode;
|
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SEARCH_PRODUCT_PRICE_PROMOTION_RESPONSE = exports.GET_CAMPAIGN = exports.SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE = 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;
|
|
3
|
+
exports.GET_VOUCHER_FOR_USER = exports.SEARCH_PRODUCT_PRICE_PROMOTION_RESPONSE = exports.GET_CAMPAIGN = exports.SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE = 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
|
+
const helpers_1 = require("../../utils/helpers");
|
|
5
6
|
exports.GET_CAMPAIGN_ACTION_ACTIVE_NOW = (0, graphql_tag_1.gql) `
|
|
6
|
-
query GetCampaignActionActiveNow(
|
|
7
|
-
$partyId:
|
|
8
|
-
$customerId: String
|
|
9
|
-
$campaignActionType: String
|
|
10
|
-
$productStoreId: String
|
|
11
|
-
) {
|
|
12
|
-
getCampaignActionActiveNow(
|
|
13
|
-
checkCampaignActiveRequest: {
|
|
14
|
-
partyId: $partyId
|
|
15
|
-
customerId: $customerId
|
|
16
|
-
campaignActionType: $campaignActionType
|
|
17
|
-
productStoreId: $productStoreId
|
|
18
|
-
}
|
|
19
|
-
) {
|
|
7
|
+
query GetCampaignActionActiveNow($partyId: String!, $customerId: String, $campaignActionType: String, $productStoreId: String) {
|
|
8
|
+
getCampaignActionActiveNow(checkCampaignActiveRequest: { partyId: $partyId, customerId: $customerId, campaignActionType: $campaignActionType, productStoreId: $productStoreId }) {
|
|
20
9
|
campaignId
|
|
21
10
|
campaignName
|
|
22
11
|
statusCampaign
|
|
@@ -66,7 +55,6 @@ exports.GET_VOUCHERS = (0, graphql_tag_1.gql) `
|
|
|
66
55
|
size
|
|
67
56
|
empty
|
|
68
57
|
content {
|
|
69
|
-
campaignActionId
|
|
70
58
|
campaignId
|
|
71
59
|
partyId
|
|
72
60
|
voucherCode
|
|
@@ -74,8 +62,12 @@ exports.GET_VOUCHERS = (0, graphql_tag_1.gql) `
|
|
|
74
62
|
status
|
|
75
63
|
discountAmount
|
|
76
64
|
discountPercent
|
|
65
|
+
discountType
|
|
77
66
|
usageLimitPerVoucher
|
|
78
67
|
maximumDiscount
|
|
68
|
+
maximumDiscountType
|
|
69
|
+
minimumSpend
|
|
70
|
+
maximumSpend
|
|
79
71
|
numberOfTimeUsed
|
|
80
72
|
id
|
|
81
73
|
createdStamp
|
|
@@ -84,25 +76,23 @@ exports.GET_VOUCHERS = (0, graphql_tag_1.gql) `
|
|
|
84
76
|
createdBy
|
|
85
77
|
isBirthday
|
|
86
78
|
customerId
|
|
79
|
+
scope
|
|
80
|
+
affiliateId
|
|
81
|
+
description
|
|
82
|
+
expiryDate
|
|
83
|
+
customAttribute
|
|
84
|
+
assignUserLimit
|
|
85
|
+
ownerPartyId
|
|
86
|
+
migratedFromReferralId
|
|
87
|
+
campaignActionId
|
|
88
|
+
discountValue
|
|
87
89
|
}
|
|
88
90
|
}
|
|
89
91
|
}
|
|
90
92
|
`;
|
|
91
93
|
exports.CHECK_VALID_VOUCHER = (0, graphql_tag_1.gql) `
|
|
92
|
-
query CheckValidVoucher(
|
|
93
|
-
$partyId:
|
|
94
|
-
$productStoreId: String
|
|
95
|
-
$customerId: String
|
|
96
|
-
$voucherCode: String!
|
|
97
|
-
) {
|
|
98
|
-
checkValidVoucher(
|
|
99
|
-
checkValidVoucherRequest: {
|
|
100
|
-
customerId: $customerId
|
|
101
|
-
voucherCode: $voucherCode
|
|
102
|
-
productStoreId: $productStoreId
|
|
103
|
-
}
|
|
104
|
-
partyId: $partyId
|
|
105
|
-
) {
|
|
94
|
+
query CheckValidVoucher($partyId: String, $productStoreId: String, $customerId: String, $voucherCode: String!) {
|
|
95
|
+
checkValidVoucher(checkValidVoucherRequest: { customerId: $customerId, voucherCode: $voucherCode, productStoreId: $productStoreId }, partyId: $partyId) {
|
|
106
96
|
campaignActionId
|
|
107
97
|
campaignId
|
|
108
98
|
partyId
|
|
@@ -123,20 +113,8 @@ exports.CHECK_VALID_VOUCHER = (0, graphql_tag_1.gql) `
|
|
|
123
113
|
}
|
|
124
114
|
`;
|
|
125
115
|
exports.GET_CAMPAIGN_ACTIVE_NOW = (0, graphql_tag_1.gql) `
|
|
126
|
-
query GetCampaignActiveNow(
|
|
127
|
-
$partyId:
|
|
128
|
-
$productStoreId: String
|
|
129
|
-
$campaignActionType: String
|
|
130
|
-
$customerId: String
|
|
131
|
-
) {
|
|
132
|
-
getCampaignActiveNow(
|
|
133
|
-
checkCampaignActiveRequest: {
|
|
134
|
-
partyId: $partyId
|
|
135
|
-
customerId: $customerId
|
|
136
|
-
campaignActionType: $campaignActionType
|
|
137
|
-
productStoreId: $productStoreId
|
|
138
|
-
}
|
|
139
|
-
) {
|
|
116
|
+
query GetCampaignActiveNow($partyId: String!, $productStoreId: String, $campaignActionType: String, $customerId: String) {
|
|
117
|
+
getCampaignActiveNow(checkCampaignActiveRequest: { partyId: $partyId, customerId: $customerId, campaignActionType: $campaignActionType, productStoreId: $productStoreId }) {
|
|
140
118
|
campaign {
|
|
141
119
|
id
|
|
142
120
|
createdStamp
|
|
@@ -179,18 +157,8 @@ exports.GET_CAMPAIGN_ACTIVE_NOW = (0, graphql_tag_1.gql) `
|
|
|
179
157
|
}
|
|
180
158
|
`;
|
|
181
159
|
exports.GET_PROMOTION_PRODUCT_PRICE = (0, graphql_tag_1.gql) `
|
|
182
|
-
query GetPromotionProductPrice(
|
|
183
|
-
$partyId:
|
|
184
|
-
$productStoreId: String!
|
|
185
|
-
$productId: String!
|
|
186
|
-
$productPrice: BigDecimal!
|
|
187
|
-
) {
|
|
188
|
-
getPromotionProductPrice(
|
|
189
|
-
partyId: $partyId
|
|
190
|
-
productStoreId: $productStoreId
|
|
191
|
-
productId: $productId
|
|
192
|
-
productPrice: $productPrice
|
|
193
|
-
) {
|
|
160
|
+
query GetPromotionProductPrice($partyId: String!, $productStoreId: String!, $productId: String!, $productPrice: BigDecimal!) {
|
|
161
|
+
getPromotionProductPrice(partyId: $partyId, productStoreId: $productStoreId, productId: $productId, productPrice: $productPrice) {
|
|
194
162
|
campaignId
|
|
195
163
|
campaignName
|
|
196
164
|
statusCampaign
|
|
@@ -210,15 +178,7 @@ exports.GET_PROMOTION_PRODUCT_PRICE = (0, graphql_tag_1.gql) `
|
|
|
210
178
|
}
|
|
211
179
|
`;
|
|
212
180
|
exports.GET_VOUCHER_AVAILABLE_FOR_CUSTOMER = (0, graphql_tag_1.gql) `
|
|
213
|
-
query GetVoucherAvailableForCustomer(
|
|
214
|
-
$partyId: String
|
|
215
|
-
$storeId: String
|
|
216
|
-
$campaignId: String
|
|
217
|
-
$campaignActionId: String
|
|
218
|
-
$customerId: String
|
|
219
|
-
$excludeExpired: Boolean
|
|
220
|
-
$isPageAble: Boolean
|
|
221
|
-
) {
|
|
181
|
+
query GetVoucherAvailableForCustomer($partyId: String, $storeId: String, $campaignId: String, $campaignActionId: String, $customerId: String, $excludeExpired: Boolean, $isPageAble: Boolean) {
|
|
222
182
|
getVoucherAvailableForCustomer(
|
|
223
183
|
searchVoucherRequest: {
|
|
224
184
|
partyId: $partyId
|
|
@@ -263,23 +223,9 @@ exports.GET_VOUCHER_AVAILABLE_FOR_CUSTOMER = (0, graphql_tag_1.gql) `
|
|
|
263
223
|
}
|
|
264
224
|
`;
|
|
265
225
|
exports.SUGGEST_VOUCHER = (0, graphql_tag_1.gql) `
|
|
266
|
-
query SuggestVoucher(
|
|
267
|
-
$partyId: String
|
|
268
|
-
$customerId: String
|
|
269
|
-
$excludeExpired: Boolean
|
|
270
|
-
$campaignId: String
|
|
271
|
-
$campaignActionId: String
|
|
272
|
-
$isBirthday: Boolean
|
|
273
|
-
) {
|
|
226
|
+
query SuggestVoucher($partyId: String, $customerId: String, $excludeExpired: Boolean, $campaignId: String, $campaignActionId: String, $isBirthday: Boolean) {
|
|
274
227
|
suggestVoucher(
|
|
275
|
-
searchVoucherRequest: {
|
|
276
|
-
partyId: $partyId
|
|
277
|
-
customerId: $customerId
|
|
278
|
-
excludeExpired: $excludeExpired
|
|
279
|
-
campaignId: $campaignId
|
|
280
|
-
campaignActionId: $campaignActionId
|
|
281
|
-
isBirthday: $isBirthday
|
|
282
|
-
}
|
|
228
|
+
searchVoucherRequest: { partyId: $partyId, customerId: $customerId, excludeExpired: $excludeExpired, campaignId: $campaignId, campaignActionId: $campaignActionId, isBirthday: $isBirthday }
|
|
283
229
|
) {
|
|
284
230
|
total
|
|
285
231
|
totalPages
|
|
@@ -369,22 +315,8 @@ exports.GET_CAMPAIGN_ACTION_BY_ID = (0, graphql_tag_1.gql) `
|
|
|
369
315
|
}
|
|
370
316
|
`;
|
|
371
317
|
exports.SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE = (0, graphql_tag_1.gql) `
|
|
372
|
-
query SearchProductGiftPromotionResponse(
|
|
373
|
-
$partyId:
|
|
374
|
-
$storeId: String
|
|
375
|
-
$productIds: [String]
|
|
376
|
-
$campaignActionId: String
|
|
377
|
-
$sort: [BaseSortRequest]
|
|
378
|
-
) {
|
|
379
|
-
searchProductGiftPromotionResponse(
|
|
380
|
-
parameterSearchProductGift: {
|
|
381
|
-
partyId: $partyId
|
|
382
|
-
storeId: $storeId
|
|
383
|
-
productIds: $productIds
|
|
384
|
-
campaignActionId: $campaignActionId
|
|
385
|
-
sort: $sort
|
|
386
|
-
}
|
|
387
|
-
) {
|
|
318
|
+
query SearchProductGiftPromotionResponse($partyId: String!, $storeId: String, $productIds: [String], $campaignActionId: String, $sort: [BaseSortRequest]) {
|
|
319
|
+
searchProductGiftPromotionResponse(parameterSearchProductGift: { partyId: $partyId, storeId: $storeId, productIds: $productIds, campaignActionId: $campaignActionId, sort: $sort }) {
|
|
388
320
|
total
|
|
389
321
|
totalPages
|
|
390
322
|
totalElements
|
|
@@ -446,21 +378,9 @@ exports.GET_CAMPAIGN = (0, graphql_tag_1.gql) `
|
|
|
446
378
|
}
|
|
447
379
|
`;
|
|
448
380
|
exports.SEARCH_PRODUCT_PRICE_PROMOTION_RESPONSE = (0, graphql_tag_1.gql) `
|
|
449
|
-
query SearchProductPricePromotionResponse(
|
|
450
|
-
$partyId: String!
|
|
451
|
-
$campaignId: String!
|
|
452
|
-
$campaignActionId: String
|
|
453
|
-
$statusActive: String
|
|
454
|
-
$sort: [BaseSortRequest]
|
|
455
|
-
) {
|
|
381
|
+
query SearchProductPricePromotionResponse($partyId: String!, $campaignId: String!, $campaignActionId: String, $statusActive: String, $sort: [BaseSortRequest]) {
|
|
456
382
|
searchProductPricePromotionResponse(
|
|
457
|
-
searchProductPricePromotionRequest: {
|
|
458
|
-
partyId: $partyId
|
|
459
|
-
campaignId: $campaignId
|
|
460
|
-
campaignActionId: $campaignActionId
|
|
461
|
-
statusActive: $statusActive
|
|
462
|
-
sort: $sort
|
|
463
|
-
}
|
|
383
|
+
searchProductPricePromotionRequest: { partyId: $partyId, campaignId: $campaignId, campaignActionId: $campaignActionId, statusActive: $statusActive, sort: $sort }
|
|
464
384
|
) {
|
|
465
385
|
content {
|
|
466
386
|
partyId
|
|
@@ -494,3 +414,11 @@ exports.SEARCH_PRODUCT_PRICE_PROMOTION_RESPONSE = (0, graphql_tag_1.gql) `
|
|
|
494
414
|
}
|
|
495
415
|
}
|
|
496
416
|
`;
|
|
417
|
+
const GET_VOUCHER_FOR_USER = (fields = []) => {
|
|
418
|
+
return (0, graphql_tag_1.gql) `
|
|
419
|
+
query GetVouchersForUser($voucherForUserRequest: VoucherForUserRequest!) {
|
|
420
|
+
getVouchersForUser(voucherForUserRequest: $voucherForUserRequest) ${(0, helpers_1.hasFields)(fields) ? `{ ${(0, helpers_1.joinField)(fields)} }` : ""}
|
|
421
|
+
}
|
|
422
|
+
`;
|
|
423
|
+
};
|
|
424
|
+
exports.GET_VOUCHER_FOR_USER = GET_VOUCHER_FOR_USER;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.REMOVE_PRODUCT_TAG = exports.ADD_PRODUCT_TAG = exports.CREATE_TAG = void 0;
|
|
4
|
+
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
+
exports.CREATE_TAG = (0, graphql_tag_1.gql) `
|
|
6
|
+
mutation CreateTag($name: String!, $slug: String!, $createdBy: String!) {
|
|
7
|
+
createTag(name: $name, slug: $slug, createdBy: $createdBy) {
|
|
8
|
+
id
|
|
9
|
+
name
|
|
10
|
+
slug
|
|
11
|
+
type
|
|
12
|
+
scope
|
|
13
|
+
storeIds
|
|
14
|
+
selected
|
|
15
|
+
title
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
exports.ADD_PRODUCT_TAG = (0, graphql_tag_1.gql) `
|
|
20
|
+
mutation AddProductTag(
|
|
21
|
+
$productId: String!
|
|
22
|
+
$tagId: String!
|
|
23
|
+
$tagGroupId: String
|
|
24
|
+
$createBy: String!
|
|
25
|
+
) {
|
|
26
|
+
addProductTag(
|
|
27
|
+
productId: $productId
|
|
28
|
+
tagId: $tagId
|
|
29
|
+
tagGroupId: $tagGroupId
|
|
30
|
+
createBy: $createBy
|
|
31
|
+
) {
|
|
32
|
+
status
|
|
33
|
+
message
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
exports.REMOVE_PRODUCT_TAG = (0, graphql_tag_1.gql) `
|
|
38
|
+
mutation RemoveProductTag(
|
|
39
|
+
$productId: String!
|
|
40
|
+
$tagId: String!
|
|
41
|
+
$tagGroupId: String
|
|
42
|
+
$updatedBy: String!
|
|
43
|
+
) {
|
|
44
|
+
removeProductTag(
|
|
45
|
+
productId: $productId
|
|
46
|
+
tagId: $tagId
|
|
47
|
+
tagGroupId: $tagGroupId
|
|
48
|
+
updatedBy: $updatedBy
|
|
49
|
+
) {
|
|
50
|
+
status
|
|
51
|
+
message
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SEARCH_TAG = exports.GET_TAGS_BY_PRODUCT_ID = void 0;
|
|
4
|
+
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
+
exports.GET_TAGS_BY_PRODUCT_ID = (0, graphql_tag_1.gql) `
|
|
6
|
+
query GetTagsByProductId($productId: String!) {
|
|
7
|
+
getTagsByProductId(productId: $productId) {
|
|
8
|
+
id
|
|
9
|
+
title
|
|
10
|
+
items {
|
|
11
|
+
id
|
|
12
|
+
name
|
|
13
|
+
slug
|
|
14
|
+
type
|
|
15
|
+
scope
|
|
16
|
+
storeIds
|
|
17
|
+
selected
|
|
18
|
+
title
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
exports.SEARCH_TAG = (0, graphql_tag_1.gql) `
|
|
24
|
+
query SearchTag($keyword: String, $currentPage: Int, $maxResult: Int) {
|
|
25
|
+
searchTag(keyword: $keyword, currentPage: $currentPage, maxResult: $maxResult) {
|
|
26
|
+
total
|
|
27
|
+
maxResult
|
|
28
|
+
index
|
|
29
|
+
resultList {
|
|
30
|
+
id
|
|
31
|
+
name
|
|
32
|
+
slug
|
|
33
|
+
type
|
|
34
|
+
scope
|
|
35
|
+
storeIds
|
|
36
|
+
selected
|
|
37
|
+
title
|
|
38
|
+
tagId
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
@@ -2,4 +2,5 @@ export declare const CANCEL_PAYMENT: import("graphql").DocumentNode;
|
|
|
2
2
|
export declare const CONFIRM_TO_GATEWAY: import("graphql").DocumentNode;
|
|
3
3
|
export declare const CONFIRM_PAYMENT_SUCCESS_MANUAL: import("graphql").DocumentNode;
|
|
4
4
|
export declare const HANDLE_UPDATE_GATEWAY_CONFIG: import("graphql").DocumentNode;
|
|
5
|
+
export declare const CREATE_PAYMENT: import("graphql").DocumentNode;
|
|
5
6
|
export declare const HANDLE_CREATE_GATEWAY_CONFIG: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HANDLE_CREATE_GATEWAY_CONFIG = exports.HANDLE_UPDATE_GATEWAY_CONFIG = exports.CONFIRM_PAYMENT_SUCCESS_MANUAL = exports.CONFIRM_TO_GATEWAY = exports.CANCEL_PAYMENT = void 0;
|
|
3
|
+
exports.HANDLE_CREATE_GATEWAY_CONFIG = exports.CREATE_PAYMENT = exports.HANDLE_UPDATE_GATEWAY_CONFIG = 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!) {
|
|
@@ -89,6 +89,20 @@ exports.HANDLE_UPDATE_GATEWAY_CONFIG = (0, graphql_tag_1.gql) `
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
`;
|
|
92
|
+
exports.CREATE_PAYMENT = (0, graphql_tag_1.gql) `
|
|
93
|
+
mutation CreatePayment($paymentData: Payment) {
|
|
94
|
+
createPayment(paymentData: $paymentData) {
|
|
95
|
+
code
|
|
96
|
+
message
|
|
97
|
+
data
|
|
98
|
+
qrCodeUrl
|
|
99
|
+
deeplink
|
|
100
|
+
deeplinkMiniApp
|
|
101
|
+
paymentId
|
|
102
|
+
gwConfigId
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
`;
|
|
92
106
|
exports.HANDLE_CREATE_GATEWAY_CONFIG = (0, graphql_tag_1.gql) `
|
|
93
107
|
mutation HandleCreateGatewayConfig(
|
|
94
108
|
$input: PaymentGatewayConfigInput!
|
|
@@ -7,4 +7,6 @@ export declare const GW_CONFIG_DETAIL: import("graphql").DocumentNode;
|
|
|
7
7
|
export declare const GET_PAYMENT_METHOD_TITLES: import("graphql").DocumentNode;
|
|
8
8
|
export declare const GET_PAYEMNT_GATEWAYS_BY_METHOD_CODE: import("graphql").DocumentNode;
|
|
9
9
|
export declare const GET_PAYMENT_METHOD_TYPES_V2: import("graphql").DocumentNode;
|
|
10
|
+
export declare const GET_PAYMENT_METHOD_TYPES_WITH_GATEWAY_CONFIG: import("graphql").DocumentNode;
|
|
10
11
|
export declare const GET_TRANSFER_INFO: import("graphql").DocumentNode;
|
|
12
|
+
export declare const PAYMENT_METHODS_BY_PARTNER: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GET_TRANSFER_INFO = exports.GET_PAYMENT_METHOD_TYPES_V2 = exports.GET_PAYEMNT_GATEWAYS_BY_METHOD_CODE = exports.GET_PAYMENT_METHOD_TITLES = exports.GW_CONFIG_DETAIL = exports.PAYMENT_STATUS = exports.PAYMENT_INFO = exports.GET_PAYMENT_METHOD_TYPES = exports.PAYMENT_METHODS = exports.PAYMENTS_BY_ORDERS = void 0;
|
|
3
|
+
exports.PAYMENT_METHODS_BY_PARTNER = exports.GET_TRANSFER_INFO = exports.GET_PAYMENT_METHOD_TYPES_WITH_GATEWAY_CONFIG = exports.GET_PAYMENT_METHOD_TYPES_V2 = exports.GET_PAYEMNT_GATEWAYS_BY_METHOD_CODE = exports.GET_PAYMENT_METHOD_TITLES = 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!]!) {
|
|
@@ -255,6 +255,44 @@ exports.GET_PAYMENT_METHOD_TYPES_V2 = (0, graphql_tag_1.gql) `
|
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
`;
|
|
258
|
+
exports.GET_PAYMENT_METHOD_TYPES_WITH_GATEWAY_CONFIG = (0, graphql_tag_1.gql) `
|
|
259
|
+
query GetPaymentMethodTypesWithGatewayConfig(
|
|
260
|
+
$partnerId: String!
|
|
261
|
+
$storeId: String!
|
|
262
|
+
) {
|
|
263
|
+
getPaymentMethodTypes(partnerId: $partnerId, storeId: $storeId) {
|
|
264
|
+
code
|
|
265
|
+
name
|
|
266
|
+
description
|
|
267
|
+
image
|
|
268
|
+
storeActive
|
|
269
|
+
paymentGatewayConfig {
|
|
270
|
+
id
|
|
271
|
+
methodCode
|
|
272
|
+
partnerCode
|
|
273
|
+
subMethodCode
|
|
274
|
+
gwPartnerCode
|
|
275
|
+
gwPartnerName
|
|
276
|
+
gwPaymentMethod
|
|
277
|
+
gwSubChannel
|
|
278
|
+
gwMethodVersion
|
|
279
|
+
hashAlgorithm
|
|
280
|
+
accessKey
|
|
281
|
+
secretKey
|
|
282
|
+
responseUrl
|
|
283
|
+
requestUrl
|
|
284
|
+
methodType
|
|
285
|
+
publicKey
|
|
286
|
+
redirectUrl
|
|
287
|
+
activated
|
|
288
|
+
paymentRecordingMethod
|
|
289
|
+
userId
|
|
290
|
+
name
|
|
291
|
+
description
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
`;
|
|
258
296
|
exports.GET_TRANSFER_INFO = (0, graphql_tag_1.gql) `
|
|
259
297
|
query GetTransferInfo(
|
|
260
298
|
$partnerId: String!
|
|
@@ -275,3 +313,22 @@ exports.GET_TRANSFER_INFO = (0, graphql_tag_1.gql) `
|
|
|
275
313
|
}
|
|
276
314
|
}
|
|
277
315
|
`;
|
|
316
|
+
exports.PAYMENT_METHODS_BY_PARTNER = (0, graphql_tag_1.gql) `
|
|
317
|
+
query PaymentMethodsByPartner($partnerCode: String) {
|
|
318
|
+
paymentMethods(partnerCode: $partnerCode ) {
|
|
319
|
+
id
|
|
320
|
+
code
|
|
321
|
+
description
|
|
322
|
+
image
|
|
323
|
+
name
|
|
324
|
+
titles {
|
|
325
|
+
id
|
|
326
|
+
code
|
|
327
|
+
name
|
|
328
|
+
lang
|
|
329
|
+
showField
|
|
330
|
+
required
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
`;
|
|
@@ -6,3 +6,7 @@ export declare const UPDATE_END_TIME_LAB_SESSION: DocumentNode;
|
|
|
6
6
|
export declare const STOP_LAB_SESSION: DocumentNode;
|
|
7
7
|
export declare const UPDATE_TYPE_LAB_SESSION: DocumentNode;
|
|
8
8
|
export declare const STOP_LAB_SESSION_FOR_CUSTOMER: DocumentNode;
|
|
9
|
+
export declare const CREATE_COMPUTING_LAB_BY_TEMPLATE_ID: (fields?: string[]) => DocumentNode;
|
|
10
|
+
export declare const REMOVE_COMPUTING_LAB: DocumentNode;
|
|
11
|
+
export declare const OFF_COMPUTING_LAB: DocumentNode;
|
|
12
|
+
export declare const ON_COMPUTING_LAB: DocumentNode;
|
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.STOP_LAB_SESSION_FOR_CUSTOMER = exports.UPDATE_TYPE_LAB_SESSION = exports.STOP_LAB_SESSION = exports.UPDATE_END_TIME_LAB_SESSION = exports.CREATE_LAB_SESSION_BY_COMPUTING_ID = exports.CREATE_LAB_SESSION_BY_LAB_SESSION_ID = exports.CREATE_LAB_SESSION_BY_TEMPLATE_ID = void 0;
|
|
3
|
+
exports.ON_COMPUTING_LAB = exports.OFF_COMPUTING_LAB = exports.REMOVE_COMPUTING_LAB = exports.CREATE_COMPUTING_LAB_BY_TEMPLATE_ID = exports.STOP_LAB_SESSION_FOR_CUSTOMER = exports.UPDATE_TYPE_LAB_SESSION = exports.STOP_LAB_SESSION = exports.UPDATE_END_TIME_LAB_SESSION = exports.CREATE_LAB_SESSION_BY_COMPUTING_ID = exports.CREATE_LAB_SESSION_BY_LAB_SESSION_ID = exports.CREATE_LAB_SESSION_BY_TEMPLATE_ID = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
// Tạo phiên thực hành từ template
|
|
6
6
|
exports.CREATE_LAB_SESSION_BY_TEMPLATE_ID = (0, graphql_tag_1.gql) `
|
|
7
|
-
mutation CreateLabSessionByTemplateId(
|
|
8
|
-
$templateId:
|
|
9
|
-
$userId: String!
|
|
10
|
-
$articleId: String!
|
|
11
|
-
$typeLabSessionCode: String!
|
|
12
|
-
) {
|
|
13
|
-
createLabSessionByTemplateId(
|
|
14
|
-
templateId: $templateId
|
|
15
|
-
userId: $userId
|
|
16
|
-
articleId: $articleId
|
|
17
|
-
typeLabSessionCode: $typeLabSessionCode
|
|
18
|
-
) {
|
|
7
|
+
mutation CreateLabSessionByTemplateId($templateId: String!, $userId: String!, $articleId: String!, $typeLabSessionCode: String!) {
|
|
8
|
+
createLabSessionByTemplateId(templateId: $templateId, userId: $userId, articleId: $articleId, typeLabSessionCode: $typeLabSessionCode) {
|
|
19
9
|
labSessionId
|
|
20
10
|
userId
|
|
21
11
|
typeLabSession
|
|
@@ -44,16 +34,8 @@ exports.CREATE_LAB_SESSION_BY_TEMPLATE_ID = (0, graphql_tag_1.gql) `
|
|
|
44
34
|
`;
|
|
45
35
|
// Tạo phiên thực hành con từ phiên thực hành chính
|
|
46
36
|
exports.CREATE_LAB_SESSION_BY_LAB_SESSION_ID = (0, graphql_tag_1.gql) `
|
|
47
|
-
mutation CreateLabSessionByLabSessionId(
|
|
48
|
-
$labSessionId:
|
|
49
|
-
$userId: String!
|
|
50
|
-
$articleId: String!
|
|
51
|
-
) {
|
|
52
|
-
createLabSessionByLabSessionId(
|
|
53
|
-
labSessionId: $labSessionId
|
|
54
|
-
userId: $userId
|
|
55
|
-
articleId: $articleId
|
|
56
|
-
) {
|
|
37
|
+
mutation CreateLabSessionByLabSessionId($labSessionId: String!, $userId: String!, $articleId: String!) {
|
|
38
|
+
createLabSessionByLabSessionId(labSessionId: $labSessionId, userId: $userId, articleId: $articleId) {
|
|
57
39
|
labSessionId
|
|
58
40
|
userId
|
|
59
41
|
typeLabSession
|
|
@@ -82,16 +64,8 @@ exports.CREATE_LAB_SESSION_BY_LAB_SESSION_ID = (0, graphql_tag_1.gql) `
|
|
|
82
64
|
`;
|
|
83
65
|
// Tạo phiên thực hành từ computing của khách hàng
|
|
84
66
|
exports.CREATE_LAB_SESSION_BY_COMPUTING_ID = (0, graphql_tag_1.gql) `
|
|
85
|
-
mutation CreateLabSessionByComputingId(
|
|
86
|
-
$computingId:
|
|
87
|
-
$userId: String!
|
|
88
|
-
$articleId: String!
|
|
89
|
-
) {
|
|
90
|
-
createLabSessionByComputingId(
|
|
91
|
-
computingId: $computingId
|
|
92
|
-
userId: $userId
|
|
93
|
-
articleId: $articleId
|
|
94
|
-
) {
|
|
67
|
+
mutation CreateLabSessionByComputingId($computingId: String!, $userId: String!, $articleId: String!) {
|
|
68
|
+
createLabSessionByComputingId(computingId: $computingId, userId: $userId, articleId: $articleId) {
|
|
95
69
|
labSessionId
|
|
96
70
|
userId
|
|
97
71
|
typeLabSession
|
|
@@ -129,11 +103,7 @@ exports.UPDATE_END_TIME_LAB_SESSION = (0, graphql_tag_1.gql) `
|
|
|
129
103
|
`;
|
|
130
104
|
// Dừng thực hành
|
|
131
105
|
exports.STOP_LAB_SESSION = (0, graphql_tag_1.gql) `
|
|
132
|
-
mutation StopLabSession(
|
|
133
|
-
$labSessionId: String!
|
|
134
|
-
$userId: String!
|
|
135
|
-
$note: String
|
|
136
|
-
) {
|
|
106
|
+
mutation StopLabSession($labSessionId: String!, $userId: String!, $note: String) {
|
|
137
107
|
stopLabSession(labSessionId: $labSessionId, userId: $userId, note: $note) {
|
|
138
108
|
status
|
|
139
109
|
message
|
|
@@ -141,16 +111,8 @@ exports.STOP_LAB_SESSION = (0, graphql_tag_1.gql) `
|
|
|
141
111
|
}
|
|
142
112
|
`;
|
|
143
113
|
exports.UPDATE_TYPE_LAB_SESSION = (0, graphql_tag_1.gql) `
|
|
144
|
-
mutation StopLabSession(
|
|
145
|
-
$labSessionId:
|
|
146
|
-
$typeLabSessionCode: String!
|
|
147
|
-
$userId: String!
|
|
148
|
-
) {
|
|
149
|
-
updateTypeLabSession(
|
|
150
|
-
labSessionId: $labSessionId
|
|
151
|
-
typeLabSessionCode: $typeLabSessionCode
|
|
152
|
-
userId: $userId
|
|
153
|
-
) {
|
|
114
|
+
mutation StopLabSession($labSessionId: String!, $typeLabSessionCode: String!, $userId: String!) {
|
|
115
|
+
updateTypeLabSession(labSessionId: $labSessionId, typeLabSessionCode: $typeLabSessionCode, userId: $userId) {
|
|
154
116
|
status
|
|
155
117
|
message
|
|
156
118
|
}
|
|
@@ -158,14 +120,60 @@ exports.UPDATE_TYPE_LAB_SESSION = (0, graphql_tag_1.gql) `
|
|
|
158
120
|
`;
|
|
159
121
|
// Dừng thực hành
|
|
160
122
|
exports.STOP_LAB_SESSION_FOR_CUSTOMER = (0, graphql_tag_1.gql) `
|
|
161
|
-
mutation StopLabSessionForCustomer(
|
|
162
|
-
$labSessionId: String!
|
|
163
|
-
$userId: String!
|
|
164
|
-
$note: String
|
|
165
|
-
) {
|
|
123
|
+
mutation StopLabSessionForCustomer($labSessionId: String!, $userId: String!, $note: String) {
|
|
166
124
|
stopLabSessionForCustomer(labSessionId: $labSessionId, userId: $userId, note: $note) {
|
|
167
125
|
status
|
|
168
126
|
message
|
|
169
127
|
}
|
|
170
128
|
}
|
|
171
129
|
`;
|
|
130
|
+
const CREATE_COMPUTING_LAB_BY_TEMPLATE_ID = (fields = []) => {
|
|
131
|
+
const fieldStr = fields.join("\n ");
|
|
132
|
+
const hasFields = fields.length > 0;
|
|
133
|
+
return (0, graphql_tag_1.gql) `
|
|
134
|
+
mutation createComputingLabByTemplateId(
|
|
135
|
+
$templateId: String!
|
|
136
|
+
$userId: String!
|
|
137
|
+
$productId: String!
|
|
138
|
+
$province: String!
|
|
139
|
+
$timeUse: BigDecimal!
|
|
140
|
+
$createBy: String!
|
|
141
|
+
$price: BigDecimal
|
|
142
|
+
){
|
|
143
|
+
createComputingLabByTemplateId (
|
|
144
|
+
templateId: $templateId
|
|
145
|
+
userId: $userId
|
|
146
|
+
productId: $productId
|
|
147
|
+
province: $province
|
|
148
|
+
timeUse: $timeUse
|
|
149
|
+
createBy: $createBy
|
|
150
|
+
price: $price
|
|
151
|
+
)
|
|
152
|
+
${hasFields ? `{ ${fieldStr} }` : ""}
|
|
153
|
+
} `;
|
|
154
|
+
};
|
|
155
|
+
exports.CREATE_COMPUTING_LAB_BY_TEMPLATE_ID = CREATE_COMPUTING_LAB_BY_TEMPLATE_ID;
|
|
156
|
+
exports.REMOVE_COMPUTING_LAB = (0, graphql_tag_1.gql) `
|
|
157
|
+
mutation RemoveComputingLab($partnerId: String!, $userId: String!, $computingId: String!, $updateBy: String!) {
|
|
158
|
+
removeComputingLab(partnerId: $partnerId, userId: $userId, computingId: $computingId, updateBy: $updateBy) {
|
|
159
|
+
status
|
|
160
|
+
message
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
`;
|
|
164
|
+
exports.OFF_COMPUTING_LAB = (0, graphql_tag_1.gql) `
|
|
165
|
+
mutation OffComputingLab($partnerId: String!, $userId: String!, $computingId: String!, $timeUse: BigDecimal!, $updateBy: String!) {
|
|
166
|
+
offComputingLab(partnerId: $partnerId, userId: $userId, computingId: $computingId, timeUse: $timeUse, updateBy: $updateBy) {
|
|
167
|
+
status
|
|
168
|
+
message
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
`;
|
|
172
|
+
exports.ON_COMPUTING_LAB = (0, graphql_tag_1.gql) `
|
|
173
|
+
mutation OnComputingLab($partnerId: String!, $userId: String!, $computingId: String!, $timeUse: BigDecimal!, $updateBy: String!, $price: BigDecimal) {
|
|
174
|
+
onComputingLab(partnerId: $partnerId, userId: $userId, computingId: $computingId, timeUse: $timeUse, updateBy: $updateBy, price: $price) {
|
|
175
|
+
status
|
|
176
|
+
message
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
`;
|
|
@@ -5,3 +5,6 @@ export declare const GET_LAB_SESSIONS_BY_USER_ID: DocumentNode;
|
|
|
5
5
|
export declare const GET_LAB_SESSIONS_BY_USER_ID_AND_ARTICLE_ID: DocumentNode;
|
|
6
6
|
export declare const GET_LAB_SESSIONS_CHILL_BY_PARENT: DocumentNode;
|
|
7
7
|
export declare const GET_LAB_DOING_AND_DONE_BY_USERID: (fields?: string[]) => DocumentNode;
|
|
8
|
+
export declare const CALCULATE_COMPUTING_LAB_ACTION_PRICING: (fields?: string[]) => DocumentNode;
|
|
9
|
+
export declare const GET_SESSION_LAB: (fields?: string[]) => DocumentNode;
|
|
10
|
+
export declare const FILTER_COMPUTING_LAB: (fields?: string[]) => DocumentNode;
|