@longvansoftware/storefront-js-client 4.6.2 → 4.6.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/accounting_service/mutations.d.ts +2 -0
- package/dist/src/graphql/accounting_service/mutations.js +100 -0
- package/dist/src/graphql/accounting_service/queries.d.ts +1 -0
- package/dist/src/graphql/accounting_service/queries.js +62 -0
- package/dist/src/graphql/content_api/queries.d.ts +2 -0
- package/dist/src/graphql/content_api/queries.js +23 -0
- package/dist/src/graphql/crm_camping/mutations.d.ts +1 -0
- package/dist/src/graphql/crm_camping/mutations.js +37 -0
- package/dist/src/graphql/crm_camping/queries.d.ts +14 -0
- package/dist/src/graphql/crm_camping/queries.js +420 -0
- package/dist/src/graphql/orderGraphQL/mutations.d.ts +10 -0
- package/dist/src/graphql/orderGraphQL/mutations.js +410 -0
- package/dist/src/graphql/orderGraphQL/queries.d.ts +10 -0
- package/dist/src/graphql/orderGraphQL/queries.js +480 -0
- package/dist/src/graphql/paymentLV/mutations.d.ts +2 -0
- package/dist/src/graphql/paymentLV/mutations.js +31 -0
- package/dist/src/graphql/paymentLV/queries.d.ts +5 -0
- package/dist/src/graphql/paymentLV/queries.js +135 -0
- package/dist/src/graphql/product/queries.d.ts +31 -29
- package/dist/src/graphql/product/queries.js +20 -10
- package/dist/src/graphql/quicklab_service/mutations.d.ts +8 -0
- package/dist/src/graphql/quicklab_service/mutations.js +171 -0
- package/dist/src/graphql/quicklab_service/queries.d.ts +7 -0
- package/dist/src/graphql/quicklab_service/queries.js +131 -0
- package/dist/src/graphql/remote_access_service/mutations.d.ts +7 -0
- package/dist/src/graphql/remote_access_service/mutations.js +89 -0
- package/dist/src/graphql/remote_access_service/queries.d.ts +2 -0
- package/dist/src/graphql/remote_access_service/queries.js +34 -0
- package/dist/src/graphql/resource_permission/mutations.d.ts +2 -0
- package/dist/src/graphql/resource_permission/mutations.js +65 -0
- package/dist/src/graphql/resource_permission/queries.d.ts +1 -0
- package/dist/src/graphql/resource_permission/queries.js +18 -0
- package/dist/src/graphql/storage_s3/mutations.d.ts +27 -0
- package/dist/src/graphql/storage_s3/mutations.js +603 -0
- package/dist/src/graphql/storage_s3/queries.d.ts +12 -0
- package/dist/src/graphql/storage_s3/queries.js +129 -0
- package/dist/src/lib/accounting_service/index.d.ts +9 -0
- package/dist/src/lib/accounting_service/index.js +69 -0
- package/dist/src/lib/cloud_rest/index.d.ts +17 -0
- package/dist/src/lib/cloud_rest/index.js +101 -0
- package/dist/src/lib/content_api/index.d.ts +7 -0
- package/dist/src/lib/content_api/index.js +43 -0
- package/dist/src/lib/crm_camping/index.d.ts +21 -0
- package/dist/src/lib/crm_camping/index.js +302 -0
- package/dist/src/lib/dns/index.d.ts +7 -0
- package/dist/src/lib/{cloudService → dns}/index.js +16 -11
- package/dist/src/lib/orderGraphQL/index.d.ts +24 -0
- package/dist/src/lib/orderGraphQL/index.js +342 -0
- package/dist/src/lib/order_cloud_rest/index.d.ts +7 -0
- package/dist/src/lib/order_cloud_rest/index.js +39 -0
- package/dist/src/lib/paymentLV/index.d.ts +13 -0
- package/dist/src/lib/paymentLV/index.js +149 -0
- package/dist/src/lib/product/index.d.ts +1 -0
- package/dist/src/lib/product/index.js +18 -0
- package/dist/src/lib/quicklab_service/index.d.ts +19 -0
- package/dist/src/lib/quicklab_service/index.js +211 -0
- package/dist/src/lib/remote_access_service/index.d.ts +16 -0
- package/dist/src/lib/remote_access_service/index.js +181 -0
- package/dist/src/lib/resource_permission/index.d.ts +9 -0
- package/dist/src/lib/resource_permission/index.js +82 -0
- package/dist/src/lib/service.d.ts +14 -0
- package/dist/src/lib/service.js +101 -0
- package/dist/src/lib/storage_s3/index.d.ts +42 -0
- package/dist/src/lib/storage_s3/index.js +736 -0
- package/dist/src/types/remote_access_service.d.ts +12 -0
- package/dist/src/types/remote_access_service.js +2 -0
- package/dist/src/types/storage_s3.d.ts +10 -0
- package/dist/src/types/storage_s3.js +2 -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 +3 -2
- package/dist/src/graphql/cloudService/queries.d.ts +0 -1
- package/dist/src/graphql/cloudService/queries.js +0 -71
- package/dist/src/lib/cloudService/index.d.ts +0 -5
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CALCULATE_RESOURCE_CHANGE_PRICE = exports.SEARCH_ORDER_DYNAMIC = exports.CALC_EXCHANGE_PRICE_EXTEND_RESOURCE_DETAIL_DYNAMIC = exports.FIND_ORDER_BY_OWNER_PARTYID = exports.GET_ORDER_BY_SERVICE_ID = exports.GET_ORDER_LINE_ITEM_BY_SERVICE_ID = exports.GET_QUANTITY_ORDER_LINEITEMS = exports.GET_ORDER_DETAIL_DYNAMIC = exports.GET_ORDER_DETAIL = void 0;
|
|
4
|
+
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
+
exports.GET_ORDER_DETAIL = (0, graphql_tag_1.gql) `
|
|
6
|
+
query getOrderDetail($orderId: String!) {
|
|
7
|
+
orderDetail(orderId: $orderId) {
|
|
8
|
+
order {
|
|
9
|
+
cancelReason
|
|
10
|
+
currencyCode
|
|
11
|
+
orderStatus
|
|
12
|
+
totalPrice {
|
|
13
|
+
amount
|
|
14
|
+
}
|
|
15
|
+
discountTotalPrice {
|
|
16
|
+
amount
|
|
17
|
+
}
|
|
18
|
+
totalVAT {
|
|
19
|
+
amount
|
|
20
|
+
}
|
|
21
|
+
currentTotalPrice {
|
|
22
|
+
amount
|
|
23
|
+
}
|
|
24
|
+
currentSubtotalPrice {
|
|
25
|
+
amount
|
|
26
|
+
currencyCode
|
|
27
|
+
}
|
|
28
|
+
createdStamp
|
|
29
|
+
edited
|
|
30
|
+
financialStatus
|
|
31
|
+
fulfillmentStatus
|
|
32
|
+
orderStatus
|
|
33
|
+
id
|
|
34
|
+
partnerId
|
|
35
|
+
ownerName
|
|
36
|
+
ownerEmail
|
|
37
|
+
ownerPhone
|
|
38
|
+
ownerPartyId
|
|
39
|
+
orderNumber
|
|
40
|
+
rawData
|
|
41
|
+
orderId
|
|
42
|
+
id
|
|
43
|
+
note
|
|
44
|
+
pending
|
|
45
|
+
checkCommodities
|
|
46
|
+
shipmentNote
|
|
47
|
+
shopId
|
|
48
|
+
facilityId
|
|
49
|
+
orderType
|
|
50
|
+
shippingServiceId
|
|
51
|
+
carrierId
|
|
52
|
+
fromOrderId
|
|
53
|
+
externalCode
|
|
54
|
+
createdAt
|
|
55
|
+
currentTotalPrice {
|
|
56
|
+
amount
|
|
57
|
+
currencyCode
|
|
58
|
+
}
|
|
59
|
+
createdStamp
|
|
60
|
+
customAttribute
|
|
61
|
+
canceledAt
|
|
62
|
+
updatedAt
|
|
63
|
+
approvedAt
|
|
64
|
+
processedAt
|
|
65
|
+
completedAt
|
|
66
|
+
createdBy
|
|
67
|
+
saleName
|
|
68
|
+
salePartyId
|
|
69
|
+
ownerPartyId
|
|
70
|
+
customerLocale
|
|
71
|
+
orderParentId
|
|
72
|
+
shopName
|
|
73
|
+
version
|
|
74
|
+
description
|
|
75
|
+
discountApplications {
|
|
76
|
+
allocationMethod
|
|
77
|
+
targetSelection
|
|
78
|
+
targetType
|
|
79
|
+
title
|
|
80
|
+
type
|
|
81
|
+
percent
|
|
82
|
+
voucherCode
|
|
83
|
+
voucherId
|
|
84
|
+
campaignId
|
|
85
|
+
campaignActionId
|
|
86
|
+
campaignActionType
|
|
87
|
+
value {
|
|
88
|
+
amount
|
|
89
|
+
currencyCode
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
remainTotal {
|
|
93
|
+
amount
|
|
94
|
+
currencyCode
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
lineItems {
|
|
98
|
+
orderLineItem {
|
|
99
|
+
originalTotalPrice {
|
|
100
|
+
amount
|
|
101
|
+
}
|
|
102
|
+
description
|
|
103
|
+
unitType
|
|
104
|
+
customAttributes {
|
|
105
|
+
key
|
|
106
|
+
value
|
|
107
|
+
}
|
|
108
|
+
id
|
|
109
|
+
orderItemId
|
|
110
|
+
quantity
|
|
111
|
+
totalVAT {
|
|
112
|
+
amount
|
|
113
|
+
currencyCode
|
|
114
|
+
}
|
|
115
|
+
orderLineItemParentId
|
|
116
|
+
giftConditionProductId
|
|
117
|
+
giftQuantity
|
|
118
|
+
variant {
|
|
119
|
+
id
|
|
120
|
+
price {
|
|
121
|
+
amount
|
|
122
|
+
currencyCode
|
|
123
|
+
}
|
|
124
|
+
product {
|
|
125
|
+
id
|
|
126
|
+
title
|
|
127
|
+
}
|
|
128
|
+
title
|
|
129
|
+
unitPrice {
|
|
130
|
+
amount
|
|
131
|
+
currencyCode
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
productOptions {
|
|
135
|
+
idOption
|
|
136
|
+
name
|
|
137
|
+
value
|
|
138
|
+
title
|
|
139
|
+
}
|
|
140
|
+
resourceConfigs {
|
|
141
|
+
name
|
|
142
|
+
quantity
|
|
143
|
+
unit
|
|
144
|
+
productId
|
|
145
|
+
giftProductId
|
|
146
|
+
gift
|
|
147
|
+
giftQuantity
|
|
148
|
+
campaignId
|
|
149
|
+
campaignActionId
|
|
150
|
+
qualify
|
|
151
|
+
idParent
|
|
152
|
+
addQuantity
|
|
153
|
+
defaultQuantity
|
|
154
|
+
title
|
|
155
|
+
price
|
|
156
|
+
unitPrice
|
|
157
|
+
totalResource
|
|
158
|
+
}
|
|
159
|
+
resourceItems {
|
|
160
|
+
name
|
|
161
|
+
quantity
|
|
162
|
+
unit
|
|
163
|
+
productId
|
|
164
|
+
giftProductId
|
|
165
|
+
gift
|
|
166
|
+
giftQuantity
|
|
167
|
+
campaignId
|
|
168
|
+
campaignActionId
|
|
169
|
+
qualify
|
|
170
|
+
idParent
|
|
171
|
+
addQuantity
|
|
172
|
+
defaultQuantity
|
|
173
|
+
title
|
|
174
|
+
price
|
|
175
|
+
unitPrice
|
|
176
|
+
totalResource
|
|
177
|
+
unitGift
|
|
178
|
+
giftDuration
|
|
179
|
+
giftDurationUnit
|
|
180
|
+
}
|
|
181
|
+
itemType
|
|
182
|
+
}
|
|
183
|
+
serviceId
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
`;
|
|
188
|
+
const GET_ORDER_DETAIL_DYNAMIC = (fields = []) => {
|
|
189
|
+
const fieldStr = fields.join("\n ");
|
|
190
|
+
const hasFields = fields.length > 0;
|
|
191
|
+
return (0, graphql_tag_1.gql) `
|
|
192
|
+
query getOrderDetail($orderId: String!) {
|
|
193
|
+
orderDetail(orderId: $orderId) ${hasFields ? `{ ${fieldStr} }` : ""}
|
|
194
|
+
}
|
|
195
|
+
`;
|
|
196
|
+
};
|
|
197
|
+
exports.GET_ORDER_DETAIL_DYNAMIC = GET_ORDER_DETAIL_DYNAMIC;
|
|
198
|
+
exports.GET_QUANTITY_ORDER_LINEITEMS = (0, graphql_tag_1.gql) `
|
|
199
|
+
query getOrderDetail($orderId: String!) {
|
|
200
|
+
orderDetail(orderId: $orderId) {
|
|
201
|
+
order {
|
|
202
|
+
financialStatus
|
|
203
|
+
orderStatus
|
|
204
|
+
orderType
|
|
205
|
+
customAttribute
|
|
206
|
+
ownerPartyId
|
|
207
|
+
}
|
|
208
|
+
lineItems {
|
|
209
|
+
orderLineItem {
|
|
210
|
+
variant {
|
|
211
|
+
title
|
|
212
|
+
}
|
|
213
|
+
itemType
|
|
214
|
+
orderLineItemParentId
|
|
215
|
+
giftConditionProductId
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
`;
|
|
221
|
+
exports.GET_ORDER_LINE_ITEM_BY_SERVICE_ID = (0, graphql_tag_1.gql) `
|
|
222
|
+
query GetOrderLineItemByServiceId($partnerId: String!, $serviceId: String!) {
|
|
223
|
+
getOrderLineItemByServiceId(partnerId: $partnerId, serviceId: $serviceId) {
|
|
224
|
+
id
|
|
225
|
+
partnerId
|
|
226
|
+
currentQuantity
|
|
227
|
+
customAttributes {
|
|
228
|
+
key
|
|
229
|
+
value
|
|
230
|
+
}
|
|
231
|
+
discountedTotalPrice {
|
|
232
|
+
amount
|
|
233
|
+
currencyCode
|
|
234
|
+
}
|
|
235
|
+
originalTotalPrice {
|
|
236
|
+
amount
|
|
237
|
+
currencyCode
|
|
238
|
+
}
|
|
239
|
+
quantity
|
|
240
|
+
variant {
|
|
241
|
+
availableForSale
|
|
242
|
+
barcode
|
|
243
|
+
|
|
244
|
+
currentlyNotInStock
|
|
245
|
+
id
|
|
246
|
+
|
|
247
|
+
price {
|
|
248
|
+
amount
|
|
249
|
+
currencyCode
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
unitPrice {
|
|
253
|
+
amount
|
|
254
|
+
currencyCode
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
quantityAvailable
|
|
258
|
+
requiresShipping
|
|
259
|
+
sku
|
|
260
|
+
title
|
|
261
|
+
|
|
262
|
+
weight
|
|
263
|
+
weightUnit
|
|
264
|
+
}
|
|
265
|
+
orderId
|
|
266
|
+
orderItemId
|
|
267
|
+
fulfilledQuantity
|
|
268
|
+
fulfillingQuantity
|
|
269
|
+
orderItemName
|
|
270
|
+
note
|
|
271
|
+
createdStamp
|
|
272
|
+
updatedStamp
|
|
273
|
+
completedAt
|
|
274
|
+
orderLineItemParentId
|
|
275
|
+
giftConditionProductId
|
|
276
|
+
giftQuantity
|
|
277
|
+
orderStatus
|
|
278
|
+
totalVAT {
|
|
279
|
+
amount
|
|
280
|
+
currencyCode
|
|
281
|
+
}
|
|
282
|
+
vatRate {
|
|
283
|
+
amount
|
|
284
|
+
currencyCode
|
|
285
|
+
}
|
|
286
|
+
totalTax {
|
|
287
|
+
amount
|
|
288
|
+
currencyCode
|
|
289
|
+
}
|
|
290
|
+
unitType
|
|
291
|
+
productOptions {
|
|
292
|
+
idOption
|
|
293
|
+
name
|
|
294
|
+
value
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
`;
|
|
299
|
+
exports.GET_ORDER_BY_SERVICE_ID = (0, graphql_tag_1.gql) `
|
|
300
|
+
query GetOrderByServiceId($serviceId: String!) {
|
|
301
|
+
getOrderByServiceId(serviceId: $serviceId) {
|
|
302
|
+
cancelReason
|
|
303
|
+
currencyCode
|
|
304
|
+
currentSubtotalPrice {
|
|
305
|
+
amount
|
|
306
|
+
currencyCode
|
|
307
|
+
}
|
|
308
|
+
currentTotalDuties {
|
|
309
|
+
amount
|
|
310
|
+
currencyCode
|
|
311
|
+
}
|
|
312
|
+
currentTotalPrice {
|
|
313
|
+
amount
|
|
314
|
+
currencyCode
|
|
315
|
+
}
|
|
316
|
+
currentTotalTax {
|
|
317
|
+
amount
|
|
318
|
+
currencyCode
|
|
319
|
+
}
|
|
320
|
+
edited
|
|
321
|
+
financialStatus
|
|
322
|
+
fulfillmentStatus
|
|
323
|
+
orderStatus
|
|
324
|
+
id
|
|
325
|
+
partnerId
|
|
326
|
+
ownerName
|
|
327
|
+
ownerEmail
|
|
328
|
+
ownerPhone
|
|
329
|
+
orderNumber
|
|
330
|
+
originalTotalDuties {
|
|
331
|
+
amount
|
|
332
|
+
currencyCode
|
|
333
|
+
}
|
|
334
|
+
originalTotalPrice {
|
|
335
|
+
amount
|
|
336
|
+
currencyCode
|
|
337
|
+
}
|
|
338
|
+
shippingAddress {
|
|
339
|
+
address1
|
|
340
|
+
address2
|
|
341
|
+
city
|
|
342
|
+
company
|
|
343
|
+
country
|
|
344
|
+
countryCode
|
|
345
|
+
firstName
|
|
346
|
+
formattedArea
|
|
347
|
+
id
|
|
348
|
+
lastName
|
|
349
|
+
latitude
|
|
350
|
+
longitude
|
|
351
|
+
name
|
|
352
|
+
phone
|
|
353
|
+
province
|
|
354
|
+
provinceCode
|
|
355
|
+
zip
|
|
356
|
+
}
|
|
357
|
+
subtotalPrice {
|
|
358
|
+
amount
|
|
359
|
+
currencyCode
|
|
360
|
+
}
|
|
361
|
+
totalPrice {
|
|
362
|
+
amount
|
|
363
|
+
currencyCode
|
|
364
|
+
}
|
|
365
|
+
totalRefunded {
|
|
366
|
+
amount
|
|
367
|
+
currencyCode
|
|
368
|
+
}
|
|
369
|
+
totalShippingPrice {
|
|
370
|
+
amount
|
|
371
|
+
currencyCode
|
|
372
|
+
}
|
|
373
|
+
totalTax {
|
|
374
|
+
amount
|
|
375
|
+
currencyCode
|
|
376
|
+
}
|
|
377
|
+
discountTotalPrice {
|
|
378
|
+
amount
|
|
379
|
+
currencyCode
|
|
380
|
+
}
|
|
381
|
+
cod {
|
|
382
|
+
amount
|
|
383
|
+
currencyCode
|
|
384
|
+
}
|
|
385
|
+
rawData
|
|
386
|
+
orderId
|
|
387
|
+
note
|
|
388
|
+
pending
|
|
389
|
+
checkCommodities
|
|
390
|
+
shipmentNote
|
|
391
|
+
shopId
|
|
392
|
+
facilityId
|
|
393
|
+
orderType
|
|
394
|
+
shippingServiceId
|
|
395
|
+
carrierId
|
|
396
|
+
fromOrderId
|
|
397
|
+
externalCode
|
|
398
|
+
createdAt
|
|
399
|
+
createdStamp
|
|
400
|
+
canceledAt
|
|
401
|
+
updatedAt
|
|
402
|
+
approvedAt
|
|
403
|
+
processedAt
|
|
404
|
+
completedAt
|
|
405
|
+
createdBy
|
|
406
|
+
saleName
|
|
407
|
+
salePartyId
|
|
408
|
+
ownerPartyId
|
|
409
|
+
customerLocale
|
|
410
|
+
orderParentId
|
|
411
|
+
totalVAT {
|
|
412
|
+
amount
|
|
413
|
+
currencyCode
|
|
414
|
+
}
|
|
415
|
+
shopName
|
|
416
|
+
version
|
|
417
|
+
discountApplications {
|
|
418
|
+
allocationMethod
|
|
419
|
+
targetSelection
|
|
420
|
+
targetType
|
|
421
|
+
title
|
|
422
|
+
value {
|
|
423
|
+
amount
|
|
424
|
+
currencyCode
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
orderDate
|
|
428
|
+
dueDatePayment
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
`;
|
|
432
|
+
exports.FIND_ORDER_BY_OWNER_PARTYID = (0, graphql_tag_1.gql) `
|
|
433
|
+
query FindOrderByOwnerPartyId($partnerId: String!, $ownerPartyId: String!) {
|
|
434
|
+
findOrderByOwnerPartyId(partnerId: $partnerId, ownerPartyId: $ownerPartyId)
|
|
435
|
+
}
|
|
436
|
+
`;
|
|
437
|
+
const CALC_EXCHANGE_PRICE_EXTEND_RESOURCE_DETAIL_DYNAMIC = (fields = []) => {
|
|
438
|
+
const fieldStr = fields.join("\n ");
|
|
439
|
+
const hasFields = fields.length > 0;
|
|
440
|
+
return (0, graphql_tag_1.gql) `
|
|
441
|
+
query CalcExchangePriceExtendResourceDetail(
|
|
442
|
+
$partnerId: String!
|
|
443
|
+
$storeId: String!
|
|
444
|
+
$serviceId: String!
|
|
445
|
+
$productBaseIdNew: String!
|
|
446
|
+
$durationQuantity: BigDecimal!
|
|
447
|
+
$durationUnit: String!
|
|
448
|
+
) {
|
|
449
|
+
calcExchangePriceExtendResourceDetail(
|
|
450
|
+
partnerId: $partnerId
|
|
451
|
+
storeId: $storeId
|
|
452
|
+
serviceId: $serviceId
|
|
453
|
+
productBaseIdNew: $productBaseIdNew
|
|
454
|
+
durationQuantity: $durationQuantity
|
|
455
|
+
durationUnit: $durationUnit
|
|
456
|
+
) ${hasFields ? `{ ${fieldStr} }` : ""}
|
|
457
|
+
}
|
|
458
|
+
`;
|
|
459
|
+
};
|
|
460
|
+
exports.CALC_EXCHANGE_PRICE_EXTEND_RESOURCE_DETAIL_DYNAMIC = CALC_EXCHANGE_PRICE_EXTEND_RESOURCE_DETAIL_DYNAMIC;
|
|
461
|
+
const SEARCH_ORDER_DYNAMIC = (fields = []) => {
|
|
462
|
+
const fieldStr = fields.join("\n ");
|
|
463
|
+
const hasFields = fields.length > 0;
|
|
464
|
+
return (0, graphql_tag_1.gql) `
|
|
465
|
+
query searchOrder($filter: OrderFilter) {
|
|
466
|
+
searchOrder(filter: $filter) ${hasFields ? `{ ${fieldStr} }` : ""}
|
|
467
|
+
}
|
|
468
|
+
`;
|
|
469
|
+
};
|
|
470
|
+
exports.SEARCH_ORDER_DYNAMIC = SEARCH_ORDER_DYNAMIC;
|
|
471
|
+
const CALCULATE_RESOURCE_CHANGE_PRICE = (fields = []) => {
|
|
472
|
+
const fieldStr = fields.join("\n ");
|
|
473
|
+
const hasFields = fields.length > 0;
|
|
474
|
+
return (0, graphql_tag_1.gql) `
|
|
475
|
+
query calculateResourceChangePrice($partnerId: String! $storeId: String! $productIds: [String] $quantity: BigDecimal! $unit: String! $serviceId: String) {
|
|
476
|
+
calculateResourceChangePrice(partnerId: $partnerId storeId: $storeId productIds: $productIds quantity: $quantity unit: $unit serviceId: $serviceId) ${hasFields ? `{ ${fieldStr} }` : ""}
|
|
477
|
+
}
|
|
478
|
+
`;
|
|
479
|
+
};
|
|
480
|
+
exports.CALCULATE_RESOURCE_CHANGE_PRICE = CALCULATE_RESOURCE_CHANGE_PRICE;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CONFIRM_PAID_MANUAL = exports.CANCEL_PAYMENT = void 0;
|
|
4
|
+
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
+
exports.CANCEL_PAYMENT = (0, graphql_tag_1.gql) `
|
|
6
|
+
mutation CancelPayment(
|
|
7
|
+
$paymentId: String!
|
|
8
|
+
$safeMode: Boolean!
|
|
9
|
+
$reason: String!
|
|
10
|
+
$createBy: String
|
|
11
|
+
) {
|
|
12
|
+
cancelPayment(
|
|
13
|
+
paymentId: $paymentId
|
|
14
|
+
safeMode: $safeMode
|
|
15
|
+
reason: $reason
|
|
16
|
+
createBy: $createBy
|
|
17
|
+
)
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
exports.CONFIRM_PAID_MANUAL = (0, graphql_tag_1.gql) `
|
|
21
|
+
mutation ConfirmPaidManual($paymentId: String!, $confirmBy: String) {
|
|
22
|
+
confirmPaidManual(paymentId: $paymentId, confirmBy: $confirmBy) {
|
|
23
|
+
code
|
|
24
|
+
message
|
|
25
|
+
data
|
|
26
|
+
qrCodeUrl
|
|
27
|
+
deeplink
|
|
28
|
+
deeplinkMiniApp
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const PAYMENTS_BY_ORDERS: import("graphql").DocumentNode;
|
|
2
|
+
export declare const GET_TRANSFER_INFO: import("graphql").DocumentNode;
|
|
3
|
+
export declare const GET_PAYMENT_METHOD_TYPES: import("graphql").DocumentNode;
|
|
4
|
+
export declare const PAYMENT_METHODS: import("graphql").DocumentNode;
|
|
5
|
+
export declare const PAYMENT_STATUS: import("graphql").DocumentNode;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PAYMENT_STATUS = exports.PAYMENT_METHODS = exports.GET_PAYMENT_METHOD_TYPES = exports.GET_TRANSFER_INFO = exports.PAYMENTS_BY_ORDERS = void 0;
|
|
4
|
+
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
+
exports.PAYMENTS_BY_ORDERS = (0, graphql_tag_1.gql) `
|
|
6
|
+
query PaymentsByOrders($orderIds: [String!]!) {
|
|
7
|
+
paymentsByOrders(orderIds: $orderIds) {
|
|
8
|
+
methodCode
|
|
9
|
+
methodTypeCode
|
|
10
|
+
gatewayConfigId
|
|
11
|
+
partnerCode
|
|
12
|
+
totalAmount
|
|
13
|
+
fee
|
|
14
|
+
discountAmount
|
|
15
|
+
payDate
|
|
16
|
+
payType
|
|
17
|
+
transactionDate
|
|
18
|
+
orderId
|
|
19
|
+
paymentId
|
|
20
|
+
invoiceId
|
|
21
|
+
orderInfo
|
|
22
|
+
orderType
|
|
23
|
+
locale
|
|
24
|
+
merchantIp
|
|
25
|
+
extraData
|
|
26
|
+
storeID
|
|
27
|
+
bankCode
|
|
28
|
+
appUser
|
|
29
|
+
phone
|
|
30
|
+
email
|
|
31
|
+
address
|
|
32
|
+
statusCode
|
|
33
|
+
statusDescription
|
|
34
|
+
transactionId
|
|
35
|
+
createBy
|
|
36
|
+
methodDescription
|
|
37
|
+
methodMapping
|
|
38
|
+
baseMethodCode
|
|
39
|
+
confirmPaidBy
|
|
40
|
+
confirmPaidDate
|
|
41
|
+
qrCode
|
|
42
|
+
payUrl
|
|
43
|
+
customerId
|
|
44
|
+
attributes
|
|
45
|
+
paymentNote
|
|
46
|
+
payExpireDate
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
exports.GET_TRANSFER_INFO = (0, graphql_tag_1.gql) `
|
|
51
|
+
query GetTransferInfor(
|
|
52
|
+
$partnerId: String!
|
|
53
|
+
$storeId: String!
|
|
54
|
+
$paymentId: String
|
|
55
|
+
) {
|
|
56
|
+
getTransferInfo(
|
|
57
|
+
partnerId: $partnerId
|
|
58
|
+
storeId: $storeId
|
|
59
|
+
paymentId: $paymentId
|
|
60
|
+
) {
|
|
61
|
+
bankCode
|
|
62
|
+
bankName
|
|
63
|
+
accountNumber
|
|
64
|
+
accountName
|
|
65
|
+
description
|
|
66
|
+
transferInfo
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
`;
|
|
70
|
+
exports.GET_PAYMENT_METHOD_TYPES = (0, graphql_tag_1.gql) `
|
|
71
|
+
query GetPaymentMethodTypes($partnerId: String!, $storeId: String!) {
|
|
72
|
+
getPaymentMethodTypes(partnerId: $partnerId, storeId: $storeId) {
|
|
73
|
+
code
|
|
74
|
+
name
|
|
75
|
+
description
|
|
76
|
+
image
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
`;
|
|
80
|
+
exports.PAYMENT_METHODS = (0, graphql_tag_1.gql) `
|
|
81
|
+
query PaymentMethods($partnerCode: String!) {
|
|
82
|
+
paymentMethods(partnerCode: $partnerCode) {
|
|
83
|
+
id
|
|
84
|
+
code
|
|
85
|
+
name
|
|
86
|
+
description
|
|
87
|
+
image
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
`;
|
|
91
|
+
exports.PAYMENT_STATUS = (0, graphql_tag_1.gql) `
|
|
92
|
+
query PaymentStatus($paymentId: String!) {
|
|
93
|
+
paymentStatus(paymentId: $paymentId) {
|
|
94
|
+
methodCode
|
|
95
|
+
methodTypeCode
|
|
96
|
+
gatewayConfigId
|
|
97
|
+
partnerCode
|
|
98
|
+
totalAmount
|
|
99
|
+
fee
|
|
100
|
+
discountAmount
|
|
101
|
+
payDate
|
|
102
|
+
payType
|
|
103
|
+
transactionDate
|
|
104
|
+
orderId
|
|
105
|
+
paymentId
|
|
106
|
+
invoiceId
|
|
107
|
+
orderInfo
|
|
108
|
+
orderType
|
|
109
|
+
locale
|
|
110
|
+
merchantIp
|
|
111
|
+
extraData
|
|
112
|
+
storeID
|
|
113
|
+
bankCode
|
|
114
|
+
appUser
|
|
115
|
+
phone
|
|
116
|
+
email
|
|
117
|
+
address
|
|
118
|
+
statusCode
|
|
119
|
+
statusDescription
|
|
120
|
+
transactionId
|
|
121
|
+
createBy
|
|
122
|
+
methodDescription
|
|
123
|
+
methodMapping
|
|
124
|
+
baseMethodCode
|
|
125
|
+
confirmPaidBy
|
|
126
|
+
confirmPaidDate
|
|
127
|
+
qrCode
|
|
128
|
+
payUrl
|
|
129
|
+
customerId
|
|
130
|
+
attributes
|
|
131
|
+
paymentNote
|
|
132
|
+
payExpireDate
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
`;
|