@longvansoftware/service-js-client 1.15.8 → 1.16.0

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.
Files changed (86) hide show
  1. package/README.md +93 -93
  2. package/dist/src/graphql/accounting_service/mutations.js +96 -96
  3. package/dist/src/graphql/accounting_service/queries.js +57 -57
  4. package/dist/src/graphql/auth/mutations.js +235 -235
  5. package/dist/src/graphql/auth/queries.js +68 -68
  6. package/dist/src/graphql/campaign/mutations.d.ts +1 -0
  7. package/dist/src/graphql/campaign/mutations.js +34 -0
  8. package/dist/src/graphql/campaign/queries.d.ts +9 -0
  9. package/dist/src/graphql/campaign/queries.js +412 -0
  10. package/dist/src/graphql/cashbook/queries.d.ts +2 -0
  11. package/dist/src/graphql/cashbook/queries.js +99 -0
  12. package/dist/src/graphql/cloud/mutations.js +282 -282
  13. package/dist/src/graphql/cloud/queries.js +341 -341
  14. package/dist/src/graphql/computing/mutations.js +303 -303
  15. package/dist/src/graphql/computing/queries.js +548 -548
  16. package/dist/src/graphql/crm/mutations.d.ts +1 -0
  17. package/dist/src/graphql/crm/mutations.js +392 -375
  18. package/dist/src/graphql/crm/queries.d.ts +1 -0
  19. package/dist/src/graphql/crm/queries.js +359 -332
  20. package/dist/src/graphql/crm_camping/mutations.js +32 -32
  21. package/dist/src/graphql/crm_camping/queries.js +198 -198
  22. package/dist/src/graphql/orderGraphQL/mutations.js +351 -351
  23. package/dist/src/graphql/orderGraphQL/queries.js +387 -387
  24. package/dist/src/graphql/payment/mutations.js +45 -45
  25. package/dist/src/graphql/payment/queries.js +60 -60
  26. package/dist/src/graphql/paymentLV/mutations.js +19 -19
  27. package/dist/src/graphql/paymentLV/queries.js +75 -75
  28. package/dist/src/graphql/paymentV2/mutations.d.ts +3 -0
  29. package/dist/src/graphql/paymentV2/mutations.js +54 -0
  30. package/dist/src/graphql/paymentV2/queries.d.ts +6 -0
  31. package/dist/src/graphql/paymentV2/queries.js +186 -0
  32. package/dist/src/graphql/product/queries.js +891 -891
  33. package/dist/src/graphql/quicklab_service/mutations.js +154 -154
  34. package/dist/src/graphql/quicklab_service/queries.js +108 -108
  35. package/dist/src/graphql/resource_permission/mutations.js +57 -57
  36. package/dist/src/graphql/resource_permission/queries.js +13 -13
  37. package/dist/src/graphql/service/mutations.js +228 -228
  38. package/dist/src/graphql/service/queries.js +128 -128
  39. package/dist/src/graphql/store/mutations.d.ts +1 -0
  40. package/dist/src/graphql/store/mutations.js +29 -0
  41. package/dist/src/graphql/store/queries.d.ts +1 -0
  42. package/dist/src/graphql/store/queries.js +29 -0
  43. package/dist/src/graphql/user/mutations.js +214 -214
  44. package/dist/src/graphql/user/queries.js +312 -312
  45. package/dist/src/lib/accounting/index.d.ts +5 -0
  46. package/dist/src/lib/accounting/index.js +32 -0
  47. package/dist/src/lib/campaign/index.d.ts +20 -0
  48. package/dist/src/lib/campaign/index.js +213 -0
  49. package/dist/src/lib/cashbook/index.d.ts +6 -0
  50. package/dist/src/lib/cashbook/index.js +56 -0
  51. package/dist/src/lib/comhub/index.d.ts +6 -0
  52. package/dist/src/lib/comhub/index.js +50 -0
  53. package/dist/src/lib/crm/index.d.ts +2 -0
  54. package/dist/src/lib/crm/index.js +40 -0
  55. package/dist/src/lib/deepLinkVietQr/index.d.ts +6 -0
  56. package/dist/src/lib/deepLinkVietQr/index.js +45 -0
  57. package/dist/src/lib/getImage/index.d.ts +4 -0
  58. package/dist/src/lib/getImage/index.js +10 -0
  59. package/dist/src/lib/image/index.d.ts +7 -0
  60. package/dist/src/lib/image/index.js +49 -0
  61. package/dist/src/lib/omnigateway/index.d.ts +7 -0
  62. package/dist/src/lib/omnigateway/index.js +58 -0
  63. package/dist/src/lib/paymentV2/index.d.ts +13 -0
  64. package/dist/src/lib/paymentV2/index.js +163 -0
  65. package/dist/src/lib/portal/index.d.ts +21 -0
  66. package/dist/src/lib/portal/index.js +225 -0
  67. package/dist/src/lib/serviceSDK.js +12 -12
  68. package/dist/src/lib/store/index.d.ts +30 -0
  69. package/dist/src/lib/store/index.js +74 -0
  70. package/dist/src/lib/token/index.d.ts +5 -0
  71. package/dist/src/lib/token/index.js +32 -0
  72. package/dist/src/lib/upload/index.d.ts +5 -0
  73. package/dist/src/lib/upload/index.js +35 -0
  74. package/dist/src/lib/warehouseV2/index.d.ts +13 -0
  75. package/dist/src/lib/warehouseV2/index.js +54 -0
  76. package/dist/src/lib/zca/index.d.ts +12 -0
  77. package/dist/src/lib/zca/index.js +41 -0
  78. package/dist/src/types/campaign.d.ts +14 -0
  79. package/dist/src/types/campaign.js +2 -0
  80. package/dist/src/types/invoice.d.ts +13 -0
  81. package/dist/src/types/invoice.js +2 -0
  82. package/dist/src/types/store.d.ts +158 -0
  83. package/dist/src/types/store.js +3 -0
  84. package/dist/src/utils/validatePhoneNumber.d.ts +1 -0
  85. package/dist/src/utils/validatePhoneNumber.js +20 -0
  86. package/package.json +44 -43
