@longvansoftware/storefront-js-client 1.6.2 → 1.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/README.md +93 -93
- package/dist/src/graphql/auth/mutations.js +88 -88
- package/dist/src/graphql/auth/queries.js +20 -20
- package/dist/src/graphql/campaign/queries.js +84 -84
- package/dist/src/graphql/cloud/mutations.js +103 -103
- package/dist/src/graphql/cloud/queries.js +112 -112
- package/dist/src/graphql/computing/mutations.js +96 -96
- package/dist/src/graphql/computing/queries.js +41 -41
- package/dist/src/graphql/crm/mutations.js +327 -327
- package/dist/src/graphql/crm/queries.js +390 -390
- package/dist/src/graphql/payment/mutations.js +37 -32
- package/dist/src/graphql/payment/queries.js +38 -38
- package/dist/src/graphql/product/queries.d.ts +1 -0
- package/dist/src/graphql/product/queries.js +344 -339
- package/dist/src/graphql/service/mutations.js +304 -304
- package/dist/src/graphql/service/queries.js +131 -131
- package/dist/src/graphql/user/mutations.js +110 -110
- package/dist/src/graphql/user/queries.js +235 -235
- package/dist/src/lib/product/index.d.ts +1 -0
- package/dist/src/lib/product/index.js +14 -0
- package/dist/src/lib/serviceSDK.js +8 -8
- package/package.json +43 -43
|
@@ -2,251 +2,251 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GET_WARDS = exports.GET_DISTRICTS = exports.GET_PROVINCES = exports.GET_CONTACT_INFOS_BY_COMPANY_ID = exports.GET_COMPANY_BY_CONTACT_INFO_ID = exports.GET_EMPLOYEES_BY_STORE_CHANEL_ID = exports.GET_STORE_CHANEL_IDS_BY_EMPLOYESS_ID = exports.GET_POSTIONS_BY_EMPLOYEES_ID = exports.SEARCH_EMPLOYEES = exports.SEARCH_CUSTOMER = exports.GET_CUSTOMER_BY_ID = exports.SEARCH_COMPANY = exports.GET_PERSON_BY_IDS_QUERY = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
-
exports.GET_PERSON_BY_IDS_QUERY = (0, graphql_tag_1.gql) `
|
|
6
|
-
query GetPersonByIds($partyIds: [String!]!) {
|
|
7
|
-
getPersonByPartyIds(partyIds: $partyIds) {
|
|
8
|
-
status
|
|
9
|
-
partyId
|
|
10
|
-
fullName
|
|
11
|
-
phone
|
|
12
|
-
address
|
|
13
|
-
gender
|
|
14
|
-
birthDate
|
|
15
|
-
email
|
|
16
|
-
personalTitle
|
|
17
|
-
imageUrl
|
|
18
|
-
identityNumber
|
|
19
|
-
id
|
|
20
|
-
addressModel {
|
|
21
|
-
id
|
|
22
|
-
addressInfo
|
|
23
|
-
provinceGeoId
|
|
24
|
-
districtGeoId
|
|
25
|
-
wardGeoId
|
|
26
|
-
provinceName
|
|
27
|
-
districtName
|
|
28
|
-
wardName
|
|
29
|
-
isDefault
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
5
|
+
exports.GET_PERSON_BY_IDS_QUERY = (0, graphql_tag_1.gql) `
|
|
6
|
+
query GetPersonByIds($partyIds: [String!]!) {
|
|
7
|
+
getPersonByPartyIds(partyIds: $partyIds) {
|
|
8
|
+
status
|
|
9
|
+
partyId
|
|
10
|
+
fullName
|
|
11
|
+
phone
|
|
12
|
+
address
|
|
13
|
+
gender
|
|
14
|
+
birthDate
|
|
15
|
+
email
|
|
16
|
+
personalTitle
|
|
17
|
+
imageUrl
|
|
18
|
+
identityNumber
|
|
19
|
+
id
|
|
20
|
+
addressModel {
|
|
21
|
+
id
|
|
22
|
+
addressInfo
|
|
23
|
+
provinceGeoId
|
|
24
|
+
districtGeoId
|
|
25
|
+
wardGeoId
|
|
26
|
+
provinceName
|
|
27
|
+
districtName
|
|
28
|
+
wardName
|
|
29
|
+
isDefault
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
33
|
`;
|
|
34
|
-
exports.SEARCH_COMPANY = (0, graphql_tag_1.gql) `
|
|
35
|
-
query SearchCompany($keyword: String, $orgId: String!, $limit: Int) {
|
|
36
|
-
searchCompany(keyword: $keyword, orgId: $orgId, limit: $limit) {
|
|
37
|
-
id
|
|
38
|
-
name
|
|
39
|
-
address
|
|
40
|
-
gender
|
|
41
|
-
identityNumber
|
|
42
|
-
birthDate
|
|
43
|
-
email
|
|
44
|
-
phone
|
|
45
|
-
createdStamp
|
|
46
|
-
createdBy
|
|
47
|
-
memberLevel
|
|
48
|
-
}
|
|
49
|
-
}
|
|
34
|
+
exports.SEARCH_COMPANY = (0, graphql_tag_1.gql) `
|
|
35
|
+
query SearchCompany($keyword: String, $orgId: String!, $limit: Int) {
|
|
36
|
+
searchCompany(keyword: $keyword, orgId: $orgId, limit: $limit) {
|
|
37
|
+
id
|
|
38
|
+
name
|
|
39
|
+
address
|
|
40
|
+
gender
|
|
41
|
+
identityNumber
|
|
42
|
+
birthDate
|
|
43
|
+
email
|
|
44
|
+
phone
|
|
45
|
+
createdStamp
|
|
46
|
+
createdBy
|
|
47
|
+
memberLevel
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
50
|
`;
|
|
51
|
-
exports.GET_CUSTOMER_BY_ID = (0, graphql_tag_1.gql) `
|
|
52
|
-
query GetCustomerById($id: String!) {
|
|
53
|
-
getCustomerById(id: $id) {
|
|
54
|
-
id
|
|
55
|
-
name
|
|
56
|
-
address
|
|
57
|
-
gender
|
|
58
|
-
identityNumber
|
|
59
|
-
birthDate
|
|
60
|
-
email
|
|
61
|
-
phone
|
|
62
|
-
createdStamp
|
|
63
|
-
createdBy
|
|
64
|
-
memberLevel
|
|
65
|
-
}
|
|
66
|
-
}
|
|
51
|
+
exports.GET_CUSTOMER_BY_ID = (0, graphql_tag_1.gql) `
|
|
52
|
+
query GetCustomerById($id: String!) {
|
|
53
|
+
getCustomerById(id: $id) {
|
|
54
|
+
id
|
|
55
|
+
name
|
|
56
|
+
address
|
|
57
|
+
gender
|
|
58
|
+
identityNumber
|
|
59
|
+
birthDate
|
|
60
|
+
email
|
|
61
|
+
phone
|
|
62
|
+
createdStamp
|
|
63
|
+
createdBy
|
|
64
|
+
memberLevel
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
67
|
`;
|
|
68
|
-
exports.SEARCH_CUSTOMER = (0, graphql_tag_1.gql) `
|
|
69
|
-
query SearchCustomers(
|
|
70
|
-
$keyword: String
|
|
71
|
-
$type: String
|
|
72
|
-
$startCreatedDate: DateCustom
|
|
73
|
-
$endCreatedDate: DateCustom
|
|
74
|
-
$memberLevel: String
|
|
75
|
-
$partnerId: String!
|
|
76
|
-
$currentPage: Int!
|
|
77
|
-
$pageSize: Int!
|
|
78
|
-
) {
|
|
79
|
-
searchCustomers(
|
|
80
|
-
keyword: $keyword
|
|
81
|
-
type: $type
|
|
82
|
-
startCreatedDate: $startCreatedDate
|
|
83
|
-
endCreatedDate: $endCreatedDate
|
|
84
|
-
memberLevel: $memberLevel
|
|
85
|
-
partnerId: $partnerId
|
|
86
|
-
currentPage: $currentPage
|
|
87
|
-
pageSize: $pageSize
|
|
88
|
-
) {
|
|
89
|
-
totalPages
|
|
90
|
-
totalElements
|
|
91
|
-
currentPage
|
|
92
|
-
content {
|
|
93
|
-
id
|
|
94
|
-
name
|
|
95
|
-
address
|
|
96
|
-
gender
|
|
97
|
-
identityNumber
|
|
98
|
-
birthDate
|
|
99
|
-
email
|
|
100
|
-
phone
|
|
101
|
-
createdStamp
|
|
102
|
-
createdBy
|
|
103
|
-
memberLevel
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
68
|
+
exports.SEARCH_CUSTOMER = (0, graphql_tag_1.gql) `
|
|
69
|
+
query SearchCustomers(
|
|
70
|
+
$keyword: String
|
|
71
|
+
$type: String
|
|
72
|
+
$startCreatedDate: DateCustom
|
|
73
|
+
$endCreatedDate: DateCustom
|
|
74
|
+
$memberLevel: String
|
|
75
|
+
$partnerId: String!
|
|
76
|
+
$currentPage: Int!
|
|
77
|
+
$pageSize: Int!
|
|
78
|
+
) {
|
|
79
|
+
searchCustomers(
|
|
80
|
+
keyword: $keyword
|
|
81
|
+
type: $type
|
|
82
|
+
startCreatedDate: $startCreatedDate
|
|
83
|
+
endCreatedDate: $endCreatedDate
|
|
84
|
+
memberLevel: $memberLevel
|
|
85
|
+
partnerId: $partnerId
|
|
86
|
+
currentPage: $currentPage
|
|
87
|
+
pageSize: $pageSize
|
|
88
|
+
) {
|
|
89
|
+
totalPages
|
|
90
|
+
totalElements
|
|
91
|
+
currentPage
|
|
92
|
+
content {
|
|
93
|
+
id
|
|
94
|
+
name
|
|
95
|
+
address
|
|
96
|
+
gender
|
|
97
|
+
identityNumber
|
|
98
|
+
birthDate
|
|
99
|
+
email
|
|
100
|
+
phone
|
|
101
|
+
createdStamp
|
|
102
|
+
createdBy
|
|
103
|
+
memberLevel
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
107
|
`;
|
|
108
|
-
exports.SEARCH_EMPLOYEES = (0, graphql_tag_1.gql) `
|
|
109
|
-
query SearchEmployees($keyword: String, $positionShortName: String, $partnerId: String) {
|
|
110
|
-
searchEmployees(
|
|
111
|
-
keyword: $keyword
|
|
112
|
-
positionShortName: $positionShortName
|
|
113
|
-
partnerId: $partnerId
|
|
114
|
-
) {
|
|
115
|
-
id
|
|
116
|
-
name
|
|
117
|
-
address
|
|
118
|
-
gender
|
|
119
|
-
identityNumber
|
|
120
|
-
birthDate
|
|
121
|
-
email
|
|
122
|
-
phone
|
|
123
|
-
createdStamp
|
|
124
|
-
createdBy
|
|
125
|
-
memberLevel
|
|
126
|
-
}
|
|
127
|
-
}
|
|
108
|
+
exports.SEARCH_EMPLOYEES = (0, graphql_tag_1.gql) `
|
|
109
|
+
query SearchEmployees($keyword: String, $positionShortName: String, $partnerId: String) {
|
|
110
|
+
searchEmployees(
|
|
111
|
+
keyword: $keyword
|
|
112
|
+
positionShortName: $positionShortName
|
|
113
|
+
partnerId: $partnerId
|
|
114
|
+
) {
|
|
115
|
+
id
|
|
116
|
+
name
|
|
117
|
+
address
|
|
118
|
+
gender
|
|
119
|
+
identityNumber
|
|
120
|
+
birthDate
|
|
121
|
+
email
|
|
122
|
+
phone
|
|
123
|
+
createdStamp
|
|
124
|
+
createdBy
|
|
125
|
+
memberLevel
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
128
|
`;
|
|
129
|
-
exports.GET_POSTIONS_BY_EMPLOYEES_ID = (0, graphql_tag_1.gql) `
|
|
130
|
-
query GetPositionsByEmployeeId($employeeId: String!, $partnerId: String!) {
|
|
131
|
-
getPositionsByEmployeeId(employeeId: $employeeId, partnerId: $partnerId)
|
|
132
|
-
}
|
|
129
|
+
exports.GET_POSTIONS_BY_EMPLOYEES_ID = (0, graphql_tag_1.gql) `
|
|
130
|
+
query GetPositionsByEmployeeId($employeeId: String!, $partnerId: String!) {
|
|
131
|
+
getPositionsByEmployeeId(employeeId: $employeeId, partnerId: $partnerId)
|
|
132
|
+
}
|
|
133
133
|
`;
|
|
134
|
-
exports.GET_STORE_CHANEL_IDS_BY_EMPLOYESS_ID = (0, graphql_tag_1.gql) `
|
|
135
|
-
query GetStoreChannelIdsByEmployeeId($employeeId: String!, $partnerId: String!) {
|
|
136
|
-
getStoreChannelIdsByEmployeeId(employeeId: $employeeId, partnerId: $partnerId)
|
|
137
|
-
}
|
|
134
|
+
exports.GET_STORE_CHANEL_IDS_BY_EMPLOYESS_ID = (0, graphql_tag_1.gql) `
|
|
135
|
+
query GetStoreChannelIdsByEmployeeId($employeeId: String!, $partnerId: String!) {
|
|
136
|
+
getStoreChannelIdsByEmployeeId(employeeId: $employeeId, partnerId: $partnerId)
|
|
137
|
+
}
|
|
138
138
|
`;
|
|
139
|
-
exports.GET_EMPLOYEES_BY_STORE_CHANEL_ID = (0, graphql_tag_1.gql) `
|
|
140
|
-
query GetEmployeesByStoreChannelId($storeChannelId: String!, $partnerId: String!) {
|
|
141
|
-
getEmployeesByStoreChannelId(storeChannelId: $storeChannelId, partnerId: $partnerId) {
|
|
142
|
-
id
|
|
143
|
-
name
|
|
144
|
-
address
|
|
145
|
-
gender
|
|
146
|
-
identityNumber
|
|
147
|
-
birthDate
|
|
148
|
-
email
|
|
149
|
-
phone
|
|
150
|
-
createdStamp
|
|
151
|
-
createdBy
|
|
152
|
-
memberLevel
|
|
153
|
-
}
|
|
154
|
-
}
|
|
139
|
+
exports.GET_EMPLOYEES_BY_STORE_CHANEL_ID = (0, graphql_tag_1.gql) `
|
|
140
|
+
query GetEmployeesByStoreChannelId($storeChannelId: String!, $partnerId: String!) {
|
|
141
|
+
getEmployeesByStoreChannelId(storeChannelId: $storeChannelId, partnerId: $partnerId) {
|
|
142
|
+
id
|
|
143
|
+
name
|
|
144
|
+
address
|
|
145
|
+
gender
|
|
146
|
+
identityNumber
|
|
147
|
+
birthDate
|
|
148
|
+
email
|
|
149
|
+
phone
|
|
150
|
+
createdStamp
|
|
151
|
+
createdBy
|
|
152
|
+
memberLevel
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
155
|
`;
|
|
156
|
-
exports.GET_COMPANY_BY_CONTACT_INFO_ID = (0, graphql_tag_1.gql) `
|
|
157
|
-
query GetCompanyByContactInfoId($contactId: String!, $partnerId: String!) {
|
|
158
|
-
getCompanyByContactInfoId(contactId: $contactId, partnerId: $partnerId) {
|
|
159
|
-
id
|
|
160
|
-
name
|
|
161
|
-
address
|
|
162
|
-
gender
|
|
163
|
-
identityNumber
|
|
164
|
-
birthDate
|
|
165
|
-
email
|
|
166
|
-
phone
|
|
167
|
-
createdStamp
|
|
168
|
-
createdBy
|
|
169
|
-
memberLevel
|
|
170
|
-
}
|
|
171
|
-
}
|
|
156
|
+
exports.GET_COMPANY_BY_CONTACT_INFO_ID = (0, graphql_tag_1.gql) `
|
|
157
|
+
query GetCompanyByContactInfoId($contactId: String!, $partnerId: String!) {
|
|
158
|
+
getCompanyByContactInfoId(contactId: $contactId, partnerId: $partnerId) {
|
|
159
|
+
id
|
|
160
|
+
name
|
|
161
|
+
address
|
|
162
|
+
gender
|
|
163
|
+
identityNumber
|
|
164
|
+
birthDate
|
|
165
|
+
email
|
|
166
|
+
phone
|
|
167
|
+
createdStamp
|
|
168
|
+
createdBy
|
|
169
|
+
memberLevel
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
172
|
`;
|
|
173
|
-
exports.GET_CONTACT_INFOS_BY_COMPANY_ID = (0, graphql_tag_1.gql) `
|
|
174
|
-
query GetContactInfosByCompanyId($companyId: String!, $partnerId: String!) {
|
|
175
|
-
getContactInfosByCompanyId(companyId: $companyId, partnerId: $partnerId) {
|
|
176
|
-
id
|
|
177
|
-
name
|
|
178
|
-
address
|
|
179
|
-
gender
|
|
180
|
-
identityNumber
|
|
181
|
-
birthDate
|
|
182
|
-
email
|
|
183
|
-
phone
|
|
184
|
-
createdStamp
|
|
185
|
-
createdBy
|
|
186
|
-
memberLevel
|
|
187
|
-
}
|
|
188
|
-
}
|
|
173
|
+
exports.GET_CONTACT_INFOS_BY_COMPANY_ID = (0, graphql_tag_1.gql) `
|
|
174
|
+
query GetContactInfosByCompanyId($companyId: String!, $partnerId: String!) {
|
|
175
|
+
getContactInfosByCompanyId(companyId: $companyId, partnerId: $partnerId) {
|
|
176
|
+
id
|
|
177
|
+
name
|
|
178
|
+
address
|
|
179
|
+
gender
|
|
180
|
+
identityNumber
|
|
181
|
+
birthDate
|
|
182
|
+
email
|
|
183
|
+
phone
|
|
184
|
+
createdStamp
|
|
185
|
+
createdBy
|
|
186
|
+
memberLevel
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
189
|
`;
|
|
190
|
-
exports.GET_PROVINCES = (0, graphql_tag_1.gql) `
|
|
191
|
-
query GetProvinces {
|
|
192
|
-
getProvinces {
|
|
193
|
-
geoId
|
|
194
|
-
geoTypeId
|
|
195
|
-
geoName
|
|
196
|
-
geoNameLocal
|
|
197
|
-
geoCode
|
|
198
|
-
geoSecCode
|
|
199
|
-
abbreviation
|
|
200
|
-
vnPostId
|
|
201
|
-
jtExpressId
|
|
202
|
-
vnPostRegion
|
|
203
|
-
inetId
|
|
204
|
-
lastUpdatedStamp
|
|
205
|
-
lastUpdatedTxStamp
|
|
206
|
-
createdStamp
|
|
207
|
-
createdTxStamp
|
|
208
|
-
}
|
|
209
|
-
}
|
|
190
|
+
exports.GET_PROVINCES = (0, graphql_tag_1.gql) `
|
|
191
|
+
query GetProvinces {
|
|
192
|
+
getProvinces {
|
|
193
|
+
geoId
|
|
194
|
+
geoTypeId
|
|
195
|
+
geoName
|
|
196
|
+
geoNameLocal
|
|
197
|
+
geoCode
|
|
198
|
+
geoSecCode
|
|
199
|
+
abbreviation
|
|
200
|
+
vnPostId
|
|
201
|
+
jtExpressId
|
|
202
|
+
vnPostRegion
|
|
203
|
+
inetId
|
|
204
|
+
lastUpdatedStamp
|
|
205
|
+
lastUpdatedTxStamp
|
|
206
|
+
createdStamp
|
|
207
|
+
createdTxStamp
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
210
|
`;
|
|
211
|
-
exports.GET_DISTRICTS = (0, graphql_tag_1.gql) `
|
|
212
|
-
query GetDistricts($provinceId: String!) {
|
|
213
|
-
getDistricts(provinceId: $provinceId) {
|
|
214
|
-
geoId
|
|
215
|
-
geoTypeId
|
|
216
|
-
geoName
|
|
217
|
-
geoNameLocal
|
|
218
|
-
geoCode
|
|
219
|
-
geoSecCode
|
|
220
|
-
abbreviation
|
|
221
|
-
vnPostId
|
|
222
|
-
jtExpressId
|
|
223
|
-
vnPostRegion
|
|
224
|
-
inetId
|
|
225
|
-
lastUpdatedStamp
|
|
226
|
-
lastUpdatedTxStamp
|
|
227
|
-
createdStamp
|
|
228
|
-
createdTxStamp
|
|
229
|
-
}
|
|
230
|
-
}
|
|
211
|
+
exports.GET_DISTRICTS = (0, graphql_tag_1.gql) `
|
|
212
|
+
query GetDistricts($provinceId: String!) {
|
|
213
|
+
getDistricts(provinceId: $provinceId) {
|
|
214
|
+
geoId
|
|
215
|
+
geoTypeId
|
|
216
|
+
geoName
|
|
217
|
+
geoNameLocal
|
|
218
|
+
geoCode
|
|
219
|
+
geoSecCode
|
|
220
|
+
abbreviation
|
|
221
|
+
vnPostId
|
|
222
|
+
jtExpressId
|
|
223
|
+
vnPostRegion
|
|
224
|
+
inetId
|
|
225
|
+
lastUpdatedStamp
|
|
226
|
+
lastUpdatedTxStamp
|
|
227
|
+
createdStamp
|
|
228
|
+
createdTxStamp
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
231
|
`;
|
|
232
|
-
exports.GET_WARDS = (0, graphql_tag_1.gql) `
|
|
233
|
-
query GetWards($districtId: String!) {
|
|
234
|
-
getWards(districtId: $districtId) {
|
|
235
|
-
geoId
|
|
236
|
-
geoTypeId
|
|
237
|
-
geoName
|
|
238
|
-
geoNameLocal
|
|
239
|
-
geoCode
|
|
240
|
-
geoSecCode
|
|
241
|
-
abbreviation
|
|
242
|
-
vnPostId
|
|
243
|
-
jtExpressId
|
|
244
|
-
vnPostRegion
|
|
245
|
-
inetId
|
|
246
|
-
lastUpdatedStamp
|
|
247
|
-
lastUpdatedTxStamp
|
|
248
|
-
createdStamp
|
|
249
|
-
createdTxStamp
|
|
250
|
-
}
|
|
251
|
-
}
|
|
232
|
+
exports.GET_WARDS = (0, graphql_tag_1.gql) `
|
|
233
|
+
query GetWards($districtId: String!) {
|
|
234
|
+
getWards(districtId: $districtId) {
|
|
235
|
+
geoId
|
|
236
|
+
geoTypeId
|
|
237
|
+
geoName
|
|
238
|
+
geoNameLocal
|
|
239
|
+
geoCode
|
|
240
|
+
geoSecCode
|
|
241
|
+
abbreviation
|
|
242
|
+
vnPostId
|
|
243
|
+
jtExpressId
|
|
244
|
+
vnPostRegion
|
|
245
|
+
inetId
|
|
246
|
+
lastUpdatedStamp
|
|
247
|
+
lastUpdatedTxStamp
|
|
248
|
+
createdStamp
|
|
249
|
+
createdTxStamp
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
252
|
`;
|
|
@@ -24,6 +24,20 @@ class ProductService extends serviceSDK_1.Service {
|
|
|
24
24
|
*/
|
|
25
25
|
constructor(endpoint, orgId, storeId) {
|
|
26
26
|
super(endpoint, orgId, storeId);
|
|
27
|
+
this.getProductImage = (productId) => __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
const query = queries_1.GET_PRODUCT_IMAGE;
|
|
29
|
+
const variables = {
|
|
30
|
+
partnerId: this.orgId,
|
|
31
|
+
productId,
|
|
32
|
+
};
|
|
33
|
+
try {
|
|
34
|
+
const response = yield this.graphqlQuery(query, variables);
|
|
35
|
+
return response.getProductImage;
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
27
41
|
}
|
|
28
42
|
// ...
|
|
29
43
|
/**
|
|
@@ -44,8 +44,8 @@ class Service {
|
|
|
44
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
45
|
try {
|
|
46
46
|
const { data, errors } = yield this.client.query({
|
|
47
|
-
query: (0, client_1.gql) `
|
|
48
|
-
${query}
|
|
47
|
+
query: (0, client_1.gql) `
|
|
48
|
+
${query}
|
|
49
49
|
`,
|
|
50
50
|
variables,
|
|
51
51
|
context: {
|
|
@@ -71,8 +71,8 @@ class Service {
|
|
|
71
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
72
72
|
try {
|
|
73
73
|
const { data, errors } = yield this.client.mutate({
|
|
74
|
-
mutation: (0, client_1.gql) `
|
|
75
|
-
${mutation}
|
|
74
|
+
mutation: (0, client_1.gql) `
|
|
75
|
+
${mutation}
|
|
76
76
|
`,
|
|
77
77
|
variables,
|
|
78
78
|
context: {
|
|
@@ -132,8 +132,8 @@ class Service {
|
|
|
132
132
|
return __awaiter(this, void 0, void 0, function* () {
|
|
133
133
|
try {
|
|
134
134
|
const { data, errors } = yield this.client.query({
|
|
135
|
-
query: (0, client_1.gql) `
|
|
136
|
-
${query}
|
|
135
|
+
query: (0, client_1.gql) `
|
|
136
|
+
${query}
|
|
137
137
|
`,
|
|
138
138
|
variables,
|
|
139
139
|
context: {
|
|
@@ -160,8 +160,8 @@ class Service {
|
|
|
160
160
|
return __awaiter(this, void 0, void 0, function* () {
|
|
161
161
|
try {
|
|
162
162
|
const { data, errors } = yield this.client.mutate({
|
|
163
|
-
mutation: (0, client_1.gql) `
|
|
164
|
-
${mutation}
|
|
163
|
+
mutation: (0, client_1.gql) `
|
|
164
|
+
${mutation}
|
|
165
165
|
`,
|
|
166
166
|
variables,
|
|
167
167
|
context: {
|
package/package.json
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@longvansoftware/storefront-js-client",
|
|
3
|
-
"version": "1.6.
|
|
4
|
-
"main": "dist/src/index.js",
|
|
5
|
-
"types": "dist/src/index.d.ts",
|
|
6
|
-
"files": [
|
|
7
|
-
"dist/**/*.d.ts",
|
|
8
|
-
"dist/**/*.js"
|
|
9
|
-
],
|
|
10
|
-
"directories": {
|
|
11
|
-
"test": "jest"
|
|
12
|
-
},
|
|
13
|
-
"scripts": {
|
|
14
|
-
"test": "jest",
|
|
15
|
-
"build": "tsc",
|
|
16
|
-
"publish": "npm run build && npm publish"
|
|
17
|
-
},
|
|
18
|
-
"keywords": [],
|
|
19
|
-
"author": "",
|
|
20
|
-
"license": "ISC",
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"@apollo/client": "3.9.11",
|
|
23
|
-
"apollo-boost": "^0.4.9",
|
|
24
|
-
"axios": "^1.6.8",
|
|
25
|
-
"cross-fetch": "^4.0.0",
|
|
26
|
-
"crypto-js": "^4.2.0",
|
|
27
|
-
"graphql": "^15.8.0",
|
|
28
|
-
"graphql-request": "^6.1.0",
|
|
29
|
-
"graphql-tag": "^2.12.6",
|
|
30
|
-
"react": "^18.2.0",
|
|
31
|
-
"ts-node": "^10.9.2"
|
|
32
|
-
},
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@types/axios": "^0.14.0",
|
|
35
|
-
"@types/crypto-js": "^4.2.2",
|
|
36
|
-
"@types/jest": "^29.5.12",
|
|
37
|
-
"@types/node": "^20.12.7",
|
|
38
|
-
"jest": "^29.7.0",
|
|
39
|
-
"ts-jest": "^29.1.2",
|
|
40
|
-
"typescript": "^5.4.5"
|
|
41
|
-
},
|
|
42
|
-
"description": ""
|
|
43
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@longvansoftware/storefront-js-client",
|
|
3
|
+
"version": "1.6.3",
|
|
4
|
+
"main": "dist/src/index.js",
|
|
5
|
+
"types": "dist/src/index.d.ts",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist/**/*.d.ts",
|
|
8
|
+
"dist/**/*.js"
|
|
9
|
+
],
|
|
10
|
+
"directories": {
|
|
11
|
+
"test": "jest"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"test": "jest",
|
|
15
|
+
"build": "tsc",
|
|
16
|
+
"publish": "npm run build && npm publish"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [],
|
|
19
|
+
"author": "",
|
|
20
|
+
"license": "ISC",
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@apollo/client": "3.9.11",
|
|
23
|
+
"apollo-boost": "^0.4.9",
|
|
24
|
+
"axios": "^1.6.8",
|
|
25
|
+
"cross-fetch": "^4.0.0",
|
|
26
|
+
"crypto-js": "^4.2.0",
|
|
27
|
+
"graphql": "^15.8.0",
|
|
28
|
+
"graphql-request": "^6.1.0",
|
|
29
|
+
"graphql-tag": "^2.12.6",
|
|
30
|
+
"react": "^18.2.0",
|
|
31
|
+
"ts-node": "^10.9.2"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/axios": "^0.14.0",
|
|
35
|
+
"@types/crypto-js": "^4.2.2",
|
|
36
|
+
"@types/jest": "^29.5.12",
|
|
37
|
+
"@types/node": "^20.12.7",
|
|
38
|
+
"jest": "^29.7.0",
|
|
39
|
+
"ts-jest": "^29.1.2",
|
|
40
|
+
"typescript": "^5.4.5"
|
|
41
|
+
},
|
|
42
|
+
"description": ""
|
|
43
|
+
}
|