@vendure/admin-ui 1.7.0 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/bundles/vendure-admin-ui-catalog.umd.js +8 -1
  2. package/bundles/vendure-admin-ui-catalog.umd.js.map +1 -1
  3. package/bundles/vendure-admin-ui-core.umd.js +28 -11
  4. package/bundles/vendure-admin-ui-core.umd.js.map +1 -1
  5. package/bundles/vendure-admin-ui-customer.umd.js +5 -4
  6. package/bundles/vendure-admin-ui-customer.umd.js.map +1 -1
  7. package/bundles/vendure-admin-ui-order.umd.js +10 -7
  8. package/bundles/vendure-admin-ui-order.umd.js.map +1 -1
  9. package/core/common/generated-types.d.ts +2 -1
  10. package/core/common/utilities/configurable-operation-utils.d.ts +4 -1
  11. package/core/common/version.d.ts +1 -1
  12. package/core/vendure-admin-ui-core.metadata.json +1 -1
  13. package/customer/vendure-admin-ui-customer.metadata.json +1 -1
  14. package/esm2015/catalog/components/generate-product-variants/generate-product-variants.component.js +1 -1
  15. package/esm2015/catalog/components/option-value-input/option-value-input.component.js +8 -2
  16. package/esm2015/core/common/generated-types.js +2 -2
  17. package/esm2015/core/common/introspection-result.js +1 -1
  18. package/esm2015/core/common/utilities/configurable-operation-utils.js +8 -2
  19. package/esm2015/core/common/version.js +2 -2
  20. package/esm2015/core/components/app-shell/app-shell.component.js +1 -1
  21. package/esm2015/core/data/definitions/order-definitions.js +443 -443
  22. package/esm2015/core/data/definitions/product-definitions.js +743 -743
  23. package/esm2015/core/data/utils/remove-readonly-custom-fields.js +4 -1
  24. package/esm2015/core/shared/components/dropdown/dropdown-menu.component.js +11 -11
  25. package/esm2015/core/shared/components/dropdown/dropdown-trigger.directive.js +1 -1
  26. package/esm2015/core/shared/pipes/locale-currency.pipe.js +10 -2
  27. package/esm2015/customer/components/customer-group-list/customer-group-list.component.js +6 -5
  28. package/esm2015/order/components/order-editor/order-editor.component.js +9 -5
  29. package/fesm2015/vendure-admin-ui-catalog.js +7 -1
  30. package/fesm2015/vendure-admin-ui-catalog.js.map +1 -1
  31. package/fesm2015/vendure-admin-ui-core.js +1260 -1243
  32. package/fesm2015/vendure-admin-ui-core.js.map +1 -1
  33. package/fesm2015/vendure-admin-ui-customer.js +5 -4
  34. package/fesm2015/vendure-admin-ui-customer.js.map +1 -1
  35. package/fesm2015/vendure-admin-ui-order.js +8 -4
  36. package/fesm2015/vendure-admin-ui-order.js.map +1 -1
  37. package/order/vendure-admin-ui-order.metadata.json +1 -1
  38. package/package.json +2 -2
  39. package/static/styles/_variables.scss +1 -0
  40. package/static/styles/global/_sass-overrides.scss +1 -1
@@ -1548,6 +1548,9 @@ function isEntityCreateOrUpdateMutation(documentNode) {
1548
1548
  if (inputTypeName === 'UpdateActiveAdministratorInput') {
1549
1549
  return 'Administrator';
1550
1550
  }
1551
+ if (inputTypeName === 'ModifyOrderInput') {
1552
+ return 'Order';
1553
+ }
1551
1554
  const createMatch = inputTypeName.match(CREATE_ENTITY_REGEX);
1552
1555
  if (createMatch) {
1553
1556
  return createMatch[1];
@@ -1775,771 +1778,771 @@ class ClientDataService {
1775
1778
  setContentLanguage(languageCode) {
1776
1779
  return this.baseDataService.mutate(SET_CONTENT_LANGUAGE, {
1777
1780
  languageCode,
1778
- });
1779
- }
1780
- setUiTheme(theme) {
1781
- return this.baseDataService.mutate(SET_UI_THEME, {
1782
- theme,
1783
- });
1784
- }
1785
- setDisplayUiExtensionPoints(display) {
1786
- return this.baseDataService.mutate(SET_DISPLAY_UI_EXTENSION_POINTS, {
1787
- display,
1788
- });
1789
- }
1790
- setActiveChannel(channelId) {
1791
- return this.baseDataService.mutate(SET_ACTIVE_CHANNEL, {
1792
- channelId,
1793
- });
1794
- }
1795
- updateUserChannels(channels) {
1796
- return this.baseDataService.mutate(UPDATE_USER_CHANNELS, {
1797
- channels,
1798
- });
1799
- }
1800
- }
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
- }
1781
+ });
2509
1782
  }
