@longvansoftware/storefront-js-client 3.0.5 → 3.0.7

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 (41) hide show
  1. package/README.md +221 -221
  2. package/dist/src/graphql/auth/mutations.d.ts +1 -0
  3. package/dist/src/graphql/auth/mutations.js +192 -205
  4. package/dist/src/graphql/auth/queries.d.ts +0 -1
  5. package/dist/src/graphql/auth/queries.js +60 -65
  6. package/dist/src/graphql/campaign/mutations.js +26 -26
  7. package/dist/src/graphql/campaign/queries.js +375 -375
  8. package/dist/src/graphql/cashbook/queries.js +93 -93
  9. package/dist/src/graphql/cloud/mutations.js +103 -103
  10. package/dist/src/graphql/cloud/queries.js +112 -112
  11. package/dist/src/graphql/computing/mutations.js +96 -96
  12. package/dist/src/graphql/computing/queries.js +41 -41
  13. package/dist/src/graphql/crm/mutations.js +813 -813
  14. package/dist/src/graphql/crm/queries.js +661 -661
  15. package/dist/src/graphql/fragments/product.d.ts +38 -0
  16. package/dist/src/graphql/fragments/product.js +196 -0
  17. package/dist/src/graphql/payment/mutations.js +146 -146
  18. package/dist/src/graphql/payment/queries.js +116 -116
  19. package/dist/src/graphql/paymentV2/mutations.js +47 -47
  20. package/dist/src/graphql/paymentV2/queries.js +176 -176
  21. package/dist/src/graphql/product/mutations.js +94 -94
  22. package/dist/src/graphql/product/queries.js +472 -472
  23. package/dist/src/graphql/service/mutations.js +304 -304
  24. package/dist/src/graphql/service/queries.js +131 -131
  25. package/dist/src/graphql/store/mutations.js +24 -24
  26. package/dist/src/graphql/store/queries.js +24 -24
  27. package/dist/src/graphql/user/mutations.js +142 -142
  28. package/dist/src/graphql/user/queries.js +298 -298
  29. package/dist/src/lib/auth/index.d.ts +7 -36
  30. package/dist/src/lib/auth/index.js +6 -69
  31. package/dist/src/lib/order/index.d.ts +2 -0
  32. package/dist/src/lib/order/index.js +37 -0
  33. package/dist/src/lib/serviceSDK.js +12 -12
  34. package/dist/src/lib/shareZalo/index.d.ts +5 -0
  35. package/dist/src/lib/shareZalo/index.js +32 -0
  36. package/dist/src/types/auth.d.ts +0 -123
  37. package/dist/src/types/common.d.ts +264 -0
  38. package/dist/src/types/common.js +35 -0
  39. package/dist/src/utils/errorHandler.d.ts +64 -0
  40. package/dist/src/utils/errorHandler.js +197 -0
  41. package/package.json +43 -44
@@ -2,126 +2,126 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GET_INVOICE_ITEM_OF_INVOICE = exports.VIEW_PUBLISHED_INVOICE = exports.GET_INVOICES_OF_ORDER = exports.GET_INVOICE_DETAIL = exports.GET_PAYMENT_METHOD_OF_STORE_CHANNEL = exports.GEN_QR_PAYMENT = exports.GET_PAYMENT_METHOD = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
- exports.GET_PAYMENT_METHOD = (0, graphql_tag_1.gql) `
6
- query GetPaymentMethod($orgId: String!, $storeChannelId: String) {
7
- getPaymentMethod(orgId: $orgId, storeChannelId: $storeChannelId) {
8
- id
9
- code
10
- name
11
- }
12
- }
5
+ exports.GET_PAYMENT_METHOD = (0, graphql_tag_1.gql) `
6
+ query GetPaymentMethod($orgId: String!, $storeChannelId: String) {
7
+ getPaymentMethod(orgId: $orgId, storeChannelId: $storeChannelId) {
8
+ id
9
+ code
10
+ name
11
+ }
12
+ }
13
13
  `;
14
- exports.GEN_QR_PAYMENT = (0, graphql_tag_1.gql) `
15
- query GenQRPayment(
16
- $orgId: String!
17
- $orderId: String!
18
- $storeId: String!
19
- $totalAmount: BigDecimal
20
- ) {
21
- genQRPayment(
22
- orgId: $orgId
23
- orderId: $orderId
24
- storeId: $storeId
25
- totalAmount: $totalAmount
26
- )
27
- }
14
+ exports.GEN_QR_PAYMENT = (0, graphql_tag_1.gql) `
15
+ query GenQRPayment(
16
+ $orgId: String!
17
+ $orderId: String!
18
+ $storeId: String!
19
+ $totalAmount: BigDecimal
20
+ ) {
21
+ genQRPayment(
22
+ orgId: $orgId
23
+ orderId: $orderId
24
+ storeId: $storeId
25
+ totalAmount: $totalAmount
26
+ )
27
+ }
28
28
  `;
