@longvansoftware/storefront-js-client 3.0.6 → 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,185 +2,185 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GW_CONFIG_DETAIL = exports.PAYMENT_STATUS = exports.PAYMENT_INFO = exports.GET_PAYMENT_METHOD_TYPES = exports.PAYMENT_METHODS = exports.PAYMENTS_BY_ORDERS = void 0;
4
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
- paymentNote
44
- }
45
- }
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
+ paymentNote
44
+ }
45
+ }
46
46
  `;
47
- exports.PAYMENT_METHODS = (0, graphql_tag_1.gql) `
48
- query PaymentMethods($partnerCode: String) {
49
- paymentMethods(partnerCode: $partnerCode) {
50
- id
51
- code
52
- name
53
- description
54
- image
55
- }
56
- }
47
+ exports.PAYMENT_METHODS = (0, graphql_tag_1.gql) `
48
+ query PaymentMethods($partnerCode: String) {
49
+ paymentMethods(partnerCode: $partnerCode) {
50
+ id
51
+ code
52
+ name
53
+ description
54
+ image
55
+ }
56
+ }
57
57
  `;
58
- exports.GET_PAYMENT_METHOD_TYPES = (0, graphql_tag_1.gql) `
59
- query GetPaymentMethodTypes($partnerId: String!, $storeId: String!) {
60
- getPaymentMethodTypes(partnerId: $partnerId, storeId: $storeId) {
61
- code
62
- name
63
- description
64
- image
65
- }
66
- }
58
+ exports.GET_PAYMENT_METHOD_TYPES = (0, graphql_tag_1.gql) `
59
+ query GetPaymentMethodTypes($partnerId: String!, $storeId: String!) {
60
+ getPaymentMethodTypes(partnerId: $partnerId, storeId: $storeId) {
61
+ code
62
+ name
63
+ description
64
+ image
65
+ }
66
+ }
67
67
  `;
68
- exports.PAYMENT_INFO = (0, graphql_tag_1.gql) `
69
- query PaymentInfo($paymentId: String!) {
70
- paymentInfo(paymentId: $paymentId) {
71
- id
72
- payType
73
- payDate
74
- dueDate
75
- completePayment
76
- paymentTerm
77
- methodCode
78
- methodTypeCode
79
- gatewayConfigId
80
- partnerCode
81
- totalAmount
82
- remain
83
- currCode
84
- invoiceId
85
- orderId
86
- orderInfo
87
- orderGroup
88
- orderType
89
- returnUrl
90
- ipnUrl
91
- merchantIp
92
- extraData
93
- storeID
94
- bankCode
95
- appUser
96
- phone
97
- email
98
- address
99
- signature
100
- createBy
101
- transactionId
102
- baseMethodCode
103
- retry
104
- postToOrder
105
- editAble
106
- approved
107
- statusCode
108
- paymentGroup
109
- userId
110
- type
111
- attributes
112
- items {
113
- id
114
- partnerCode
115
- paymentId
116
- type
117
- orderId
118
- invoiceId
119
- orderGroup
120
- orderType
121
- orderInfo
122
- totalAmount
123
- }
124
- }
125
- }
68
+ exports.PAYMENT_INFO = (0, graphql_tag_1.gql) `
69
+ query PaymentInfo($paymentId: String!) {
70
+ paymentInfo(paymentId: $paymentId) {
71
+ id
72
+ payType
73
+ payDate
74
+ dueDate
75
+ completePayment
76
+ paymentTerm
77
+ methodCode
78
+ methodTypeCode
79
+ gatewayConfigId
80
+ partnerCode
81
+ totalAmount
82
+ remain
83
+ currCode
84
+ invoiceId
85
+ orderId
86
+ orderInfo
87
+ orderGroup
88
+ orderType
89
+ returnUrl
90
+ ipnUrl
91
+ merchantIp
92
+ extraData
93
+ storeID
94
+ bankCode
95
+ appUser
96
+ phone
97
+ email
98
+ address
99
+ signature
100
+ createBy
101
+ transactionId
102
+ baseMethodCode
103
+ retry
104
+ postToOrder
105
+ editAble
106
+ approved
107
+ statusCode
108
+ paymentGroup
109
+ userId
110
+ type
111
+ attributes
112
+ items {
113
+ id
114
+ partnerCode
115
+ paymentId
116
+ type
117
+ orderId
118
+ invoiceId
119
+ orderGroup
120
+ orderType
121
+ orderInfo
122
+ totalAmount
123
+ }
124
+ }
125
+ }
126
126
  `;