2510
- ${TAG_FRAGMENT}
2511
- `;
2512
- const GET_TAG = gql `
2513
- query GetTag($id: ID!) {
2514
- tag(id: $id) {
2515
- ...Tag
2516
- }
1783
+ setUiTheme(theme) {
1784
+ return this.baseDataService.mutate(SET_UI_THEME, {
1785
+ theme,
1786
+ });
2517
1787
  }
2518
- ${TAG_FRAGMENT}
2519
- `;
2520
- const CREATE_TAG = gql `
2521
- mutation CreateTag($input: CreateTagInput!) {
2522
- createTag(input: $input) {
2523
- ...Tag
2524
- }
1788
+ setDisplayUiExtensionPoints(display) {
1789
+ return this.baseDataService.mutate(SET_DISPLAY_UI_EXTENSION_POINTS, {
1790
+ display,
1791
+ });
2525
1792
  }
2526
- ${TAG_FRAGMENT}
2527
- `;
2528
- const UPDATE_TAG = gql `
2529
- mutation UpdateTag($input: UpdateTagInput!) {
2530
- updateTag(input: $input) {
2531
- ...Tag
2532
- }
1793
+ setActiveChannel(channelId) {
1794
+ return this.baseDataService.mutate(SET_ACTIVE_CHANNEL, {
1795
+ channelId,
1796
+ });
2533
1797
  }
2534
- ${TAG_FRAGMENT}
2535
- `;
2536
- const DELETE_TAG = gql `
2537
- mutation DeleteTag($id: ID!) {
2538
- deleteTag(id: $id) {
2539
- message
2540
- result
2541
- }
1798
+ updateUserChannels(channels) {
1799
+ return this.baseDataService.mutate(UPDATE_USER_CHANNELS, {
1800
+ channels,
1801
+ });
2542
1802
  }
1803
+ }
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
+ }
2543
2546
  `;
2544
2547
 
2545
2548
  const GET_COLLECTION_FILTERS = gql `
@@ -3300,474 +3303,474 @@ class FacetDataService {
3300
3303
  }
3301
3304
  }
3302
3305
 
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}
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}
3771
3774
  `;
3772
3775
 
3773
3776
  class OrderDataService {
@@ -4641,7 +4644,7 @@ var LogicalOperator;
4641
4644
  *
4642
4645
  * ## Understanding Permission.Owner
4643
4646
  *
4644
- * `Permission.Owner` is a special permission which is used in some of the Vendure resolvers to indicate that that resolver should only
4647
+ * `Permission.Owner` is a special permission which is used in some Vendure resolvers to indicate that that resolver should only
4645
4648
  * be accessible to the "owner" of that resource.
4646
4649
  *
4647
4650
  * For example, the Shop API `activeCustomer` query resolver should only return the Customer object for the "owner" of that Customer, i.e.
@@ -6484,7 +6487,7 @@ AppShellComponent.decorators = [
6484
6487
  { type: Component, args: [{
6485
6488
  selector: 'vdr-app-shell',
6486
6489
  template: "<clr-main-container>\r\n <clr-header>\r\n <div class=\"branding\">\r\n <a [routerLink]=\"['/']\"><img src=\"assets/logo-75px.png\" class=\"logo\" /><span class=\"wordmark\" *ngIf=\"!hideVendureBranding\">vendure</span></a>\r\n </div>\r\n <div class=\"header-nav\"></div>\r\n <div class=\"header-actions\">\r\n <vdr-channel-switcher *vdrIfMultichannel></vdr-channel-switcher>\r\n <vdr-user-menu [userName]=\"userName$ | async\"\r\n [uiLanguageAndLocale]=\"uiLanguageAndLocale$ | async\"\r\n [availableLanguages]=\"availableLanguages\"\r\n (selectUiLanguage)=\"selectUiLanguage()\"\r\n (logOut)=\"logOut()\"></vdr-user-menu>\r\n </div>\r\n </clr-header>\r\n <nav class=\"subnav\"><vdr-breadcrumb></vdr-breadcrumb></nav>\r\n\r\n <div class=\"content-container\">\r\n <div class=\"content-area\"><router-outlet></router-outlet></div>\r\n <vdr-main-nav></vdr-main-nav>\r\n </div>\r\n</clr-main-container>\r\n",
6487
- styles: [".branding{min-width:0}.logo{width:40px}.wordmark{font-weight:bold;margin-left:12px;font-size:24px;color:var(--color-primary-500)}@media screen and (min-width: 768px){vdr-breadcrumb{margin-left:18%}}.header-actions{align-items:center}.content-area{position:relative}::ng-deep .header{background-image:linear-gradient(to right,var(--color-header-gradient-from),var(--color-header-gradient-to))}\n"]
6490
+ styles: [".branding{min-width:0}.logo{width:40px}.wordmark{font-weight:bold;margin-left:12px;font-size:24px;color:var(--color-primary-500)}@media screen and (min-width: 768px){vdr-breadcrumb{margin-left:10.8rem}}.header-actions{align-items:center}.content-area{position:relative}::ng-deep .header{background-image:linear-gradient(to right,var(--color-header-gradient-from),var(--color-header-gradient-to))}\n"]
6488
6491
  },] }
6489
6492
  ];
6490
6493
  AppShellComponent.ctorParameters = () => [
@@ -8574,10 +8577,16 @@ function configurableDefinitionToInstance(def) {
8574
8577
  * ```
