@longvansoftware/storefront-js-client 3.7.6 → 3.7.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.
Files changed (55) hide show
  1. package/dist/src/graphql/product/queries.d.ts +1 -0
  2. package/dist/src/graphql/product/queries.js +108 -1
  3. package/dist/src/lib/product/index.d.ts +1 -0
  4. package/dist/src/lib/product/index.js +17 -0
  5. package/package.json +2 -3
  6. package/dist/src/graphql/accounting_service/mutations.d.ts +0 -2
  7. package/dist/src/graphql/accounting_service/mutations.js +0 -102
  8. package/dist/src/graphql/accounting_service/queries.d.ts +0 -1
  9. package/dist/src/graphql/accounting_service/queries.js +0 -62
  10. package/dist/src/graphql/crm_camping/mutations.d.ts +0 -1
  11. package/dist/src/graphql/crm_camping/mutations.js +0 -37
  12. package/dist/src/graphql/crm_camping/queries.d.ts +0 -8
  13. package/dist/src/graphql/crm_camping/queries.js +0 -279
  14. package/dist/src/graphql/fragments/product.d.ts +0 -38
  15. package/dist/src/graphql/fragments/product.js +0 -196
  16. package/dist/src/graphql/orderGraphQL/mutations.d.ts +0 -4
  17. package/dist/src/graphql/orderGraphQL/mutations.js +0 -359
  18. package/dist/src/graphql/orderGraphQL/queries.d.ts +0 -7
  19. package/dist/src/graphql/orderGraphQL/queries.js +0 -402
  20. package/dist/src/graphql/paymentLV/mutations.d.ts +0 -2
  21. package/dist/src/graphql/paymentLV/mutations.js +0 -25
  22. package/dist/src/graphql/paymentLV/queries.d.ts +0 -4
  23. package/dist/src/graphql/paymentLV/queries.js +0 -83
  24. package/dist/src/graphql/quicklab_service/mutations.d.ts +0 -8
  25. package/dist/src/graphql/quicklab_service/mutations.js +0 -171
  26. package/dist/src/graphql/quicklab_service/queries.d.ts +0 -6
  27. package/dist/src/graphql/quicklab_service/queries.js +0 -121
  28. package/dist/src/graphql/resource_permission/mutations.d.ts +0 -2
  29. package/dist/src/graphql/resource_permission/mutations.js +0 -63
  30. package/dist/src/graphql/resource_permission/queries.d.ts +0 -1
  31. package/dist/src/graphql/resource_permission/queries.js +0 -18
  32. package/dist/src/lib/accounting_service/index.d.ts +0 -9
  33. package/dist/src/lib/accounting_service/index.js +0 -69
  34. package/dist/src/lib/cloud_rest/index.d.ts +0 -17
  35. package/dist/src/lib/cloud_rest/index.js +0 -101
  36. package/dist/src/lib/crm_camping/index.d.ts +0 -16
  37. package/dist/src/lib/crm_camping/index.js +0 -227
  38. package/dist/src/lib/dns/index.d.ts +0 -7
  39. package/dist/src/lib/dns/index.js +0 -40
  40. package/dist/src/lib/orderGraphQL/index.d.ts +0 -16
  41. package/dist/src/lib/orderGraphQL/index.js +0 -192
  42. package/dist/src/lib/order_cloud_rest/index.d.ts +0 -7
  43. package/dist/src/lib/order_cloud_rest/index.js +0 -39
  44. package/dist/src/lib/paymentLV/index.d.ts +0 -12
  45. package/dist/src/lib/paymentLV/index.js +0 -132
  46. package/dist/src/lib/quicklab_service/index.d.ts +0 -18
  47. package/dist/src/lib/quicklab_service/index.js +0 -197
  48. package/dist/src/lib/resource_permission/index.d.ts +0 -9
  49. package/dist/src/lib/resource_permission/index.js +0 -81
  50. package/dist/src/lib/shareZalo/index.d.ts +0 -5
  51. package/dist/src/lib/shareZalo/index.js +0 -32
  52. package/dist/src/types/common.d.ts +0 -264
  53. package/dist/src/types/common.js +0 -35
  54. package/dist/src/utils/errorHandler.d.ts +0 -64
  55. package/dist/src/utils/errorHandler.js +0 -197