127
- exports.PAYMENT_STATUS = (0, graphql_tag_1.gql) `
128
- query PaymentStatus($paymentId: String!) {
129
- paymentStatus(paymentId: $paymentId) {
130
- methodCode
131
- methodTypeCode
132
- gatewayConfigId
133
- partnerCode
134
- totalAmount
135
- fee
136
- discountAmount
137
- payDate
138
- payType
139
- transactionDate
140
- paymentId
141
- invoiceId
142
- orderInfo
143
- orderType
144
- locale
145
- merchantIp
146
- extraData
147
- storeID
148
- bankCode
149
- appUser
150
- phone
151
- email
152
- address
153
- statusCode
154
- statusDescription
155
- transactionId
156
- createBy
157
- methodDescription
158
- methodMapping
159
- baseMethodCode
160
- confirmPaidBy
161
- confirmPaidDate
162
- qrCode
163
- payUrl
164
- attributes
165
- }
166
- }
127
+ exports.PAYMENT_STATUS = (0, graphql_tag_1.gql) `
128
+ query PaymentStatus($paymentId: String!) {
129
+ paymentStatus(paymentId: $paymentId) {
130
+ methodCode
131
+ methodTypeCode
132
+ gatewayConfigId
133
+ partnerCode
134
+ totalAmount
135
+ fee
136
+ discountAmount
137
+ payDate
138
+ payType
139
+ transactionDate
140
+ paymentId
141
+ invoiceId
142
+ orderInfo
143
+ orderType
144
+ locale
145
+ merchantIp
146
+ extraData
147
+ storeID
148
+ bankCode
149
+ appUser
150
+ phone
151
+ email
152
+ address
153
+ statusCode
154
+ statusDescription
155
+ transactionId
156
+ createBy
157
+ methodDescription
158
+ methodMapping
159
+ baseMethodCode
160
+ confirmPaidBy
161
+ confirmPaidDate
162
+ qrCode
163
+ payUrl
164
+ attributes
165
+ }
166
+ }
167
167
  `;
168
- exports.GW_CONFIG_DETAIL = (0, graphql_tag_1.gql) `
169
- query GwConfigDetail($configId: String!) {
170
- gwConfigDetail(configId: $configId) {
171
- id
172
- name
173
- methodCode
174
- partnerCode
175
- subMethodCode
176
- gwPartnerCode
177
- gwPartnerName
178
- gwSubChannel
179
- gwMethodVersion
180
- accessKey
181
- secretKey
182
- description
183
- activated
184
- }
185
- }
168
+ exports.GW_CONFIG_DETAIL = (0, graphql_tag_1.gql) `
169
+ query GwConfigDetail($configId: String!) {
170
+ gwConfigDetail(configId: $configId) {
171
+ id
172
+ name
173
+ methodCode
174
+ partnerCode
175
+ subMethodCode
176
+ gwPartnerCode
177
+ gwPartnerName
178
+ gwSubChannel
179
+ gwMethodVersion
180
+ accessKey
181
+ secretKey
182
+ description
183
+ activated
184
+ }
185
+ }
186
186
  `;
@@ -2,104 +2,104 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CLEAR_ALL_CACHES = exports.UPDATE_UNIT = exports.UPDATE_SHORT_DESCRIPTION = exports.UPDATE_CATEGORY = exports.UPDATE_PRICE_PROMOTION = exports.UPDATE_PRICE = exports.UPDATE_PRODUCT_TITLE = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
- exports.UPDATE_PRODUCT_TITLE = (0, graphql_tag_1.gql) `
6
- mutation UpdateProductTitle(
7
- $productId: String!
8
- $title: String!
9
- $updatedBy: String!
10
- ) {
11
- updateProductTitle(
12
- productId: $productId
13
- title: $title
14
- updatedBy: $updatedBy
15
- ) {
16
- status
17
- message
18
- }
19
- }
5
+ exports.UPDATE_PRODUCT_TITLE = (0, graphql_tag_1.gql) `
6
+ mutation UpdateProductTitle(
7
+ $productId: String!
8
+ $title: String!
9
+ $updatedBy: String!
10
+ ) {
11
+ updateProductTitle(
12
+ productId: $productId
13
+ title: $title
14
+ updatedBy: $updatedBy
15
+ ) {
16
+ status
17
+ message
18
+ }
19
+ }
20
20
  `;
21
- exports.UPDATE_PRICE = (0, graphql_tag_1.gql) `
22
- mutation UpdatePrice(
23
- $productId: String!
24
- $storeId: String!
25
- $price: BigDecimal!
26
- $updatedBy: String!
27
- ) {
28
- updatePrice(
29
- productId: $productId
30
- storeId: $storeId
31
- price: $price
32
- updatedBy: $updatedBy
33
- ) {
34
- status
35
- message
36
- }
37
- }
21
+ exports.UPDATE_PRICE = (0, graphql_tag_1.gql) `
22
+ mutation UpdatePrice(
23
+ $productId: String!
24
+ $storeId: String!
25
+ $price: BigDecimal!
26
+ $updatedBy: String!
27
+ ) {
28
+ updatePrice(
29
+ productId: $productId
30
+ storeId: $storeId
31
+ price: $price
32
+ updatedBy: $updatedBy
33
+ ) {
34
+ status
35
+ message
36
+ }
37
+ }
38
38
  `;
