@vendure/admin-ui 1.7.0 → 1.7.1
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/bundles/vendure-admin-ui-catalog.umd.js.map +1 -1
- package/bundles/vendure-admin-ui-core.umd.js +1 -1
- package/bundles/vendure-admin-ui-core.umd.js.map +1 -1
- package/core/common/version.d.ts +1 -1
- package/core/vendure-admin-ui-core.metadata.json +1 -1
- package/esm2015/catalog/components/generate-product-variants/generate-product-variants.component.js +1 -1
- package/esm2015/catalog/components/option-value-input/option-value-input.component.js +1 -1
- package/esm2015/core/common/version.js +2 -2
- package/esm2015/core/data/definitions/order-definitions.js +443 -443
- package/esm2015/core/data/definitions/product-definitions.js +743 -743
- package/fesm2015/vendure-admin-ui-catalog.js.map +1 -1
- package/fesm2015/vendure-admin-ui-core.js +1210 -1210
- package/fesm2015/vendure-admin-ui-core.js.map +1 -1
- package/package.json +2 -2
|
@@ -1799,747 +1799,747 @@ class ClientDataService {
|
|
|
1799
1799
|
}
|
|
1800
1800
|
}
|
|
1801
1801
|
|
|
1802
|
-
const ASSET_FRAGMENT = gql `
|
|
1803
|
-
fragment Asset on Asset {
|
|
1804
|
-
id
|
|
1805
|
-
createdAt
|
|
1806
|
-
updatedAt
|
|
1807
|
-
name
|
|
1808
|
-
fileSize
|
|
1809
|
-
mimeType
|
|
1810
|
-
type
|
|
1811
|
-
preview
|
|
1812
|
-
source
|
|
1813
|
-
width
|
|
1814
|
-
height
|
|
1815
|
-
focalPoint {
|
|
1816
|
-
x
|
|
1817
|
-
y
|
|
1818
|
-
}
|
|
1819
|
-
}
|
|
1820
|
-
`;
|
|
1821
|
-
const TAG_FRAGMENT = gql `
|
|
1822
|
-
fragment Tag on Tag {
|
|
1823
|
-
id
|
|
1824
|
-
value
|
|
1825
|
-
}
|
|
1826
|
-
`;
|
|
1827
|
-
const PRODUCT_OPTION_GROUP_FRAGMENT = gql `
|
|
1828
|
-
fragment ProductOptionGroup on ProductOptionGroup {
|
|
1829
|
-
id
|
|
1830
|
-
createdAt
|
|
1831
|
-
updatedAt
|
|
1832
|
-
code
|
|
1833
|
-
languageCode
|
|
1834
|
-
name
|
|
1835
|
-
translations {
|
|
1836
|
-
id
|
|
1837
|
-
languageCode
|
|
1838
|
-
name
|
|
1839
|
-
}
|
|
1840
|
-
}
|
|
1841
|
-
`;
|
|
1842
|
-
const PRODUCT_OPTION_FRAGMENT = gql `
|
|
1843
|
-
fragment ProductOption on ProductOption {
|
|
1844
|
-
id
|
|
1845
|
-
createdAt
|
|
1846
|
-
updatedAt
|
|
1847
|
-
code
|
|
1848
|
-
languageCode
|
|
1849
|
-
name
|
|
1850
|
-
groupId
|
|
1851
|
-
translations {
|
|
1852
|
-
id
|
|
1853
|
-
languageCode
|
|
1854
|
-
name
|
|
1855
|
-
}
|
|
1856
|
-
}
|
|
1857
|
-
`;
|
|
1858
|
-
const PRODUCT_VARIANT_FRAGMENT = gql `
|
|
1859
|
-
fragment ProductVariant on ProductVariant {
|
|
1860
|
-
id
|
|
1861
|
-
createdAt
|
|
1862
|
-
updatedAt
|
|
1863
|
-
enabled
|
|
1864
|
-
languageCode
|
|
1865
|
-
name
|
|
1866
|
-
price
|
|
1867
|
-
currencyCode
|
|
1868
|
-
priceWithTax
|
|
1869
|
-
stockOnHand
|
|
1870
|
-
stockAllocated
|
|
1871
|
-
trackInventory
|
|
1872
|
-
outOfStockThreshold
|
|
1873
|
-
useGlobalOutOfStockThreshold
|
|
1874
|
-
taxRateApplied {
|
|
1875
|
-
id
|
|
1876
|
-
name
|
|
1877
|
-
value
|
|
1878
|
-
}
|
|
1879
|
-
taxCategory {
|
|
1880
|
-
id
|
|
1881
|
-
name
|
|
1882
|
-
}
|
|
1883
|
-
sku
|
|
1884
|
-
options {
|
|
1885
|
-
...ProductOption
|
|
1886
|
-
}
|
|
1887
|
-
facetValues {
|
|
1888
|
-
id
|
|
1889
|
-
code
|
|
1890
|
-
name
|
|
1891
|
-
facet {
|
|
1892
|
-
id
|
|
1893
|
-
name
|
|
1894
|
-
}
|
|
1895
|
-
}
|
|
1896
|
-
featuredAsset {
|
|
1897
|
-
...Asset
|
|
1898
|
-
}
|
|
1899
|
-
assets {
|
|
1900
|
-
...Asset
|
|
1901
|
-
}
|
|
1902
|
-
translations {
|
|
1903
|
-
id
|
|
1904
|
-
languageCode
|
|
1905
|
-
name
|
|
1906
|
-
}
|
|
1907
|
-
channels {
|
|
1908
|
-
id
|
|
1909
|
-
code
|
|
1910
|
-
}
|
|
1911
|
-
}
|
|
1912
|
-
${PRODUCT_OPTION_FRAGMENT}
|
|
1913
|
-
${ASSET_FRAGMENT}
|
|
1914
|
-
`;
|
|
1915
|
-
const PRODUCT_DETAIL_FRAGMENT = gql `
|
|
1916
|
-
fragment ProductDetail on Product {
|
|
1917
|
-
id
|
|
1918
|
-
createdAt
|
|
1919
|
-
updatedAt
|
|
1920
|
-
enabled
|
|
1921
|
-
languageCode
|
|
1922
|
-
name
|
|
1923
|
-
slug
|
|
1924
|
-
description
|
|
1925
|
-
featuredAsset {
|
|
1926
|
-
...Asset
|
|
1927
|
-
}
|
|
1928
|
-
assets {
|
|
1929
|
-
...Asset
|
|
1930
|
-
}
|
|
1931
|
-
translations {
|
|
1932
|
-
id
|
|
1933
|
-
languageCode
|
|
1934
|
-
name
|
|
1935
|
-
slug
|
|
1936
|
-
description
|
|
1937
|
-
}
|
|
1938
|
-
optionGroups {
|
|
1939
|
-
...ProductOptionGroup
|
|
1940
|
-
}
|
|
1941
|
-
facetValues {
|
|
1942
|
-
id
|
|
1943
|
-
code
|
|
1944
|
-
name
|
|
1945
|
-
facet {
|
|
1946
|
-
id
|
|
1947
|
-
name
|
|
1948
|
-
}
|
|
1949
|
-
}
|
|
1950
|
-
channels {
|
|
1951
|
-
id
|
|
1952
|
-
code
|
|
1953
|
-
}
|
|
1954
|
-
}
|
|
1955
|
-
${PRODUCT_OPTION_GROUP_FRAGMENT}
|
|
1956
|
-
${ASSET_FRAGMENT}
|
|
1957
|
-
`;
|
|
1958
|
-
const PRODUCT_OPTION_GROUP_WITH_OPTIONS_FRAGMENT = gql `
|
|
1959
|
-
fragment ProductOptionGroupWithOptions on ProductOptionGroup {
|
|
1960
|
-
id
|
|
1961
|
-
createdAt
|
|
1962
|
-
updatedAt
|
|
1963
|
-
languageCode
|
|
1964
|
-
code
|
|
1965
|
-
name
|
|
1966
|
-
translations {
|
|
1967
|
-
id
|
|
1968
|
-
name
|
|
1969
|
-
}
|
|
1970
|
-
options {
|
|
1971
|
-
id
|
|
1972
|
-
languageCode
|
|
1973
|
-
name
|
|
1974
|
-
code
|
|
1975
|
-
translations {
|
|
1976
|
-
name
|
|
1977
|
-
}
|
|
1978
|
-
}
|
|
1979
|
-
}
|
|
1980
|
-
`;
|
|
1981
|
-
const UPDATE_PRODUCT = gql `
|
|
1982
|
-
mutation UpdateProduct($input: UpdateProductInput!, $variantListOptions: ProductVariantListOptions) {
|
|
1983
|
-
updateProduct(input: $input) {
|
|
1984
|
-
...ProductDetail
|
|
1985
|
-
variantList(options: $variantListOptions) {
|
|
1986
|
-
items {
|
|
1987
|
-
...ProductVariant
|
|
1988
|
-
}
|
|
1989
|
-
totalItems
|
|
1990
|
-
}
|
|
1991
|
-
}
|
|
1992
|
-
}
|
|
1993
|
-
${PRODUCT_DETAIL_FRAGMENT}
|
|
1994
|
-
${PRODUCT_VARIANT_FRAGMENT}
|
|
1995
|
-
`;
|
|
1996
|
-
const CREATE_PRODUCT = gql `
|
|
1997
|
-
mutation CreateProduct($input: CreateProductInput!, $variantListOptions: ProductVariantListOptions) {
|
|
1998
|
-
createProduct(input: $input) {
|
|
1999
|
-
...ProductDetail
|
|
2000
|
-
variantList(options: $variantListOptions) {
|
|
2001
|
-
items {
|
|
2002
|
-
...ProductVariant
|
|
2003
|
-
}
|
|
2004
|
-
totalItems
|
|
2005
|
-
}
|
|
2006
|
-
}
|
|
2007
|
-
}
|
|
2008
|
-
${PRODUCT_DETAIL_FRAGMENT}
|
|
2009
|
-
${PRODUCT_VARIANT_FRAGMENT}
|
|
2010
|
-
`;
|
|
2011
|
-
const DELETE_PRODUCT = gql `
|
|
2012
|
-
mutation DeleteProduct($id: ID!) {
|
|
2013
|
-
deleteProduct(id: $id) {
|
|
2014
|
-
result
|
|
2015
|
-
message
|
|
2016
|
-
}
|
|
2017
|
-
}
|
|
2018
|
-
`;
|
|
2019
|
-
const CREATE_PRODUCT_VARIANTS = gql `
|
|
2020
|
-
mutation CreateProductVariants($input: [CreateProductVariantInput!]!) {
|
|
2021
|
-
createProductVariants(input: $input) {
|
|
2022
|
-
...ProductVariant
|
|
2023
|
-
}
|
|
2024
|
-
}
|
|
2025
|
-
${PRODUCT_VARIANT_FRAGMENT}
|
|
2026
|
-
`;
|
|
2027
|
-
const UPDATE_PRODUCT_VARIANTS = gql `
|
|
2028
|
-
mutation UpdateProductVariants($input: [UpdateProductVariantInput!]!) {
|
|
2029
|
-
updateProductVariants(input: $input) {
|
|
2030
|
-
...ProductVariant
|
|
2031
|
-
}
|
|
2032
|
-
}
|
|
2033
|
-
${PRODUCT_VARIANT_FRAGMENT}
|
|
2034
|
-
`;
|
|
2035
|
-
const CREATE_PRODUCT_OPTION_GROUP = gql `
|
|
2036
|
-
mutation CreateProductOptionGroup($input: CreateProductOptionGroupInput!) {
|
|
2037
|
-
createProductOptionGroup(input: $input) {
|
|
2038
|
-
...ProductOptionGroupWithOptions
|
|
2039
|
-
}
|
|
2040
|
-
}
|
|
2041
|
-
${PRODUCT_OPTION_GROUP_WITH_OPTIONS_FRAGMENT}
|
|
2042
|
-
`;
|
|
2043
|
-
const GET_PRODUCT_OPTION_GROUP = gql `
|
|
2044
|
-
query GetProductOptionGroup($id: ID!) {
|
|
2045
|
-
productOptionGroup(id: $id) {
|
|
2046
|
-
...ProductOptionGroupWithOptions
|
|
2047
|
-
}
|
|
2048
|
-
}
|
|
2049
|
-
${PRODUCT_OPTION_GROUP_WITH_OPTIONS_FRAGMENT}
|
|
2050
|
-
`;
|
|
2051
|
-
const ADD_OPTION_TO_GROUP = gql `
|
|
2052
|
-
mutation AddOptionToGroup($input: CreateProductOptionInput!) {
|
|
2053
|
-
createProductOption(input: $input) {
|
|
2054
|
-
id
|
|
2055
|
-
createdAt
|
|
2056
|
-
updatedAt
|
|
2057
|
-
name
|
|
2058
|
-
code
|
|
2059
|
-
groupId
|
|
2060
|
-
}
|
|
2061
|
-
}
|
|
2062
|
-
`;
|
|
2063
|
-
const ADD_OPTION_GROUP_TO_PRODUCT = gql `
|
|
2064
|
-
mutation AddOptionGroupToProduct($productId: ID!, $optionGroupId: ID!) {
|
|
2065
|
-
addOptionGroupToProduct(productId: $productId, optionGroupId: $optionGroupId) {
|
|
2066
|
-
id
|
|
2067
|
-
createdAt
|
|
2068
|
-
updatedAt
|
|
2069
|
-
optionGroups {
|
|
2070
|
-
id
|
|
2071
|
-
createdAt
|
|
2072
|
-
updatedAt
|
|
2073
|
-
code
|
|
2074
|
-
options {
|
|
2075
|
-
id
|
|
2076
|
-
createdAt
|
|
2077
|
-
updatedAt
|
|
2078
|
-
code
|
|
2079
|
-
}
|
|
2080
|
-
}
|
|
2081
|
-
}
|
|
2082
|
-
}
|
|
2083
|
-
`;
|
|
2084
|
-
const REMOVE_OPTION_GROUP_FROM_PRODUCT = gql `
|
|
2085
|
-
mutation RemoveOptionGroupFromProduct($productId: ID!, $optionGroupId: ID!) {
|
|
2086
|
-
removeOptionGroupFromProduct(productId: $productId, optionGroupId: $optionGroupId) {
|
|
2087
|
-
... on Product {
|
|
2088
|
-
id
|
|
2089
|
-
createdAt
|
|
2090
|
-
updatedAt
|
|
2091
|
-
optionGroups {
|
|
2092
|
-
id
|
|
2093
|
-
createdAt
|
|
2094
|
-
updatedAt
|
|
2095
|
-
code
|
|
2096
|
-
options {
|
|
2097
|
-
id
|
|
2098
|
-
createdAt
|
|
2099
|
-
updatedAt
|
|
2100
|
-
code
|
|
2101
|
-
}
|
|
2102
|
-
}
|
|
2103
|
-
}
|
|
2104
|
-
...ErrorResult
|
|
2105
|
-
}
|
|
2106
|
-
}
|
|
2107
|
-
${ERROR_RESULT_FRAGMENT}
|
|
2108
|
-
`;
|
|
2109
|
-
const GET_PRODUCT_WITH_VARIANTS = gql `
|
|
2110
|
-
query GetProductWithVariants($id: ID!, $variantListOptions: ProductVariantListOptions) {
|
|
2111
|
-
product(id: $id) {
|
|
2112
|
-
...ProductDetail
|
|
2113
|
-
variantList(options: $variantListOptions) {
|
|
2114
|
-
items {
|
|
2115
|
-
...ProductVariant
|
|
2116
|
-
}
|
|
2117
|
-
totalItems
|
|
2118
|
-
}
|
|
2119
|
-
}
|
|
2120
|
-
}
|
|
2121
|
-
${PRODUCT_DETAIL_FRAGMENT}
|
|
2122
|
-
${PRODUCT_VARIANT_FRAGMENT}
|
|
2123
|
-
`;
|
|
2124
|
-
const GET_PRODUCT_SIMPLE = gql `
|
|
2125
|
-
query GetProductSimple($id: ID!) {
|
|
2126
|
-
product(id: $id) {
|
|
2127
|
-
id
|
|
2128
|
-
name
|
|
2129
|
-
featuredAsset {
|
|
2130
|
-
...Asset
|
|
2131
|
-
}
|
|
2132
|
-
}
|
|
2133
|
-
}
|
|
2134
|
-
${ASSET_FRAGMENT}
|
|
2135
|
-
`;
|
|
2136
|
-
const GET_PRODUCT_LIST = gql `
|
|
2137
|
-
query GetProductList($options: ProductListOptions) {
|
|
2138
|
-
products(options: $options) {
|
|
2139
|
-
items {
|
|
2140
|
-
id
|
|
2141
|
-
createdAt
|
|
2142
|
-
updatedAt
|
|
2143
|
-
enabled
|
|
2144
|
-
languageCode
|
|
2145
|
-
name
|
|
2146
|
-
slug
|
|
2147
|
-
featuredAsset {
|
|
2148
|
-
id
|
|
2149
|
-
createdAt
|
|
2150
|
-
updatedAt
|
|
2151
|
-
preview
|
|
2152
|
-
}
|
|
2153
|
-
}
|
|
2154
|
-
totalItems
|
|
2155
|
-
}
|
|
2156
|
-
}
|
|
2157
|
-
`;
|
|
2158
|
-
const GET_PRODUCT_OPTION_GROUPS = gql `
|
|
2159
|
-
query GetProductOptionGroups($filterTerm: String) {
|
|
2160
|
-
productOptionGroups(filterTerm: $filterTerm) {
|
|
2161
|
-
id
|
|
2162
|
-
createdAt
|
|
2163
|
-
updatedAt
|
|
2164
|
-
languageCode
|
|
2165
|
-
code
|
|
2166
|
-
name
|
|
2167
|
-
options {
|
|
2168
|
-
id
|
|
2169
|
-
createdAt
|
|
2170
|
-
updatedAt
|
|
2171
|
-
languageCode
|
|
2172
|
-
code
|
|
2173
|
-
name
|
|
2174
|
-
}
|
|
2175
|
-
}
|
|
2176
|
-
}
|
|
2177
|
-
`;
|
|
2178
|
-
const GET_ASSET_LIST = gql `
|
|
2179
|
-
query GetAssetList($options: AssetListOptions) {
|
|
2180
|
-
assets(options: $options) {
|
|
2181
|
-
items {
|
|
2182
|
-
...Asset
|
|
2183
|
-
tags {
|
|
2184
|
-
...Tag
|
|
2185
|
-
}
|
|
2186
|
-
}
|
|
2187
|
-
totalItems
|
|
2188
|
-
}
|
|
2189
|
-
}
|
|
2190
|
-
${ASSET_FRAGMENT}
|
|
2191
|
-
${TAG_FRAGMENT}
|
|
2192
|
-
`;
|
|
2193
|
-
const GET_ASSET = gql `
|
|
2194
|
-
query GetAsset($id: ID!) {
|
|
2195
|
-
asset(id: $id) {
|
|
2196
|
-
...Asset
|
|
2197
|
-
tags {
|
|
2198
|
-
...Tag
|
|
2199
|
-
}
|
|
2200
|
-
}
|
|
2201
|
-
}
|
|
2202
|
-
${ASSET_FRAGMENT}
|
|
2203
|
-
${TAG_FRAGMENT}
|
|
2204
|
-
`;
|
|
2205
|
-
const CREATE_ASSETS = gql `
|
|
2206
|
-
mutation CreateAssets($input: [CreateAssetInput!]!) {
|
|
2207
|
-
createAssets(input: $input) {
|
|
2208
|
-
...Asset
|
|
2209
|
-
... on Asset {
|
|
2210
|
-
tags {
|
|
2211
|
-
...Tag
|
|
2212
|
-
}
|
|
2213
|
-
}
|
|
2214
|
-
... on ErrorResult {
|
|
2215
|
-
message
|
|
2216
|
-
}
|
|
2217
|
-
}
|
|
2218
|
-
}
|
|
2219
|
-
${ASSET_FRAGMENT}
|
|
2220
|
-
${TAG_FRAGMENT}
|
|
2221
|
-
`;
|
|
2222
|
-
const UPDATE_ASSET = gql `
|
|
2223
|
-
mutation UpdateAsset($input: UpdateAssetInput!) {
|
|
2224
|
-
updateAsset(input: $input) {
|
|
2225
|
-
...Asset
|
|
2226
|
-
tags {
|
|
2227
|
-
...Tag
|
|
2228
|
-
}
|
|
2229
|
-
}
|
|
2230
|
-
}
|
|
2231
|
-
${ASSET_FRAGMENT}
|
|
2232
|
-
${TAG_FRAGMENT}
|
|
2233
|
-
`;
|
|
2234
|
-
const DELETE_ASSETS = gql `
|
|
2235
|
-
mutation DeleteAssets($input: DeleteAssetsInput!) {
|
|
2236
|
-
deleteAssets(input: $input) {
|
|
2237
|
-
result
|
|
2238
|
-
message
|
|
2239
|
-
}
|
|
2240
|
-
}
|
|
2241
|
-
`;
|
|
2242
|
-
const SEARCH_PRODUCTS = gql `
|
|
2243
|
-
query SearchProducts($input: SearchInput!) {
|
|
2244
|
-
search(input: $input) {
|
|
2245
|
-
totalItems
|
|
2246
|
-
items {
|
|
2247
|
-
enabled
|
|
2248
|
-
productId
|
|
2249
|
-
productName
|
|
2250
|
-
productAsset {
|
|
2251
|
-
id
|
|
2252
|
-
preview
|
|
2253
|
-
focalPoint {
|
|
2254
|
-
x
|
|
2255
|
-
y
|
|
2256
|
-
}
|
|
2257
|
-
}
|
|
2258
|
-
productVariantId
|
|
2259
|
-
productVariantName
|
|
2260
|
-
productVariantAsset {
|
|
2261
|
-
id
|
|
2262
|
-
preview
|
|
2263
|
-
focalPoint {
|
|
2264
|
-
x
|
|
2265
|
-
y
|
|
2266
|
-
}
|
|
2267
|
-
}
|
|
2268
|
-
sku
|
|
2269
|
-
channelIds
|
|
2270
|
-
}
|
|
2271
|
-
facetValues {
|
|
2272
|
-
count
|
|
2273
|
-
facetValue {
|
|
2274
|
-
id
|
|
2275
|
-
createdAt
|
|
2276
|
-
updatedAt
|
|
2277
|
-
name
|
|
2278
|
-
facet {
|
|
2279
|
-
id
|
|
2280
|
-
createdAt
|
|
2281
|
-
updatedAt
|
|
2282
|
-
name
|
|
2283
|
-
}
|
|
2284
|
-
}
|
|
2285
|
-
}
|
|
2286
|
-
}
|
|
2287
|
-
}
|
|
2288
|
-
`;
|
|
2289
|
-
const PRODUCT_SELECTOR_SEARCH = gql `
|
|
2290
|
-
query ProductSelectorSearch($term: String!, $take: Int!) {
|
|
2291
|
-
search(input: { groupByProduct: false, term: $term, take: $take }) {
|
|
2292
|
-
items {
|
|
2293
|
-
productVariantId
|
|
2294
|
-
productVariantName
|
|
2295
|
-
productAsset {
|
|
2296
|
-
id
|
|
2297
|
-
preview
|
|
2298
|
-
focalPoint {
|
|
2299
|
-
x
|
|
2300
|
-
y
|
|
2301
|
-
}
|
|
2302
|
-
}
|
|
2303
|
-
price {
|
|
2304
|
-
... on SinglePrice {
|
|
2305
|
-
value
|
|
2306
|
-
}
|
|
2307
|
-
}
|
|
2308
|
-
priceWithTax {
|
|
2309
|
-
... on SinglePrice {
|
|
2310
|
-
value
|
|
2311
|
-
}
|
|
2312
|
-
}
|
|
2313
|
-
sku
|
|
2314
|
-
}
|
|
2315
|
-
}
|
|
2316
|
-
}
|
|
2317
|
-
`;
|
|
2318
|
-
const UPDATE_PRODUCT_OPTION_GROUP = gql `
|
|
2319
|
-
mutation UpdateProductOptionGroup($input: UpdateProductOptionGroupInput!) {
|
|
2320
|
-
updateProductOptionGroup(input: $input) {
|
|
2321
|
-
...ProductOptionGroup
|
|
2322
|
-
}
|
|
2323
|
-
}
|
|
2324
|
-
${PRODUCT_OPTION_GROUP_FRAGMENT}
|
|
2325
|
-
`;
|
|
2326
|
-
const UPDATE_PRODUCT_OPTION = gql `
|
|
2327
|
-
mutation UpdateProductOption($input: UpdateProductOptionInput!) {
|
|
2328
|
-
updateProductOption(input: $input) {
|
|
2329
|
-
...ProductOption
|
|
2330
|
-
}
|
|
2331
|
-
}
|
|
2332
|
-
${PRODUCT_OPTION_FRAGMENT}
|
|
2333
|
-
`;
|
|
2334
|
-
const DELETE_PRODUCT_OPTION = gql `
|
|
2335
|
-
mutation DeleteProductOption($id: ID!) {
|
|
2336
|
-
deleteProductOption(id: $id) {
|
|
2337
|
-
result
|
|
2338
|
-
message
|
|
2339
|
-
}
|
|
2340
|
-
}
|
|
2341
|
-
`;
|
|
2342
|
-
const DELETE_PRODUCT_VARIANT = gql `
|
|
2343
|
-
mutation DeleteProductVariant($id: ID!) {
|
|
2344
|
-
deleteProductVariant(id: $id) {
|
|
2345
|
-
result
|
|
2346
|
-
message
|
|
2347
|
-
}
|
|
2348
|
-
}
|
|
2349
|
-
`;
|
|
2350
|
-
const GET_PRODUCT_VARIANT_OPTIONS = gql `
|
|
2351
|
-
query GetProductVariantOptions($id: ID!) {
|
|
2352
|
-
product(id: $id) {
|
|
2353
|
-
id
|
|
2354
|
-
createdAt
|
|
2355
|
-
updatedAt
|
|
2356
|
-
name
|
|
2357
|
-
optionGroups {
|
|
2358
|
-
...ProductOptionGroup
|
|
2359
|
-
options {
|
|
2360
|
-
...ProductOption
|
|
2361
|
-
}
|
|
2362
|
-
}
|
|
2363
|
-
variants {
|
|
2364
|
-
id
|
|
2365
|
-
createdAt
|
|
2366
|
-
updatedAt
|
|
2367
|
-
enabled
|
|
2368
|
-
name
|
|
2369
|
-
sku
|
|
2370
|
-
price
|
|
2371
|
-
stockOnHand
|
|
2372
|
-
enabled
|
|
2373
|
-
options {
|
|
2374
|
-
id
|
|
2375
|
-
createdAt
|
|
2376
|
-
updatedAt
|
|
2377
|
-
name
|
|
2378
|
-
code
|
|
2379
|
-
groupId
|
|
2380
|
-
}
|
|
2381
|
-
}
|
|
2382
|
-
}
|
|
2383
|
-
}
|
|
2384
|
-
${PRODUCT_OPTION_GROUP_FRAGMENT}
|
|
2385
|
-
${PRODUCT_OPTION_FRAGMENT}
|
|
2386
|
-
`;
|
|
2387
|
-
const ASSIGN_PRODUCTS_TO_CHANNEL = gql `
|
|
2388
|
-
mutation AssignProductsToChannel($input: AssignProductsToChannelInput!) {
|
|
2389
|
-
assignProductsToChannel(input: $input) {
|
|
2390
|
-
id
|
|
2391
|
-
channels {
|
|
2392
|
-
id
|
|
2393
|
-
code
|
|
2394
|
-
}
|
|
2395
|
-
}
|
|
2396
|
-
}
|
|
2397
|
-
`;
|
|
2398
|
-
const ASSIGN_VARIANTS_TO_CHANNEL = gql `
|
|
2399
|
-
mutation AssignVariantsToChannel($input: AssignProductVariantsToChannelInput!) {
|
|
2400
|
-
assignProductVariantsToChannel(input: $input) {
|
|
2401
|
-
id
|
|
2402
|
-
channels {
|
|
2403
|
-
id
|
|
2404
|
-
code
|
|
2405
|
-
}
|
|
2406
|
-
}
|
|
2407
|
-
}
|
|
2408
|
-
`;
|
|
2409
|
-
const REMOVE_PRODUCTS_FROM_CHANNEL = gql `
|
|
2410
|
-
mutation RemoveProductsFromChannel($input: RemoveProductsFromChannelInput!) {
|
|
2411
|
-
removeProductsFromChannel(input: $input) {
|
|
2412
|
-
id
|
|
2413
|
-
channels {
|
|
2414
|
-
id
|
|
2415
|
-
code
|
|
2416
|
-
}
|
|
2417
|
-
}
|
|
2418
|
-
}
|
|
2419
|
-
`;
|
|
2420
|
-
const REMOVE_VARIANTS_FROM_CHANNEL = gql `
|
|
2421
|
-
mutation RemoveVariantsFromChannel($input: RemoveProductVariantsFromChannelInput!) {
|
|
2422
|
-
removeProductVariantsFromChannel(input: $input) {
|
|
2423
|
-
id
|
|
2424
|
-
channels {
|
|
2425
|
-
id
|
|
2426
|
-
code
|
|
2427
|
-
}
|
|
2428
|
-
}
|
|
2429
|
-
}
|
|
2430
|
-
`;
|
|
2431
|
-
const GET_PRODUCT_VARIANT = gql `
|
|
2432
|
-
query GetProductVariant($id: ID!) {
|
|
2433
|
-
productVariant(id: $id) {
|
|
2434
|
-
id
|
|
2435
|
-
name
|
|
2436
|
-
sku
|
|
2437
|
-
featuredAsset {
|
|
2438
|
-
id
|
|
2439
|
-
preview
|
|
2440
|
-
focalPoint {
|
|
2441
|
-
x
|
|
2442
|
-
y
|
|
2443
|
-
}
|
|
2444
|
-
}
|
|
2445
|
-
product {
|
|
2446
|
-
id
|
|
2447
|
-
featuredAsset {
|
|
2448
|
-
id
|
|
2449
|
-
preview
|
|
2450
|
-
focalPoint {
|
|
2451
|
-
x
|
|
2452
|
-
y
|
|
2453
|
-
}
|
|
2454
|
-
}
|
|
2455
|
-
}
|
|
2456
|
-
}
|
|
2457
|
-
}
|
|
2458
|
-
`;
|
|
2459
|
-
const GET_PRODUCT_VARIANT_LIST_SIMPLE = gql `
|
|
2460
|
-
query GetProductVariantListSimple($options: ProductVariantListOptions!, $productId: ID) {
|
|
2461
|
-
productVariants(options: $options, productId: $productId) {
|
|
2462
|
-
items {
|
|
2463
|
-
id
|
|
2464
|
-
name
|
|
2465
|
-
sku
|
|
2466
|
-
featuredAsset {
|
|
2467
|
-
id
|
|
2468
|
-
preview
|
|
2469
|
-
focalPoint {
|
|
2470
|
-
x
|
|
2471
|
-
y
|
|
2472
|
-
}
|
|
2473
|
-
}
|
|
2474
|
-
product {
|
|
2475
|
-
id
|
|
2476
|
-
featuredAsset {
|
|
2477
|
-
id
|
|
2478
|
-
preview
|
|
2479
|
-
focalPoint {
|
|
2480
|
-
x
|
|
2481
|
-
y
|
|
2482
|
-
}
|
|
2483
|
-
}
|
|
2484
|
-
}
|
|
2485
|
-
}
|
|
2486
|
-
totalItems
|
|
2487
|
-
}
|
|
2488
|
-
}
|
|
2489
|
-
`;
|
|
2490
|
-
const GET_PRODUCT_VARIANT_LIST = gql `
|
|
2491
|
-
query GetProductVariantList($options: ProductVariantListOptions!, $productId: ID) {
|
|
2492
|
-
productVariants(options: $options, productId: $productId) {
|
|
2493
|
-
items {
|
|
2494
|
-
...ProductVariant
|
|
2495
|
-
}
|
|
2496
|
-
totalItems
|
|
2497
|
-
}
|
|
2498
|
-
}
|
|
2499
|
-
${PRODUCT_VARIANT_FRAGMENT}
|
|
2500
|
-
`;
|
|
2501
|
-
const GET_TAG_LIST = gql `
|
|
2502
|
-
query GetTagList($options: TagListOptions) {
|
|
2503
|
-
tags(options: $options) {
|
|
2504
|
-
items {
|
|
2505
|
-
...Tag
|
|
2506
|
-
}
|
|
2507
|
-
totalItems
|
|
2508
|
-
}
|
|
2509
|
-
}
|
|
2510
|
-
${TAG_FRAGMENT}
|
|
2511
|
-
`;
|
|
2512
|
-
const GET_TAG = gql `
|
|
2513
|
-
query GetTag($id: ID!) {
|
|
2514
|
-
tag(id: $id) {
|
|
2515
|
-
...Tag
|
|
2516
|
-
}
|
|
2517
|
-
}
|
|
2518
|
-
${TAG_FRAGMENT}
|
|
2519
|
-
`;
|
|
2520
|
-
const CREATE_TAG = gql `
|
|
2521
|
-
mutation CreateTag($input: CreateTagInput!) {
|
|
2522
|
-
createTag(input: $input) {
|
|
2523
|
-
...Tag
|
|
2524
|
-
}
|
|
2525
|
-
}
|
|
2526
|
-
${TAG_FRAGMENT}
|
|
2527
|
-
`;
|
|
2528
|
-
const UPDATE_TAG = gql `
|
|
2529
|
-
mutation UpdateTag($input: UpdateTagInput!) {
|
|
2530
|
-
updateTag(input: $input) {
|
|
2531
|
-
...Tag
|
|
2532
|
-
}
|
|
2533
|
-
}
|
|
2534
|
-
${TAG_FRAGMENT}
|
|
2535
|
-
`;
|
|
2536
|
-
const DELETE_TAG = gql `
|
|
2537
|
-
mutation DeleteTag($id: ID!) {
|
|
2538
|
-
deleteTag(id: $id) {
|
|
2539
|
-
message
|
|
2540
|
-
result
|
|
2541
|
-
}
|
|
2542
|
-
}
|
|
1802
|
+
const ASSET_FRAGMENT = gql `
|
|
1803
|
+
fragment Asset on Asset {
|
|
1804
|
+
id
|
|
1805
|
+
createdAt
|
|
1806
|
+
updatedAt
|
|
1807
|
+
name
|
|
1808
|
+
fileSize
|
|
1809
|
+
mimeType
|
|
1810
|
+
type
|
|
1811
|
+
preview
|
|
1812
|
+
source
|
|
1813
|
+
width
|
|
1814
|
+
height
|
|
1815
|
+
focalPoint {
|
|
1816
|
+
x
|
|
1817
|
+
y
|
|
1818
|
+
}
|
|
1819
|
+
}
|
|
1820
|
+
`;
|
|
1821
|
+
const TAG_FRAGMENT = gql `
|
|
1822
|
+
fragment Tag on Tag {
|
|
1823
|
+
id
|
|
1824
|
+
value
|
|
1825
|
+
}
|
|
1826
|
+
`;
|
|
1827
|
+
const PRODUCT_OPTION_GROUP_FRAGMENT = gql `
|
|
1828
|
+
fragment ProductOptionGroup on ProductOptionGroup {
|
|
1829
|
+
id
|
|
1830
|
+
createdAt
|
|
1831
|
+
updatedAt
|
|
1832
|
+
code
|
|
1833
|
+
languageCode
|
|
1834
|
+
name
|
|
1835
|
+
translations {
|
|
1836
|
+
id
|
|
1837
|
+
languageCode
|
|
1838
|
+
name
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
`;
|
|
1842
|
+
const PRODUCT_OPTION_FRAGMENT = gql `
|
|
1843
|
+
fragment ProductOption on ProductOption {
|
|
1844
|
+
id
|
|
1845
|
+
createdAt
|
|
1846
|
+
updatedAt
|
|
1847
|
+
code
|
|
1848
|
+
languageCode
|
|
1849
|
+
name
|
|
1850
|
+
groupId
|
|
1851
|
+
translations {
|
|
1852
|
+
id
|
|
1853
|
+
languageCode
|
|
1854
|
+
name
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
`;
|
|
1858
|
+
const PRODUCT_VARIANT_FRAGMENT = gql `
|
|
1859
|
+
fragment ProductVariant on ProductVariant {
|
|
1860
|
+
id
|
|
1861
|
+
createdAt
|
|
1862
|
+
updatedAt
|
|
1863
|
+
enabled
|
|
1864
|
+
languageCode
|
|
1865
|
+
name
|
|
1866
|
+
price
|
|
1867
|
+
currencyCode
|
|
1868
|
+
priceWithTax
|
|
1869
|
+
stockOnHand
|
|
1870
|
+
stockAllocated
|
|
1871
|
+
trackInventory
|
|
1872
|
+
outOfStockThreshold
|
|
1873
|
+
useGlobalOutOfStockThreshold
|
|
1874
|
+
taxRateApplied {
|
|
1875
|
+
id
|
|
1876
|
+
name
|
|
1877
|
+
value
|
|
1878
|
+
}
|
|
1879
|
+
taxCategory {
|
|
1880
|
+
id
|
|
1881
|
+
name
|
|
1882
|
+
}
|
|
1883
|
+
sku
|
|
1884
|
+
options {
|
|
1885
|
+
...ProductOption
|
|
1886
|
+
}
|
|
1887
|
+
facetValues {
|
|
1888
|
+
id
|
|
1889
|
+
code
|
|
1890
|
+
name
|
|
1891
|
+
facet {
|
|
1892
|
+
id
|
|
1893
|
+
name
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
featuredAsset {
|
|
1897
|
+
...Asset
|
|
1898
|
+
}
|
|
1899
|
+
assets {
|
|
1900
|
+
...Asset
|
|
1901
|
+
}
|
|
1902
|
+
translations {
|
|
1903
|
+
id
|
|
1904
|
+
languageCode
|
|
1905
|
+
name
|
|
1906
|
+
}
|
|
1907
|
+
channels {
|
|
1908
|
+
id
|
|
1909
|
+
code
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1912
|
+
${PRODUCT_OPTION_FRAGMENT}
|
|
1913
|
+
${ASSET_FRAGMENT}
|
|
1914
|
+
`;
|
|
1915
|
+
const PRODUCT_DETAIL_FRAGMENT = gql `
|
|
1916
|
+
fragment ProductDetail on Product {
|
|
1917
|
+
id
|
|
1918
|
+
createdAt
|
|
1919
|
+
updatedAt
|
|
1920
|
+
enabled
|
|
1921
|
+
languageCode
|
|
1922
|
+
name
|
|
1923
|
+
slug
|
|
1924
|
+
description
|
|
1925
|
+
featuredAsset {
|
|
1926
|
+
...Asset
|
|
1927
|
+
}
|
|
1928
|
+
assets {
|
|
1929
|
+
...Asset
|
|
1930
|
+
}
|
|
1931
|
+
translations {
|
|
1932
|
+
id
|
|
1933
|
+
languageCode
|
|
1934
|
+
name
|
|
1935
|
+
slug
|
|
1936
|
+
description
|
|
1937
|
+
}
|
|
1938
|
+
optionGroups {
|
|
1939
|
+
...ProductOptionGroup
|
|
1940
|
+
}
|
|
1941
|
+
facetValues {
|
|
1942
|
+
id
|
|
1943
|
+
code
|
|
1944
|
+
name
|
|
1945
|
+
facet {
|
|
1946
|
+
id
|
|
1947
|
+
name
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
channels {
|
|
1951
|
+
id
|
|
1952
|
+
code
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
${PRODUCT_OPTION_GROUP_FRAGMENT}
|
|
1956
|
+
${ASSET_FRAGMENT}
|
|
1957
|
+
`;
|
|
1958
|
+
const PRODUCT_OPTION_GROUP_WITH_OPTIONS_FRAGMENT = gql `
|
|
1959
|
+
fragment ProductOptionGroupWithOptions on ProductOptionGroup {
|
|
1960
|
+
id
|
|
1961
|
+
createdAt
|
|
1962
|
+
updatedAt
|
|
1963
|
+
languageCode
|
|
1964
|
+
code
|
|
1965
|
+
name
|
|
1966
|
+
translations {
|
|
1967
|
+
id
|
|
1968
|
+
name
|
|
1969
|
+
}
|
|
1970
|
+
options {
|
|
1971
|
+
id
|
|
1972
|
+
languageCode
|
|
1973
|
+
name
|
|
1974
|
+
code
|
|
1975
|
+
translations {
|
|
1976
|
+
name
|
|
1977
|
+
}
|
|
1978
|
+
}
|
|
1979
|
+
}
|
|
1980
|
+
`;
|
|
1981
|
+
const UPDATE_PRODUCT = gql `
|
|
1982
|
+
mutation UpdateProduct($input: UpdateProductInput!, $variantListOptions: ProductVariantListOptions) {
|
|
1983
|
+
updateProduct(input: $input) {
|
|
1984
|
+
...ProductDetail
|
|
1985
|
+
variantList(options: $variantListOptions) {
|
|
1986
|
+
items {
|
|
1987
|
+
...ProductVariant
|
|
1988
|
+
}
|
|
1989
|
+
totalItems
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1993
|
+
${PRODUCT_DETAIL_FRAGMENT}
|
|
1994
|
+
${PRODUCT_VARIANT_FRAGMENT}
|
|
1995
|
+
`;
|
|
1996
|
+
const CREATE_PRODUCT = gql `
|
|
1997
|
+
mutation CreateProduct($input: CreateProductInput!, $variantListOptions: ProductVariantListOptions) {
|
|
1998
|
+
createProduct(input: $input) {
|
|
1999
|
+
...ProductDetail
|
|
2000
|
+
variantList(options: $variantListOptions) {
|
|
2001
|
+
items {
|
|
2002
|
+
...ProductVariant
|
|
2003
|
+
}
|
|
2004
|
+
totalItems
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
2008
|
+
${PRODUCT_DETAIL_FRAGMENT}
|
|
2009
|
+
${PRODUCT_VARIANT_FRAGMENT}
|
|
2010
|
+
`;
|
|
2011
|
+
const DELETE_PRODUCT = gql `
|
|
2012
|
+
mutation DeleteProduct($id: ID!) {
|
|
2013
|
+
deleteProduct(id: $id) {
|
|
2014
|
+
result
|
|
2015
|
+
message
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
`;
|
|
2019
|
+
const CREATE_PRODUCT_VARIANTS = gql `
|
|
2020
|
+
mutation CreateProductVariants($input: [CreateProductVariantInput!]!) {
|
|
2021
|
+
createProductVariants(input: $input) {
|
|
2022
|
+
...ProductVariant
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
${PRODUCT_VARIANT_FRAGMENT}
|
|
2026
|
+
`;
|
|
2027
|
+
const UPDATE_PRODUCT_VARIANTS = gql `
|
|
2028
|
+
mutation UpdateProductVariants($input: [UpdateProductVariantInput!]!) {
|
|
2029
|
+
updateProductVariants(input: $input) {
|
|
2030
|
+
...ProductVariant
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
${PRODUCT_VARIANT_FRAGMENT}
|
|
2034
|
+
`;
|
|
2035
|
+
const CREATE_PRODUCT_OPTION_GROUP = gql `
|
|
2036
|
+
mutation CreateProductOptionGroup($input: CreateProductOptionGroupInput!) {
|
|
2037
|
+
createProductOptionGroup(input: $input) {
|
|
2038
|
+
...ProductOptionGroupWithOptions
|
|
2039
|
+
}
|
|
2040
|
+
}
|
|
2041
|
+
${PRODUCT_OPTION_GROUP_WITH_OPTIONS_FRAGMENT}
|
|
2042
|
+
`;
|
|
2043
|
+
const GET_PRODUCT_OPTION_GROUP = gql `
|
|
2044
|
+
query GetProductOptionGroup($id: ID!) {
|
|
2045
|
+
productOptionGroup(id: $id) {
|
|
2046
|
+
...ProductOptionGroupWithOptions
|
|
2047
|
+
}
|
|
2048
|
+
}
|
|
2049
|
+
${PRODUCT_OPTION_GROUP_WITH_OPTIONS_FRAGMENT}
|
|
2050
|
+
`;
|
|
2051
|
+
const ADD_OPTION_TO_GROUP = gql `
|
|
2052
|
+
mutation AddOptionToGroup($input: CreateProductOptionInput!) {
|
|
2053
|
+
createProductOption(input: $input) {
|
|
2054
|
+
id
|
|
2055
|
+
createdAt
|
|
2056
|
+
updatedAt
|
|
2057
|
+
name
|
|
2058
|
+
code
|
|
2059
|
+
groupId
|
|
2060
|
+
}
|
|
2061
|
+
}
|
|
2062
|
+
`;
|
|
2063
|
+
const ADD_OPTION_GROUP_TO_PRODUCT = gql `
|
|
2064
|
+
mutation AddOptionGroupToProduct($productId: ID!, $optionGroupId: ID!) {
|
|
2065
|
+
addOptionGroupToProduct(productId: $productId, optionGroupId: $optionGroupId) {
|
|
2066
|
+
id
|
|
2067
|
+
createdAt
|
|
2068
|
+
updatedAt
|
|
2069
|
+
optionGroups {
|
|
2070
|
+
id
|
|
2071
|
+
createdAt
|
|
2072
|
+
updatedAt
|
|
2073
|
+
code
|
|
2074
|
+
options {
|
|
2075
|
+
id
|
|
2076
|
+
createdAt
|
|
2077
|
+
updatedAt
|
|
2078
|
+
code
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
`;
|
|
2084
|
+
const REMOVE_OPTION_GROUP_FROM_PRODUCT = gql `
|
|
2085
|
+
mutation RemoveOptionGroupFromProduct($productId: ID!, $optionGroupId: ID!) {
|
|
2086
|
+
removeOptionGroupFromProduct(productId: $productId, optionGroupId: $optionGroupId) {
|
|
2087
|
+
... on Product {
|
|
2088
|
+
id
|
|
2089
|
+
createdAt
|
|
2090
|
+
updatedAt
|
|
2091
|
+
optionGroups {
|
|
2092
|
+
id
|
|
2093
|
+
createdAt
|
|
2094
|
+
updatedAt
|
|
2095
|
+
code
|
|
2096
|
+
options {
|
|
2097
|
+
id
|
|
2098
|
+
createdAt
|
|
2099
|
+
updatedAt
|
|
2100
|
+
code
|
|
2101
|
+
}
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
...ErrorResult
|
|
2105
|
+
}
|
|
2106
|
+
}
|
|
2107
|
+
${ERROR_RESULT_FRAGMENT}
|
|
2108
|
+
`;
|
|
2109
|
+
const GET_PRODUCT_WITH_VARIANTS = gql `
|
|
2110
|
+
query GetProductWithVariants($id: ID!, $variantListOptions: ProductVariantListOptions) {
|
|
2111
|
+
product(id: $id) {
|
|
2112
|
+
...ProductDetail
|
|
2113
|
+
variantList(options: $variantListOptions) {
|
|
2114
|
+
items {
|
|
2115
|
+
...ProductVariant
|
|
2116
|
+
}
|
|
2117
|
+
totalItems
|
|
2118
|
+
}
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2121
|
+
${PRODUCT_DETAIL_FRAGMENT}
|
|
2122
|
+
${PRODUCT_VARIANT_FRAGMENT}
|
|
2123
|
+
`;
|
|
2124
|
+
const GET_PRODUCT_SIMPLE = gql `
|
|
2125
|
+
query GetProductSimple($id: ID!) {
|
|
2126
|
+
product(id: $id) {
|
|
2127
|
+
id
|
|
2128
|
+
name
|
|
2129
|
+
featuredAsset {
|
|
2130
|
+
...Asset
|
|
2131
|
+
}
|
|
2132
|
+
}
|
|
2133
|
+
}
|
|
2134
|
+
${ASSET_FRAGMENT}
|
|
2135
|
+
`;
|
|
2136
|
+
const GET_PRODUCT_LIST = gql `
|
|
2137
|
+
query GetProductList($options: ProductListOptions) {
|
|
2138
|
+
products(options: $options) {
|
|
2139
|
+
items {
|
|
2140
|
+
id
|
|
2141
|
+
createdAt
|
|
2142
|
+
updatedAt
|
|
2143
|
+
enabled
|
|
2144
|
+
languageCode
|
|
2145
|
+
name
|
|
2146
|
+
slug
|
|
2147
|
+
featuredAsset {
|
|
2148
|
+
id
|
|
2149
|
+
createdAt
|
|
2150
|
+
updatedAt
|
|
2151
|
+
preview
|
|
2152
|
+
}
|
|
2153
|
+
}
|
|
2154
|
+
totalItems
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
`;
|
|
2158
|
+
const GET_PRODUCT_OPTION_GROUPS = gql `
|
|
2159
|
+
query GetProductOptionGroups($filterTerm: String) {
|
|
2160
|
+
productOptionGroups(filterTerm: $filterTerm) {
|
|
2161
|
+
id
|
|
2162
|
+
createdAt
|
|
2163
|
+
updatedAt
|
|
2164
|
+
languageCode
|
|
2165
|
+
code
|
|
2166
|
+
name
|
|
2167
|
+
options {
|
|
2168
|
+
id
|
|
2169
|
+
createdAt
|
|
2170
|
+
updatedAt
|
|
2171
|
+
languageCode
|
|
2172
|
+
code
|
|
2173
|
+
name
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
}
|
|
2177
|
+
`;
|
|
2178
|
+
const GET_ASSET_LIST = gql `
|
|
2179
|
+
query GetAssetList($options: AssetListOptions) {
|
|
2180
|
+
assets(options: $options) {
|
|
2181
|
+
items {
|
|
2182
|
+
...Asset
|
|
2183
|
+
tags {
|
|
2184
|
+
...Tag
|
|
2185
|
+
}
|
|
2186
|
+
}
|
|
2187
|
+
totalItems
|
|
2188
|
+
}
|
|
2189
|
+
}
|
|
2190
|
+
${ASSET_FRAGMENT}
|
|
2191
|
+
${TAG_FRAGMENT}
|
|
2192
|
+
`;
|
|
2193
|
+
const GET_ASSET = gql `
|
|
2194
|
+
query GetAsset($id: ID!) {
|
|
2195
|
+
asset(id: $id) {
|
|
2196
|
+
...Asset
|
|
2197
|
+
tags {
|
|
2198
|
+
...Tag
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
${ASSET_FRAGMENT}
|
|
2203
|
+
${TAG_FRAGMENT}
|
|
2204
|
+
`;
|
|
2205
|
+
const CREATE_ASSETS = gql `
|
|
2206
|
+
mutation CreateAssets($input: [CreateAssetInput!]!) {
|
|
2207
|
+
createAssets(input: $input) {
|
|
2208
|
+
...Asset
|
|
2209
|
+
... on Asset {
|
|
2210
|
+
tags {
|
|
2211
|
+
...Tag
|
|
2212
|
+
}
|
|
2213
|
+
}
|
|
2214
|
+
... on ErrorResult {
|
|
2215
|
+
message
|
|
2216
|
+
}
|
|
2217
|
+
}
|
|
2218
|
+
}
|
|
2219
|
+
${ASSET_FRAGMENT}
|
|
2220
|
+
${TAG_FRAGMENT}
|
|
2221
|
+
`;
|
|
2222
|
+
const UPDATE_ASSET = gql `
|
|
2223
|
+
mutation UpdateAsset($input: UpdateAssetInput!) {
|
|
2224
|
+
updateAsset(input: $input) {
|
|
2225
|
+
...Asset
|
|
2226
|
+
tags {
|
|
2227
|
+
...Tag
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
${ASSET_FRAGMENT}
|
|
2232
|
+
${TAG_FRAGMENT}
|
|
2233
|
+
`;
|
|
2234
|
+
const DELETE_ASSETS = gql `
|
|
2235
|
+
mutation DeleteAssets($input: DeleteAssetsInput!) {
|
|
2236
|
+
deleteAssets(input: $input) {
|
|
2237
|
+
result
|
|
2238
|
+
message
|
|
2239
|
+
}
|
|
2240
|
+
}
|
|
2241
|
+
`;
|
|
2242
|
+
const SEARCH_PRODUCTS = gql `
|
|
2243
|
+
query SearchProducts($input: SearchInput!) {
|
|
2244
|
+
search(input: $input) {
|
|
2245
|
+
totalItems
|
|
2246
|
+
items {
|
|
2247
|
+
enabled
|
|
2248
|
+
productId
|
|
2249
|
+
productName
|
|
2250
|
+
productAsset {
|
|
2251
|
+
id
|
|
2252
|
+
preview
|
|
2253
|
+
focalPoint {
|
|
2254
|
+
x
|
|
2255
|
+
y
|
|
2256
|
+
}
|
|
2257
|
+
}
|
|
2258
|
+
productVariantId
|
|
2259
|
+
productVariantName
|
|
2260
|
+
productVariantAsset {
|
|
2261
|
+
id
|
|
2262
|
+
preview
|
|
2263
|
+
focalPoint {
|
|
2264
|
+
x
|
|
2265
|
+
y
|
|
2266
|
+
}
|
|
2267
|
+
}
|
|
2268
|
+
sku
|
|
2269
|
+
channelIds
|
|
2270
|
+
}
|
|
2271
|
+
facetValues {
|
|
2272
|
+
count
|
|
2273
|
+
facetValue {
|
|
2274
|
+
id
|
|
2275
|
+
createdAt
|
|
2276
|
+
updatedAt
|
|
2277
|
+
name
|
|
2278
|
+
facet {
|
|
2279
|
+
id
|
|
2280
|
+
createdAt
|
|
2281
|
+
updatedAt
|
|
2282
|
+
name
|
|
2283
|
+
}
|
|
2284
|
+
}
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
`;
|
|
2289
|
+
const PRODUCT_SELECTOR_SEARCH = gql `
|
|
2290
|
+
query ProductSelectorSearch($term: String!, $take: Int!) {
|
|
2291
|
+
search(input: { groupByProduct: false, term: $term, take: $take }) {
|
|
2292
|
+
items {
|
|
2293
|
+
productVariantId
|
|
2294
|
+
productVariantName
|
|
2295
|
+
productAsset {
|
|
2296
|
+
id
|
|
2297
|
+
preview
|
|
2298
|
+
focalPoint {
|
|
2299
|
+
x
|
|
2300
|
+
y
|
|
2301
|
+
}
|
|
2302
|
+
}
|
|
2303
|
+
price {
|
|
2304
|
+
... on SinglePrice {
|
|
2305
|
+
value
|
|
2306
|
+
}
|
|
2307
|
+
}
|
|
2308
|
+
priceWithTax {
|
|
2309
|
+
... on SinglePrice {
|
|
2310
|
+
value
|
|
2311
|
+
}
|
|
2312
|
+
}
|
|
2313
|
+
sku
|
|
2314
|
+
}
|
|
2315
|
+
}
|
|
2316
|
+
}
|
|
2317
|
+
`;
|
|
2318
|
+
const UPDATE_PRODUCT_OPTION_GROUP = gql `
|
|
2319
|
+
mutation UpdateProductOptionGroup($input: UpdateProductOptionGroupInput!) {
|
|
2320
|
+
updateProductOptionGroup(input: $input) {
|
|
2321
|
+
...ProductOptionGroup
|
|
2322
|
+
}
|
|
2323
|
+
}
|
|
2324
|
+
${PRODUCT_OPTION_GROUP_FRAGMENT}
|
|
2325
|
+
`;
|
|
2326
|
+
const UPDATE_PRODUCT_OPTION = gql `
|
|
2327
|
+
mutation UpdateProductOption($input: UpdateProductOptionInput!) {
|
|
2328
|
+
updateProductOption(input: $input) {
|
|
2329
|
+
...ProductOption
|
|
2330
|
+
}
|
|
2331
|
+
}
|
|
2332
|
+
${PRODUCT_OPTION_FRAGMENT}
|
|
2333
|
+
`;
|
|
2334
|
+
const DELETE_PRODUCT_OPTION = gql `
|
|
2335
|
+
mutation DeleteProductOption($id: ID!) {
|
|
2336
|
+
deleteProductOption(id: $id) {
|
|
2337
|
+
result
|
|
2338
|
+
message
|
|
2339
|
+
}
|
|
2340
|
+
}
|
|
2341
|
+
`;
|
|
2342
|
+
const DELETE_PRODUCT_VARIANT = gql `
|
|
2343
|
+
mutation DeleteProductVariant($id: ID!) {
|
|
2344
|
+
deleteProductVariant(id: $id) {
|
|
2345
|
+
result
|
|
2346
|
+
message
|
|
2347
|
+
}
|
|
2348
|
+
}
|
|
2349
|
+
`;
|
|
2350
|
+
const GET_PRODUCT_VARIANT_OPTIONS = gql `
|
|
2351
|
+
query GetProductVariantOptions($id: ID!) {
|
|
2352
|
+
product(id: $id) {
|
|
2353
|
+
id
|
|
2354
|
+
createdAt
|
|
2355
|
+
updatedAt
|
|
2356
|
+
name
|
|
2357
|
+
optionGroups {
|
|
2358
|
+
...ProductOptionGroup
|
|
2359
|
+
options {
|
|
2360
|
+
...ProductOption
|
|
2361
|
+
}
|
|
2362
|
+
}
|
|
2363
|
+
variants {
|
|
2364
|
+
id
|
|
2365
|
+
createdAt
|
|
2366
|
+
updatedAt
|
|
2367
|
+
enabled
|
|
2368
|
+
name
|
|
2369
|
+
sku
|
|
2370
|
+
price
|
|
2371
|
+
stockOnHand
|
|
2372
|
+
enabled
|
|
2373
|
+
options {
|
|
2374
|
+
id
|
|
2375
|
+
createdAt
|
|
2376
|
+
updatedAt
|
|
2377
|
+
name
|
|
2378
|
+
code
|
|
2379
|
+
groupId
|
|
2380
|
+
}
|
|
2381
|
+
}
|
|
2382
|
+
}
|
|
2383
|
+
}
|
|
2384
|
+
${PRODUCT_OPTION_GROUP_FRAGMENT}
|
|
2385
|
+
${PRODUCT_OPTION_FRAGMENT}
|
|
2386
|
+
`;
|
|
2387
|
+
const ASSIGN_PRODUCTS_TO_CHANNEL = gql `
|
|
2388
|
+
mutation AssignProductsToChannel($input: AssignProductsToChannelInput!) {
|
|
2389
|
+
assignProductsToChannel(input: $input) {
|
|
2390
|
+
id
|
|
2391
|
+
channels {
|
|
2392
|
+
id
|
|
2393
|
+
code
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
}
|
|
2397
|
+
`;
|
|
2398
|
+
const ASSIGN_VARIANTS_TO_CHANNEL = gql `
|
|
2399
|
+
mutation AssignVariantsToChannel($input: AssignProductVariantsToChannelInput!) {
|
|
2400
|
+
assignProductVariantsToChannel(input: $input) {
|
|
2401
|
+
id
|
|
2402
|
+
channels {
|
|
2403
|
+
id
|
|
2404
|
+
code
|
|
2405
|
+
}
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
`;
|
|
2409
|
+
const REMOVE_PRODUCTS_FROM_CHANNEL = gql `
|
|
2410
|
+
mutation RemoveProductsFromChannel($input: RemoveProductsFromChannelInput!) {
|
|
2411
|
+
removeProductsFromChannel(input: $input) {
|
|
2412
|
+
id
|
|
2413
|
+
channels {
|
|
2414
|
+
id
|
|
2415
|
+
code
|
|
2416
|
+
}
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2419
|
+
`;
|
|
2420
|
+
const REMOVE_VARIANTS_FROM_CHANNEL = gql `
|
|
2421
|
+
mutation RemoveVariantsFromChannel($input: RemoveProductVariantsFromChannelInput!) {
|
|
2422
|
+
removeProductVariantsFromChannel(input: $input) {
|
|
2423
|
+
id
|
|
2424
|
+
channels {
|
|
2425
|
+
id
|
|
2426
|
+
code
|
|
2427
|
+
}
|
|
2428
|
+
}
|
|
2429
|
+
}
|
|
2430
|
+
`;
|
|
2431
|
+
const GET_PRODUCT_VARIANT = gql `
|
|
2432
|
+
query GetProductVariant($id: ID!) {
|
|
2433
|
+
productVariant(id: $id) {
|
|
2434
|
+
id
|
|
2435
|
+
name
|
|
2436
|
+
sku
|
|
2437
|
+
featuredAsset {
|
|
2438
|
+
id
|
|
2439
|
+
preview
|
|
2440
|
+
focalPoint {
|
|
2441
|
+
x
|
|
2442
|
+
y
|
|
2443
|
+
}
|
|
2444
|
+
}
|
|
2445
|
+
product {
|
|
2446
|
+
id
|
|
2447
|
+
featuredAsset {
|
|
2448
|
+
id
|
|
2449
|
+
preview
|
|
2450
|
+
focalPoint {
|
|
2451
|
+
x
|
|
2452
|
+
y
|
|
2453
|
+
}
|
|
2454
|
+
}
|
|
2455
|
+
}
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2458
|
+
`;
|
|
2459
|
+
const GET_PRODUCT_VARIANT_LIST_SIMPLE = gql `
|
|
2460
|
+
query GetProductVariantListSimple($options: ProductVariantListOptions!, $productId: ID) {
|
|
2461
|
+
productVariants(options: $options, productId: $productId) {
|
|
2462
|
+
items {
|
|
2463
|
+
id
|
|
2464
|
+
name
|
|
2465
|
+
sku
|
|
2466
|
+
featuredAsset {
|
|
2467
|
+
id
|
|
2468
|
+
preview
|
|
2469
|
+
focalPoint {
|
|
2470
|
+
x
|
|
2471
|
+
y
|
|
2472
|
+
}
|
|
2473
|
+
}
|
|
2474
|
+
product {
|
|
2475
|
+
id
|
|
2476
|
+
featuredAsset {
|
|
2477
|
+
id
|
|
2478
|
+
preview
|
|
2479
|
+
focalPoint {
|
|
2480
|
+
x
|
|
2481
|
+
y
|
|
2482
|
+
}
|
|
2483
|
+
}
|
|
2484
|
+
}
|
|
2485
|
+
}
|
|
2486
|
+
totalItems
|
|
2487
|
+
}
|
|
2488
|
+
}
|
|
2489
|
+
`;
|
|
2490
|
+
const GET_PRODUCT_VARIANT_LIST = gql `
|
|
2491
|
+
query GetProductVariantList($options: ProductVariantListOptions!, $productId: ID) {
|
|
2492
|
+
productVariants(options: $options, productId: $productId) {
|
|
2493
|
+
items {
|
|
2494
|
+
...ProductVariant
|
|
2495
|
+
}
|
|
2496
|
+
totalItems
|
|
2497
|
+
}
|
|
2498
|
+
}
|
|
2499
|
+
${PRODUCT_VARIANT_FRAGMENT}
|
|
2500
|
+
`;
|
|
2501
|
+
const GET_TAG_LIST = gql `
|
|
2502
|
+
query GetTagList($options: TagListOptions) {
|
|
2503
|
+
tags(options: $options) {
|
|
2504
|
+
items {
|
|
2505
|
+
...Tag
|
|
2506
|
+
}
|
|
2507
|
+
totalItems
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
${TAG_FRAGMENT}
|
|
2511
|
+
`;
|
|
2512
|
+
const GET_TAG = gql `
|
|
2513
|
+
query GetTag($id: ID!) {
|
|
2514
|
+
tag(id: $id) {
|
|
2515
|
+
...Tag
|
|
2516
|
+
}
|
|
2517
|
+
}
|
|
2518
|
+
${TAG_FRAGMENT}
|
|
2519
|
+
`;
|
|
2520
|
+
const CREATE_TAG = gql `
|
|
2521
|
+
mutation CreateTag($input: CreateTagInput!) {
|
|
2522
|
+
createTag(input: $input) {
|
|
2523
|
+
...Tag
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2526
|
+
${TAG_FRAGMENT}
|
|
2527
|
+
`;
|
|
2528
|
+
const UPDATE_TAG = gql `
|
|
2529
|
+
mutation UpdateTag($input: UpdateTagInput!) {
|
|
2530
|
+
updateTag(input: $input) {
|
|
2531
|
+
...Tag
|
|
2532
|
+
}
|
|
2533
|
+
}
|
|
2534
|
+
${TAG_FRAGMENT}
|
|
2535
|
+
`;
|
|
2536
|
+
const DELETE_TAG = gql `
|
|
2537
|
+
mutation DeleteTag($id: ID!) {
|
|
2538
|
+
deleteTag(id: $id) {
|
|
2539
|
+
message
|
|
2540
|
+
result
|
|
2541
|
+
}
|
|
2542
|
+
}
|
|
2543
2543
|
`;
|
|
2544
2544
|
|
|
2545
2545
|
const GET_COLLECTION_FILTERS = gql `
|
|
@@ -3300,474 +3300,474 @@ class FacetDataService {
|
|
|
3300
3300
|
}
|
|
3301
3301
|
}
|
|
3302
3302
|
|
|
3303
|
-
const DISCOUNT_FRAGMENT = gql `
|
|
3304
|
-
fragment Discount on Discount {
|
|
3305
|
-
adjustmentSource
|
|
3306
|
-
amount
|
|
3307
|
-
amountWithTax
|
|
3308
|
-
description
|
|
3309
|
-
type
|
|
3310
|
-
}
|
|
3311
|
-
`;
|
|
3312
|
-
const PAYMENT_FRAGMENT = gql `
|
|
3313
|
-
fragment Payment on Payment {
|
|
3314
|
-
id
|
|
3315
|
-
transactionId
|
|
3316
|
-
amount
|
|
3317
|
-
method
|
|
3318
|
-
state
|
|
3319
|
-
metadata
|
|
3320
|
-
}
|
|
3321
|
-
`;
|
|
3322
|
-
const REFUND_FRAGMENT = gql `
|
|
3323
|
-
fragment Refund on Refund {
|
|
3324
|
-
id
|
|
3325
|
-
state
|
|
3326
|
-
items
|
|
3327
|
-
shipping
|
|
3328
|
-
adjustment
|
|
3329
|
-
transactionId
|
|
3330
|
-
paymentId
|
|
3331
|
-
}
|
|
3332
|
-
`;
|
|
3333
|
-
const ORDER_ADDRESS_FRAGMENT = gql `
|
|
3334
|
-
fragment OrderAddress on OrderAddress {
|
|
3335
|
-
fullName
|
|
3336
|
-
company
|
|
3337
|
-
streetLine1
|
|
3338
|
-
streetLine2
|
|
3339
|
-
city
|
|
3340
|
-
province
|
|
3341
|
-
postalCode
|
|
3342
|
-
country
|
|
3343
|
-
countryCode
|
|
3344
|
-
phoneNumber
|
|
3345
|
-
}
|
|
3346
|
-
`;
|
|
3347
|
-
const ORDER_FRAGMENT = gql `
|
|
3348
|
-
fragment Order on Order {
|
|
3349
|
-
id
|
|
3350
|
-
createdAt
|
|
3351
|
-
updatedAt
|
|
3352
|
-
orderPlacedAt
|
|
3353
|
-
code
|
|
3354
|
-
state
|
|
3355
|
-
nextStates
|
|
3356
|
-
total
|
|
3357
|
-
totalWithTax
|
|
3358
|
-
currencyCode
|
|
3359
|
-
customer {
|
|
3360
|
-
id
|
|
3361
|
-
firstName
|
|
3362
|
-
lastName
|
|
3363
|
-
}
|
|
3364
|
-
shippingLines {
|
|
3365
|
-
shippingMethod {
|
|
3366
|
-
name
|
|
3367
|
-
}
|
|
3368
|
-
}
|
|
3369
|
-
}
|
|
3370
|
-
`;
|
|
3371
|
-
const FULFILLMENT_FRAGMENT = gql `
|
|
3372
|
-
fragment Fulfillment on Fulfillment {
|
|
3373
|
-
id
|
|
3374
|
-
state
|
|
3375
|
-
nextStates
|
|
3376
|
-
createdAt
|
|
3377
|
-
updatedAt
|
|
3378
|
-
method
|
|
3379
|
-
summary {
|
|
3380
|
-
orderLine {
|
|
3381
|
-
id
|
|
3382
|
-
}
|
|
3383
|
-
quantity
|
|
3384
|
-
}
|
|
3385
|
-
trackingCode
|
|
3386
|
-
}
|
|
3387
|
-
`;
|
|
3388
|
-
const ORDER_LINE_FRAGMENT = gql `
|
|
3389
|
-
fragment OrderLine on OrderLine {
|
|
3390
|
-
id
|
|
3391
|
-
featuredAsset {
|
|
3392
|
-
preview
|
|
3393
|
-
}
|
|
3394
|
-
productVariant {
|
|
3395
|
-
id
|
|
3396
|
-
name
|
|
3397
|
-
sku
|
|
3398
|
-
trackInventory
|
|
3399
|
-
stockOnHand
|
|
3400
|
-
}
|
|
3401
|
-
discounts {
|
|
3402
|
-
...Discount
|
|
3403
|
-
}
|
|
3404
|
-
fulfillments {
|
|
3405
|
-
...Fulfillment
|
|
3406
|
-
}
|
|
3407
|
-
unitPrice
|
|
3408
|
-
unitPriceWithTax
|
|
3409
|
-
proratedUnitPrice
|
|
3410
|
-
proratedUnitPriceWithTax
|
|
3411
|
-
quantity
|
|
3412
|
-
items {
|
|
3413
|
-
id
|
|
3414
|
-
refundId
|
|
3415
|
-
cancelled
|
|
3416
|
-
}
|
|
3417
|
-
linePrice
|
|
3418
|
-
lineTax
|
|
3419
|
-
linePriceWithTax
|
|
3420
|
-
discountedLinePrice
|
|
3421
|
-
discountedLinePriceWithTax
|
|
3422
|
-
}
|
|
3423
|
-
`;
|
|
3424
|
-
const ORDER_DETAIL_FRAGMENT = gql `
|
|
3425
|
-
fragment OrderDetail on Order {
|
|
3426
|
-
id
|
|
3427
|
-
createdAt
|
|
3428
|
-
updatedAt
|
|
3429
|
-
code
|
|
3430
|
-
state
|
|
3431
|
-
nextStates
|
|
3432
|
-
active
|
|
3433
|
-
couponCodes
|
|
3434
|
-
customer {
|
|
3435
|
-
id
|
|
3436
|
-
firstName
|
|
3437
|
-
lastName
|
|
3438
|
-
}
|
|
3439
|
-
lines {
|
|
3440
|
-
...OrderLine
|
|
3441
|
-
}
|
|
3442
|
-
surcharges {
|
|
3443
|
-
id
|
|
3444
|
-
sku
|
|
3445
|
-
description
|
|
3446
|
-
price
|
|
3447
|
-
priceWithTax
|
|
3448
|
-
taxRate
|
|
3449
|
-
}
|
|
3450
|
-
discounts {
|
|
3451
|
-
...Discount
|
|
3452
|
-
}
|
|
3453
|
-
promotions {
|
|
3454
|
-
id
|
|
3455
|
-
couponCode
|
|
3456
|
-
}
|
|
3457
|
-
subTotal
|
|
3458
|
-
subTotalWithTax
|
|
3459
|
-
total
|
|
3460
|
-
totalWithTax
|
|
3461
|
-
currencyCode
|
|
3462
|
-
shipping
|
|
3463
|
-
shippingWithTax
|
|
3464
|
-
shippingLines {
|
|
3465
|
-
shippingMethod {
|
|
3466
|
-
id
|
|
3467
|
-
code
|
|
3468
|
-
name
|
|
3469
|
-
fulfillmentHandlerCode
|
|
3470
|
-
description
|
|
3471
|
-
}
|
|
3472
|
-
}
|
|
3473
|
-
taxSummary {
|
|
3474
|
-
description
|
|
3475
|
-
taxBase
|
|
3476
|
-
taxRate
|
|
3477
|
-
taxTotal
|
|
3478
|
-
}
|
|
3479
|
-
shippingAddress {
|
|
3480
|
-
...OrderAddress
|
|
3481
|
-
}
|
|
3482
|
-
billingAddress {
|
|
3483
|
-
...OrderAddress
|
|
3484
|
-
}
|
|
3485
|
-
payments {
|
|
3486
|
-
id
|
|
3487
|
-
createdAt
|
|
3488
|
-
transactionId
|
|
3489
|
-
amount
|
|
3490
|
-
method
|
|
3491
|
-
state
|
|
3492
|
-
nextStates
|
|
3493
|
-
errorMessage
|
|
3494
|
-
metadata
|
|
3495
|
-
refunds {
|
|
3496
|
-
id
|
|
3497
|
-
createdAt
|
|
3498
|
-
state
|
|
3499
|
-
items
|
|
3500
|
-
adjustment
|
|
3501
|
-
total
|
|
3502
|
-
paymentId
|
|
3503
|
-
reason
|
|
3504
|
-
transactionId
|
|
3505
|
-
method
|
|
3506
|
-
metadata
|
|
3507
|
-
orderItems {
|
|
3508
|
-
id
|
|
3509
|
-
}
|
|
3510
|
-
}
|
|
3511
|
-
}
|
|
3512
|
-
fulfillments {
|
|
3513
|
-
...Fulfillment
|
|
3514
|
-
}
|
|
3515
|
-
modifications {
|
|
3516
|
-
id
|
|
3517
|
-
createdAt
|
|
3518
|
-
isSettled
|
|
3519
|
-
priceChange
|
|
3520
|
-
note
|
|
3521
|
-
payment {
|
|
3522
|
-
id
|
|
3523
|
-
amount
|
|
3524
|
-
}
|
|
3525
|
-
orderItems {
|
|
3526
|
-
id
|
|
3527
|
-
}
|
|
3528
|
-
refund {
|
|
3529
|
-
id
|
|
3530
|
-
paymentId
|
|
3531
|
-
total
|
|
3532
|
-
}
|
|
3533
|
-
surcharges {
|
|
3534
|
-
id
|
|
3535
|
-
}
|
|
3536
|
-
}
|
|
3537
|
-
}
|
|
3538
|
-
${DISCOUNT_FRAGMENT}
|
|
3539
|
-
${ORDER_ADDRESS_FRAGMENT}
|
|
3540
|
-
${FULFILLMENT_FRAGMENT}
|
|
3541
|
-
${ORDER_LINE_FRAGMENT}
|
|
3542
|
-
`;
|
|
3543
|
-
const GET_ORDERS_LIST = gql `
|
|
3544
|
-
query GetOrderList($options: OrderListOptions) {
|
|
3545
|
-
orders(options: $options) {
|
|
3546
|
-
items {
|
|
3547
|
-
...Order
|
|
3548
|
-
}
|
|
3549
|
-
totalItems
|
|
3550
|
-
}
|
|
3551
|
-
}
|
|
3552
|
-
${ORDER_FRAGMENT}
|
|
3553
|
-
`;
|
|
3554
|
-
const GET_ORDER = gql `
|
|
3555
|
-
query GetOrder($id: ID!) {
|
|
3556
|
-
order(id: $id) {
|
|
3557
|
-
...OrderDetail
|
|
3558
|
-
}
|
|
3559
|
-
}
|
|
3560
|
-
${ORDER_DETAIL_FRAGMENT}
|
|
3561
|
-
`;
|
|
3562
|
-
const SETTLE_PAYMENT = gql `
|
|
3563
|
-
mutation SettlePayment($id: ID!) {
|
|
3564
|
-
settlePayment(id: $id) {
|
|
3565
|
-
...Payment
|
|
3566
|
-
...ErrorResult
|
|
3567
|
-
... on SettlePaymentError {
|
|
3568
|
-
paymentErrorMessage
|
|
3569
|
-
}
|
|
3570
|
-
... on PaymentStateTransitionError {
|
|
3571
|
-
transitionError
|
|
3572
|
-
}
|
|
3573
|
-
... on OrderStateTransitionError {
|
|
3574
|
-
transitionError
|
|
3575
|
-
}
|
|
3576
|
-
}
|
|
3577
|
-
}
|
|
3578
|
-
${ERROR_RESULT_FRAGMENT}
|
|
3579
|
-
${PAYMENT_FRAGMENT}
|
|
3580
|
-
`;
|
|
3581
|
-
const CANCEL_PAYMENT = gql `
|
|
3582
|
-
mutation CancelPayment($id: ID!) {
|
|
3583
|
-
cancelPayment(id: $id) {
|
|
3584
|
-
...Payment
|
|
3585
|
-
...ErrorResult
|
|
3586
|
-
... on CancelPaymentError {
|
|
3587
|
-
paymentErrorMessage
|
|
3588
|
-
}
|
|
3589
|
-
... on PaymentStateTransitionError {
|
|
3590
|
-
transitionError
|
|
3591
|
-
}
|
|
3592
|
-
}
|
|
3593
|
-
}
|
|
3594
|
-
${ERROR_RESULT_FRAGMENT}
|
|
3595
|
-
${PAYMENT_FRAGMENT}
|
|
3596
|
-
`;
|
|
3597
|
-
const TRANSITION_PAYMENT_TO_STATE = gql `
|
|
3598
|
-
mutation TransitionPaymentToState($id: ID!, $state: String!) {
|
|
3599
|
-
transitionPaymentToState(id: $id, state: $state) {
|
|
3600
|
-
...Payment
|
|
3601
|
-
...ErrorResult
|
|
3602
|
-
... on PaymentStateTransitionError {
|
|
3603
|
-
transitionError
|
|
3604
|
-
}
|
|
3605
|
-
}
|
|
3606
|
-
}
|
|
3607
|
-
${PAYMENT_FRAGMENT}
|
|
3608
|
-
${ERROR_RESULT_FRAGMENT}
|
|
3609
|
-
`;
|
|
3610
|
-
const CREATE_FULFILLMENT = gql `
|
|
3611
|
-
mutation CreateFulfillment($input: FulfillOrderInput!) {
|
|
3612
|
-
addFulfillmentToOrder(input: $input) {
|
|
3613
|
-
...Fulfillment
|
|
3614
|
-
... on CreateFulfillmentError {
|
|
3615
|
-
errorCode
|
|
3616
|
-
message
|
|
3617
|
-
fulfillmentHandlerError
|
|
3618
|
-
}
|
|
3619
|
-
... on FulfillmentStateTransitionError {
|
|
3620
|
-
errorCode
|
|
3621
|
-
message
|
|
3622
|
-
transitionError
|
|
3623
|
-
}
|
|
3624
|
-
...ErrorResult
|
|
3625
|
-
}
|
|
3626
|
-
}
|
|
3627
|
-
${FULFILLMENT_FRAGMENT}
|
|
3628
|
-
${ERROR_RESULT_FRAGMENT}
|
|
3629
|
-
`;
|
|
3630
|
-
const CANCEL_ORDER = gql `
|
|
3631
|
-
mutation CancelOrder($input: CancelOrderInput!) {
|
|
3632
|
-
cancelOrder(input: $input) {
|
|
3633
|
-
...OrderDetail
|
|
3634
|
-
...ErrorResult
|
|
3635
|
-
}
|
|
3636
|
-
}
|
|
3637
|
-
${ORDER_DETAIL_FRAGMENT}
|
|
3638
|
-
${ERROR_RESULT_FRAGMENT}
|
|
3639
|
-
`;
|
|
3640
|
-
const REFUND_ORDER = gql `
|
|
3641
|
-
mutation RefundOrder($input: RefundOrderInput!) {
|
|
3642
|
-
refundOrder(input: $input) {
|
|
3643
|
-
...Refund
|
|
3644
|
-
...ErrorResult
|
|
3645
|
-
}
|
|
3646
|
-
}
|
|
3647
|
-
${REFUND_FRAGMENT}
|
|
3648
|
-
${ERROR_RESULT_FRAGMENT}
|
|
3649
|
-
`;
|
|
3650
|
-
const SETTLE_REFUND = gql `
|
|
3651
|
-
mutation SettleRefund($input: SettleRefundInput!) {
|
|
3652
|
-
settleRefund(input: $input) {
|
|
3653
|
-
...Refund
|
|
3654
|
-
...ErrorResult
|
|
3655
|
-
}
|
|
3656
|
-
}
|
|
3657
|
-
${REFUND_FRAGMENT}
|
|
3658
|
-
${ERROR_RESULT_FRAGMENT}
|
|
3659
|
-
`;
|
|
3660
|
-
const GET_ORDER_HISTORY = gql `
|
|
3661
|
-
query GetOrderHistory($id: ID!, $options: HistoryEntryListOptions) {
|
|
3662
|
-
order(id: $id) {
|
|
3663
|
-
id
|
|
3664
|
-
history(options: $options) {
|
|
3665
|
-
totalItems
|
|
3666
|
-
items {
|
|
3667
|
-
id
|
|
3668
|
-
type
|
|
3669
|
-
createdAt
|
|
3670
|
-
isPublic
|
|
3671
|
-
administrator {
|
|
3672
|
-
id
|
|
3673
|
-
firstName
|
|
3674
|
-
lastName
|
|
3675
|
-
}
|
|
3676
|
-
data
|
|
3677
|
-
}
|
|
3678
|
-
}
|
|
3679
|
-
}
|
|
3680
|
-
}
|
|
3681
|
-
`;
|
|
3682
|
-
const ADD_NOTE_TO_ORDER = gql `
|
|
3683
|
-
mutation AddNoteToOrder($input: AddNoteToOrderInput!) {
|
|
3684
|
-
addNoteToOrder(input: $input) {
|
|
3685
|
-
id
|
|
3686
|
-
}
|
|
3687
|
-
}
|
|
3688
|
-
`;
|
|
3689
|
-
const UPDATE_ORDER_NOTE = gql `
|
|
3690
|
-
mutation UpdateOrderNote($input: UpdateOrderNoteInput!) {
|
|
3691
|
-
updateOrderNote(input: $input) {
|
|
3692
|
-
id
|
|
3693
|
-
data
|
|
3694
|
-
isPublic
|
|
3695
|
-
}
|
|
3696
|
-
}
|
|
3697
|
-
`;
|
|
3698
|
-
const DELETE_ORDER_NOTE = gql `
|
|
3699
|
-
mutation DeleteOrderNote($id: ID!) {
|
|
3700
|
-
deleteOrderNote(id: $id) {
|
|
3701
|
-
result
|
|
3702
|
-
message
|
|
3703
|
-
}
|
|
3704
|
-
}
|
|
3705
|
-
`;
|
|
3706
|
-
const TRANSITION_ORDER_TO_STATE = gql `
|
|
3707
|
-
mutation TransitionOrderToState($id: ID!, $state: String!) {
|
|
3708
|
-
transitionOrderToState(id: $id, state: $state) {
|
|
3709
|
-
...Order
|
|
3710
|
-
...ErrorResult
|
|
3711
|
-
... on OrderStateTransitionError {
|
|
3712
|
-
transitionError
|
|
3713
|
-
}
|
|
3714
|
-
}
|
|
3715
|
-
}
|
|
3716
|
-
${ORDER_FRAGMENT}
|
|
3717
|
-
${ERROR_RESULT_FRAGMENT}
|
|
3718
|
-
`;
|
|
3719
|
-
const UPDATE_ORDER_CUSTOM_FIELDS = gql `
|
|
3720
|
-
mutation UpdateOrderCustomFields($input: UpdateOrderInput!) {
|
|
3721
|
-
setOrderCustomFields(input: $input) {
|
|
3722
|
-
...Order
|
|
3723
|
-
}
|
|
3724
|
-
}
|
|
3725
|
-
${ORDER_FRAGMENT}
|
|
3726
|
-
`;
|
|
3727
|
-
const TRANSITION_FULFILLMENT_TO_STATE = gql `
|
|
3728
|
-
mutation TransitionFulfillmentToState($id: ID!, $state: String!) {
|
|
3729
|
-
transitionFulfillmentToState(id: $id, state: $state) {
|
|
3730
|
-
...Fulfillment
|
|
3731
|
-
...ErrorResult
|
|
3732
|
-
... on FulfillmentStateTransitionError {
|
|
3733
|
-
transitionError
|
|
3734
|
-
}
|
|
3735
|
-
}
|
|
3736
|
-
}
|
|
3737
|
-
${FULFILLMENT_FRAGMENT}
|
|
3738
|
-
${ERROR_RESULT_FRAGMENT}
|
|
3739
|
-
`;
|
|
3740
|
-
const GET_ORDER_SUMMARY = gql `
|
|
3741
|
-
query GetOrderSummary($start: DateTime!, $end: DateTime!) {
|
|
3742
|
-
orders(options: { filter: { orderPlacedAt: { between: { start: $start, end: $end } } } }) {
|
|
3743
|
-
totalItems
|
|
3744
|
-
items {
|
|
3745
|
-
id
|
|
3746
|
-
total
|
|
3747
|
-
currencyCode
|
|
3748
|
-
}
|
|
3749
|
-
}
|
|
3750
|
-
}
|
|
3751
|
-
`;
|
|
3752
|
-
const MODIFY_ORDER = gql `
|
|
3753
|
-
mutation ModifyOrder($input: ModifyOrderInput!) {
|
|
3754
|
-
modifyOrder(input: $input) {
|
|
3755
|
-
...OrderDetail
|
|
3756
|
-
...ErrorResult
|
|
3757
|
-
}
|
|
3758
|
-
}
|
|
3759
|
-
${ORDER_DETAIL_FRAGMENT}
|
|
3760
|
-
${ERROR_RESULT_FRAGMENT}
|
|
3761
|
-
`;
|
|
3762
|
-
const ADD_MANUAL_PAYMENT_TO_ORDER = gql `
|
|
3763
|
-
mutation AddManualPayment($input: ManualPaymentInput!) {
|
|
3764
|
-
addManualPaymentToOrder(input: $input) {
|
|
3765
|
-
...OrderDetail
|
|
3766
|
-
...ErrorResult
|
|
3767
|
-
}
|
|
3768
|
-
}
|
|
3769
|
-
${ORDER_DETAIL_FRAGMENT}
|
|
3770
|
-
${ERROR_RESULT_FRAGMENT}
|
|
3303
|
+
const DISCOUNT_FRAGMENT = gql `
|
|
3304
|
+
fragment Discount on Discount {
|
|
3305
|
+
adjustmentSource
|
|
3306
|
+
amount
|
|
3307
|
+
amountWithTax
|
|
3308
|
+
description
|
|
3309
|
+
type
|
|
3310
|
+
}
|
|
3311
|
+
`;
|
|
3312
|
+
const PAYMENT_FRAGMENT = gql `
|
|
3313
|
+
fragment Payment on Payment {
|
|
3314
|
+
id
|
|
3315
|
+
transactionId
|
|
3316
|
+
amount
|
|
3317
|
+
method
|
|
3318
|
+
state
|
|
3319
|
+
metadata
|
|
3320
|
+
}
|
|
3321
|
+
`;
|
|
3322
|
+
const REFUND_FRAGMENT = gql `
|
|
3323
|
+
fragment Refund on Refund {
|
|
3324
|
+
id
|
|
3325
|
+
state
|
|
3326
|
+
items
|
|
3327
|
+
shipping
|
|
3328
|
+
adjustment
|
|
3329
|
+
transactionId
|
|
3330
|
+
paymentId
|
|
3331
|
+
}
|
|
3332
|
+
`;
|
|
3333
|
+
const ORDER_ADDRESS_FRAGMENT = gql `
|
|
3334
|
+
fragment OrderAddress on OrderAddress {
|
|
3335
|
+
fullName
|
|
3336
|
+
company
|
|
3337
|
+
streetLine1
|
|
3338
|
+
streetLine2
|
|
3339
|
+
city
|
|
3340
|
+
province
|
|
3341
|
+
postalCode
|
|
3342
|
+
country
|
|
3343
|
+
countryCode
|
|
3344
|
+
phoneNumber
|
|
3345
|
+
}
|
|
3346
|
+
`;
|
|
3347
|
+
const ORDER_FRAGMENT = gql `
|
|
3348
|
+
fragment Order on Order {
|
|
3349
|
+
id
|
|
3350
|
+
createdAt
|
|
3351
|
+
updatedAt
|
|
3352
|
+
orderPlacedAt
|
|
3353
|
+
code
|
|
3354
|
+
state
|
|
3355
|
+
nextStates
|
|
3356
|
+
total
|
|
3357
|
+
totalWithTax
|
|
3358
|
+
currencyCode
|
|
3359
|
+
customer {
|
|
3360
|
+
id
|
|
3361
|
+
firstName
|
|
3362
|
+
lastName
|
|
3363
|
+
}
|
|
3364
|
+
shippingLines {
|
|
3365
|
+
shippingMethod {
|
|
3366
|
+
name
|
|
3367
|
+
}
|
|
3368
|
+
}
|
|
3369
|
+
}
|
|
3370
|
+
`;
|
|
3371
|
+
const FULFILLMENT_FRAGMENT = gql `
|
|
3372
|
+
fragment Fulfillment on Fulfillment {
|
|
3373
|
+
id
|
|
3374
|
+
state
|
|
3375
|
+
nextStates
|
|
3376
|
+
createdAt
|
|
3377
|
+
updatedAt
|
|
3378
|
+
method
|
|
3379
|
+
summary {
|
|
3380
|
+
orderLine {
|
|
3381
|
+
id
|
|
3382
|
+
}
|
|
3383
|
+
quantity
|
|
3384
|
+
}
|
|
3385
|
+
trackingCode
|
|
3386
|
+
}
|
|
3387
|
+
`;
|
|
3388
|
+
const ORDER_LINE_FRAGMENT = gql `
|
|
3389
|
+
fragment OrderLine on OrderLine {
|
|
3390
|
+
id
|
|
3391
|
+
featuredAsset {
|
|
3392
|
+
preview
|
|
3393
|
+
}
|
|
3394
|
+
productVariant {
|
|
3395
|
+
id
|
|
3396
|
+
name
|
|
3397
|
+
sku
|
|
3398
|
+
trackInventory
|
|
3399
|
+
stockOnHand
|
|
3400
|
+
}
|
|
3401
|
+
discounts {
|
|
3402
|
+
...Discount
|
|
3403
|
+
}
|
|
3404
|
+
fulfillments {
|
|
3405
|
+
...Fulfillment
|
|
3406
|
+
}
|
|
3407
|
+
unitPrice
|
|
3408
|
+
unitPriceWithTax
|
|
3409
|
+
proratedUnitPrice
|
|
3410
|
+
proratedUnitPriceWithTax
|
|
3411
|
+
quantity
|
|
3412
|
+
items {
|
|
3413
|
+
id
|
|
3414
|
+
refundId
|
|
3415
|
+
cancelled
|
|
3416
|
+
}
|
|
3417
|
+
linePrice
|
|
3418
|
+
lineTax
|
|
3419
|
+
linePriceWithTax
|
|
3420
|
+
discountedLinePrice
|
|
3421
|
+
discountedLinePriceWithTax
|
|
3422
|
+
}
|
|
3423
|
+
`;
|
|
3424
|
+
const ORDER_DETAIL_FRAGMENT = gql `
|
|
3425
|
+
fragment OrderDetail on Order {
|
|
3426
|
+
id
|
|
3427
|
+
createdAt
|
|
3428
|
+
updatedAt
|
|
3429
|
+
code
|
|
3430
|
+
state
|
|
3431
|
+
nextStates
|
|
3432
|
+
active
|
|
3433
|
+
couponCodes
|
|
3434
|
+
customer {
|
|
3435
|
+
id
|
|
3436
|
+
firstName
|
|
3437
|
+
lastName
|
|
3438
|
+
}
|
|
3439
|
+
lines {
|
|
3440
|
+
...OrderLine
|
|
3441
|
+
}
|
|
3442
|
+
surcharges {
|
|
3443
|
+
id
|
|
3444
|
+
sku
|
|
3445
|
+
description
|
|
3446
|
+
price
|
|
3447
|
+
priceWithTax
|
|
3448
|
+
taxRate
|
|
3449
|
+
}
|
|
3450
|
+
discounts {
|
|
3451
|
+
...Discount
|
|
3452
|
+
}
|
|
3453
|
+
promotions {
|
|
3454
|
+
id
|
|
3455
|
+
couponCode
|
|
3456
|
+
}
|
|
3457
|
+
subTotal
|
|
3458
|
+
subTotalWithTax
|
|
3459
|
+
total
|
|
3460
|
+
totalWithTax
|
|
3461
|
+
currencyCode
|
|
3462
|
+
shipping
|
|
3463
|
+
shippingWithTax
|
|
3464
|
+
shippingLines {
|
|
3465
|
+
shippingMethod {
|
|
3466
|
+
id
|
|
3467
|
+
code
|
|
3468
|
+
name
|
|
3469
|
+
fulfillmentHandlerCode
|
|
3470
|
+
description
|
|
3471
|
+
}
|
|
3472
|
+
}
|
|
3473
|
+
taxSummary {
|
|
3474
|
+
description
|
|
3475
|
+
taxBase
|
|
3476
|
+
taxRate
|
|
3477
|
+
taxTotal
|
|
3478
|
+
}
|
|
3479
|
+
shippingAddress {
|
|
3480
|
+
...OrderAddress
|
|
3481
|
+
}
|
|
3482
|
+
billingAddress {
|
|
3483
|
+
...OrderAddress
|
|
3484
|
+
}
|
|
3485
|
+
payments {
|
|
3486
|
+
id
|
|
3487
|
+
createdAt
|
|
3488
|
+
transactionId
|
|
3489
|
+
amount
|
|
3490
|
+
method
|
|
3491
|
+
state
|
|
3492
|
+
nextStates
|
|
3493
|
+
errorMessage
|
|
3494
|
+
metadata
|
|
3495
|
+
refunds {
|
|
3496
|
+
id
|
|
3497
|
+
createdAt
|
|
3498
|
+
state
|
|
3499
|
+
items
|
|
3500
|
+
adjustment
|
|
3501
|
+
total
|
|
3502
|
+
paymentId
|
|
3503
|
+
reason
|
|
3504
|
+
transactionId
|
|
3505
|
+
method
|
|
3506
|
+
metadata
|
|
3507
|
+
orderItems {
|
|
3508
|
+
id
|
|
3509
|
+
}
|
|
3510
|
+
}
|
|
3511
|
+
}
|
|
3512
|
+
fulfillments {
|
|
3513
|
+
...Fulfillment
|
|
3514
|
+
}
|
|
3515
|
+
modifications {
|
|
3516
|
+
id
|
|
3517
|
+
createdAt
|
|
3518
|
+
isSettled
|
|
3519
|
+
priceChange
|
|
3520
|
+
note
|
|
3521
|
+
payment {
|
|
3522
|
+
id
|
|
3523
|
+
amount
|
|
3524
|
+
}
|
|
3525
|
+
orderItems {
|
|
3526
|
+
id
|
|
3527
|
+
}
|
|
3528
|
+
refund {
|
|
3529
|
+
id
|
|
3530
|
+
paymentId
|
|
3531
|
+
total
|
|
3532
|
+
}
|
|
3533
|
+
surcharges {
|
|
3534
|
+
id
|
|
3535
|
+
}
|
|
3536
|
+
}
|
|
3537
|
+
}
|
|
3538
|
+
${DISCOUNT_FRAGMENT}
|
|
3539
|
+
${ORDER_ADDRESS_FRAGMENT}
|
|
3540
|
+
${FULFILLMENT_FRAGMENT}
|
|
3541
|
+
${ORDER_LINE_FRAGMENT}
|
|
3542
|
+
`;
|
|
3543
|
+
const GET_ORDERS_LIST = gql `
|
|
3544
|
+
query GetOrderList($options: OrderListOptions) {
|
|
3545
|
+
orders(options: $options) {
|
|
3546
|
+
items {
|
|
3547
|
+
...Order
|
|
3548
|
+
}
|
|
3549
|
+
totalItems
|
|
3550
|
+
}
|
|
3551
|
+
}
|
|
3552
|
+
${ORDER_FRAGMENT}
|
|
3553
|
+
`;
|
|
3554
|
+
const GET_ORDER = gql `
|
|
3555
|
+
query GetOrder($id: ID!) {
|
|
3556
|
+
order(id: $id) {
|
|
3557
|
+
...OrderDetail
|
|
3558
|
+
}
|
|
3559
|
+
}
|
|
3560
|
+
${ORDER_DETAIL_FRAGMENT}
|
|
3561
|
+
`;
|
|
3562
|
+
const SETTLE_PAYMENT = gql `
|
|
3563
|
+
mutation SettlePayment($id: ID!) {
|
|
3564
|
+
settlePayment(id: $id) {
|
|
3565
|
+
...Payment
|
|
3566
|
+
...ErrorResult
|
|
3567
|
+
... on SettlePaymentError {
|
|
3568
|
+
paymentErrorMessage
|
|
3569
|
+
}
|
|
3570
|
+
... on PaymentStateTransitionError {
|
|
3571
|
+
transitionError
|
|
3572
|
+
}
|
|
3573
|
+
... on OrderStateTransitionError {
|
|
3574
|
+
transitionError
|
|
3575
|
+
}
|
|
3576
|
+
}
|
|
3577
|
+
}
|
|
3578
|
+
${ERROR_RESULT_FRAGMENT}
|
|
3579
|
+
${PAYMENT_FRAGMENT}
|
|
3580
|
+
`;
|
|
3581
|
+
const CANCEL_PAYMENT = gql `
|
|
3582
|
+
mutation CancelPayment($id: ID!) {
|
|
3583
|
+
cancelPayment(id: $id) {
|
|
3584
|
+
...Payment
|
|
3585
|
+
...ErrorResult
|
|
3586
|
+
... on CancelPaymentError {
|
|
3587
|
+
paymentErrorMessage
|
|
3588
|
+
}
|
|
3589
|
+
... on PaymentStateTransitionError {
|
|
3590
|
+
transitionError
|
|
3591
|
+
}
|
|
3592
|
+
}
|
|
3593
|
+
}
|
|
3594
|
+
${ERROR_RESULT_FRAGMENT}
|
|
3595
|
+
${PAYMENT_FRAGMENT}
|
|
3596
|
+
`;
|
|
3597
|
+
const TRANSITION_PAYMENT_TO_STATE = gql `
|
|
3598
|
+
mutation TransitionPaymentToState($id: ID!, $state: String!) {
|
|
3599
|
+
transitionPaymentToState(id: $id, state: $state) {
|
|
3600
|
+
...Payment
|
|
3601
|
+
...ErrorResult
|
|
3602
|
+
... on PaymentStateTransitionError {
|
|
3603
|
+
transitionError
|
|
3604
|
+
}
|
|
3605
|
+
}
|
|
3606
|
+
}
|
|
3607
|
+
${PAYMENT_FRAGMENT}
|
|
3608
|
+
${ERROR_RESULT_FRAGMENT}
|
|
3609
|
+
`;
|
|
3610
|
+
const CREATE_FULFILLMENT = gql `
|
|
3611
|
+
mutation CreateFulfillment($input: FulfillOrderInput!) {
|
|
3612
|
+
addFulfillmentToOrder(input: $input) {
|
|
3613
|
+
...Fulfillment
|
|
3614
|
+
... on CreateFulfillmentError {
|
|
3615
|
+
errorCode
|
|
3616
|
+
message
|
|
3617
|
+
fulfillmentHandlerError
|
|
3618
|
+
}
|
|
3619
|
+
... on FulfillmentStateTransitionError {
|
|
3620
|
+
errorCode
|
|
3621
|
+
message
|
|
3622
|
+
transitionError
|
|
3623
|
+
}
|
|
3624
|
+
...ErrorResult
|
|
3625
|
+
}
|
|
3626
|
+
}
|
|
3627
|
+
${FULFILLMENT_FRAGMENT}
|
|
3628
|
+
${ERROR_RESULT_FRAGMENT}
|
|
3629
|
+
`;
|
|
3630
|
+
const CANCEL_ORDER = gql `
|
|
3631
|
+
mutation CancelOrder($input: CancelOrderInput!) {
|
|
3632
|
+
cancelOrder(input: $input) {
|
|
3633
|
+
...OrderDetail
|
|
3634
|
+
...ErrorResult
|
|
3635
|
+
}
|
|
3636
|
+
}
|
|
3637
|
+
${ORDER_DETAIL_FRAGMENT}
|
|
3638
|
+
${ERROR_RESULT_FRAGMENT}
|
|
3639
|
+
`;
|
|
3640
|
+
const REFUND_ORDER = gql `
|
|
3641
|
+
mutation RefundOrder($input: RefundOrderInput!) {
|
|
3642
|
+
refundOrder(input: $input) {
|
|
3643
|
+
...Refund
|
|
3644
|
+
...ErrorResult
|
|
3645
|
+
}
|
|
3646
|
+
}
|
|
3647
|
+
${REFUND_FRAGMENT}
|
|
3648
|
+
${ERROR_RESULT_FRAGMENT}
|
|
3649
|
+
`;
|
|
3650
|
+
const SETTLE_REFUND = gql `
|
|
3651
|
+
mutation SettleRefund($input: SettleRefundInput!) {
|
|
3652
|
+
settleRefund(input: $input) {
|
|
3653
|
+
...Refund
|
|
3654
|
+
...ErrorResult
|
|
3655
|
+
}
|
|
3656
|
+
}
|
|
3657
|
+
${REFUND_FRAGMENT}
|
|
3658
|
+
${ERROR_RESULT_FRAGMENT}
|
|
3659
|
+
`;
|
|
3660
|
+
const GET_ORDER_HISTORY = gql `
|
|
3661
|
+
query GetOrderHistory($id: ID!, $options: HistoryEntryListOptions) {
|
|
3662
|
+
order(id: $id) {
|
|
3663
|
+
id
|
|
3664
|
+
history(options: $options) {
|
|
3665
|
+
totalItems
|
|
3666
|
+
items {
|
|
3667
|
+
id
|
|
3668
|
+
type
|
|
3669
|
+
createdAt
|
|
3670
|
+
isPublic
|
|
3671
|
+
administrator {
|
|
3672
|
+
id
|
|
3673
|
+
firstName
|
|
3674
|
+
lastName
|
|
3675
|
+
}
|
|
3676
|
+
data
|
|
3677
|
+
}
|
|
3678
|
+
}
|
|
3679
|
+
}
|
|
3680
|
+
}
|
|
3681
|
+
`;
|
|
3682
|
+
const ADD_NOTE_TO_ORDER = gql `
|
|
3683
|
+
mutation AddNoteToOrder($input: AddNoteToOrderInput!) {
|
|
3684
|
+
addNoteToOrder(input: $input) {
|
|
3685
|
+
id
|
|
3686
|
+
}
|
|
3687
|
+
}
|
|
3688
|
+
`;
|
|
3689
|
+
const UPDATE_ORDER_NOTE = gql `
|
|
3690
|
+
mutation UpdateOrderNote($input: UpdateOrderNoteInput!) {
|
|
3691
|
+
updateOrderNote(input: $input) {
|
|
3692
|
+
id
|
|
3693
|
+
data
|
|
3694
|
+
isPublic
|
|
3695
|
+
}
|
|
3696
|
+
}
|
|
3697
|
+
`;
|
|
3698
|
+
const DELETE_ORDER_NOTE = gql `
|
|
3699
|
+
mutation DeleteOrderNote($id: ID!) {
|
|
3700
|
+
deleteOrderNote(id: $id) {
|
|
3701
|
+
result
|
|
3702
|
+
message
|
|
3703
|
+
}
|
|
3704
|
+
}
|
|
3705
|
+
`;
|
|
3706
|
+
const TRANSITION_ORDER_TO_STATE = gql `
|
|
3707
|
+
mutation TransitionOrderToState($id: ID!, $state: String!) {
|
|
3708
|
+
transitionOrderToState(id: $id, state: $state) {
|
|
3709
|
+
...Order
|
|
3710
|
+
...ErrorResult
|
|
3711
|
+
... on OrderStateTransitionError {
|
|
3712
|
+
transitionError
|
|
3713
|
+
}
|
|
3714
|
+
}
|
|
3715
|
+
}
|
|
3716
|
+
${ORDER_FRAGMENT}
|
|
3717
|
+
${ERROR_RESULT_FRAGMENT}
|
|
3718
|
+
`;
|
|
3719
|
+
const UPDATE_ORDER_CUSTOM_FIELDS = gql `
|
|
3720
|
+
mutation UpdateOrderCustomFields($input: UpdateOrderInput!) {
|
|
3721
|
+
setOrderCustomFields(input: $input) {
|
|
3722
|
+
...Order
|
|
3723
|
+
}
|
|
3724
|
+
}
|
|
3725
|
+
${ORDER_FRAGMENT}
|
|
3726
|
+
`;
|
|
3727
|
+
const TRANSITION_FULFILLMENT_TO_STATE = gql `
|
|
3728
|
+
mutation TransitionFulfillmentToState($id: ID!, $state: String!) {
|
|
3729
|
+
transitionFulfillmentToState(id: $id, state: $state) {
|
|
3730
|
+
...Fulfillment
|
|
3731
|
+
...ErrorResult
|
|
3732
|
+
... on FulfillmentStateTransitionError {
|
|
3733
|
+
transitionError
|
|
3734
|
+
}
|
|
3735
|
+
}
|
|
3736
|
+
}
|
|
3737
|
+
${FULFILLMENT_FRAGMENT}
|
|
3738
|
+
${ERROR_RESULT_FRAGMENT}
|
|
3739
|
+
`;
|
|
3740
|
+
const GET_ORDER_SUMMARY = gql `
|
|
3741
|
+
query GetOrderSummary($start: DateTime!, $end: DateTime!) {
|
|
3742
|
+
orders(options: { filter: { orderPlacedAt: { between: { start: $start, end: $end } } } }) {
|
|
3743
|
+
totalItems
|
|
3744
|
+
items {
|
|
3745
|
+
id
|
|
3746
|
+
total
|
|
3747
|
+
currencyCode
|
|
3748
|
+
}
|
|
3749
|
+
}
|
|
3750
|
+
}
|
|
3751
|
+
`;
|
|
3752
|
+
const MODIFY_ORDER = gql `
|
|
3753
|
+
mutation ModifyOrder($input: ModifyOrderInput!) {
|
|
3754
|
+
modifyOrder(input: $input) {
|
|
3755
|
+
...OrderDetail
|
|
3756
|
+
...ErrorResult
|
|
3757
|
+
}
|
|
3758
|
+
}
|
|
3759
|
+
${ORDER_DETAIL_FRAGMENT}
|
|
3760
|
+
${ERROR_RESULT_FRAGMENT}
|
|
3761
|
+
`;
|
|
3762
|
+
const ADD_MANUAL_PAYMENT_TO_ORDER = gql `
|
|
3763
|
+
mutation AddManualPayment($input: ManualPaymentInput!) {
|
|
3764
|
+
addManualPaymentToOrder(input: $input) {
|
|
3765
|
+
...OrderDetail
|
|
3766
|
+
...ErrorResult
|
|
3767
|
+
}
|
|
3768
|
+
}
|
|
3769
|
+
${ORDER_DETAIL_FRAGMENT}
|
|
3770
|
+
${ERROR_RESULT_FRAGMENT}
|
|
3771
3771
|
`;
|
|
3772
3772
|
|
|
3773
3773
|
class OrderDataService {
|
|
@@ -16051,7 +16051,7 @@ function patchObject(obj, patch) {
|
|
|
16051
16051
|
}
|
|
16052
16052
|
|
|
16053
16053
|
// Auto-generated by the set-version.js script.
|
|
16054
|
-
const ADMIN_UI_VERSION = '1.7.
|
|
16054
|
+
const ADMIN_UI_VERSION = '1.7.1';
|
|
16055
16055
|
|
|
16056
16056
|
/**
|
|
16057
16057
|
* Responsible for registering dashboard widget components and querying for layouts.
|