@longvansoftware/service-js-client 2.8.7 → 2.8.9
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 +4 -2
- package/dist/src/graphql/campaign/queries.d.ts +13 -11
- package/dist/src/graphql/campaign/queries.js +39 -111
- package/dist/src/graphql/cashbook/mutation.d.ts +5 -0
- package/dist/src/graphql/cashbook/mutation.js +94 -0
- package/dist/src/graphql/cashbook/query.d.ts +3 -0
- package/dist/src/graphql/cashbook/query.js +27 -0
- package/dist/src/graphql/cloudCloud/mutations.d.ts +2 -0
- package/dist/src/graphql/cloudCloud/mutations.js +101 -27
- package/dist/src/graphql/cloudCloud/queries.js +4 -0
- package/dist/src/graphql/orderCloud/mutations.d.ts +3 -1
- package/dist/src/graphql/orderCloud/mutations.js +21 -5
- package/dist/src/graphql/paymentV2/mutations.d.ts +1 -0
- package/dist/src/graphql/paymentV2/mutations.js +23 -37
- package/dist/src/graphql/paymentV2/queries.d.ts +2 -0
- package/dist/src/graphql/paymentV2/queries.js +58 -1
- package/dist/src/graphql/storefont/mutation.d.ts +4 -0
- package/dist/src/graphql/storefont/mutation.js +56 -0
- package/dist/src/graphql/storefont/queries.d.ts +5 -0
- package/dist/src/graphql/storefont/queries.js +106 -0
- package/dist/src/graphql/storefront/query.d.ts +3 -0
- package/dist/src/graphql/storefront/query.js +41 -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/SDK.d.ts +3 -0
- package/dist/src/lib/SDK.js +4 -0
- package/dist/src/lib/campaign/index.d.ts +1 -0
- package/dist/src/lib/campaign/index.js +69 -12
- package/dist/src/lib/cashbook/index.d.ts +23 -3
- package/dist/src/lib/cashbook/index.js +90 -20
- package/dist/src/lib/cloudCloud/index.d.ts +1 -0
- package/dist/src/lib/cloudCloud/index.js +16 -0
- package/dist/src/lib/imageGateway/index.d.ts +6 -0
- package/dist/src/lib/imageGateway/index.js +18 -0
- package/dist/src/lib/orderCloud/index.d.ts +2 -0
- package/dist/src/lib/orderCloud/index.js +47 -1
- package/dist/src/lib/paymentV2/index.d.ts +11 -1
- package/dist/src/lib/paymentV2/index.js +55 -14
- package/dist/src/lib/portal/index.d.ts +10 -2
- package/dist/src/lib/portal/index.js +171 -11
- package/dist/src/lib/storefont/index.d.ts +23 -0
- package/dist/src/lib/storefont/index.js +160 -0
- package/dist/src/lib/storefront/index.d.ts +2 -0
- package/dist/src/lib/storefront/index.js +39 -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
package/dist/config/config.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export declare const environmentEndpoints: {
|
|
|
25
25
|
marketplace: string;
|
|
26
26
|
storefront: string;
|
|
27
27
|
dynamic_collection: string;
|
|
28
|
+
cashbook: string;
|
|
28
29
|
};
|
|
29
30
|
live: {
|
|
30
31
|
product: string;
|
|
@@ -52,5 +53,6 @@ export declare const environmentEndpoints: {
|
|
|
52
53
|
marketplace: string;
|
|
53
54
|
storefront: string;
|
|
54
55
|
dynamic_collection: string;
|
|
56
|
+
cashbook: string;
|
|
55
57
|
};
|
|
56
58
|
};
|
package/dist/config/config.js
CHANGED
|
@@ -28,7 +28,8 @@ exports.environmentEndpoints = {
|
|
|
28
28
|
content_api: "https://api-gateway.longvan.dev/content-api/graphql",
|
|
29
29
|
marketplace: "https://api-gateway.longvan.dev/marketplace/graphql",
|
|
30
30
|
storefront: "https://api-gateway.longvan.dev/storefront-service/graphql",
|
|
31
|
-
dynamic_collection: "https://api-gateway.longvan.dev/dynamic-collection"
|
|
31
|
+
dynamic_collection: "https://api-gateway.longvan.dev/dynamic-collection",
|
|
32
|
+
cashbook: "https://api-gateway.longvan.dev/cashbook-service/graphql"
|
|
32
33
|
},
|
|
33
34
|
live: {
|
|
34
35
|
product: "https://product-service.longvan.vn/product-service/graphql",
|
|
@@ -56,6 +57,7 @@ exports.environmentEndpoints = {
|
|
|
56
57
|
content_api: "https://portal.longvan.vn/content-api/graphql",
|
|
57
58
|
marketplace: "https://api-gateway.longvan.vn/marketplace/graphql",
|
|
58
59
|
storefront: "https://api-gateway.longvan.vn/storefront-service/graphql",
|
|
59
|
-
dynamic_collection: "https://portal.longvan.vn/dynamic-collection"
|
|
60
|
+
dynamic_collection: "https://portal.longvan.vn/dynamic-collection",
|
|
61
|
+
cashbook: "https://api-gateway.longvan.dev/cashbook-service/graphql"
|
|
60
62
|
}
|
|
61
63
|
};
|
|
@@ -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,5 @@
|
|
|
1
|
+
import { DocumentNode } from "graphql";
|
|
2
|
+
export declare const CREATE_CASH_ACCOUNT_CUSTOMER: (fields?: string[]) => DocumentNode;
|
|
3
|
+
export declare const UPDATE_CASH_ACCOUNT_CUSTOMER: (fields?: string[]) => DocumentNode;
|
|
4
|
+
export declare const DELETE_CASH_ACCOUNT_CUSTOMER: (fields?: string[]) => DocumentNode;
|
|
5
|
+
export declare const CONFIRM_DELETE_CASH_ACCOUNT_CUSTOMER: (fields?: string[]) => DocumentNode;
|
|
@@ -0,0 +1,94 @@
|
|
|
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.CONFIRM_DELETE_CASH_ACCOUNT_CUSTOMER = exports.DELETE_CASH_ACCOUNT_CUSTOMER = exports.UPDATE_CASH_ACCOUNT_CUSTOMER = exports.CREATE_CASH_ACCOUNT_CUSTOMER = void 0;
|
|
7
|
+
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
+
const helpers_1 = require("../../utils/helpers");
|
|
9
|
+
const CREATE_CASH_ACCOUNT_CUSTOMER = (fields = []) => {
|
|
10
|
+
return (0, graphql_tag_1.default) `
|
|
11
|
+
mutation CreateCashAccountCustomer(
|
|
12
|
+
$partnerId: String!
|
|
13
|
+
$bankCode: String!
|
|
14
|
+
$name: String!
|
|
15
|
+
$accountNumber: String!
|
|
16
|
+
$typeCard: CardType!
|
|
17
|
+
$partyId: String!
|
|
18
|
+
) {
|
|
19
|
+
createCashAccountCustomer(
|
|
20
|
+
input: {
|
|
21
|
+
partnerId: $partnerId
|
|
22
|
+
bankCode: $bankCode
|
|
23
|
+
name: $name
|
|
24
|
+
accountNumber: $accountNumber
|
|
25
|
+
typeCard: $typeCard
|
|
26
|
+
partyId: $partyId
|
|
27
|
+
}
|
|
28
|
+
) ${(0, helpers_1.hasFields)(fields) ? `{ ${(0, helpers_1.joinField)(fields)} }` : ""}
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
};
|
|
32
|
+
exports.CREATE_CASH_ACCOUNT_CUSTOMER = CREATE_CASH_ACCOUNT_CUSTOMER;
|
|
33
|
+
const UPDATE_CASH_ACCOUNT_CUSTOMER = (fields = []) => {
|
|
34
|
+
return (0, graphql_tag_1.default) `
|
|
35
|
+
mutation UpdateCashAccountCustomer(
|
|
36
|
+
$id: ID!
|
|
37
|
+
$partnerId: String!
|
|
38
|
+
$bankCode: String
|
|
39
|
+
$name: String
|
|
40
|
+
$accountNumber: String
|
|
41
|
+
$typeCard: CardType
|
|
42
|
+
$isDefault: Boolean
|
|
43
|
+
$partyId: String!
|
|
44
|
+
) {
|
|
45
|
+
updateCashAccountCustomer(
|
|
46
|
+
input: {
|
|
47
|
+
id: $id
|
|
48
|
+
partnerId: $partnerId
|
|
49
|
+
bankCode: $bankCode
|
|
50
|
+
name: $name
|
|
51
|
+
accountNumber: $accountNumber
|
|
52
|
+
typeCard: $typeCard
|
|
53
|
+
isDefault: $isDefault
|
|
54
|
+
partyId: $partyId
|
|
55
|
+
}
|
|
56
|
+
) ${(0, helpers_1.hasFields)(fields) ? `{ ${(0, helpers_1.joinField)(fields)} }` : ""}
|
|
57
|
+
}
|
|
58
|
+
`;
|
|
59
|
+
};
|
|
60
|
+
exports.UPDATE_CASH_ACCOUNT_CUSTOMER = UPDATE_CASH_ACCOUNT_CUSTOMER;
|
|
61
|
+
const DELETE_CASH_ACCOUNT_CUSTOMER = (fields = []) => {
|
|
62
|
+
return (0, graphql_tag_1.default) `
|
|
63
|
+
mutation DeleteCashAccountCustomer(
|
|
64
|
+
$id: ID!
|
|
65
|
+
$partnerId: String!
|
|
66
|
+
$partyId: String!
|
|
67
|
+
) {
|
|
68
|
+
deleteCashAccountCustomer(
|
|
69
|
+
id: $id
|
|
70
|
+
partnerId: $partnerId
|
|
71
|
+
partyId: $partyId
|
|
72
|
+
) ${(0, helpers_1.hasFields)(fields) ? `{ ${(0, helpers_1.joinField)(fields)} }` : ""}
|
|
73
|
+
}
|
|
74
|
+
`;
|
|
75
|
+
};
|
|
76
|
+
exports.DELETE_CASH_ACCOUNT_CUSTOMER = DELETE_CASH_ACCOUNT_CUSTOMER;
|
|
77
|
+
const CONFIRM_DELETE_CASH_ACCOUNT_CUSTOMER = (fields = []) => {
|
|
78
|
+
return (0, graphql_tag_1.default) `
|
|
79
|
+
mutation ConfirmDeleteCashAccountCustomer(
|
|
80
|
+
$id: ID!
|
|
81
|
+
$partnerId: String!
|
|
82
|
+
$partyId: String!
|
|
83
|
+
$otp: String!
|
|
84
|
+
) {
|
|
85
|
+
confirmDeleteCashAccountCustomer(
|
|
86
|
+
id: $id
|
|
87
|
+
partnerId: $partnerId
|
|
88
|
+
partyId: $partyId
|
|
89
|
+
otp: $otp
|
|
90
|
+
) ${(0, helpers_1.hasFields)(fields) ? `{ ${(0, helpers_1.joinField)(fields)} }` : ""}
|
|
91
|
+
}
|
|
92
|
+
`;
|
|
93
|
+
};
|
|
94
|
+
exports.CONFIRM_DELETE_CASH_ACCOUNT_CUSTOMER = CONFIRM_DELETE_CASH_ACCOUNT_CUSTOMER;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GET_BANK_CODES = exports.GET_CASH_ACCOUNT_CUSTOMERS = void 0;
|
|
4
|
+
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
+
const helpers_1 = require("../../utils/helpers");
|
|
6
|
+
const GET_CASH_ACCOUNT_CUSTOMERS = (fields = []) => {
|
|
7
|
+
return (0, graphql_tag_1.gql) `
|
|
8
|
+
query GetCashAccountCustomers(
|
|
9
|
+
$partnerId: String!
|
|
10
|
+
$partyId: String!
|
|
11
|
+
) {
|
|
12
|
+
getCashAccountCustomers(
|
|
13
|
+
partnerId: $partnerId
|
|
14
|
+
partyId: $partyId
|
|
15
|
+
) ${(0, helpers_1.hasFields)(fields) ? `{ ${(0, helpers_1.joinField)(fields)} }` : ""}
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
};
|
|
19
|
+
exports.GET_CASH_ACCOUNT_CUSTOMERS = GET_CASH_ACCOUNT_CUSTOMERS;
|
|
20
|
+
const GET_BANK_CODES = (fields = []) => {
|
|
21
|
+
return (0, graphql_tag_1.gql) `
|
|
22
|
+
query GetBankCodes {
|
|
23
|
+
getBankCodes ${(0, helpers_1.hasFields)(fields) ? `{ ${(0, helpers_1.joinField)(fields)} }` : ""}
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
};
|
|
27
|
+
exports.GET_BANK_CODES = GET_BANK_CODES;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export declare const UPDATE_DESCRIPTION: import("graphql").DocumentNode;
|
|
2
2
|
export declare const UPDATE_SERVICE_RESOURCE: import("graphql").DocumentNode;
|
|
3
3
|
export declare const RECOUNT_USED_BOOKING: import("graphql").DocumentNode;
|
|
4
|
+
export declare const LINK_USER_ACCOUNT: import("graphql").DocumentNode;
|
|
5
|
+
export declare const UPDATE_QUANTITY_V2: import("graphql").DocumentNode;
|
|
@@ -1,37 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RECOUNT_USED_BOOKING = exports.UPDATE_SERVICE_RESOURCE = exports.UPDATE_DESCRIPTION = void 0;
|
|
3
|
+
exports.UPDATE_QUANTITY_V2 = exports.LINK_USER_ACCOUNT = exports.RECOUNT_USED_BOOKING = exports.UPDATE_SERVICE_RESOURCE = exports.UPDATE_DESCRIPTION = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.UPDATE_DESCRIPTION = (0, graphql_tag_1.gql) `
|
|
6
|
-
mutation UpdateDescription(
|
|
7
|
-
$serviceId:
|
|
8
|
-
$description: String!
|
|
9
|
-
$updatedBy: String!
|
|
10
|
-
) {
|
|
11
|
-
updateDescription(
|
|
12
|
-
serviceId: $serviceId
|
|
13
|
-
description: $description
|
|
14
|
-
updatedBy: $updatedBy
|
|
15
|
-
)
|
|
6
|
+
mutation UpdateDescription($serviceId: String!, $description: String!, $updatedBy: String!) {
|
|
7
|
+
updateDescription(serviceId: $serviceId, description: $description, updatedBy: $updatedBy)
|
|
16
8
|
}
|
|
17
9
|
`;
|
|
18
10
|
exports.UPDATE_SERVICE_RESOURCE = (0, graphql_tag_1.gql) `
|
|
19
|
-
mutation UpdateServiceResource(
|
|
20
|
-
$serviceId:
|
|
21
|
-
$keyId: String!
|
|
22
|
-
$name: String
|
|
23
|
-
$value: String
|
|
24
|
-
$unit: String
|
|
25
|
-
$actorId: String!
|
|
26
|
-
) {
|
|
27
|
-
updateServiceResource(
|
|
28
|
-
serviceId: $serviceId
|
|
29
|
-
keyId: $keyId
|
|
30
|
-
name: $name
|
|
31
|
-
value: $value
|
|
32
|
-
unit: $unit
|
|
33
|
-
actorId: $actorId
|
|
34
|
-
)
|
|
11
|
+
mutation UpdateServiceResource($serviceId: String!, $keyId: String!, $name: String, $value: String, $unit: String, $actorId: String!) {
|
|
12
|
+
updateServiceResource(serviceId: $serviceId, keyId: $keyId, name: $name, value: $value, unit: $unit, actorId: $actorId)
|
|
35
13
|
}
|
|
36
14
|
`;
|
|
37
15
|
exports.RECOUNT_USED_BOOKING = (0, graphql_tag_1.gql) `
|
|
@@ -39,3 +17,99 @@ exports.RECOUNT_USED_BOOKING = (0, graphql_tag_1.gql) `
|
|
|
39
17
|
recountUsedBookings(serviceId: $serviceId, actorId: $actorId)
|
|
40
18
|
}
|
|
41
19
|
`;
|
|
20
|
+
exports.LINK_USER_ACCOUNT = (0, graphql_tag_1.gql) `
|
|
21
|
+
mutation LinkUserAccount($ownerId: String, $serviceId: String) {
|
|
22
|
+
linkUserAccount(ownerId: $ownerId, serviceId: $serviceId) {
|
|
23
|
+
service {
|
|
24
|
+
supplierId
|
|
25
|
+
serviceId
|
|
26
|
+
partnerId
|
|
27
|
+
serviceName
|
|
28
|
+
serviceGroup
|
|
29
|
+
type
|
|
30
|
+
typeName
|
|
31
|
+
status
|
|
32
|
+
statusFulfillment
|
|
33
|
+
ownerId
|
|
34
|
+
ownerPartyDetailId
|
|
35
|
+
startDate
|
|
36
|
+
endDate
|
|
37
|
+
serviceType
|
|
38
|
+
urlPrivate
|
|
39
|
+
urlPublic
|
|
40
|
+
username
|
|
41
|
+
password
|
|
42
|
+
attrs
|
|
43
|
+
description
|
|
44
|
+
ips
|
|
45
|
+
productGroupId
|
|
46
|
+
orderId
|
|
47
|
+
sponsorId
|
|
48
|
+
sponsorName
|
|
49
|
+
providedFromId
|
|
50
|
+
providedFromName
|
|
51
|
+
}
|
|
52
|
+
resources {
|
|
53
|
+
type
|
|
54
|
+
name
|
|
55
|
+
total
|
|
56
|
+
unit
|
|
57
|
+
component
|
|
58
|
+
value
|
|
59
|
+
keyId
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
`;
|
|
64
|
+
exports.UPDATE_QUANTITY_V2 = (0, graphql_tag_1.gql) `
|
|
65
|
+
mutation UpdateQuantityV2($orderId: String!, $partnerId: String!, $updateItemInputs: [UpdateItemInput]!, $updateBy: String!) {
|
|
66
|
+
updateQuantityV2(orderId: $orderId, partnerId: $partnerId, updateItemInputs: $updateItemInputs, updateBy: $updateBy) {
|
|
67
|
+
cancelReason
|
|
68
|
+
currencyCode
|
|
69
|
+
edited
|
|
70
|
+
financialStatus
|
|
71
|
+
fulfillmentStatus
|
|
72
|
+
orderStatus
|
|
73
|
+
id
|
|
74
|
+
partnerId
|
|
75
|
+
ownerName
|
|
76
|
+
ownerEmail
|
|
77
|
+
ownerPhone
|
|
78
|
+
orderNumber
|
|
79
|
+
rawData
|
|
80
|
+
orderId
|
|
81
|
+
note
|
|
82
|
+
pending
|
|
83
|
+
checkCommodities
|
|
84
|
+
shipmentNote
|
|
85
|
+
shopId
|
|
86
|
+
facilityId
|
|
87
|
+
orderType
|
|
88
|
+
shippingServiceId
|
|
89
|
+
carrierId
|
|
90
|
+
fromOrderId
|
|
91
|
+
externalCode
|
|
92
|
+
createdAt
|
|
93
|
+
createdStamp
|
|
94
|
+
canceledAt
|
|
95
|
+
updatedAt
|
|
96
|
+
approvedAt
|
|
97
|
+
processedAt
|
|
98
|
+
completedAt
|
|
99
|
+
createdBy
|
|
100
|
+
saleName
|
|
101
|
+
salePartyId
|
|
102
|
+
ownerPartyId
|
|
103
|
+
customerLocale
|
|
104
|
+
orderParentId
|
|
105
|
+
shopName
|
|
106
|
+
version
|
|
107
|
+
customAttribute
|
|
108
|
+
appliedReferralCode
|
|
109
|
+
orderDate
|
|
110
|
+
dueDatePayment
|
|
111
|
+
description
|
|
112
|
+
orderGroup
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
`;
|
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FIND_ORDER_BY_OWNER_PARTYID = void 0;
|
|
3
|
+
exports.MERGE_ORDER_CART = exports.FIND_ORDER_BY_OWNER_PARTYID = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
+
const helpers_1 = require("../../utils/helpers");
|
|
5
6
|
exports.FIND_ORDER_BY_OWNER_PARTYID = (0, graphql_tag_1.gql) `
|
|
6
|
-
mutation FindOrderByOwnerPartyId(
|
|
7
|
-
$partnerId: String!
|
|
8
|
-
$ownerPartyId: String!
|
|
9
|
-
) {
|
|
7
|
+
mutation FindOrderByOwnerPartyId($partnerId: String!, $ownerPartyId: String!) {
|
|
10
8
|
findOrderByOwnerPartyId(partnerId: $partnerId, ownerPartyId: $ownerPartyId)
|
|
11
9
|
}
|
|
12
10
|
`;
|
|
11
|
+
const MERGE_ORDER_CART = (fields = []) => {
|
|
12
|
+
return (0, graphql_tag_1.gql) `
|
|
13
|
+
mutation MergeOrderCart(
|
|
14
|
+
$oldCartId: String!
|
|
15
|
+
$newCartId: String!
|
|
16
|
+
$actorId: String!
|
|
17
|
+
) {
|
|
18
|
+
mergeOrderCart(
|
|
19
|
+
input: {
|
|
20
|
+
oldCartId: $oldCartId
|
|
21
|
+
newCartId: $newCartId
|
|
22
|
+
actorId: $actorId
|
|
23
|
+
}
|
|
24
|
+
) ${(0, helpers_1.hasFields)(fields) ? `{ ${(0, helpers_1.joinField)(fields)} }` : ""}
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
};
|
|
28
|
+
exports.MERGE_ORDER_CART = MERGE_ORDER_CART;
|
|
@@ -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;
|