@longvansoftware/service-js-client 2.8.1 → 2.8.2
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.js +1 -1
- package/dist/src/graphql/campaign/queries.d.ts +11 -13
- package/dist/src/graphql/campaign/queries.js +111 -39
- package/dist/src/graphql/paymentV2/mutations.d.ts +0 -1
- package/dist/src/graphql/paymentV2/mutations.js +1 -15
- package/dist/src/graphql/paymentV2/queries.d.ts +0 -2
- package/dist/src/graphql/paymentV2/queries.js +1 -58
- package/dist/src/lib/campaign/index.d.ts +0 -1
- package/dist/src/lib/campaign/index.js +12 -69
- package/dist/src/lib/paymentV2/index.d.ts +0 -10
- package/dist/src/lib/paymentV2/index.js +0 -39
- package/dist/src/lib/portal/index.d.ts +0 -3
- package/dist/src/lib/portal/index.js +0 -50
- package/dist/src/lib/service.d.ts +14 -0
- package/dist/src/lib/service.js +101 -0
- package/dist/src/utils/build-field-string.d.ts +1 -0
- package/dist/src/utils/build-field-string.js +16 -0
- package/package.json +1 -1
- package/dist/src/graphql/marketplace/mutations.d.ts +0 -3
- package/dist/src/graphql/marketplace/mutations.js +0 -54
- package/dist/src/graphql/marketplace/queries.d.ts +0 -2
- package/dist/src/graphql/marketplace/queries.js +0 -42
- package/dist/src/graphql/storefont/mutation.d.ts +0 -0
- package/dist/src/graphql/storefont/mutation.js +0 -1
- package/dist/src/graphql/storefont/queries.d.ts +0 -2
- package/dist/src/graphql/storefont/queries.js +0 -46
- package/dist/src/graphql/tag/mutations.d.ts +0 -2
- package/dist/src/graphql/tag/mutations.js +0 -44
- package/dist/src/graphql/tag/queries.d.ts +0 -1
- package/dist/src/graphql/tag/queries.js +0 -20
- package/dist/src/lib/marketplace/index.d.ts +0 -9
- package/dist/src/lib/marketplace/index.js +0 -106
- package/dist/src/lib/storefont/index.d.ts +0 -6
- package/dist/src/lib/storefont/index.js +0 -51
- package/dist/src/lib/tag/index.d.ts +0 -7
- package/dist/src/lib/tag/index.js +0 -61
package/dist/config/config.js
CHANGED
|
@@ -6,7 +6,7 @@ exports.environmentEndpoints = {
|
|
|
6
6
|
product: "https://api-gateway.longvan.dev/product-service/graphql",
|
|
7
7
|
crm: "https://api-gateway.longvan.dev/crm-graph-gateway/graphql",
|
|
8
8
|
auth: "https://api-gateway.longvan.dev/authorization-gateway/graphql",
|
|
9
|
-
order: "https://api-gateway.longvan.dev/v2",
|
|
9
|
+
order: "https://api-gateway.longvan.dev/storefront-service/v2",
|
|
10
10
|
user: "https://api-gateway.longvan.dev/user-gateway/graphql",
|
|
11
11
|
payment: "https://api-gateway.longvan.dev/invoice-gateway/graphql",
|
|
12
12
|
service: "https://api-gateway.longvan.dev/service-api/graphql",
|
|
@@ -1,13 +1,11 @@
|
|
|
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
|
|
12
|
-
export declare const SEARCH_PRODUCT_PRICE_PROMOTION_RESPONSE: DocumentNode;
|
|
13
|
-
export declare const GET_VOUCHER_FOR_USER: (fields?: string[]) => DocumentNode;
|
|
1
|
+
export declare const GET_CAMPAIGN_ACTION_ACTIVE_NOW: import("graphql").DocumentNode;
|
|
2
|
+
export declare const GET_VOUCHERS: import("graphql").DocumentNode;
|
|
3
|
+
export declare const CHECK_VALID_VOUCHER: import("graphql").DocumentNode;
|
|
4
|
+
export declare const GET_CAMPAIGN_ACTIVE_NOW: import("graphql").DocumentNode;
|
|
5
|
+
export declare const GET_PROMOTION_PRODUCT_PRICE: import("graphql").DocumentNode;
|
|
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;
|
|
9
|
+
export declare const SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE: import("graphql").DocumentNode;
|
|
10
|
+
export declare const GET_CAMPAIGN: import("graphql").DocumentNode;
|
|
11
|
+
export declare const SEARCH_PRODUCT_PRICE_PROMOTION_RESPONSE: import("graphql").DocumentNode;
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
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;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
-
const helpers_1 = require("../../utils/helpers");
|
|
6
5
|
exports.GET_CAMPAIGN_ACTION_ACTIVE_NOW = (0, graphql_tag_1.gql) `
|
|
7
|
-
query GetCampaignActionActiveNow(
|
|
8
|
-
|
|
6
|
+
query GetCampaignActionActiveNow(
|
|
7
|
+
$partyId: String!
|
|
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
|
+
) {
|
|
9
20
|
campaignId
|
|
10
21
|
campaignName
|
|
11
22
|
statusCampaign
|
|
@@ -55,6 +66,7 @@ exports.GET_VOUCHERS = (0, graphql_tag_1.gql) `
|
|
|
55
66
|
size
|
|
56
67
|
empty
|
|
57
68
|
content {
|
|
69
|
+
campaignActionId
|
|
58
70
|
campaignId
|
|
59
71
|
partyId
|
|
60
72
|
voucherCode
|
|
@@ -62,12 +74,8 @@ exports.GET_VOUCHERS = (0, graphql_tag_1.gql) `
|
|
|
62
74
|
status
|
|
63
75
|
discountAmount
|
|
64
76
|
discountPercent
|
|
65
|
-
discountType
|
|
66
77
|
usageLimitPerVoucher
|
|
67
78
|
maximumDiscount
|
|
68
|
-
maximumDiscountType
|
|
69
|
-
minimumSpend
|
|
70
|
-
maximumSpend
|
|
71
79
|
numberOfTimeUsed
|
|
72
80
|
id
|
|
73
81
|
createdStamp
|
|
@@ -76,23 +84,25 @@ exports.GET_VOUCHERS = (0, graphql_tag_1.gql) `
|
|
|
76
84
|
createdBy
|
|
77
85
|
isBirthday
|
|
78
86
|
customerId
|
|
79
|
-
scope
|
|
80
|
-
affiliateId
|
|
81
|
-
description
|
|
82
|
-
expiryDate
|
|
83
|
-
customAttribute
|
|
84
|
-
assignUserLimit
|
|
85
|
-
ownerPartyId
|
|
86
|
-
migratedFromReferralId
|
|
87
|
-
campaignActionId
|
|
88
|
-
discountValue
|
|
89
87
|
}
|
|
90
88
|
}
|
|
91
89
|
}
|
|
92
90
|
`;
|
|
93
91
|
exports.CHECK_VALID_VOUCHER = (0, graphql_tag_1.gql) `
|
|
94
|
-
query CheckValidVoucher(
|
|
95
|
-
|
|
92
|
+
query CheckValidVoucher(
|
|
93
|
+
$partyId: String
|
|
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
|
+
) {
|
|
96
106
|
campaignActionId
|
|
97
107
|
campaignId
|
|
98
108
|
partyId
|
|
@@ -113,8 +123,20 @@ exports.CHECK_VALID_VOUCHER = (0, graphql_tag_1.gql) `
|
|
|
113
123
|
}
|
|
114
124
|
`;
|
|
115
125
|
exports.GET_CAMPAIGN_ACTIVE_NOW = (0, graphql_tag_1.gql) `
|
|
116
|
-
query GetCampaignActiveNow(
|
|
117
|
-
|
|
126
|
+
query GetCampaignActiveNow(
|
|
127
|
+
$partyId: String!
|
|
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
|
+
) {
|
|
118
140
|
campaign {
|
|
119
141
|
id
|
|
120
142
|
createdStamp
|
|
@@ -157,8 +179,18 @@ exports.GET_CAMPAIGN_ACTIVE_NOW = (0, graphql_tag_1.gql) `
|
|
|
157
179
|
}
|
|
158
180
|
`;
|
|
159
181
|
exports.GET_PROMOTION_PRODUCT_PRICE = (0, graphql_tag_1.gql) `
|
|
160
|
-
query GetPromotionProductPrice(
|
|
161
|
-
|
|
182
|
+
query GetPromotionProductPrice(
|
|
183
|
+
$partyId: String!
|
|
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
|
+
) {
|
|
162
194
|
campaignId
|
|
163
195
|
campaignName
|
|
164
196
|
statusCampaign
|
|
@@ -178,7 +210,15 @@ exports.GET_PROMOTION_PRODUCT_PRICE = (0, graphql_tag_1.gql) `
|
|
|
178
210
|
}
|
|
179
211
|
`;
|
|
180
212
|
exports.GET_VOUCHER_AVAILABLE_FOR_CUSTOMER = (0, graphql_tag_1.gql) `
|
|
181
|
-
query GetVoucherAvailableForCustomer(
|
|
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
|
+
) {
|
|
182
222
|
getVoucherAvailableForCustomer(
|
|
183
223
|
searchVoucherRequest: {
|
|
184
224
|
partyId: $partyId
|
|
@@ -223,9 +263,23 @@ exports.GET_VOUCHER_AVAILABLE_FOR_CUSTOMER = (0, graphql_tag_1.gql) `
|
|
|
223
263
|
}
|
|
224
264
|
`;
|
|
225
265
|
exports.SUGGEST_VOUCHER = (0, graphql_tag_1.gql) `
|
|
226
|
-
query SuggestVoucher(
|
|
266
|
+
query SuggestVoucher(
|
|
267
|
+
$partyId: String
|
|
268
|
+
$customerId: String
|
|
269
|
+
$excludeExpired: Boolean
|
|
270
|
+
$campaignId: String
|
|
271
|
+
$campaignActionId: String
|
|
272
|
+
$isBirthday: Boolean
|
|
273
|
+
) {
|
|
227
274
|
suggestVoucher(
|
|
228
|
-
searchVoucherRequest: {
|
|
275
|
+
searchVoucherRequest: {
|
|
276
|
+
partyId: $partyId
|
|
277
|
+
customerId: $customerId
|
|
278
|
+
excludeExpired: $excludeExpired
|
|
279
|
+
campaignId: $campaignId
|
|
280
|
+
campaignActionId: $campaignActionId
|
|
281
|
+
isBirthday: $isBirthday
|
|
282
|
+
}
|
|
229
283
|
) {
|
|
230
284
|
total
|
|
231
285
|
totalPages
|
|
@@ -315,8 +369,22 @@ exports.GET_CAMPAIGN_ACTION_BY_ID = (0, graphql_tag_1.gql) `
|
|
|
315
369
|
}
|
|
316
370
|
`;
|
|
317
371
|
exports.SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE = (0, graphql_tag_1.gql) `
|
|
318
|
-
query SearchProductGiftPromotionResponse(
|
|
319
|
-
|
|
372
|
+
query SearchProductGiftPromotionResponse(
|
|
373
|
+
$partyId: String!
|
|
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
|
+
) {
|
|
320
388
|
total
|
|
321
389
|
totalPages
|
|
322
390
|
totalElements
|
|
@@ -378,9 +446,21 @@ exports.GET_CAMPAIGN = (0, graphql_tag_1.gql) `
|
|
|
378
446
|
}
|
|
379
447
|
`;
|
|
380
448
|
exports.SEARCH_PRODUCT_PRICE_PROMOTION_RESPONSE = (0, graphql_tag_1.gql) `
|
|
381
|
-
query SearchProductPricePromotionResponse(
|
|
449
|
+
query SearchProductPricePromotionResponse(
|
|
450
|
+
$partyId: String!
|
|
451
|
+
$campaignId: String!
|
|
452
|
+
$campaignActionId: String
|
|
453
|
+
$statusActive: String
|
|
454
|
+
$sort: [BaseSortRequest]
|
|
455
|
+
) {
|
|
382
456
|
searchProductPricePromotionResponse(
|
|
383
|
-
searchProductPricePromotionRequest: {
|
|
457
|
+
searchProductPricePromotionRequest: {
|
|
458
|
+
partyId: $partyId
|
|
459
|
+
campaignId: $campaignId
|
|
460
|
+
campaignActionId: $campaignActionId
|
|
461
|
+
statusActive: $statusActive
|
|
462
|
+
sort: $sort
|
|
463
|
+
}
|
|
384
464
|
) {
|
|
385
465
|
content {
|
|
386
466
|
partyId
|
|
@@ -414,11 +494,3 @@ exports.SEARCH_PRODUCT_PRICE_PROMOTION_RESPONSE = (0, graphql_tag_1.gql) `
|
|
|
414
494
|
}
|
|
415
495
|
}
|
|
416
496
|
`;
|
|
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;
|
|
@@ -2,5 +2,4 @@ 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;
|
|
6
5
|
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.
|
|
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;
|
|
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,20 +89,6 @@ 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
|
-
`;
|
|
106
92
|
exports.HANDLE_CREATE_GATEWAY_CONFIG = (0, graphql_tag_1.gql) `
|
|
107
93
|
mutation HandleCreateGatewayConfig(
|
|
108
94
|
$input: PaymentGatewayConfigInput!
|
|
@@ -7,6 +7,4 @@ 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;
|
|
11
10
|
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.
|
|
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;
|
|
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,44 +255,6 @@ 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
|
-
`;
|
|
296
258
|
exports.GET_TRANSFER_INFO = (0, graphql_tag_1.gql) `
|
|
297
259
|
query GetTransferInfo(
|
|
298
260
|
$partnerId: String!
|
|
@@ -313,22 +275,3 @@ exports.GET_TRANSFER_INFO = (0, graphql_tag_1.gql) `
|
|
|
313
275
|
}
|
|
314
276
|
}
|
|
315
277
|
`;
|
|
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
|
-
`;
|
|
@@ -19,5 +19,4 @@ export declare class CampaignService extends Service {
|
|
|
19
19
|
searchProductGiftPromotionResponse(productIds: string[], campaignActionId: string): Promise<any>;
|
|
20
20
|
getCampaign(id: string): Promise<any>;
|
|
21
21
|
searchProductPricePromotionResponse(campaignId: string, campaignActionId: string, statusActive: string): Promise<any>;
|
|
22
|
-
voucherForUserRequest(orderId: string, customerId?: string, paymentMethodId?: string, shippingCompanyId?: string, pageNumber?: number, pageSize?: number, fields?: string[]): Promise<any>;
|
|
23
22
|
}
|
|
@@ -30,7 +30,7 @@ class CampaignService extends serviceSDK_1.Service {
|
|
|
30
30
|
partyId: this.orgId,
|
|
31
31
|
productStoreId: this.storeId,
|
|
32
32
|
customerId,
|
|
33
|
-
campaignActionType
|
|
33
|
+
campaignActionType,
|
|
34
34
|
};
|
|
35
35
|
try {
|
|
36
36
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -54,7 +54,7 @@ class CampaignService extends serviceSDK_1.Service {
|
|
|
54
54
|
customerId,
|
|
55
55
|
excludeExpired,
|
|
56
56
|
pageNumber,
|
|
57
|
-
pageSize
|
|
57
|
+
pageSize,
|
|
58
58
|
};
|
|
59
59
|
try {
|
|
60
60
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -73,7 +73,7 @@ class CampaignService extends serviceSDK_1.Service {
|
|
|
73
73
|
partyId: this.orgId,
|
|
74
74
|
productStoreId: this.storeId,
|
|
75
75
|
customerId,
|
|
76
|
-
voucherCode
|
|
76
|
+
voucherCode,
|
|
77
77
|
};
|
|
78
78
|
try {
|
|
79
79
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -92,7 +92,7 @@ class CampaignService extends serviceSDK_1.Service {
|
|
|
92
92
|
partyId: this.orgId,
|
|
93
93
|
productStoreId: this.storeId,
|
|
94
94
|
campaignActionType,
|
|
95
|
-
customerId
|
|
95
|
+
customerId,
|
|
96
96
|
};
|
|
97
97
|
try {
|
|
98
98
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -110,7 +110,7 @@ class CampaignService extends serviceSDK_1.Service {
|
|
|
110
110
|
partyId: this.orgId,
|
|
111
111
|
productStoreId: this.storeId,
|
|
112
112
|
productId,
|
|
113
|
-
productPrice
|
|
113
|
+
productPrice,
|
|
114
114
|
};
|
|
115
115
|
try {
|
|
116
116
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -131,7 +131,7 @@ class CampaignService extends serviceSDK_1.Service {
|
|
|
131
131
|
campaignActionId,
|
|
132
132
|
customerId,
|
|
133
133
|
excludeExpired,
|
|
134
|
-
isPageAble
|
|
134
|
+
isPageAble,
|
|
135
135
|
};
|
|
136
136
|
try {
|
|
137
137
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -149,7 +149,7 @@ class CampaignService extends serviceSDK_1.Service {
|
|
|
149
149
|
partyId: this.orgId,
|
|
150
150
|
voucherCode,
|
|
151
151
|
userId,
|
|
152
|
-
affiliateId
|
|
152
|
+
affiliateId,
|
|
153
153
|
};
|
|
154
154
|
try {
|
|
155
155
|
const response = yield this.graphqlMutation(query, variables);
|
|
@@ -169,7 +169,7 @@ class CampaignService extends serviceSDK_1.Service {
|
|
|
169
169
|
campaignId: campaignId,
|
|
170
170
|
campaignActionId: campaignActionId,
|
|
171
171
|
excludeExpired: true,
|
|
172
|
-
isBirthday: isBirthday
|
|
172
|
+
isBirthday: isBirthday,
|
|
173
173
|
};
|
|
174
174
|
try {
|
|
175
175
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -184,7 +184,7 @@ class CampaignService extends serviceSDK_1.Service {
|
|
|
184
184
|
return __awaiter(this, void 0, void 0, function* () {
|
|
185
185
|
const query = queries_1.GET_CAMPAIGN_ACTION_BY_ID;
|
|
186
186
|
const variables = {
|
|
187
|
-
id
|
|
187
|
+
id,
|
|
188
188
|
};
|
|
189
189
|
try {
|
|
190
190
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -203,7 +203,7 @@ class CampaignService extends serviceSDK_1.Service {
|
|
|
203
203
|
storeId: this.storeId,
|
|
204
204
|
productIds: productIds,
|
|
205
205
|
campaignActionId: campaignActionId,
|
|
206
|
-
sort: { asc: true, key: "createdStamp" }
|
|
206
|
+
sort: { asc: true, key: "createdStamp" },
|
|
207
207
|
};
|
|
208
208
|
try {
|
|
209
209
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -218,7 +218,7 @@ class CampaignService extends serviceSDK_1.Service {
|
|
|
218
218
|
return __awaiter(this, void 0, void 0, function* () {
|
|
219
219
|
const query = queries_1.GET_CAMPAIGN;
|
|
220
220
|
const variables = {
|
|
221
|
-
id
|
|
221
|
+
id,
|
|
222
222
|
};
|
|
223
223
|
try {
|
|
224
224
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -237,7 +237,7 @@ class CampaignService extends serviceSDK_1.Service {
|
|
|
237
237
|
campaignId,
|
|
238
238
|
campaignActionId,
|
|
239
239
|
statusActive,
|
|
240
|
-
sort: { asc: true, key: "productId" }
|
|
240
|
+
sort: { asc: true, key: "productId" },
|
|
241
241
|
};
|
|
242
242
|
try {
|
|
243
243
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -248,62 +248,5 @@ class CampaignService extends serviceSDK_1.Service {
|
|
|
248
248
|
}
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
|
-
voucherForUserRequest(orderId_1) {
|
|
252
|
-
return __awaiter(this, arguments, void 0, function* (orderId, customerId = "", paymentMethodId, shippingCompanyId, pageNumber = 0, pageSize = 20, fields = [
|
|
253
|
-
`content {
|
|
254
|
-
id
|
|
255
|
-
voucherCode
|
|
256
|
-
isBirthday
|
|
257
|
-
discountAmount
|
|
258
|
-
discountPercent
|
|
259
|
-
usageLimitPerVoucher
|
|
260
|
-
numberOfTimeUsed
|
|
261
|
-
maximumDiscount
|
|
262
|
-
maximumDiscountType
|
|
263
|
-
memberLevel
|
|
264
|
-
affiliateId
|
|
265
|
-
description
|
|
266
|
-
usageLimitType
|
|
267
|
-
minimumSpend
|
|
268
|
-
maximumSpend
|
|
269
|
-
expiryDate
|
|
270
|
-
isUsable
|
|
271
|
-
unusableReasons
|
|
272
|
-
remainingAmount
|
|
273
|
-
discountType
|
|
274
|
-
discountValue
|
|
275
|
-
ownerPartyId
|
|
276
|
-
rewardType
|
|
277
|
-
voucherType
|
|
278
|
-
}`,
|
|
279
|
-
"total",
|
|
280
|
-
"pageNumber",
|
|
281
|
-
"pageSize",
|
|
282
|
-
"totalPages",
|
|
283
|
-
"numberOfElements",
|
|
284
|
-
"first",
|
|
285
|
-
"last"
|
|
286
|
-
]) {
|
|
287
|
-
const query = (0, queries_1.GET_VOUCHER_FOR_USER)(fields);
|
|
288
|
-
const variables = {
|
|
289
|
-
voucherForUserRequest: {
|
|
290
|
-
orderId,
|
|
291
|
-
customerId,
|
|
292
|
-
storeId: this.storeId,
|
|
293
|
-
paymentMethodId,
|
|
294
|
-
shippingCompanyId,
|
|
295
|
-
pageNumber,
|
|
296
|
-
pageSize
|
|
297
|
-
}
|
|
298
|
-
};
|
|
299
|
-
try {
|
|
300
|
-
const res = yield this.graphqlQuery(query, variables);
|
|
301
|
-
return res.getVouchersForUser;
|
|
302
|
-
}
|
|
303
|
-
catch (error) {
|
|
304
|
-
throw error;
|
|
305
|
-
}
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
251
|
}
|
|
309
252
|
exports.CampaignService = CampaignService;
|
|
@@ -16,14 +16,4 @@ export declare class PaymentServiceV2 extends Service {
|
|
|
16
16
|
getPaymentGatewaysByMethodCode(methodCode: string): Promise<any>;
|
|
17
17
|
getPaymentMethodTypesV2(storeActive: any, allMethodTypes: boolean): Promise<any>;
|
|
18
18
|
getTransferInfo(storeId: string, paymentId: string): Promise<any>;
|
|
19
|
-
createPayment(paymentData: {
|
|
20
|
-
totalAmount: number;
|
|
21
|
-
storeID: string;
|
|
22
|
-
partnerCode: string;
|
|
23
|
-
methodCode: string;
|
|
24
|
-
phone?: string;
|
|
25
|
-
email?: string;
|
|
26
|
-
}): Promise<any>;
|
|
27
|
-
paymentMethodsByPartner(partnerCode?: string): Promise<any>;
|
|
28
|
-
getPaymentMethodTypesWithGatewayConfig(partnerId?: string, storeId?: string): Promise<any>;
|
|
29
19
|
}
|
|
@@ -260,44 +260,5 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
|
|
|
260
260
|
}
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
|
-
createPayment(paymentData) {
|
|
264
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
265
|
-
const mutation = mutations_1.CREATE_PAYMENT;
|
|
266
|
-
const variables = { paymentData };
|
|
267
|
-
try {
|
|
268
|
-
const response = yield this.graphqlMutationV3(mutation, variables);
|
|
269
|
-
return response.createPayment;
|
|
270
|
-
}
|
|
271
|
-
catch (error) {
|
|
272
|
-
throw error;
|
|
273
|
-
}
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
paymentMethodsByPartner(partnerCode) {
|
|
277
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
278
|
-
const query = queries_1.PAYMENT_METHODS_BY_PARTNER;
|
|
279
|
-
const variables = { partnerCode };
|
|
280
|
-
try {
|
|
281
|
-
const response = yield this.graphqlQueryV3(query, variables);
|
|
282
|
-
return response.paymentMethods;
|
|
283
|
-
}
|
|
284
|
-
catch (error) {
|
|
285
|
-
throw error;
|
|
286
|
-
}
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
getPaymentMethodTypesWithGatewayConfig(partnerId, storeId) {
|
|
290
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
291
|
-
const query = queries_1.GET_PAYMENT_METHOD_TYPES_WITH_GATEWAY_CONFIG;
|
|
292
|
-
const variables = { partnerId, storeId };
|
|
293
|
-
try {
|
|
294
|
-
const response = yield this.graphqlQueryV3(query, variables);
|
|
295
|
-
return response.getPaymentMethodTypes;
|
|
296
|
-
}
|
|
297
|
-
catch (error) {
|
|
298
|
-
throw error;
|
|
299
|
-
}
|
|
300
|
-
});
|
|
301
|
-
}
|
|
302
263
|
}
|
|
303
264
|
exports.PaymentServiceV2 = PaymentServiceV2;
|
|
@@ -30,7 +30,4 @@ export declare class PortalService extends Service {
|
|
|
30
30
|
getPosition(query?: Record<string, any>): Promise<any>;
|
|
31
31
|
getPositionForTime(query?: Record<string, any>): Promise<any>;
|
|
32
32
|
getBookingCount(query?: Record<string, any>): Promise<any>;
|
|
33
|
-
getSlugPathFromDynamicFrom(query?: Record<string, any>): Promise<any>;
|
|
34
|
-
putSlugPathFromDynamicFrom(data: any): Promise<any>;
|
|
35
|
-
postSlugPathFromDynamicFrom(data: any): Promise<any>;
|
|
36
33
|
}
|