@evenicanpm/storefront-graphql-codegen 1.1.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.
- package/README.md +9 -0
- package/codegen.ts +26 -0
- package/documents/Account/index.ts +1 -0
- package/documents/Account/interfaces.ts +124 -0
- package/documents/Account/read.ts +22 -0
- package/documents/Account/readList.ts +28 -0
- package/documents/Account/update.ts +12 -0
- package/documents/Address/addressType.ts +12 -0
- package/documents/Address/countries.ts +27 -0
- package/documents/Address/create.ts +12 -0
- package/documents/Address/delete.ts +7 -0
- package/documents/Address/fragments.ts +56 -0
- package/documents/Address/index.ts +2 -0
- package/documents/Address/interfaces.ts +41 -0
- package/documents/Address/update.ts +12 -0
- package/documents/Cart/add.ts +64 -0
- package/documents/Cart/checkoutRead.ts +88 -0
- package/documents/Cart/checkoutSubmit.ts +18 -0
- package/documents/Cart/createCartAddress.ts +12 -0
- package/documents/Cart/deleteLine.ts +64 -0
- package/documents/Cart/fragments.ts +204 -0
- package/documents/Cart/interfaces.ts +56 -0
- package/documents/Cart/read.ts +44 -0
- package/documents/Cart/setOrderEmail.ts +9 -0
- package/documents/Cart/shippingMethodRead.ts +44 -0
- package/documents/Cart/shippingMethodUpdate.ts +64 -0
- package/documents/Cart/submit.ts +18 -0
- package/documents/Cart/updateCartAddress.ts +9 -0
- package/documents/Cart/updateLine.ts +64 -0
- package/documents/Catalog/create.ts +15 -0
- package/documents/Catalog/delete.ts +9 -0
- package/documents/Catalog/deleteProducts.ts +10 -0
- package/documents/Catalog/fragments.ts +80 -0
- package/documents/Catalog/interfaces.ts +34 -0
- package/documents/Catalog/linkMedia/create.ts +20 -0
- package/documents/Catalog/linkMedia/delete.ts +9 -0
- package/documents/Catalog/linkMedia/update.ts +11 -0
- package/documents/Catalog/linkProduct.ts +12 -0
- package/documents/Catalog/list.ts +23 -0
- package/documents/Catalog/read.ts +56 -0
- package/documents/Catalog/removeProduct.ts +11 -0
- package/documents/Catalog/save.ts +17 -0
- package/documents/Catalog/statusList.ts +12 -0
- package/documents/Catalog/update.ts +15 -0
- package/documents/Category/fragments.ts +54 -0
- package/documents/Category/interfaces.ts +18 -0
- package/documents/Category/list.ts +55 -0
- package/documents/MediaLibrary/File/create.ts +44 -0
- package/documents/MediaLibrary/File/delete.ts +12 -0
- package/documents/MediaLibrary/File/read.ts +36 -0
- package/documents/MediaLibrary/File/update.ts +43 -0
- package/documents/MediaLibrary/Folder/create.ts +24 -0
- package/documents/MediaLibrary/Folder/delete.ts +11 -0
- package/documents/MediaLibrary/Folder/read.ts +101 -0
- package/documents/MediaLibrary/Folder/update.ts +10 -0
- package/documents/MediaLibrary/move.ts +44 -0
- package/documents/MediaLibrary/search.ts +84 -0
- package/documents/Order/fragments.ts +116 -0
- package/documents/Order/index.ts +2 -0
- package/documents/Order/interfaces.ts +30 -0
- package/documents/Order/list.ts +129 -0
- package/documents/Order/read.ts +44 -0
- package/documents/Product/facets.ts +34 -0
- package/documents/Product/fragments.ts +167 -0
- package/documents/Product/getAll.ts +77 -0
- package/documents/Product/interfaces.ts +45 -0
- package/documents/Product/list.ts +248 -0
- package/documents/Product/read.ts +70 -0
- package/documents/Product/search.ts +170 -0
- package/documents/Review/create.ts +22 -0
- package/documents/ServerCache/productIndex.ts +11 -0
- package/documents/Session/Customer/init.ts +12 -0
- package/documents/Session/Customer/logout.ts +11 -0
- package/documents/Session/Customer/read.ts +15 -0
- package/documents/Session/fragments.ts +69 -0
- package/documents/Session/index.ts +8 -0
- package/documents/Session/interfaces.ts +11 -0
- package/documents/Session/login.ts +36 -0
- package/documents/Session/logout.ts +11 -0
- package/documents/Session/read.ts +43 -0
- package/documents/Settings/ClearCache/clearcache.ts +10 -0
- package/documents/Settings/SystemInformation/index.ts +1 -0
- package/documents/Settings/SystemInformation/interfaces.ts +16 -0
- package/documents/Settings/SystemInformation/system-information.ts +20 -0
- package/documents/Settings/aliases.ts +96 -0
- package/documents/Settings/claims.ts +124 -0
- package/documents/Settings/contacts.ts +133 -0
- package/documents/Settings/index.ts +12 -0
- package/documents/Settings/indexes.ts +73 -0
- package/documents/Settings/roles.ts +93 -0
- package/documents/Settings/settingsGroup.ts +266 -0
- package/documents/Settings/users.ts +19 -0
- package/documents/Settings/words.ts +115 -0
- package/documents/Theme/create.ts +46 -0
- package/documents/Theme/delete.ts +9 -0
- package/documents/Theme/interfaces.ts +63 -0
- package/documents/Theme/read.ts +83 -0
- package/documents/User/changePassword.ts +11 -0
- package/documents/User/counts.ts +8 -0
- package/documents/User/fragments.ts +61 -0
- package/documents/User/index.ts +2 -0
- package/documents/User/interfaces.ts +29 -0
- package/documents/User/read.ts +44 -0
- package/documents/User/register.ts +11 -0
- package/documents/User/resetPassword.ts +11 -0
- package/documents/User/update.ts +44 -0
- package/documents/WishList/add.ts +10 -0
- package/documents/WishList/create.ts +12 -0
- package/documents/WishList/delete.ts +7 -0
- package/documents/WishList/deleteLine.ts +7 -0
- package/documents/WishList/fragments.ts +98 -0
- package/documents/WishList/index.ts +2 -0
- package/documents/WishList/interfaces.ts +68 -0
- package/documents/WishList/list.ts +136 -0
- package/documents/WishList/read.ts +44 -0
- package/documents/base/interfaces.ts +34 -0
- package/documents/base/logger.ts +20 -0
- package/documents/base/pageInfoFragments.ts +25 -0
- package/documents/base/refresh-token.ts +15 -0
- package/documents/core/Logger/create.ts +64 -0
- package/documents/core/Logger/delete.ts +14 -0
- package/documents/core/Logger/fragments.ts +55 -0
- package/documents/core/Logger/index.ts +2 -0
- package/documents/core/Logger/interfaces.ts +39 -0
- package/documents/core/Logger/list.ts +56 -0
- package/documents/core/Logger/read.ts +44 -0
- package/documents/core/Logger/update.ts +64 -0
- package/documents/core/SampleData/create.ts +76 -0
- package/documents/core/SampleData/delete.ts +14 -0
- package/documents/core/SampleData/fragments.ts +48 -0
- package/documents/core/SampleData/index.ts +7 -0
- package/documents/core/SampleData/interfaces.ts +11 -0
- package/documents/core/SampleData/list.ts +233 -0
- package/documents/core/SampleData/read.ts +44 -0
- package/documents/core/SampleData/update.ts +76 -0
- package/documents/core/index.ts +2 -0
- package/documents/messages/messages.ts +21 -0
- package/package.json +22 -0
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import { gql } from "graphql-request";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
PRODUCT_FRAGMENT_XS,
|
|
5
|
+
PRODUCT_FRAGMENT_SM,
|
|
6
|
+
PRODUCT_FRAGMENT_MD,
|
|
7
|
+
PRODUCT_FRAGMENT_LG,
|
|
8
|
+
ATTRIBUTE_VALUE_FRAGMENT,
|
|
9
|
+
} from "./fragments";
|
|
10
|
+
|
|
11
|
+
const PRODUCT_LIST_XS = gql`
|
|
12
|
+
${PRODUCT_FRAGMENT_XS}
|
|
13
|
+
query e4ProductListXS(
|
|
14
|
+
$categoryId: ID!
|
|
15
|
+
$categoryFilter: ID
|
|
16
|
+
$top: Int
|
|
17
|
+
$skip: Int
|
|
18
|
+
$sort: String
|
|
19
|
+
$sortDesc: Boolean
|
|
20
|
+
$filters: [ODataFilter]
|
|
21
|
+
) {
|
|
22
|
+
categoryById(id: $categoryId) {
|
|
23
|
+
id
|
|
24
|
+
name
|
|
25
|
+
displayName
|
|
26
|
+
}
|
|
27
|
+
products(
|
|
28
|
+
categoryId: $categoryFilter
|
|
29
|
+
top: $top
|
|
30
|
+
skip: $skip
|
|
31
|
+
sort: $sort
|
|
32
|
+
sortDesc: $sortDesc
|
|
33
|
+
filters: $filters
|
|
34
|
+
) {
|
|
35
|
+
resultsReturned
|
|
36
|
+
recordCount
|
|
37
|
+
top
|
|
38
|
+
skip
|
|
39
|
+
selectedSort
|
|
40
|
+
products {
|
|
41
|
+
...ProductFragmentXS
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
46
|
+
|
|
47
|
+
const PRODUCT_LIST_SM = gql`
|
|
48
|
+
${PRODUCT_FRAGMENT_SM}
|
|
49
|
+
query e4ProductListSM(
|
|
50
|
+
$categoryId: ID!
|
|
51
|
+
$categoryFilter: ID
|
|
52
|
+
$top: Int
|
|
53
|
+
$skip: Int
|
|
54
|
+
$sort: String
|
|
55
|
+
$sortDesc: Boolean
|
|
56
|
+
$filters: [ODataFilter]
|
|
57
|
+
) {
|
|
58
|
+
categoryById(id: $categoryId) {
|
|
59
|
+
id
|
|
60
|
+
name
|
|
61
|
+
displayName
|
|
62
|
+
breadcrumb {
|
|
63
|
+
CategoryId
|
|
64
|
+
Name
|
|
65
|
+
seoName
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
products(
|
|
69
|
+
categoryId: $categoryFilter
|
|
70
|
+
top: $top
|
|
71
|
+
skip: $skip
|
|
72
|
+
sort: $sort
|
|
73
|
+
sortDesc: $sortDesc
|
|
74
|
+
filters: $filters
|
|
75
|
+
) {
|
|
76
|
+
resultsReturned
|
|
77
|
+
recordCount
|
|
78
|
+
top
|
|
79
|
+
skip
|
|
80
|
+
selectedSort
|
|
81
|
+
products {
|
|
82
|
+
...ProductFragmentSM
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
`;
|
|
87
|
+
|
|
88
|
+
const PRODUCT_LIST_MD = gql`
|
|
89
|
+
${PRODUCT_FRAGMENT_MD}
|
|
90
|
+
${ATTRIBUTE_VALUE_FRAGMENT}
|
|
91
|
+
query e4ProductListMD(
|
|
92
|
+
$categoryId: ID!
|
|
93
|
+
$categoryFilter: ID
|
|
94
|
+
$top: Int
|
|
95
|
+
$skip: Int
|
|
96
|
+
$sort: String
|
|
97
|
+
$sortDesc: Boolean
|
|
98
|
+
$filters: [ODataFilter]
|
|
99
|
+
) {
|
|
100
|
+
categoryById(id: $categoryId) {
|
|
101
|
+
id
|
|
102
|
+
name
|
|
103
|
+
displayName
|
|
104
|
+
breadcrumb {
|
|
105
|
+
CategoryId
|
|
106
|
+
Name
|
|
107
|
+
seoName
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
products(
|
|
111
|
+
categoryId: $categoryFilter
|
|
112
|
+
top: $top
|
|
113
|
+
skip: $skip
|
|
114
|
+
sort: $sort
|
|
115
|
+
sortDesc: $sortDesc
|
|
116
|
+
filters: $filters
|
|
117
|
+
) {
|
|
118
|
+
resultsReturned
|
|
119
|
+
recordCount
|
|
120
|
+
top
|
|
121
|
+
skip
|
|
122
|
+
selectedSort
|
|
123
|
+
filters {
|
|
124
|
+
id
|
|
125
|
+
displayName
|
|
126
|
+
AttributeId
|
|
127
|
+
AttributeName
|
|
128
|
+
value {
|
|
129
|
+
...AttributeValueFragment
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
products {
|
|
133
|
+
...ProductFragmentMD
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
`;
|
|
138
|
+
|
|
139
|
+
const PRODUCT_LIST_LG = gql`
|
|
140
|
+
${PRODUCT_FRAGMENT_LG}
|
|
141
|
+
${ATTRIBUTE_VALUE_FRAGMENT}
|
|
142
|
+
query e4ProductListLG(
|
|
143
|
+
$categoryId: ID!
|
|
144
|
+
$categoryFilter: ID
|
|
145
|
+
$top: Int
|
|
146
|
+
$skip: Int
|
|
147
|
+
$sort: String
|
|
148
|
+
$sortDesc: Boolean
|
|
149
|
+
$filters: [ODataFilter]
|
|
150
|
+
) {
|
|
151
|
+
categoryById(id: $categoryId) {
|
|
152
|
+
id
|
|
153
|
+
name
|
|
154
|
+
displayName
|
|
155
|
+
breadcrumb {
|
|
156
|
+
CategoryId
|
|
157
|
+
Name
|
|
158
|
+
seoName
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
products(
|
|
162
|
+
categoryId: $categoryFilter
|
|
163
|
+
top: $top
|
|
164
|
+
skip: $skip
|
|
165
|
+
sort: $sort
|
|
166
|
+
sortDesc: $sortDesc
|
|
167
|
+
filters: $filters
|
|
168
|
+
) {
|
|
169
|
+
resultsReturned
|
|
170
|
+
recordCount
|
|
171
|
+
top
|
|
172
|
+
skip
|
|
173
|
+
selectedSort
|
|
174
|
+
filters {
|
|
175
|
+
id
|
|
176
|
+
displayName
|
|
177
|
+
AttributeId
|
|
178
|
+
AttributeName
|
|
179
|
+
value {
|
|
180
|
+
...AttributeValueFragment
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
products {
|
|
184
|
+
...ProductFragmentLG
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
`;
|
|
189
|
+
|
|
190
|
+
const PRODUCTS_BY_SKU = gql`
|
|
191
|
+
query GetProductsByIds($ids: [String!]!) {
|
|
192
|
+
getProductsByIds(ids: $ids) {
|
|
193
|
+
name
|
|
194
|
+
sku
|
|
195
|
+
id
|
|
196
|
+
shortDescription
|
|
197
|
+
uom {
|
|
198
|
+
nodes {
|
|
199
|
+
id
|
|
200
|
+
displayName
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
category {
|
|
204
|
+
id
|
|
205
|
+
displayName
|
|
206
|
+
}
|
|
207
|
+
code
|
|
208
|
+
price
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
`;
|
|
212
|
+
|
|
213
|
+
const PRODUCT_LIST_GET_ALL = gql`
|
|
214
|
+
query getAllProducts($input: ProductQueryInput) {
|
|
215
|
+
getAllProducts(input: $input) {
|
|
216
|
+
recordCount
|
|
217
|
+
pageInfo {
|
|
218
|
+
top
|
|
219
|
+
skip
|
|
220
|
+
sort
|
|
221
|
+
sortDesc
|
|
222
|
+
search
|
|
223
|
+
}
|
|
224
|
+
nodes {
|
|
225
|
+
id
|
|
226
|
+
masterProductId
|
|
227
|
+
name
|
|
228
|
+
sku
|
|
229
|
+
listPrice
|
|
230
|
+
img {
|
|
231
|
+
id
|
|
232
|
+
alt
|
|
233
|
+
cdnURL
|
|
234
|
+
}
|
|
235
|
+
productStatus {
|
|
236
|
+
id
|
|
237
|
+
name
|
|
238
|
+
}
|
|
239
|
+
productEntity {
|
|
240
|
+
id
|
|
241
|
+
name
|
|
242
|
+
}
|
|
243
|
+
modified
|
|
244
|
+
created
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
`;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { gql } from "graphql-request";
|
|
2
|
+
import {
|
|
3
|
+
PRODUCT_FRAGMENT_XS,
|
|
4
|
+
PRODUCT_FRAGMENT_SM,
|
|
5
|
+
PRODUCT_FRAGMENT_MD,
|
|
6
|
+
PRODUCT_FRAGMENT_LG,
|
|
7
|
+
REVIEW_FRAGMENT,
|
|
8
|
+
} from "./fragments";
|
|
9
|
+
|
|
10
|
+
const PRODUCT_READ_XS = gql`
|
|
11
|
+
${PRODUCT_FRAGMENT_XS}
|
|
12
|
+
query e4ProductReadXS(
|
|
13
|
+
$id: String!
|
|
14
|
+
$productLookupType: ProductLookupType! = CODE
|
|
15
|
+
) {
|
|
16
|
+
product(id: $id, productLookupType: $productLookupType) {
|
|
17
|
+
...ProductFragmentXS
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
const PRODUCT_READ_SM = gql`
|
|
23
|
+
${PRODUCT_FRAGMENT_SM}
|
|
24
|
+
query e4ProductReadSM(
|
|
25
|
+
$id: String!
|
|
26
|
+
$productLookupType: ProductLookupType! = CODE
|
|
27
|
+
) {
|
|
28
|
+
product(id: $id, productLookupType: $productLookupType) {
|
|
29
|
+
...ProductFragmentSM
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
|
|
34
|
+
const PRODUCT_READ_MD = gql`
|
|
35
|
+
${PRODUCT_FRAGMENT_MD}
|
|
36
|
+
query e4ProductReadMD(
|
|
37
|
+
$id: String!
|
|
38
|
+
$productLookupType: ProductLookupType! = CODE
|
|
39
|
+
) {
|
|
40
|
+
product(id: $id, productLookupType: $productLookupType) {
|
|
41
|
+
...ProductFragmentMD
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
`;
|
|
45
|
+
|
|
46
|
+
const PRODUCT_READ_LG = gql`
|
|
47
|
+
${PRODUCT_FRAGMENT_LG}
|
|
48
|
+
query e4ProductReadLG(
|
|
49
|
+
$id: String!
|
|
50
|
+
$productLookupType: ProductLookupType! = CODE
|
|
51
|
+
) {
|
|
52
|
+
product(id: $id, productLookupType: $productLookupType) {
|
|
53
|
+
...ProductFragmentLG
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
`;
|
|
57
|
+
|
|
58
|
+
// const PRODUCT_READ_W_REVIEWS = gql`
|
|
59
|
+
// ${PRODUCT_FRAGMENT_MD}
|
|
60
|
+
// ${REVIEW_FRAGMENT}
|
|
61
|
+
// query e4ProductReadMD(
|
|
62
|
+
// $id: String!
|
|
63
|
+
// $productLookupType: ProductLookupType! = CODE
|
|
64
|
+
// ) {
|
|
65
|
+
// product(id: $id, productLookupType: $productLookupType) {
|
|
66
|
+
// ...ProductFragmentMD
|
|
67
|
+
// ...ProductReview
|
|
68
|
+
// }
|
|
69
|
+
// }
|
|
70
|
+
// `;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { gql } from "graphql-request";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
PRODUCT_FRAGMENT_XS,
|
|
5
|
+
PRODUCT_FRAGMENT_SM,
|
|
6
|
+
PRODUCT_FRAGMENT_MD,
|
|
7
|
+
PRODUCT_FRAGMENT_LG,
|
|
8
|
+
ATTRIBUTE_VALUE_FRAGMENT,
|
|
9
|
+
} from "./fragments";
|
|
10
|
+
|
|
11
|
+
const PRODUCT_SEARCH_XS = gql`
|
|
12
|
+
${PRODUCT_FRAGMENT_XS}
|
|
13
|
+
query e4ProductSearchXS(
|
|
14
|
+
$search: String
|
|
15
|
+
$top: Int
|
|
16
|
+
$skip: Int
|
|
17
|
+
$sort: String
|
|
18
|
+
$sortDesc: Boolean
|
|
19
|
+
$filters: [ODataFilter]
|
|
20
|
+
) {
|
|
21
|
+
products(
|
|
22
|
+
search: $search
|
|
23
|
+
top: $top
|
|
24
|
+
skip: $skip
|
|
25
|
+
sort: $sort
|
|
26
|
+
sortDesc: $sortDesc
|
|
27
|
+
filters: $filters
|
|
28
|
+
) {
|
|
29
|
+
resultsReturned
|
|
30
|
+
recordCount
|
|
31
|
+
top
|
|
32
|
+
skip
|
|
33
|
+
selectedSort
|
|
34
|
+
search
|
|
35
|
+
products {
|
|
36
|
+
...ProductFragmentXS
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
41
|
+
|
|
42
|
+
const PRODUCT_SEARCH_SM = gql`
|
|
43
|
+
${PRODUCT_FRAGMENT_SM}
|
|
44
|
+
query e4ProductSearchSM(
|
|
45
|
+
$search: String
|
|
46
|
+
$top: Int
|
|
47
|
+
$skip: Int
|
|
48
|
+
$sort: String
|
|
49
|
+
$sortDesc: Boolean
|
|
50
|
+
$filters: [ODataFilter]
|
|
51
|
+
) {
|
|
52
|
+
products(
|
|
53
|
+
search: $search
|
|
54
|
+
top: $top
|
|
55
|
+
skip: $skip
|
|
56
|
+
sort: $sort
|
|
57
|
+
sortDesc: $sortDesc
|
|
58
|
+
filters: $filters
|
|
59
|
+
) {
|
|
60
|
+
resultsReturned
|
|
61
|
+
recordCount
|
|
62
|
+
top
|
|
63
|
+
skip
|
|
64
|
+
selectedSort
|
|
65
|
+
search
|
|
66
|
+
products {
|
|
67
|
+
...ProductFragmentSM
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
`;
|
|
72
|
+
|
|
73
|
+
const PRODUCT_SEARCH_MD = gql`
|
|
74
|
+
${PRODUCT_FRAGMENT_MD}
|
|
75
|
+
${ATTRIBUTE_VALUE_FRAGMENT}
|
|
76
|
+
query e4ProductSearchMD(
|
|
77
|
+
$search: String
|
|
78
|
+
$top: Int
|
|
79
|
+
$skip: Int
|
|
80
|
+
$sort: String
|
|
81
|
+
$sortDesc: Boolean
|
|
82
|
+
$filters: [ODataFilter]
|
|
83
|
+
) {
|
|
84
|
+
products(
|
|
85
|
+
search: $search
|
|
86
|
+
top: $top
|
|
87
|
+
skip: $skip
|
|
88
|
+
sort: $sort
|
|
89
|
+
sortDesc: $sortDesc
|
|
90
|
+
filters: $filters
|
|
91
|
+
) {
|
|
92
|
+
resultsReturned
|
|
93
|
+
recordCount
|
|
94
|
+
top
|
|
95
|
+
skip
|
|
96
|
+
selectedSort
|
|
97
|
+
search
|
|
98
|
+
filters {
|
|
99
|
+
AttributeId
|
|
100
|
+
AttributeName
|
|
101
|
+
value {
|
|
102
|
+
...AttributeValueFragment
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
products {
|
|
106
|
+
...ProductFragmentMD
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
`;
|
|
111
|
+
|
|
112
|
+
const PRODUCT_SEARCH_LG = gql`
|
|
113
|
+
${PRODUCT_FRAGMENT_LG}
|
|
114
|
+
${ATTRIBUTE_VALUE_FRAGMENT}
|
|
115
|
+
query e4ProductSearchLG(
|
|
116
|
+
$search: String
|
|
117
|
+
$top: Int
|
|
118
|
+
$skip: Int
|
|
119
|
+
$sort: String
|
|
120
|
+
$sortDesc: Boolean
|
|
121
|
+
$filters: [ODataFilter]
|
|
122
|
+
) {
|
|
123
|
+
products(
|
|
124
|
+
search: $search
|
|
125
|
+
top: $top
|
|
126
|
+
skip: $skip
|
|
127
|
+
sort: $sort
|
|
128
|
+
sortDesc: $sortDesc
|
|
129
|
+
filters: $filters
|
|
130
|
+
) {
|
|
131
|
+
resultsReturned
|
|
132
|
+
recordCount
|
|
133
|
+
top
|
|
134
|
+
skip
|
|
135
|
+
selectedSort
|
|
136
|
+
search
|
|
137
|
+
filters {
|
|
138
|
+
AttributeId
|
|
139
|
+
AttributeName
|
|
140
|
+
value {
|
|
141
|
+
...AttributeValueFragment
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
products {
|
|
145
|
+
...ProductFragmentLG
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
`;
|
|
150
|
+
|
|
151
|
+
const PRODUCT_TYPEAHEAD_SEARCH_MD_WITH_CATEGORY = gql`
|
|
152
|
+
query productTypeaheadSearchByCategory($input: ProductTypeaheadInput) {
|
|
153
|
+
productsTypeAhead(input: $input) {
|
|
154
|
+
id
|
|
155
|
+
code
|
|
156
|
+
sku
|
|
157
|
+
name
|
|
158
|
+
img {
|
|
159
|
+
id
|
|
160
|
+
cdnURL
|
|
161
|
+
alt
|
|
162
|
+
}
|
|
163
|
+
category {
|
|
164
|
+
name
|
|
165
|
+
id
|
|
166
|
+
parentId
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
`;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { gql } from "graphql-request";
|
|
2
|
+
|
|
3
|
+
export const REVIEW_CREATE = gql`
|
|
4
|
+
mutation AddReview($review: ReviewForCreation) {
|
|
5
|
+
addReview(review: $review) {
|
|
6
|
+
Body
|
|
7
|
+
ContactId
|
|
8
|
+
Created
|
|
9
|
+
IsVerifiedPurchase
|
|
10
|
+
Modified
|
|
11
|
+
ModifiedBy
|
|
12
|
+
OriginCode
|
|
13
|
+
ProductId
|
|
14
|
+
ProductReviewId
|
|
15
|
+
ProductReviewStatusId
|
|
16
|
+
PurchaseDate
|
|
17
|
+
Rating
|
|
18
|
+
Sort
|
|
19
|
+
Title
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { gql } from "graphql-request";
|
|
2
|
+
|
|
3
|
+
import { SESSION_FRAGMENT_SM } from "../fragments";
|
|
4
|
+
|
|
5
|
+
const CUSTOMER_INIT_SESSION = gql`
|
|
6
|
+
${SESSION_FRAGMENT_SM}
|
|
7
|
+
mutation customerInitSession($input: CustomerInitSessionInput!) {
|
|
8
|
+
customerInitSession(input: $input) {
|
|
9
|
+
...SessionFragmentSM
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { gql } from "graphql-request";
|
|
2
|
+
|
|
3
|
+
import { SESSION_FRAGMENT_CUSTOMER_WITH_CART } from "../fragments";
|
|
4
|
+
|
|
5
|
+
const SESSION_READ_CUSTOMER = gql`
|
|
6
|
+
${SESSION_FRAGMENT_CUSTOMER_WITH_CART}
|
|
7
|
+
query e4ReadSessionCustomer(
|
|
8
|
+
$withCart: Boolean = true
|
|
9
|
+
$withSobo: Boolean = true
|
|
10
|
+
) {
|
|
11
|
+
sessionRead(withCart: $withCart, withSobo: $withSobo) {
|
|
12
|
+
...SessionFragmentCustomerWithCart
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { gql } from "graphql-request";
|
|
2
|
+
|
|
3
|
+
import { CART_FRAGMENT_MD, CART_FRAGMENT_LG } from "../Cart/fragments";
|
|
4
|
+
|
|
5
|
+
export const SESSION_FRAGMENT_XS = gql`
|
|
6
|
+
fragment SessionFragmentXS on Session {
|
|
7
|
+
id
|
|
8
|
+
user {
|
|
9
|
+
aspNetUserId
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
export const SESSION_FRAGMENT_SM = gql`
|
|
15
|
+
fragment SessionFragmentSM on Session {
|
|
16
|
+
id
|
|
17
|
+
user {
|
|
18
|
+
aspNetUserId
|
|
19
|
+
firstName
|
|
20
|
+
lastName
|
|
21
|
+
email
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
export const SESSION_FRAGMENT_MANAGEMENT_WITH_CLAIMS = gql`
|
|
27
|
+
fragment SessionFragmentManagementWithClaims on Session {
|
|
28
|
+
id
|
|
29
|
+
user {
|
|
30
|
+
aspNetUserId
|
|
31
|
+
firstName
|
|
32
|
+
lastName
|
|
33
|
+
email
|
|
34
|
+
claims {
|
|
35
|
+
id
|
|
36
|
+
actionId
|
|
37
|
+
action
|
|
38
|
+
subjectId
|
|
39
|
+
subject
|
|
40
|
+
fieldId
|
|
41
|
+
field
|
|
42
|
+
isCan
|
|
43
|
+
isPassThrough
|
|
44
|
+
claimType
|
|
45
|
+
roleClaimId
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
|
|
51
|
+
export const SESSION_FRAGMENT_CUSTOMER_WITH_CART = gql`
|
|
52
|
+
${CART_FRAGMENT_LG}
|
|
53
|
+
fragment SessionFragmentCustomerWithCart on Session {
|
|
54
|
+
id
|
|
55
|
+
user {
|
|
56
|
+
aspNetUserId
|
|
57
|
+
firstName
|
|
58
|
+
lastName
|
|
59
|
+
email
|
|
60
|
+
}
|
|
61
|
+
cart @include(if: $withCart) {
|
|
62
|
+
...e4CartFragmentLG
|
|
63
|
+
}
|
|
64
|
+
soboUser @include(if: $withSobo) {
|
|
65
|
+
firstName
|
|
66
|
+
lastName
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
`;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { gql } from "graphql-request"
|
|
2
|
+
|
|
3
|
+
import { SESSION_FRAGMENT_XS, SESSION_FRAGMENT_SM } from './fragments';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
const SESSION_LOGIN_XS = gql`
|
|
8
|
+
${SESSION_FRAGMENT_XS}
|
|
9
|
+
mutation e4LoginXS($input: LoginInput!) {
|
|
10
|
+
login(input: $input) {
|
|
11
|
+
token
|
|
12
|
+
refreshToken
|
|
13
|
+
session {
|
|
14
|
+
...SessionFragmentXS
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
const SESSION_LOGIN_SM = gql`
|
|
21
|
+
${SESSION_FRAGMENT_SM}
|
|
22
|
+
mutation e4LoginSM($input: LoginInput!) {
|
|
23
|
+
login(input: $input) {
|
|
24
|
+
token
|
|
25
|
+
refreshToken
|
|
26
|
+
session {
|
|
27
|
+
...SessionFragmentSM
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
SESSION_LOGIN_XS,
|
|
35
|
+
SESSION_LOGIN_SM
|
|
36
|
+
});
|