@@ -2,401 +2,401 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  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
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
- variant {
117
- id
118
- price {
119
- amount
120
- currencyCode
121
- }
122
- product {
123
- id
124
- title
125
- }
126
- title
127
- unitPrice {
128
- amount
129
- currencyCode
130
- }
131
- }
132
- productOptions {
133
- idOption
134
- name
135
- value
136
- title
137
- }
138
- resourceItems {
139
- name
140
- quantity
141
- unit
142
- productId
143
- }
144
- resourceConfigs {
145
- name
146
- quantity
147
- unit
148
- productId
149
- }
150
- itemType
151
- }
152
- serviceId
153
- }
154
- }
155
- }
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
+ variant {
117
+ id
118
+ price {
119
+ amount
120
+ currencyCode
121
+ }
122
+ product {
123
+ id
124
+ title
125
+ }
126
+ title
127
+ unitPrice {
128
+ amount
129
+ currencyCode
130
+ }
131
+ }
132
+ productOptions {
133
+ idOption
134
+ name
135
+ value
136
+ title
137
+ }
138
+ resourceItems {
139
+ name
140
+ quantity
141
+ unit
142
+ productId
143
+ }
144
+ resourceConfigs {
145
+ name
146
+ quantity
147
+ unit
148
+ productId
149
+ }
150
+ itemType
151
+ }
152
+ serviceId
153
+ }
154
+ }
155
+ }
156
156
  `;
157
157
  const GET_ORDER_DETAIL_DYNAMIC = (fields = []) => {
158
158
  const fieldStr = fields.join("\n ");
159
159
  const hasFields = fields.length > 0;
160
- return (0, graphql_tag_1.gql) `
161
- query getOrderDetail($orderId: String!) {
162
- orderDetail(orderId: $orderId) ${hasFields ? `{ ${fieldStr} }` : ""}
163
- }
160
+ return (0, graphql_tag_1.gql) `
161
+ query getOrderDetail($orderId: String!) {
162
+ orderDetail(orderId: $orderId) ${hasFields ? `{ ${fieldStr} }` : ""}
163
+ }
164
164
  `;
