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