8575
8578
  */
8576
8579
  function toConfigurableOperationInput(operation, formValueOperations) {
8580
+ const argsArray = Array.isArray(formValueOperations.args) ? formValueOperations.args : undefined;
8581
+ const argsMap = !Array.isArray(formValueOperations.args) ? formValueOperations.args : undefined;
8577
8582
  return {
8578
8583
  code: operation.code,
8579
8584
  arguments: operation.args.map(({ name, value }, j) => {
8580
- const formValue = formValueOperations.args[name];
8585
+ var _a, _b;
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) {
8588
+ throw new Error(`Cannot find an argument value for the key "${name}"`);
8589
+ }
8581
8590
  return {
8582
8591
  name,
8583
8592
  value: (formValue === null || formValue === void 0 ? void 0 : formValue.hasOwnProperty('value'))
@@ -11683,16 +11692,16 @@ class DropdownMenuComponent {
11683
11692
  DropdownMenuComponent.decorators = [
11684
11693
  { type: Component, args: [{
11685
11694
  selector: 'vdr-dropdown-menu',
11686
- template: `
11687
- <ng-template #menu>
11688
- <div class="dropdown open">
11689
- <div class="dropdown-menu">
11690
- <div class="dropdown-content-wrapper">
11691
- <ng-content></ng-content>
11692
- </div>
11693
- </div>
11694
- </div>
11695
- </ng-template>
11695
+ template: `
11696
+ <ng-template #menu>
11697
+ <div class="dropdown open">
11698
+ <div class="dropdown-menu">
11699
+ <div class="dropdown-content-wrapper">
11700
+ <ng-content></ng-content>
11701
+ </div>
11702
+ </div>
11703
+ </div>
11704
+ </ng-template>
11696
11705
  `,
11697
11706
  changeDetection: ChangeDetectionStrategy.OnPush,
11698
11707
  styles: [".clear-backdrop{background-color:#ff69b4}.dropdown.open>.dropdown-menu{position:relative;top:0;height:100%;overflow-y:auto}:host{opacity:1;transition:opacity .3s}\n"]
@@ -14979,7 +14988,15 @@ class LocaleCurrencyPipe extends LocaleBasePipe {
14979
14988
  if (typeof value === 'number' && typeof currencyCode === 'string') {
14980
14989
  const activeLocale = this.getActiveLocale(locale);
14981
14990
  const majorUnits = value / 100;
14982
- return new Intl.NumberFormat(activeLocale, { style: 'currency', currency: currencyCode }).format(majorUnits);
14991
+ try {
14992
+ return new Intl.NumberFormat(activeLocale, {
14993
+ style: 'currency',
14994
+ currency: currencyCode,
14995
+ }).format(majorUnits);
14996
+ }
14997
+ catch (e) {
14998
+ return majorUnits.toFixed(2);
14999
+ }
14983
15000
  }
14984
15001
  return value;
14985
15002
  }
@@ -16051,7 +16068,7 @@ function patchObject(obj, patch) {
16051
16068
  }
16052
16069
 
16053
16070
  // Auto-generated by the set-version.js script.
16054
- const ADMIN_UI_VERSION = '1.7.0';
16071
+ const ADMIN_UI_VERSION = '1.7.2';
16055
16072
 
16056
16073
  /**
16057
16074
  * Responsible for registering dashboard widget components and querying for layouts.