165
165
  };
166
166
  exports.GET_ORDER_DETAIL_DYNAMIC = GET_ORDER_DETAIL_DYNAMIC;
167
- exports.GET_QUANTITY_ORDER_LINEITEMS = (0, graphql_tag_1.gql) `
168
- query getOrderDetail($orderId: String!) {
169
- orderDetail(orderId: $orderId) {
170
- order {
171
- financialStatus
172
- orderStatus
173
- orderType
174
- customAttribute
175
- ownerPartyId
176
- }
177
- lineItems {
178
- orderLineItem {
179
- variant {
180
- title
181
- }
182
- itemType
183
- orderLineItemParentId
184
- }
185
- }
186
- }
187
- }
167
+ exports.GET_QUANTITY_ORDER_LINEITEMS = (0, graphql_tag_1.gql) `
168
+ query getOrderDetail($orderId: String!) {
169
+ orderDetail(orderId: $orderId) {
170
+ order {
171
+ financialStatus
172
+ orderStatus
173
+ orderType
174
+ customAttribute
175
+ ownerPartyId
176
+ }
177
+ lineItems {
178
+ orderLineItem {
179
+ variant {
180
+ title
181
+ }
182
+ itemType
183
+ orderLineItemParentId
184
+ }
185
+ }
186
+ }
187
+ }
188
188
  `;
189
- exports.GET_ORDER_LINE_ITEM_BY_SERVICE_ID = (0, graphql_tag_1.gql) `
190
- query GetOrderLineItemByServiceId($partnerId: String!, $serviceId: String!) {
191
- getOrderLineItemByServiceId(partnerId: $partnerId, serviceId: $serviceId) {
192
- id
193
- partnerId
194
- currentQuantity
195
- customAttributes {
196
- key
197
- value
198
- }
199
- discountedTotalPrice {
200
- amount
201
- currencyCode
202
- }
203
- originalTotalPrice {
204
- amount
205
- currencyCode
206
- }
207
- quantity
208
- variant {
209
- availableForSale
210
- barcode
211
-
212
- currentlyNotInStock
213
- id
214
-
215
- price {
216
- amount
217
- currencyCode
218
- }
219
-
220
- unitPrice {
221
- amount
222
- currencyCode
223
- }
224
-
225
- quantityAvailable
226
- requiresShipping
227
- sku
228
- title
229
-
230
- weight
231
- weightUnit
232
- }
233
- orderId
234
- orderItemId
235
- fulfilledQuantity
236
- fulfillingQuantity
237
- orderItemName
238
- note
239
- createdStamp
240
- updatedStamp
241
- completedAt
242
- orderLineItemParentId
243
- orderStatus
244
- totalVAT {
245
- amount
246
- currencyCode
247
- }
248
- vatRate {
249
- amount
250
- currencyCode
251
- }
252
- totalTax {
253
- amount
254
- currencyCode
255
- }
256
- unitType
257
- productOptions {
258
- idOption
259
- name
260
- value
261
- }
262
- }
263
- }
189
+ exports.GET_ORDER_LINE_ITEM_BY_SERVICE_ID = (0, graphql_tag_1.gql) `
190
+ query GetOrderLineItemByServiceId($partnerId: String!, $serviceId: String!) {
191
+ getOrderLineItemByServiceId(partnerId: $partnerId, serviceId: $serviceId) {
192
+ id
193
+ partnerId
194
+ currentQuantity
195
+ customAttributes {
196
+ key
197
+ value
198
+ }
199
+ discountedTotalPrice {
200
+ amount
201
+ currencyCode
202
+ }
203
+ originalTotalPrice {
204
+ amount
205
+ currencyCode
206
+ }
207
+ quantity
208
+ variant {
209
+ availableForSale
210
+ barcode
211
+
212
+ currentlyNotInStock
213
+ id
214
+
215
+ price {
216
+ amount
217
+ currencyCode
218
+ }
219
+
220
+ unitPrice {
221
+ amount
222
+ currencyCode
223
+ }
224
+
225
+ quantityAvailable
226
+ requiresShipping
227
+ sku
228
+ title
229
+
230
+ weight
231
+ weightUnit
232
+ }
233
+ orderId
234
+ orderItemId
235
+ fulfilledQuantity
236
+ fulfillingQuantity
237
+ orderItemName
238
+ note
239
+ createdStamp
240
+ updatedStamp
241
+ completedAt
242
+ orderLineItemParentId
243
+ orderStatus
244
+ totalVAT {
245
+ amount
246
+ currencyCode
247
+ }
248
+ vatRate {
249
+ amount
250
+ currencyCode
251
+ }
252
+ totalTax {
253
+ amount
254
+ currencyCode
255
+ }
256
+ unitType
257
+ productOptions {
258
+ idOption
259
+ name
260
+ value
261
+ }
262
+ }
263
+ }
264
264
  `;
