@longvansoftware/service-js-client 2.7.1 → 2.7.3
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/auth/queries.js +16 -0
- package/dist/src/graphql/campaign/queries.d.ts +11 -13
- package/dist/src/graphql/campaign/queries.js +111 -39
- package/dist/src/graphql/crm_camping/queries.js +1 -0
- 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/auth/index.d.ts +4 -4
- package/dist/src/lib/auth/index.js +17 -9
- 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
|
@@ -78,11 +78,15 @@ exports.GET_ACCESS_TOKEN_BY_OTP = (0, graphql_tag_1.gql) `
|
|
|
78
78
|
$otpCode: String!
|
|
79
79
|
$phone: String!
|
|
80
80
|
$channelType: String
|
|
81
|
+
$appId: String
|
|
82
|
+
$deviceId: String
|
|
81
83
|
) {
|
|
82
84
|
getAccessTokenByOTP(
|
|
83
85
|
otpCode: $otpCode
|
|
84
86
|
phone: $phone
|
|
85
87
|
channelType: $channelType
|
|
88
|
+
appId: $appId
|
|
89
|
+
deviceId: $deviceId
|
|
86
90
|
)
|
|
87
91
|
}
|
|
88
92
|
`;
|
|
@@ -141,6 +145,8 @@ exports.LOGIN_GOOGLE = (0, graphql_tag_1.gql) `
|
|
|
141
145
|
$redirectUrl: String!
|
|
142
146
|
$redirectUrlError: String
|
|
143
147
|
$serviceOperator: String
|
|
148
|
+
$appId: String
|
|
149
|
+
$deviceId: String
|
|
144
150
|
) {
|
|
145
151
|
loginGoogle(
|
|
146
152
|
orgId: $orgId
|
|
@@ -148,6 +154,8 @@ exports.LOGIN_GOOGLE = (0, graphql_tag_1.gql) `
|
|
|
148
154
|
redirectUrl: $redirectUrl
|
|
149
155
|
redirectUrlError: $redirectUrlError
|
|
150
156
|
serviceOperator: $serviceOperator
|
|
157
|
+
appId: $appId
|
|
158
|
+
deviceId: $deviceId
|
|
151
159
|
)
|
|
152
160
|
}
|
|
153
161
|
`;
|
|
@@ -158,6 +166,8 @@ exports.LOGIN_FACEBOOK = (0, graphql_tag_1.gql) `
|
|
|
158
166
|
$redirectUrl: String!
|
|
159
167
|
$redirectUrlError: String
|
|
160
168
|
$serviceOperator: String
|
|
169
|
+
$appId: String
|
|
170
|
+
$deviceId: String
|
|
161
171
|
) {
|
|
162
172
|
loginFacebook(
|
|
163
173
|
orgId: $orgId
|
|
@@ -165,6 +175,8 @@ exports.LOGIN_FACEBOOK = (0, graphql_tag_1.gql) `
|
|
|
165
175
|
redirectUrl: $redirectUrl
|
|
166
176
|
redirectUrlError: $redirectUrlError
|
|
167
177
|
serviceOperator: $serviceOperator
|
|
178
|
+
appId: $appId
|
|
179
|
+
deviceId: $deviceId
|
|
168
180
|
)
|
|
169
181
|
}
|
|
170
182
|
`;
|
|
@@ -175,6 +187,8 @@ exports.LOGIN_ZALO = (0, graphql_tag_1.gql) `
|
|
|
175
187
|
$redirectUrl: String!
|
|
176
188
|
$redirectUrlError: String
|
|
177
189
|
$serviceOperator: String
|
|
190
|
+
$appId: String
|
|
191
|
+
$deviceId: String
|
|
178
192
|
) {
|
|
179
193
|
loginZalo(
|
|
180
194
|
orgId: $orgId
|
|
@@ -182,6 +196,8 @@ exports.LOGIN_ZALO = (0, graphql_tag_1.gql) `
|
|
|
182
196
|
redirectUrl: $redirectUrl
|
|
183
197
|
redirectUrlError: $redirectUrlError
|
|
184
198
|
serviceOperator: $serviceOperator
|
|
199
|
+
appId: $appId
|
|
200
|
+
deviceId: $deviceId
|
|
185
201
|
)
|
|
186
202
|
}
|
|
187
203
|
`;
|
|
@@ -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
|
-
`;
|
|
@@ -39,7 +39,7 @@ export declare class AuthService extends Service {
|
|
|
39
39
|
getUserLoginsByPartyId(partyId: string): Promise<any>;
|
|
40
40
|
sendOTP(phone: string, channelType: string | null): Promise<any>;
|
|
41
41
|
validateOTP(otpCode: string, phone: string, channelType: string | null): Promise<any>;
|
|
42
|
-
getAccessTokenByOTP(otpCode: string, phone: string, channelType: string | null): Promise<any>;
|
|
42
|
+
getAccessTokenByOTP(otpCode: string, phone: string, channelType: string | null, appId?: string, deviceId?: string): Promise<any>;
|
|
43
43
|
createUserLogin(userLoginId: string): Promise<any>;
|
|
44
44
|
createUserDetailWithoutUserLogin(name: string, phone: string, email: string): Promise<any>;
|
|
45
45
|
getPhoneByPartyId(partyId: string): Promise<any>;
|
|
@@ -51,8 +51,8 @@ export declare class AuthService extends Service {
|
|
|
51
51
|
checkEnabled2FA(partyId: string, fields: string[]): Promise<any>;
|
|
52
52
|
logout(accessToken: string, partyId: string): Promise<any>;
|
|
53
53
|
resetPassword(username: string, newPassword: string, accessToken: string): Promise<any>;
|
|
54
|
-
loginGoogle(redirectUrl: string, redirectUrlError?: string, serviceOperator?: string): Promise<any>;
|
|
55
|
-
loginFacebook(redirectUrl: string, redirectUrlError?: string, serviceOperator?: string): Promise<any>;
|
|
54
|
+
loginGoogle(redirectUrl: string, redirectUrlError?: string, serviceOperator?: string, appId?: string, deviceId?: string): Promise<any>;
|
|
55
|
+
loginFacebook(redirectUrl: string, redirectUrlError?: string, serviceOperator?: string, appId?: string, deviceId?: string): Promise<any>;
|
|
56
56
|
/**
|
|
57
57
|
* Logs in a user via Zalo by executing a GraphQL query.
|
|
58
58
|
*
|
|
@@ -60,5 +60,5 @@ export declare class AuthService extends Service {
|
|
|
60
60
|
* @returns A promise that resolves to the result of the `loginZalo` GraphQL query.
|
|
61
61
|
* @throws Will throw an error if the GraphQL query fails.
|
|
62
62
|
*/
|
|
63
|
-
loginZalo(redirectUrl: string, redirectUrlError?: string, serviceOperator?: string): Promise<any>;
|
|
63
|
+
loginZalo(redirectUrl: string, redirectUrlError?: string, serviceOperator?: string, appId?: string, deviceId?: string): Promise<any>;
|
|
64
64
|
}
|
|
@@ -40,7 +40,7 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
40
40
|
login(loginRequest) {
|
|
41
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
42
|
const variables = {
|
|
43
|
-
loginRequest: Object.assign({ orgId: this.orgId }, loginRequest),
|
|
43
|
+
loginRequest: Object.assign({ orgId: this.orgId, appId: "LONGVAN_USI" }, loginRequest),
|
|
44
44
|
};
|
|
45
45
|
const data = yield this.graphqlMutation(mutations_1.LOGIN_MUTATION, variables);
|
|
46
46
|
return data.login;
|
|
@@ -306,13 +306,15 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
306
306
|
}
|
|
307
307
|
});
|
|
308
308
|
}
|
|
309
|
-
getAccessTokenByOTP(
|
|
310
|
-
return __awaiter(this,
|
|
309
|
+
getAccessTokenByOTP(otpCode_1, phone_1, channelType_1) {
|
|
310
|
+
return __awaiter(this, arguments, void 0, function* (otpCode, phone, channelType, appId = "LONGVAN_USI", deviceId) {
|
|
311
311
|
const mutation = queries_1.GET_ACCESS_TOKEN_BY_OTP;
|
|
312
312
|
const variables = {
|
|
313
313
|
otpCode,
|
|
314
314
|
phone,
|
|
315
315
|
channelType,
|
|
316
|
+
appId,
|
|
317
|
+
deviceId,
|
|
316
318
|
};
|
|
317
319
|
try {
|
|
318
320
|
const response = yield this.graphqlMutation(mutation, variables);
|
|
@@ -515,8 +517,8 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
515
517
|
}
|
|
516
518
|
});
|
|
517
519
|
}
|
|
518
|
-
loginGoogle(
|
|
519
|
-
return __awaiter(this,
|
|
520
|
+
loginGoogle(redirectUrl_1, redirectUrlError_1, serviceOperator_1) {
|
|
521
|
+
return __awaiter(this, arguments, void 0, function* (redirectUrl, redirectUrlError, serviceOperator, appId = "LONGVAN_USI", deviceId) {
|
|
520
522
|
const query = queries_1.LOGIN_GOOGLE;
|
|
521
523
|
const variables = {
|
|
522
524
|
orgId: this.orgId,
|
|
@@ -524,6 +526,8 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
524
526
|
redirectUrl,
|
|
525
527
|
serviceOperator,
|
|
526
528
|
redirectUrlError,
|
|
529
|
+
appId,
|
|
530
|
+
deviceId,
|
|
527
531
|
};
|
|
528
532
|
try {
|
|
529
533
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -535,8 +539,8 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
535
539
|
}
|
|
536
540
|
});
|
|
537
541
|
}
|
|
538
|
-
loginFacebook(
|
|
539
|
-
return __awaiter(this,
|
|
542
|
+
loginFacebook(redirectUrl_1, redirectUrlError_1, serviceOperator_1) {
|
|
543
|
+
return __awaiter(this, arguments, void 0, function* (redirectUrl, redirectUrlError, serviceOperator, appId = "LONGVAN_USI", deviceId) {
|
|
540
544
|
const query = queries_1.LOGIN_FACEBOOK;
|
|
541
545
|
const variables = {
|
|
542
546
|
orgId: this.orgId,
|
|
@@ -544,6 +548,8 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
544
548
|
redirectUrl,
|
|
545
549
|
serviceOperator,
|
|
546
550
|
redirectUrlError,
|
|
551
|
+
appId,
|
|
552
|
+
deviceId,
|
|
547
553
|
};
|
|
548
554
|
try {
|
|
549
555
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -562,8 +568,8 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
562
568
|
* @returns A promise that resolves to the result of the `loginZalo` GraphQL query.
|
|
563
569
|
* @throws Will throw an error if the GraphQL query fails.
|
|
564
570
|
*/
|
|
565
|
-
loginZalo(
|
|
566
|
-
return __awaiter(this,
|
|
571
|
+
loginZalo(redirectUrl_1, redirectUrlError_1, serviceOperator_1) {
|
|
572
|
+
return __awaiter(this, arguments, void 0, function* (redirectUrl, redirectUrlError, serviceOperator, appId = "LONGVAN_USI", deviceId) {
|
|
567
573
|
const query = queries_1.LOGIN_ZALO;
|
|
568
574
|
const variables = {
|
|
569
575
|
orgId: this.orgId,
|
|
@@ -571,6 +577,8 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
571
577
|
redirectUrl,
|
|
572
578
|
serviceOperator,
|
|
573
579
|
redirectUrlError,
|
|
580
|
+
appId,
|
|
581
|
+
deviceId,
|
|
574
582
|
};
|
|
575
583
|
try {
|
|
576
584
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -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
|
}
|