39
- exports.UPDATE_PRICE_PROMOTION = (0, graphql_tag_1.gql) `
40
- mutation UpdatePricePromotion(
41
- $productId: String!
42
- $storeId: String!
43
- $price: BigDecimal!
44
- $updatedBy: String!
45
- ) {
46
- updatePricePromotion(
47
- productId: $productId
48
- storeId: $storeId
49
- price: $price
50
- updatedBy: $updatedBy
51
- ) {
52
- status
53
- message
54
- }
55
- }
39
+ exports.UPDATE_PRICE_PROMOTION = (0, graphql_tag_1.gql) `
40
+ mutation UpdatePricePromotion(
41
+ $productId: String!
42
+ $storeId: String!
43
+ $price: BigDecimal!
44
+ $updatedBy: String!
45
+ ) {
46
+ updatePricePromotion(
47
+ productId: $productId
48
+ storeId: $storeId
49
+ price: $price
50
+ updatedBy: $updatedBy
51
+ ) {
52
+ status
53
+ message
54
+ }
55
+ }
56
56
  `;
57
- exports.UPDATE_CATEGORY = (0, graphql_tag_1.gql) `
58
- mutation UpdateCategory(
59
- $productId: String!
60
- $categoryId: String!
61
- $updatedBy: String!
62
- ) {
63
- updateCategory(
64
- productId: $productId
65
- categoryId: $categoryId
66
- updatedBy: $updatedBy
67
- ) {
68
- status
69
- message
70
- }
71
- }
57
+ exports.UPDATE_CATEGORY = (0, graphql_tag_1.gql) `
58
+ mutation UpdateCategory(
59
+ $productId: String!
60
+ $categoryId: String!
61
+ $updatedBy: String!
62
+ ) {
63
+ updateCategory(
64
+ productId: $productId
65
+ categoryId: $categoryId
66
+ updatedBy: $updatedBy
67
+ ) {
68
+ status
69
+ message
70
+ }
71
+ }
72
72
  `;
73
- exports.UPDATE_SHORT_DESCRIPTION = (0, graphql_tag_1.gql) `
74
- mutation UpdateShortDescription(
75
- $productId: String!
76
- $shortDescription: String!
77
- $updatedBy: String!
78
- ) {
79
- updateShortDescription(
80
- productId: $productId
81
- shortDescription: $shortDescription
82
- updatedBy: $updatedBy
83
- ) {
84
- status
85
- message
86
- }
87
- }
73
+ exports.UPDATE_SHORT_DESCRIPTION = (0, graphql_tag_1.gql) `
74
+ mutation UpdateShortDescription(
75
+ $productId: String!
76
+ $shortDescription: String!
77
+ $updatedBy: String!
78
+ ) {
79
+ updateShortDescription(
80
+ productId: $productId
81
+ shortDescription: $shortDescription
82
+ updatedBy: $updatedBy
83
+ ) {
84
+ status
85
+ message
86
+ }
87
+ }
88
88
  `;
89
- exports.UPDATE_UNIT = (0, graphql_tag_1.gql) `
90
- mutation UpdateUnit(
91
- $productId: String!
92
- $unitId: String!
93
- $updatedBy: String!
94
- ) {
95
- updateUnit(productId: $productId, unitId: $unitId, updatedBy: $updatedBy) {
96
- status
97
- message
98
- }
99
- }
89
+ exports.UPDATE_UNIT = (0, graphql_tag_1.gql) `
90
+ mutation UpdateUnit(
91
+ $productId: String!
92
+ $unitId: String!
93
+ $updatedBy: String!
94
+ ) {
95
+ updateUnit(productId: $productId, unitId: $unitId, updatedBy: $updatedBy) {
96
+ status
97
+ message
98
+ }
99
+ }
100
100
  `;
101
- exports.CLEAR_ALL_CACHES = (0, graphql_tag_1.gql) `
102
- mutation ClearAllCaches {
103
- clearAllCaches
104
- }
101
+ exports.CLEAR_ALL_CACHES = (0, graphql_tag_1.gql) `
102
+ mutation ClearAllCaches {
103
+ clearAllCaches
104
+ }
105
105
  `;