29
- exports.GET_PAYMENT_METHOD_OF_STORE_CHANNEL = (0, graphql_tag_1.gql) `
30
- query GetPaymentMethodOfStoreChannel(
31
- $orgId: String!
32
- $storeChannelId: String!
33
- ) {
34
- getPaymentMethodOfStoreChannel(
35
- orgId: $orgId
36
- storeChannelId: $storeChannelId
37
- ) {
38
- id
39
- code
40
- name
41
- image
42
- description
43
- }
44
- }
29
+ exports.GET_PAYMENT_METHOD_OF_STORE_CHANNEL = (0, graphql_tag_1.gql) `
30
+ query GetPaymentMethodOfStoreChannel(
31
+ $orgId: String!
32
+ $storeChannelId: String!
33
+ ) {
34
+ getPaymentMethodOfStoreChannel(
35
+ orgId: $orgId
36
+ storeChannelId: $storeChannelId
37
+ ) {
38
+ id
39
+ code
40
+ name
41
+ image
42
+ description
43
+ }
44
+ }
45
45
  `;
46
- exports.GET_INVOICE_DETAIL = (0, graphql_tag_1.gql) `
47
- query GetInvoiceDetail($invoiceId: String!) {
48
- getInvoiceDetail(invoiceId: $invoiceId) {
49
- id
50
- orderId
51
- type
52
- partyIdFrom
53
- partyIdTo
54
- status
55
- invoiceDate
56
- invoiceDueDate
57
- createdBy
58
- createdStamp
59
- paymentId
60
- originalTotalPrice
61
- totalVAT
62
- appliedAmount
63
- }
64
- }
46
+ exports.GET_INVOICE_DETAIL = (0, graphql_tag_1.gql) `
47
+ query GetInvoiceDetail($invoiceId: String!) {
48
+ getInvoiceDetail(invoiceId: $invoiceId) {
49
+ id
50
+ orderId
51
+ type
52
+ partyIdFrom
53
+ partyIdTo
54
+ status
55
+ invoiceDate
56
+ invoiceDueDate
57
+ createdBy
58
+ createdStamp
59
+ paymentId
60
+ originalTotalPrice
61
+ totalVAT
62
+ appliedAmount
63
+ }
64
+ }
65
65
  `;
66
- exports.GET_INVOICES_OF_ORDER = (0, graphql_tag_1.gql) `
67
- query GetInvoicesOfOrder($orderId: String!) {
68
- getInvoicesOfOrder(orderId: $orderId) {
69
- id
70
- orderId
71
- type
72
- partyIdFrom
73
- partyIdTo
74
- status
75
- invoiceDate
76
- invoiceDueDate
77
- createdBy
78
- createdStamp
79
- paymentId
80
- originalTotalPrice
81
- totalVAT
82
- appliedAmount
83
- attributes {
84
- name
85
- value
86
- }
87
- }
88
- }
66
+ exports.GET_INVOICES_OF_ORDER = (0, graphql_tag_1.gql) `
67
+ query GetInvoicesOfOrder($orderId: String!) {
68
+ getInvoicesOfOrder(orderId: $orderId) {
69
+ id
70
+ orderId
71
+ type
72
+ partyIdFrom
73
+ partyIdTo
74
+ status
75
+ invoiceDate
76
+ invoiceDueDate
77
+ createdBy
78
+ createdStamp
79
+ paymentId
80
+ originalTotalPrice
81
+ totalVAT
82
+ appliedAmount
83
+ attributes {
84
+ name
85
+ value
86
+ }
87
+ }
88
+ }
89
89
  `;
90
- exports.VIEW_PUBLISHED_INVOICE = (0, graphql_tag_1.gql) `
91
- query ViewPublishedInvoice($partnerId: String!, $invoiceId: String!) {
92
- viewPublishedInvoice(partnerId: $partnerId, invoiceId: $invoiceId) {
93
- code
94
- message
95
- invoiceId
96
- sourceId
97
- sourceType
98
- previewLink
99
- lookupLink
100
- }
101
- }
90
+ exports.VIEW_PUBLISHED_INVOICE = (0, graphql_tag_1.gql) `
91
+ query ViewPublishedInvoice($partnerId: String!, $invoiceId: String!) {
92
+ viewPublishedInvoice(partnerId: $partnerId, invoiceId: $invoiceId) {
93
+ code
94
+ message
95
+ invoiceId
96
+ sourceId
97
+ sourceType
98
+ previewLink
99
+ lookupLink
100
+ }
101
+ }
102
102
  `;