265
- exports.GET_ORDER_BY_SERVICE_ID = (0, graphql_tag_1.gql) `
266
- query GetOrderByServiceId($serviceId: String!) {
267
- getOrderByServiceId(serviceId: $serviceId) {
268
- cancelReason
269
- currencyCode
270
- currentSubtotalPrice {
271
- amount
272
- currencyCode
273
- }
274
- currentTotalDuties {
275
- amount
276
- currencyCode
277
- }
278
- currentTotalPrice {
279
- amount
280
- currencyCode
281
- }
282
- currentTotalTax {
283
- amount
284
- currencyCode
285
- }
286
- edited
287
- financialStatus
288
- fulfillmentStatus
289
- orderStatus
290
- id
291
- partnerId
292
- ownerName
293
- ownerEmail
294
- ownerPhone
295
- orderNumber
296
- originalTotalDuties {
297
- amount
298
- currencyCode
299
- }
300
- originalTotalPrice {
301
- amount
302
- currencyCode
303
- }
304
- shippingAddress {
305
- address1
306
- address2
307
- city
308
- company
309
- country
310
- countryCode
311
- firstName
312
- formattedArea
313
- id
314
- lastName
315
- latitude
316
- longitude
317
- name
318
- phone
319
- province
320
- provinceCode
321
- zip
322
- }
323
- subtotalPrice {
324
- amount
325
- currencyCode
326
- }
327
- totalPrice {
328
- amount
329
- currencyCode
330
- }
331
- totalRefunded {
332
- amount
333
- currencyCode
334
- }
335
- totalShippingPrice {
336
- amount
337
- currencyCode
338
- }
339
- totalTax {
340
- amount
341
- currencyCode
342
- }
343
- discountTotalPrice {
344
- amount
345
- currencyCode
346
- }
347
- cod {
348
- amount
349
- currencyCode
350
- }
351
- rawData
352
- orderId
353
- note
354
- pending
355
- checkCommodities
356
- shipmentNote
357
- shopId
358
- facilityId
359
- orderType
360
- shippingServiceId
361
- carrierId
362
- fromOrderId
363
- externalCode
364
- createdAt
365
- createdStamp
366
- canceledAt
367
- updatedAt
368
- approvedAt
369
- processedAt
370
- completedAt
371
- createdBy
372
- saleName
373
- salePartyId
374
- ownerPartyId
375
- customerLocale
376
- orderParentId
377
- totalVAT {
378
- amount
379
- currencyCode
380
- }
381
- shopName
382
- version
383
- discountApplications {
384
- allocationMethod
385
- targetSelection
386
- targetType
387
- title
388
- value {
389
- amount
390
- currencyCode
391
- }
392
- }
393
- orderDate
394
- dueDatePayment
395
- }
396
- }
265
+ exports.GET_ORDER_BY_SERVICE_ID = (0, graphql_tag_1.gql) `
266
+ query GetOrderByServiceId($serviceId: String!) {
267
+ getOrderByServiceId(serviceId: $serviceId) {
268
+ cancelReason
269
+ currencyCode
270
+ currentSubtotalPrice {
271
+ amount
272
+ currencyCode
273
+ }
274
+ currentTotalDuties {
275
+ amount
276
+ currencyCode
277
+ }
278
+ currentTotalPrice {
279
+ amount
280
+ currencyCode
281
+ }
282
+ currentTotalTax {
283
+ amount
284
+ currencyCode
285
+ }
286
+ edited
287
+ financialStatus
288
+ fulfillmentStatus
289
+ orderStatus
290
+ id
291
+ partnerId
292
+ ownerName
293
+ ownerEmail
294
+ ownerPhone
295
+ orderNumber
296
+ originalTotalDuties {
297
+ amount
298
+ currencyCode
299
+ }
300
+ originalTotalPrice {
301
+ amount
302
+ currencyCode
303
+ }
304
+ shippingAddress {
305
+ address1
306
+ address2
307
+ city
308
+ company
309
+ country
310
+ countryCode
311
+ firstName
312
+ formattedArea
313
+ id
314
+ lastName
315
+ latitude
316
+ longitude
317
+ name
318
+ phone
319
+ province
320
+ provinceCode
321
+ zip
322
+ }
323
+ subtotalPrice {
324
+ amount
325
+ currencyCode
326
+ }
327
+ totalPrice {
328
+ amount
329
+ currencyCode
330
+ }
331
+ totalRefunded {
332
+ amount
333
+ currencyCode
334
+ }
335
+ totalShippingPrice {
336
+ amount
337
+ currencyCode
338
+ }
339
+ totalTax {
340
+ amount
341
+ currencyCode
342
+ }
343
+ discountTotalPrice {
344
+ amount
345
+ currencyCode
346
+ }
347
+ cod {
348
+ amount
349
+ currencyCode
350
+ }
351
+ rawData
352
+ orderId
353
+ note
354
+ pending
355
+ checkCommodities
356
+ shipmentNote
357
+ shopId
358
+ facilityId
359
+ orderType
360
+ shippingServiceId
361
+ carrierId
362
+ fromOrderId
363
+ externalCode
364
+ createdAt
365
+ createdStamp
366
+ canceledAt
367
+ updatedAt
368
+ approvedAt
369
+ processedAt
370
+ completedAt
371
+ createdBy
372
+ saleName
373
+ salePartyId
374
+ ownerPartyId
375
+ customerLocale
376
+ orderParentId
377
+ totalVAT {
378
+ amount
379
+ currencyCode
380
+ }
381
+ shopName
382
+ version
383
+ discountApplications {
384
+ allocationMethod
385
+ targetSelection
386
+ targetType
387
+ title
388
+ value {
389
+ amount
390
+ currencyCode
391
+ }
392
+ }
393
+ orderDate
394
+ dueDatePayment
395
+ }
396
+ }
397
397
  `;
398
- exports.FIND_ORDER_BY_OWNER_PARTYID = (0, graphql_tag_1.gql) `
399
- query FindOrderByOwnerPartyId($partnerId: String!, $ownerPartyId: String!) {
400
- findOrderByOwnerPartyId(partnerId: $partnerId, ownerPartyId: $ownerPartyId)
401
- }
398
+ exports.FIND_ORDER_BY_OWNER_PARTYID = (0, graphql_tag_1.gql) `
399
+ query FindOrderByOwnerPartyId($partnerId: String!, $ownerPartyId: String!) {
400
+ findOrderByOwnerPartyId(partnerId: $partnerId, ownerPartyId: $ownerPartyId)
401
+ }
402
402
  `;