@@ -1,402 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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
- 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
- }
156
- `;
157
- const GET_ORDER_DETAIL_DYNAMIC = (fields = []) => {
158
- const fieldStr = fields.join("\n ");
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
- }
164
- `;
165
- };
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
- }
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
- }
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
- }
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
- }
402
- `;
@@ -1,2 +0,0 @@
1
- export declare const CANCEL_PAYMENT: import("graphql").DocumentNode;
2
- export declare const CONFIRM_PAID_MANUAL: import("graphql").DocumentNode;
@@ -1,25 +0,0 @@
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
- $reason: String!
9
- $createBy: String
10
- ) {
11
- cancelPayment(paymentId: $paymentId, reason: $reason, createBy: $createBy)
12
- }
13
- `;
14
- exports.CONFIRM_PAID_MANUAL = (0, graphql_tag_1.gql) `
15
- mutation ConfirmPaidManual($paymentId: String!, $confirmBy: String) {
16
- confirmPaidManual(paymentId: $paymentId, confirmBy: $confirmBy) {
17
- code
18
- message
19
- data
20
- qrCodeUrl
21
- deeplink
22
- deeplinkMiniApp
23
- }
24
- }
25
- `;
@@ -1,4 +0,0 @@
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;
@@ -1,83 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- 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
- partnerCode
11
- totalAmount
12
- fee
13
- discountAmount
14
- payDate
15
- payType
16
- transactionDate
17
- orderId
18
- paymentId
19
- invoiceId
20
- orderInfo
21
- orderType
22
- locale
23
- merchantIp
24
- extraData
25
- storeID
26
- bankCode
27
- appUser
28
- phone
29
- email
30
- address
31
- statusCode
32
- statusDescription
33
- transactionId
34
- createBy
35
- methodDescription
36
- methodMapping
37
- baseMethodCode
38
- confirmPaidBy
39
- confirmPaidDate
40
- }
41
- }
42
- `;
43
- exports.GET_TRANSFER_INFO = (0, graphql_tag_1.gql) `
44
- query GetTransferInfor(
45
- $partnerId: String!
46
- $storeId: String!
47
- $paymentId: String
48
- ) {
49
- getTransferInfo(
50
- partnerId: $partnerId
51
- storeId: $storeId
52
- paymentId: $paymentId
53
- ) {
54
- bankCode
55
- bankName
56
- accountNumber
57
- accountName
58
- description
59
- transferInfo
60
- }
61
- }
62
- `;
63
- exports.GET_PAYMENT_METHOD_TYPES = (0, graphql_tag_1.gql) `
64
- query GetPaymentMethodTypes($partnerId: String!, $storeId: String!) {
65
- getPaymentMethodTypes(partnerId: $partnerId, storeId: $storeId) {
66
- code
67
- name
68
- description
69
- image
70
- }
71
- }
72
- `;
73
- exports.PAYMENT_METHODS = (0, graphql_tag_1.gql) `
74
- query PaymentMethods($partnerCode: String!) {
75
- paymentMethods(partnerCode: $partnerCode) {
76
- id
77
- code
78
- name
79
- description
80
- image
81
- }
82
- }
83
- `;
@@ -1,8 +0,0 @@
1
- import { DocumentNode } from "graphql";
2
- export declare const CREATE_LAB_SESSION_BY_TEMPLATE_ID: DocumentNode;
3
- export declare const CREATE_LAB_SESSION_BY_LAB_SESSION_ID: DocumentNode;
4
- export declare const CREATE_LAB_SESSION_BY_COMPUTING_ID: DocumentNode;
5
- export declare const UPDATE_END_TIME_LAB_SESSION: DocumentNode;
6
- export declare const STOP_LAB_SESSION: DocumentNode;
7
- export declare const UPDATE_TYPE_LAB_SESSION: DocumentNode;
8
- export declare const STOP_LAB_SESSION_FOR_CUSTOMER: DocumentNode;
@@ -1,171 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.STOP_LAB_SESSION_FOR_CUSTOMER = exports.UPDATE_TYPE_LAB_SESSION = exports.STOP_LAB_SESSION = exports.UPDATE_END_TIME_LAB_SESSION = exports.CREATE_LAB_SESSION_BY_COMPUTING_ID = exports.CREATE_LAB_SESSION_BY_LAB_SESSION_ID = exports.CREATE_LAB_SESSION_BY_TEMPLATE_ID = void 0;
4
- const graphql_tag_1 = require("graphql-tag");
5
- // Tạo phiên thực hành từ template
6
- exports.CREATE_LAB_SESSION_BY_TEMPLATE_ID = (0, graphql_tag_1.gql) `
7
- mutation CreateLabSessionByTemplateId(
8
- $templateId: String!
9
- $userId: String!
10
- $articleId: String!
11
- $typeLabSessionCode: String!
12
- ) {
13
- createLabSessionByTemplateId(
14
- templateId: $templateId
15
- userId: $userId
16
- articleId: $articleId
17
- typeLabSessionCode: $typeLabSessionCode
18
- ) {
19
- labSessionId
20
- userId
21
- typeLabSession
22
- statusUseName
23
- statusUse
24
- startTime
25
- endTime
26
- note
27
- articleId
28
- articleTitle
29
- computingId
30
- computingName
31
- computingState
32
- templateId
33
- templateName
34
- productId
35
- productName
36
- parent
37
- labSessionIdLast
38
- statusUseLast
39
- startTimeLast
40
- endTimeLast
41
- noteLast
42
- }
43
- }
44
- `;
45
- // Tạo phiên thực hành con từ phiên thực hành chính
46
- exports.CREATE_LAB_SESSION_BY_LAB_SESSION_ID = (0, graphql_tag_1.gql) `
47
- mutation CreateLabSessionByLabSessionId(
48
- $labSessionId: String!
49
- $userId: String!
50
- $articleId: String!
51
- ) {
52
- createLabSessionByLabSessionId(
53
- labSessionId: $labSessionId
54
- userId: $userId
55
- articleId: $articleId
56
- ) {
57
- labSessionId
58
- userId
59
- typeLabSession
60
- statusUseName
61
- statusUse
62
- startTime
63
- endTime
64
- note
65
- articleId
66
- articleTitle
67
- computingId
68
- computingName
69
- computingState
70
- templateId
71
- templateName
72
- productId
73
- productName
74
- parent
75
- labSessionIdLast
76
- statusUseLast
77
- startTimeLast
78
- endTimeLast
79
- noteLast
80
- }
81
- }
82
- `;
83
- // Tạo phiên thực hành từ computing của khách hàng
84
- exports.CREATE_LAB_SESSION_BY_COMPUTING_ID = (0, graphql_tag_1.gql) `
85
- mutation CreateLabSessionByComputingId(
86
- $computingId: String!
87
- $userId: String!
88
- $articleId: String!
89
- ) {
90
- createLabSessionByComputingId(
91
- computingId: $computingId
92
- userId: $userId
93
- articleId: $articleId
94
- ) {
95
- labSessionId
96
- userId
97
- typeLabSession
98
- statusUseName
99
- statusUse
100
- startTime
101
- endTime
102
- note
103
- articleId
104
- articleTitle
105
- computingId
106
- computingName
107
- computingState
108
- templateId
109
- templateName
110
- productId
111
- productName
112
- parent
113
- labSessionIdLast
114
- statusUseLast
115
- startTimeLast
116
- endTimeLast
117
- noteLast
118
- }
119
- }
120
- `;
121
- // Cập nhật lại thời gian thực hành mỗi phút 1 lần(setup realtime ở FE)
122
- exports.UPDATE_END_TIME_LAB_SESSION = (0, graphql_tag_1.gql) `
123
- mutation UpdateEndTimeLabSession($labSessionId: String!, $userId: String!) {
124
- updateEndTimeLabSession(labSessionId: $labSessionId, userId: $userId) {
125
- status
126
- message
127
- }
128
- }
129
- `;
130
- // Dừng thực hành
131
- exports.STOP_LAB_SESSION = (0, graphql_tag_1.gql) `
132
- mutation StopLabSession(
133
- $labSessionId: String!
134
- $userId: String!
135
- $note: String
136
- ) {
137
- stopLabSession(labSessionId: $labSessionId, userId: $userId, note: $note) {
138
- status
139
- message
140
- }
141
- }
142
- `;
143
- exports.UPDATE_TYPE_LAB_SESSION = (0, graphql_tag_1.gql) `
144
- mutation StopLabSession(
145
- $labSessionId: String!
146
- $typeLabSessionCode: String!
147
- $userId: String!
148
- ) {
149
- updateTypeLabSession(
150
- labSessionId: $labSessionId
151
- typeLabSessionCode: $typeLabSessionCode
152
- userId: $userId
153
- ) {
154
- status
155
- message
156
- }
157
- }
158
- `;
159
- // Dừng thực hành
160
- exports.STOP_LAB_SESSION_FOR_CUSTOMER = (0, graphql_tag_1.gql) `
161
- mutation StopLabSessionForCustomer(
162
- $labSessionId: String!
163
- $userId: String!
164
- $note: String
165
- ) {
166
- stopLabSessionForCustomer(labSessionId: $labSessionId, userId: $userId, note: $note) {
167
- status
168
- message
169
- }
170
- }
171
- `;
@@ -1,6 +0,0 @@
1
- import { DocumentNode } from "graphql";
2
- export declare const GET_TEMPLATE_BY_ARTICLE_ID: DocumentNode;
3
- export declare const GET_TYPE_LAB_SESSION: DocumentNode;
4
- export declare const GET_LAB_SESSIONS_BY_USER_ID: DocumentNode;
5
- export declare const GET_LAB_SESSIONS_BY_USER_ID_AND_ARTICLE_ID: DocumentNode;
6
- export declare const GET_LAB_SESSIONS_CHILL_BY_PARENT: DocumentNode;