103
- exports.GET_INVOICE_ITEM_OF_INVOICE = (0, graphql_tag_1.gql) `
104
- query GetInvoiceItemOfInvoie($invoiceId: String!) {
105
- getInvoiceItemOfInvoie(invoiceId: $invoiceId) {
106
- id
107
- invoiceId
108
- type
109
- partyIdFrom
110
- partyIdTo
111
- status
112
- productParentId
113
- productId
114
- productName
115
- sku
116
- unitType
117
- quantity
118
- amount
119
- vatRateName
120
- vatRate
121
- totalVAT
122
- totalAmount
123
- invoiceDate
124
- note
125
- }
126
- }
103
+ exports.GET_INVOICE_ITEM_OF_INVOICE = (0, graphql_tag_1.gql) `
104
+ query GetInvoiceItemOfInvoie($invoiceId: String!) {
105
+ getInvoiceItemOfInvoie(invoiceId: $invoiceId) {
106
+ id
107
+ invoiceId
108
+ type
109
+ partyIdFrom
110
+ partyIdTo
111
+ status
112
+ productParentId
113
+ productId
114
+ productName
115
+ sku
116
+ unitType
117
+ quantity
118
+ amount
119
+ vatRateName
120
+ vatRate
121
+ totalVAT
122
+ totalAmount
123
+ invoiceDate
124
+ note
125
+ }
126
+ }
127
127
  `;
@@ -2,53 +2,53 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CONFIRM_PAYMENT_SUCCESS_MANUAL = exports.CONFIRM_TO_GATEWAY = exports.CANCEL_PAYMENT = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
- exports.CANCEL_PAYMENT = (0, graphql_tag_1.gql) `
6
- mutation CancelPayment($paymentId: String!, $reason: String!) {
7
- cancelPayment(paymentId: $paymentId, reason: $reason)
8
- }
5
+ exports.CANCEL_PAYMENT = (0, graphql_tag_1.gql) `
6
+ mutation CancelPayment($paymentId: String!, $reason: String!) {
7
+ cancelPayment(paymentId: $paymentId, reason: $reason)
8
+ }
9
9
  `;
10
- exports.CONFIRM_TO_GATEWAY = (0, graphql_tag_1.gql) `
11
- mutation ConfirmToGateWay(
12
- $paymentId: String!
13
- $methodCode: String
14
- $returnUrl: String
15
- ) {
16
- confirmToGateway(
17
- paymentId: $paymentId
18
- methodCode: $methodCode
19
- returnUrl: $returnUrl
20
- ) {
21
- code
22
- message
23
- data
24
- qrCodeUrl
25
- deeplink
26
- deeplinkMiniApp
27
- paymentId
28
- gwConfigId
29
- }
30
- }
10
+ exports.CONFIRM_TO_GATEWAY = (0, graphql_tag_1.gql) `
11
+ mutation ConfirmToGateWay(
12
+ $paymentId: String!
13
+ $methodCode: String
14
+ $returnUrl: String
15
+ ) {
16
+ confirmToGateway(
17
+ paymentId: $paymentId
18
+ methodCode: $methodCode
19
+ returnUrl: $returnUrl
20
+ ) {
21
+ code
22
+ message
23
+ data
24
+ qrCodeUrl
25
+ deeplink
26
+ deeplinkMiniApp
27
+ paymentId
28
+ gwConfigId
29
+ }
30
+ }
31
31
  `;
32
- exports.CONFIRM_PAYMENT_SUCCESS_MANUAL = (0, graphql_tag_1.gql) `
33
- mutation ConfirmPaymentSuccessManual(
34
- $paymentId: String!
35
- $transactionNo: String!
36
- $note: String
37
- $confirmBy: String!
38
- ) {
39
- confirmPaymentSuccessManual(
40
- paymentId: $paymentId
41
- transactionNo: $transactionNo
42
- note: $note
43
- confirmBy: $confirmBy
44
- ) {
45
- code
46
- message
47
- data
48
- qrCodeUrl
49
- deeplink
50
- deeplinkMiniApp
51
- paymentId
52
- }
53
- }
32
+ exports.CONFIRM_PAYMENT_SUCCESS_MANUAL = (0, graphql_tag_1.gql) `
33
+ mutation ConfirmPaymentSuccessManual(
34
+ $paymentId: String!
35
+ $transactionNo: String!
36
+ $note: String
37
+ $confirmBy: String!
38
+ ) {
39
+ confirmPaymentSuccessManual(
40
+ paymentId: $paymentId
41
+ transactionNo: $transactionNo
42
+ note: $note
43
+ confirmBy: $confirmBy
44
+ ) {
45
+ code
46
+ message
47
+ data
48
+ qrCodeUrl
49
+ deeplink
50
+ deeplinkMiniApp
51
+ paymentId
52
+ }
53
+ }
54
54
  `;