From 4efce141da2221be57fa7d50303df7d5e20e4136 Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Thu, 9 Jul 2020 13:45:01 +0200 Subject: [PATCH 01/31] Add weight to variant --- src/misc.ts | 4 ++ .../ProductShipping/ProductShipping.tsx | 65 +++++++++++++++++++ .../components/ProductShipping/index.ts | 0 .../ProductVariantAttributes.tsx | 21 +----- .../ProductVariantCreatePage.tsx | 15 ++++- .../ProductVariantPage/ProductVariantPage.tsx | 15 ++++- src/products/fixtures.ts | 28 ++++++-- src/products/mutations.ts | 4 ++ src/products/queries.ts | 12 ++++ src/products/types/Product.ts | 14 ++++ src/products/types/ProductCreate.ts | 15 +++++ src/products/types/ProductDetails.ts | 14 ++++ src/products/types/ProductImageCreate.ts | 14 ++++ src/products/types/ProductImageUpdate.ts | 14 ++++ src/products/types/ProductUpdate.ts | 14 ++++ src/products/types/ProductVariant.ts | 7 ++ src/products/types/ProductVariantDetails.ts | 7 ++ src/products/types/SimpleProductUpdate.ts | 42 ++++++++++++ src/products/types/VariantCreate.ts | 7 ++ src/products/types/VariantImageAssign.ts | 7 ++ src/products/types/VariantImageUnassign.ts | 7 ++ src/products/types/VariantUpdate.ts | 15 +++++ src/products/views/ProductVariant.tsx | 8 ++- src/products/views/ProductVariantCreate.tsx | 6 +- .../products/ProductVariantCreatePage.tsx | 4 ++ .../stories/products/ProductVariantPage.tsx | 3 + src/utils/errors/product.ts | 31 +++++++++ 27 files changed, 365 insertions(+), 28 deletions(-) create mode 100644 src/products/components/ProductShipping/ProductShipping.tsx create mode 100644 src/products/components/ProductShipping/index.ts diff --git a/src/misc.ts b/src/misc.ts index 4d51f42fac5..f4934f862cc 100644 --- a/src/misc.ts +++ b/src/misc.ts @@ -59,6 +59,10 @@ export function decimal(value: string | number) { return value; } +export function weight(value: string) { + return value === "" ? null : parseFloat(value); +} + export const removeDoubleSlashes = (url: string) => url.replace(/([^:]\/)\/+/g, "$1"); diff --git a/src/products/components/ProductShipping/ProductShipping.tsx b/src/products/components/ProductShipping/ProductShipping.tsx new file mode 100644 index 00000000000..ef5373ce4af --- /dev/null +++ b/src/products/components/ProductShipping/ProductShipping.tsx @@ -0,0 +1,65 @@ +import Card from "@material-ui/core/Card"; +import CardContent from "@material-ui/core/CardContent"; +import InputAdornment from "@material-ui/core/InputAdornment"; +import TextField from "@material-ui/core/TextField"; +import CardTitle from "@saleor/components/CardTitle"; +import Grid from "@saleor/components/Grid"; +import { getFormErrors, getProductErrorMessage } from "@saleor/utils/errors"; +import React from "react"; +import { useIntl } from "react-intl"; +import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; + +interface ProductShippingProps { + data: { + weight: string; + }; + disabled: boolean; + errors: ProductErrorFragment[]; + weightUnit: string; + onChange: (event: React.ChangeEvent) => void; +} + +const ProductShipping: React.FC = props => { + const { data, disabled, errors, weightUnit, onChange } = props; + + const intl = useIntl(); + + const formErrors = getFormErrors(["weight"], errors); + + return ( + + + + + {weightUnit} + ), + inputProps: { + min: 0 + } + }} + /> + + + + ); +}; +ProductShipping.displayName = "ProductShipping"; +export default ProductShipping; diff --git a/src/products/components/ProductShipping/index.ts b/src/products/components/ProductShipping/index.ts new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx b/src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx index b32a7ef2d12..bad74b2b536 100644 --- a/src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx +++ b/src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx @@ -2,7 +2,7 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import Typography from "@material-ui/core/Typography"; import React from "react"; -import { IntlShape, useIntl } from "react-intl"; +import { useIntl } from "react-intl"; import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; @@ -14,7 +14,7 @@ import Skeleton from "@saleor/components/Skeleton"; import { FormsetAtomicData, FormsetChange } from "@saleor/hooks/useFormset"; import { commonMessages } from "@saleor/intl"; import { VariantCreate_productVariantCreate_errors } from "@saleor/products/types/VariantCreate"; -import { ProductErrorCode } from "@saleor/types/globalTypes"; +import { getProductVariantAttributeErrorMessage } from "@saleor/utils/errors/product"; import { ProductVariant_attributes_attribute_values } from "../../types/ProductVariant"; export interface VariantAttributeInputData { @@ -67,19 +67,6 @@ function getAttributeValueChoices( })); } -function translateErrors(intl: IntlShape) { - return { - [ProductErrorCode.REQUIRED]: intl.formatMessage({ - defaultMessage: "All attributes should have value", - description: "product attribute error" - }), - [ProductErrorCode.UNIQUE]: intl.formatMessage({ - defaultMessage: "This variant already exists", - description: "product attribute error" - }) - }; -} - const ProductVariantAttributes: React.FC = ({ attributes, disabled, @@ -88,8 +75,6 @@ const ProductVariantAttributes: React.FC = ({ }) => { const intl = useIntl(); - const translatedErrors = translateErrors(intl); - return ( = ({ .filter(error => error.field === "attributes") .map(error => ( - {translatedErrors[error.code]} + {getProductVariantAttributeErrorMessage(error, intl)} ))} diff --git a/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx b/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx index f768787dbc4..2e59ea446f0 100644 --- a/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx +++ b/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx @@ -18,6 +18,7 @@ import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragm import { SearchWarehouses_search_edges_node } from "@saleor/searches/types/SearchWarehouses"; import { maybe } from "../../../misc"; import { ProductVariantCreateData_product } from "../../types/ProductVariantCreateData"; +import ProductShipping from "../ProductShipping/ProductShipping"; import ProductVariantAttributes, { VariantAttributeInputData } from "../ProductVariantAttributes"; @@ -32,6 +33,7 @@ interface ProductVariantCreatePageFormData { quantity: string; sku: string; trackInventory: boolean; + weight: string; } export interface ProductVariantCreatePageSubmitData @@ -48,6 +50,7 @@ interface ProductVariantCreatePageProps { product: ProductVariantCreateData_product; saveButtonBarState: ConfirmButtonTransitionState; warehouses: SearchWarehouses_search_edges_node[]; + weightUnit: string; onBack: () => void; onSubmit: (data: ProductVariantCreatePageSubmitData) => void; onVariantClick: (variantId: string) => void; @@ -61,6 +64,7 @@ const ProductVariantCreatePage: React.FC = ({ product, saveButtonBarState, warehouses, + weightUnit, onBack, onSubmit, onVariantClick @@ -86,7 +90,8 @@ const ProductVariantCreatePage: React.FC = ({ priceOverride: "", quantity: "0", sku: "", - trackInventory: true + trackInventory: true, + weight: "" }; const handleSubmit = (data: ProductVariantCreatePageFormData) => @@ -137,6 +142,14 @@ const ProductVariantCreatePage: React.FC = ({ onChange={change} /> + + = ({ + defaultWeightUnit, errors, loading, header, @@ -112,7 +116,8 @@ const ProductVariantPage: React.FC = ({ costPrice: maybe(() => variant.costPrice.amount.toString(), ""), priceOverride: maybe(() => variant.priceOverride.amount.toString(), ""), sku: maybe(() => variant.sku, ""), - trackInventory: variant?.trackInventory + trackInventory: variant?.trackInventory, + weight: variant?.weight?.value.toString() || "" }; const handleSubmit = (data: ProductVariantPageFormData) => { @@ -195,6 +200,14 @@ const ProductVariantPage: React.FC = ({ onChange={change} /> + + ({ } } ], - trackInventory: true + trackInventory: true, + weight: { + __typename: "Weight", + unit: "kg", + value: 6 + } }); export const variantImages = (placeholderImage: string) => variant(placeholderImage).images; diff --git a/src/products/mutations.ts b/src/products/mutations.ts index d877e1b1aa5..80d7cacdb64 100644 --- a/src/products/mutations.ts +++ b/src/products/mutations.ts @@ -295,6 +295,7 @@ export const productCreateMutation = gql` $seo: SeoInput $stocks: [StockInput!]! $trackInventory: Boolean! + $weight: WeightScalar ) { productCreate( input: { @@ -312,6 +313,7 @@ export const productCreateMutation = gql` seo: $seo stocks: $stocks trackInventory: $trackInventory + weight: $weight } ) { errors: productErrors { @@ -360,6 +362,7 @@ export const variantUpdateMutation = gql` $sku: String $trackInventory: Boolean! $stocks: [StockInput!]! + $weight: WeightScalar ) { productVariantUpdate( id: $id @@ -369,6 +372,7 @@ export const variantUpdateMutation = gql` priceOverride: $priceOverride sku: $sku trackInventory: $trackInventory + weight: $weight } ) { errors: productErrors { diff --git a/src/products/queries.ts b/src/products/queries.ts index a614f03185a..5ae6e21d319 100644 --- a/src/products/queries.ts +++ b/src/products/queries.ts @@ -185,12 +185,20 @@ export const productFragmentDetails = gql` ...StockFragment } trackInventory + weight { + unit + value + } } productType { id name hasVariants } + weight { + unit + value + } } `; @@ -253,6 +261,10 @@ export const fragmentVariant = gql` ...StockFragment } trackInventory + weight { + unit + value + } } `; diff --git a/src/products/types/Product.ts b/src/products/types/Product.ts index a1c8c7696c9..370fdc3d0e9 100644 --- a/src/products/types/Product.ts +++ b/src/products/types/Product.ts @@ -163,6 +163,12 @@ export interface Product_variants_stocks { warehouse: Product_variants_stocks_warehouse; } +export interface Product_variants_weight { + __typename: "Weight"; + unit: string; + value: number; +} + export interface Product_variants { __typename: "ProductVariant"; id: string; @@ -172,6 +178,13 @@ export interface Product_variants { margin: number | null; stocks: (Product_variants_stocks | null)[] | null; trackInventory: boolean; + weight: Product_variants_weight | null; +} + +export interface Product_weight { + __typename: "Weight"; + unit: string; + value: number; } export interface Product { @@ -195,4 +208,5 @@ export interface Product { pricing: Product_pricing | null; images: (Product_images | null)[] | null; variants: (Product_variants | null)[] | null; + weight: Product_weight | null; } diff --git a/src/products/types/ProductCreate.ts b/src/products/types/ProductCreate.ts index d757729d09b..e1d020c3f51 100644 --- a/src/products/types/ProductCreate.ts +++ b/src/products/types/ProductCreate.ts @@ -169,6 +169,12 @@ export interface ProductCreate_productCreate_product_variants_stocks { warehouse: ProductCreate_productCreate_product_variants_stocks_warehouse; } +export interface ProductCreate_productCreate_product_variants_weight { + __typename: "Weight"; + unit: string; + value: number; +} + export interface ProductCreate_productCreate_product_variants { __typename: "ProductVariant"; id: string; @@ -178,6 +184,13 @@ export interface ProductCreate_productCreate_product_variants { margin: number | null; stocks: (ProductCreate_productCreate_product_variants_stocks | null)[] | null; trackInventory: boolean; + weight: ProductCreate_productCreate_product_variants_weight | null; +} + +export interface ProductCreate_productCreate_product_weight { + __typename: "Weight"; + unit: string; + value: number; } export interface ProductCreate_productCreate_product { @@ -201,6 +214,7 @@ export interface ProductCreate_productCreate_product { pricing: ProductCreate_productCreate_product_pricing | null; images: (ProductCreate_productCreate_product_images | null)[] | null; variants: (ProductCreate_productCreate_product_variants | null)[] | null; + weight: ProductCreate_productCreate_product_weight | null; } export interface ProductCreate_productCreate { @@ -228,4 +242,5 @@ export interface ProductCreateVariables { seo?: SeoInput | null; stocks: StockInput[]; trackInventory: boolean; + weight?: any | null; } diff --git a/src/products/types/ProductDetails.ts b/src/products/types/ProductDetails.ts index 2c5913c5a60..86d337d42e2 100644 --- a/src/products/types/ProductDetails.ts +++ b/src/products/types/ProductDetails.ts @@ -163,6 +163,12 @@ export interface ProductDetails_product_variants_stocks { warehouse: ProductDetails_product_variants_stocks_warehouse; } +export interface ProductDetails_product_variants_weight { + __typename: "Weight"; + unit: string; + value: number; +} + export interface ProductDetails_product_variants { __typename: "ProductVariant"; id: string; @@ -172,6 +178,13 @@ export interface ProductDetails_product_variants { margin: number | null; stocks: (ProductDetails_product_variants_stocks | null)[] | null; trackInventory: boolean; + weight: ProductDetails_product_variants_weight | null; +} + +export interface ProductDetails_product_weight { + __typename: "Weight"; + unit: string; + value: number; } export interface ProductDetails_product { @@ -195,6 +208,7 @@ export interface ProductDetails_product { pricing: ProductDetails_product_pricing | null; images: (ProductDetails_product_images | null)[] | null; variants: (ProductDetails_product_variants | null)[] | null; + weight: ProductDetails_product_weight | null; } export interface ProductDetails { diff --git a/src/products/types/ProductImageCreate.ts b/src/products/types/ProductImageCreate.ts index 49cd57bda50..6614ea71621 100644 --- a/src/products/types/ProductImageCreate.ts +++ b/src/products/types/ProductImageCreate.ts @@ -169,6 +169,12 @@ export interface ProductImageCreate_productImageCreate_product_variants_stocks { warehouse: ProductImageCreate_productImageCreate_product_variants_stocks_warehouse; } +export interface ProductImageCreate_productImageCreate_product_variants_weight { + __typename: "Weight"; + unit: string; + value: number; +} + export interface ProductImageCreate_productImageCreate_product_variants { __typename: "ProductVariant"; id: string; @@ -178,6 +184,13 @@ export interface ProductImageCreate_productImageCreate_product_variants { margin: number | null; stocks: (ProductImageCreate_productImageCreate_product_variants_stocks | null)[] | null; trackInventory: boolean; + weight: ProductImageCreate_productImageCreate_product_variants_weight | null; +} + +export interface ProductImageCreate_productImageCreate_product_weight { + __typename: "Weight"; + unit: string; + value: number; } export interface ProductImageCreate_productImageCreate_product { @@ -201,6 +214,7 @@ export interface ProductImageCreate_productImageCreate_product { pricing: ProductImageCreate_productImageCreate_product_pricing | null; images: (ProductImageCreate_productImageCreate_product_images | null)[] | null; variants: (ProductImageCreate_productImageCreate_product_variants | null)[] | null; + weight: ProductImageCreate_productImageCreate_product_weight | null; } export interface ProductImageCreate_productImageCreate { diff --git a/src/products/types/ProductImageUpdate.ts b/src/products/types/ProductImageUpdate.ts index abb5401cbdb..26adab9363d 100644 --- a/src/products/types/ProductImageUpdate.ts +++ b/src/products/types/ProductImageUpdate.ts @@ -169,6 +169,12 @@ export interface ProductImageUpdate_productImageUpdate_product_variants_stocks { warehouse: ProductImageUpdate_productImageUpdate_product_variants_stocks_warehouse; } +export interface ProductImageUpdate_productImageUpdate_product_variants_weight { + __typename: "Weight"; + unit: string; + value: number; +} + export interface ProductImageUpdate_productImageUpdate_product_variants { __typename: "ProductVariant"; id: string; @@ -178,6 +184,13 @@ export interface ProductImageUpdate_productImageUpdate_product_variants { margin: number | null; stocks: (ProductImageUpdate_productImageUpdate_product_variants_stocks | null)[] | null; trackInventory: boolean; + weight: ProductImageUpdate_productImageUpdate_product_variants_weight | null; +} + +export interface ProductImageUpdate_productImageUpdate_product_weight { + __typename: "Weight"; + unit: string; + value: number; } export interface ProductImageUpdate_productImageUpdate_product { @@ -201,6 +214,7 @@ export interface ProductImageUpdate_productImageUpdate_product { pricing: ProductImageUpdate_productImageUpdate_product_pricing | null; images: (ProductImageUpdate_productImageUpdate_product_images | null)[] | null; variants: (ProductImageUpdate_productImageUpdate_product_variants | null)[] | null; + weight: ProductImageUpdate_productImageUpdate_product_weight | null; } export interface ProductImageUpdate_productImageUpdate { diff --git a/src/products/types/ProductUpdate.ts b/src/products/types/ProductUpdate.ts index 9ea3e5fd8e1..6a4e6841133 100644 --- a/src/products/types/ProductUpdate.ts +++ b/src/products/types/ProductUpdate.ts @@ -169,6 +169,12 @@ export interface ProductUpdate_productUpdate_product_variants_stocks { warehouse: ProductUpdate_productUpdate_product_variants_stocks_warehouse; } +export interface ProductUpdate_productUpdate_product_variants_weight { + __typename: "Weight"; + unit: string; + value: number; +} + export interface ProductUpdate_productUpdate_product_variants { __typename: "ProductVariant"; id: string; @@ -178,6 +184,13 @@ export interface ProductUpdate_productUpdate_product_variants { margin: number | null; stocks: (ProductUpdate_productUpdate_product_variants_stocks | null)[] | null; trackInventory: boolean; + weight: ProductUpdate_productUpdate_product_variants_weight | null; +} + +export interface ProductUpdate_productUpdate_product_weight { + __typename: "Weight"; + unit: string; + value: number; } export interface ProductUpdate_productUpdate_product { @@ -201,6 +214,7 @@ export interface ProductUpdate_productUpdate_product { pricing: ProductUpdate_productUpdate_product_pricing | null; images: (ProductUpdate_productUpdate_product_images | null)[] | null; variants: (ProductUpdate_productUpdate_product_variants | null)[] | null; + weight: ProductUpdate_productUpdate_product_weight | null; } export interface ProductUpdate_productUpdate { diff --git a/src/products/types/ProductVariant.ts b/src/products/types/ProductVariant.ts index ec79ea8edc0..78926e644ef 100644 --- a/src/products/types/ProductVariant.ts +++ b/src/products/types/ProductVariant.ts @@ -103,6 +103,12 @@ export interface ProductVariant_stocks { warehouse: ProductVariant_stocks_warehouse; } +export interface ProductVariant_weight { + __typename: "Weight"; + unit: string; + value: number; +} + export interface ProductVariant { __typename: "ProductVariant"; id: string; @@ -115,4 +121,5 @@ export interface ProductVariant { sku: string; stocks: (ProductVariant_stocks | null)[] | null; trackInventory: boolean; + weight: ProductVariant_weight | null; } diff --git a/src/products/types/ProductVariantDetails.ts b/src/products/types/ProductVariantDetails.ts index 3e7de371858..43a1871e7dd 100644 --- a/src/products/types/ProductVariantDetails.ts +++ b/src/products/types/ProductVariantDetails.ts @@ -103,6 +103,12 @@ export interface ProductVariantDetails_productVariant_stocks { warehouse: ProductVariantDetails_productVariant_stocks_warehouse; } +export interface ProductVariantDetails_productVariant_weight { + __typename: "Weight"; + unit: string; + value: number; +} + export interface ProductVariantDetails_productVariant { __typename: "ProductVariant"; id: string; @@ -115,6 +121,7 @@ export interface ProductVariantDetails_productVariant { sku: string; stocks: (ProductVariantDetails_productVariant_stocks | null)[] | null; trackInventory: boolean; + weight: ProductVariantDetails_productVariant_weight | null; } export interface ProductVariantDetails { diff --git a/src/products/types/SimpleProductUpdate.ts b/src/products/types/SimpleProductUpdate.ts index 7e4d3460065..c4ace4ad596 100644 --- a/src/products/types/SimpleProductUpdate.ts +++ b/src/products/types/SimpleProductUpdate.ts @@ -169,6 +169,12 @@ export interface SimpleProductUpdate_productUpdate_product_variants_stocks { warehouse: SimpleProductUpdate_productUpdate_product_variants_stocks_warehouse; } +export interface SimpleProductUpdate_productUpdate_product_variants_weight { + __typename: "Weight"; + unit: string; + value: number; +} + export interface SimpleProductUpdate_productUpdate_product_variants { __typename: "ProductVariant"; id: string; @@ -178,6 +184,13 @@ export interface SimpleProductUpdate_productUpdate_product_variants { margin: number | null; stocks: (SimpleProductUpdate_productUpdate_product_variants_stocks | null)[] | null; trackInventory: boolean; + weight: SimpleProductUpdate_productUpdate_product_variants_weight | null; +} + +export interface SimpleProductUpdate_productUpdate_product_weight { + __typename: "Weight"; + unit: string; + value: number; } export interface SimpleProductUpdate_productUpdate_product { @@ -201,6 +214,7 @@ export interface SimpleProductUpdate_productUpdate_product { pricing: SimpleProductUpdate_productUpdate_product_pricing | null; images: (SimpleProductUpdate_productUpdate_product_images | null)[] | null; variants: (SimpleProductUpdate_productUpdate_product_variants | null)[] | null; + weight: SimpleProductUpdate_productUpdate_product_weight | null; } export interface SimpleProductUpdate_productUpdate { @@ -312,6 +326,12 @@ export interface SimpleProductUpdate_productVariantUpdate_productVariant_stocks warehouse: SimpleProductUpdate_productVariantUpdate_productVariant_stocks_warehouse; } +export interface SimpleProductUpdate_productVariantUpdate_productVariant_weight { + __typename: "Weight"; + unit: string; + value: number; +} + export interface SimpleProductUpdate_productVariantUpdate_productVariant { __typename: "ProductVariant"; id: string; @@ -324,6 +344,7 @@ export interface SimpleProductUpdate_productVariantUpdate_productVariant { sku: string; stocks: (SimpleProductUpdate_productVariantUpdate_productVariant_stocks | null)[] | null; trackInventory: boolean; + weight: SimpleProductUpdate_productVariantUpdate_productVariant_weight | null; } export interface SimpleProductUpdate_productVariantUpdate { @@ -436,6 +457,12 @@ export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_s warehouse: SimpleProductUpdate_productVariantStocksCreate_productVariant_stocks_warehouse; } +export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_weight { + __typename: "Weight"; + unit: string; + value: number; +} + export interface SimpleProductUpdate_productVariantStocksCreate_productVariant { __typename: "ProductVariant"; id: string; @@ -448,6 +475,7 @@ export interface SimpleProductUpdate_productVariantStocksCreate_productVariant { sku: string; stocks: (SimpleProductUpdate_productVariantStocksCreate_productVariant_stocks | null)[] | null; trackInventory: boolean; + weight: SimpleProductUpdate_productVariantStocksCreate_productVariant_weight | null; } export interface SimpleProductUpdate_productVariantStocksCreate { @@ -559,6 +587,12 @@ export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_s warehouse: SimpleProductUpdate_productVariantStocksDelete_productVariant_stocks_warehouse; } +export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_weight { + __typename: "Weight"; + unit: string; + value: number; +} + export interface SimpleProductUpdate_productVariantStocksDelete_productVariant { __typename: "ProductVariant"; id: string; @@ -571,6 +605,7 @@ export interface SimpleProductUpdate_productVariantStocksDelete_productVariant { sku: string; stocks: (SimpleProductUpdate_productVariantStocksDelete_productVariant_stocks | null)[] | null; trackInventory: boolean; + weight: SimpleProductUpdate_productVariantStocksDelete_productVariant_weight | null; } export interface SimpleProductUpdate_productVariantStocksDelete { @@ -683,6 +718,12 @@ export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_s warehouse: SimpleProductUpdate_productVariantStocksUpdate_productVariant_stocks_warehouse; } +export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_weight { + __typename: "Weight"; + unit: string; + value: number; +} + export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant { __typename: "ProductVariant"; id: string; @@ -695,6 +736,7 @@ export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant { sku: string; stocks: (SimpleProductUpdate_productVariantStocksUpdate_productVariant_stocks | null)[] | null; trackInventory: boolean; + weight: SimpleProductUpdate_productVariantStocksUpdate_productVariant_weight | null; } export interface SimpleProductUpdate_productVariantStocksUpdate { diff --git a/src/products/types/VariantCreate.ts b/src/products/types/VariantCreate.ts index 6d8e19e5c61..004894e9b19 100644 --- a/src/products/types/VariantCreate.ts +++ b/src/products/types/VariantCreate.ts @@ -111,6 +111,12 @@ export interface VariantCreate_productVariantCreate_productVariant_stocks { warehouse: VariantCreate_productVariantCreate_productVariant_stocks_warehouse; } +export interface VariantCreate_productVariantCreate_productVariant_weight { + __typename: "Weight"; + unit: string; + value: number; +} + export interface VariantCreate_productVariantCreate_productVariant { __typename: "ProductVariant"; id: string; @@ -123,6 +129,7 @@ export interface VariantCreate_productVariantCreate_productVariant { sku: string; stocks: (VariantCreate_productVariantCreate_productVariant_stocks | null)[] | null; trackInventory: boolean; + weight: VariantCreate_productVariantCreate_productVariant_weight | null; } export interface VariantCreate_productVariantCreate { diff --git a/src/products/types/VariantImageAssign.ts b/src/products/types/VariantImageAssign.ts index fad6f55d678..ac72c1c4fcd 100644 --- a/src/products/types/VariantImageAssign.ts +++ b/src/products/types/VariantImageAssign.ts @@ -111,6 +111,12 @@ export interface VariantImageAssign_variantImageAssign_productVariant_stocks { warehouse: VariantImageAssign_variantImageAssign_productVariant_stocks_warehouse; } +export interface VariantImageAssign_variantImageAssign_productVariant_weight { + __typename: "Weight"; + unit: string; + value: number; +} + export interface VariantImageAssign_variantImageAssign_productVariant { __typename: "ProductVariant"; id: string; @@ -123,6 +129,7 @@ export interface VariantImageAssign_variantImageAssign_productVariant { sku: string; stocks: (VariantImageAssign_variantImageAssign_productVariant_stocks | null)[] | null; trackInventory: boolean; + weight: VariantImageAssign_variantImageAssign_productVariant_weight | null; } export interface VariantImageAssign_variantImageAssign { diff --git a/src/products/types/VariantImageUnassign.ts b/src/products/types/VariantImageUnassign.ts index 51b14b8c0a1..8d7d870ac9b 100644 --- a/src/products/types/VariantImageUnassign.ts +++ b/src/products/types/VariantImageUnassign.ts @@ -111,6 +111,12 @@ export interface VariantImageUnassign_variantImageUnassign_productVariant_stocks warehouse: VariantImageUnassign_variantImageUnassign_productVariant_stocks_warehouse; } +export interface VariantImageUnassign_variantImageUnassign_productVariant_weight { + __typename: "Weight"; + unit: string; + value: number; +} + export interface VariantImageUnassign_variantImageUnassign_productVariant { __typename: "ProductVariant"; id: string; @@ -123,6 +129,7 @@ export interface VariantImageUnassign_variantImageUnassign_productVariant { sku: string; stocks: (VariantImageUnassign_variantImageUnassign_productVariant_stocks | null)[] | null; trackInventory: boolean; + weight: VariantImageUnassign_variantImageUnassign_productVariant_weight | null; } export interface VariantImageUnassign_variantImageUnassign { diff --git a/src/products/types/VariantUpdate.ts b/src/products/types/VariantUpdate.ts index 4ed24460600..b898c17dcf1 100644 --- a/src/products/types/VariantUpdate.ts +++ b/src/products/types/VariantUpdate.ts @@ -111,6 +111,12 @@ export interface VariantUpdate_productVariantUpdate_productVariant_stocks { warehouse: VariantUpdate_productVariantUpdate_productVariant_stocks_warehouse; } +export interface VariantUpdate_productVariantUpdate_productVariant_weight { + __typename: "Weight"; + unit: string; + value: number; +} + export interface VariantUpdate_productVariantUpdate_productVariant { __typename: "ProductVariant"; id: string; @@ -123,6 +129,7 @@ export interface VariantUpdate_productVariantUpdate_productVariant { sku: string; stocks: (VariantUpdate_productVariantUpdate_productVariant_stocks | null)[] | null; trackInventory: boolean; + weight: VariantUpdate_productVariantUpdate_productVariant_weight | null; } export interface VariantUpdate_productVariantUpdate { @@ -235,6 +242,12 @@ export interface VariantUpdate_productVariantStocksUpdate_productVariant_stocks warehouse: VariantUpdate_productVariantStocksUpdate_productVariant_stocks_warehouse; } +export interface VariantUpdate_productVariantStocksUpdate_productVariant_weight { + __typename: "Weight"; + unit: string; + value: number; +} + export interface VariantUpdate_productVariantStocksUpdate_productVariant { __typename: "ProductVariant"; id: string; @@ -247,6 +260,7 @@ export interface VariantUpdate_productVariantStocksUpdate_productVariant { sku: string; stocks: (VariantUpdate_productVariantStocksUpdate_productVariant_stocks | null)[] | null; trackInventory: boolean; + weight: VariantUpdate_productVariantStocksUpdate_productVariant_weight | null; } export interface VariantUpdate_productVariantStocksUpdate { @@ -337,4 +351,5 @@ export interface VariantUpdateVariables { sku?: string | null; trackInventory: boolean; stocks: StockInput[]; + weight?: any | null; } diff --git a/src/products/views/ProductVariant.tsx b/src/products/views/ProductVariant.tsx index 5f9c1058480..bb7b10a2235 100644 --- a/src/products/views/ProductVariant.tsx +++ b/src/products/views/ProductVariant.tsx @@ -9,7 +9,8 @@ import { commonMessages } from "@saleor/intl"; import NotFoundPage from "@saleor/components/NotFoundPage"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import { useWarehouseList } from "@saleor/warehouses/queries"; -import { decimal } from "../../misc"; +import useShop from "@saleor/hooks/useShop"; +import { decimal, weight } from "../../misc"; import ProductVariantDeleteDialog from "../components/ProductVariantDeleteDialog"; import ProductVariantPage, { ProductVariantPageSubmitData @@ -40,6 +41,7 @@ export const ProductVariant: React.FC = ({ productId, params }) => { + const shop = useShop(); const navigate = useNavigator(); const notify = useNotifier(); const intl = useIntl(); @@ -129,6 +131,7 @@ export const ProductVariant: React.FC = ({ <> = ({ stocks: data.updateStocks.map( mapFormsetStockToStockInput ), - trackInventory: data.trackInventory + trackInventory: data.trackInventory, + weight: weight(data.weight) }) } onVariantClick={variantId => { diff --git a/src/products/views/ProductVariantCreate.tsx b/src/products/views/ProductVariantCreate.tsx index fce437e40ca..b1545c2f217 100644 --- a/src/products/views/ProductVariantCreate.tsx +++ b/src/products/views/ProductVariantCreate.tsx @@ -8,7 +8,7 @@ import useShop from "@saleor/hooks/useShop"; import NotFoundPage from "@saleor/components/NotFoundPage"; import { commonMessages } from "@saleor/intl"; import { useWarehouseList } from "@saleor/warehouses/queries"; -import { decimal } from "../../misc"; +import { decimal, weight } from "../../misc"; import ProductVariantCreatePage, { ProductVariantCreatePageSubmitData } from "../components/ProductVariantCreatePage"; @@ -82,7 +82,8 @@ export const ProductVariant: React.FC = ({ quantity: parseInt(stock.value, 0), warehouse: stock.id })), - trackInventory: true + trackInventory: true, + weight: weight(formData.weight) } } }); @@ -120,6 +121,7 @@ export const ProductVariant: React.FC = ({ edge => edge.node ) || [] } + weightUnit={shop?.defaultWeightUnit} /> ); diff --git a/src/storybook/stories/products/ProductVariantCreatePage.tsx b/src/storybook/stories/products/ProductVariantCreatePage.tsx index d5ef0ac0b4e..f15d829ff50 100644 --- a/src/storybook/stories/products/ProductVariantCreatePage.tsx +++ b/src/storybook/stories/products/ProductVariantCreatePage.tsx @@ -15,6 +15,7 @@ storiesOf("Views / Products / Create product variant", module) .add("default", () => ( ( ( ( ( ( ( undefined} diff --git a/src/utils/errors/product.ts b/src/utils/errors/product.ts index 0886770ece0..01baeec1c86 100644 --- a/src/utils/errors/product.ts +++ b/src/utils/errors/product.ts @@ -14,15 +14,26 @@ const messages = defineMessages({ attributeCannotBeAssigned: { defaultMessage: "This attribute cannot be assigned to this product type" }, + attributeRequired: { + defaultMessage: "All attributes should have value", + description: "product attribute error" + }, attributeVariantsDisabled: { defaultMessage: "Variants are disabled in this product type" }, + duplicatedInputItem: { + defaultMessage: "Variant with these attributes already exists" + }, skuUnique: { defaultMessage: "SKUs must be unique", description: "bulk variant create error" }, variantNoDigitalContent: { defaultMessage: "This variant does not have any digital content" + }, + variantUnique: { + defaultMessage: "This variant already exists", + description: "product attribute error" } }); @@ -38,6 +49,8 @@ function getProductErrorMessage( return intl.formatMessage(messages.attributeCannotBeAssigned); case ProductErrorCode.ATTRIBUTE_VARIANTS_DISABLED: return intl.formatMessage(messages.attributeVariantsDisabled); + case ProductErrorCode.DUPLICATED_INPUT_ITEM: + return intl.formatMessage(messages.duplicatedInputItem); case ProductErrorCode.GRAPHQL_ERROR: return intl.formatMessage(commonErrorMessages.graphqlError); case ProductErrorCode.REQUIRED: @@ -54,6 +67,24 @@ function getProductErrorMessage( return undefined; } +export function getProductVariantAttributeErrorMessage( + err: Omit | undefined, + intl: IntlShape +): string { + if (err) { + switch (err.code) { + case ProductErrorCode.REQUIRED: + return intl.formatMessage(messages.attributeRequired); + case ProductErrorCode.UNIQUE: + return intl.formatMessage(messages.variantUnique); + default: + return getProductErrorMessage(err, intl); + } + } + + return undefined; +} + export function getBulkProductErrorMessage( err: BulkProductErrorFragment | undefined, intl: IntlShape From e066d3171f8a530aec02543b748fbf407bfd9d8d Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Thu, 9 Jul 2020 14:53:08 +0200 Subject: [PATCH 02/31] Add weight to simple products --- .../ProductCreatePage/ProductCreatePage.tsx | 15 ++++- .../ProductUpdatePage/ProductUpdatePage.tsx | 67 +++++++++++-------- src/products/mutations.ts | 2 + src/products/types/SimpleProductUpdate.ts | 1 + src/products/utils/data.ts | 4 +- src/products/views/ProductCreate.tsx | 6 +- .../views/ProductUpdate/ProductUpdate.tsx | 3 + src/products/views/ProductUpdate/handlers.ts | 5 +- .../stories/products/ProductCreatePage.tsx | 3 + .../stories/products/ProductUpdatePage.tsx | 1 + .../WarehouseDetailsPage.tsx | 4 +- 11 files changed, 77 insertions(+), 34 deletions(-) diff --git a/src/products/components/ProductCreatePage/ProductCreatePage.tsx b/src/products/components/ProductCreatePage/ProductCreatePage.tsx index 60ef44658ef..3d1ae00f158 100644 --- a/src/products/components/ProductCreatePage/ProductCreatePage.tsx +++ b/src/products/components/ProductCreatePage/ProductCreatePage.tsx @@ -43,6 +43,7 @@ import ProductDetailsForm from "../ProductDetailsForm"; import ProductOrganization from "../ProductOrganization"; import ProductPricing from "../ProductPricing"; import ProductStocks, { ProductStockInput } from "../ProductStocks"; +import ProductShipping from "../ProductShipping/ProductShipping"; interface FormData { basePrice: number; @@ -59,6 +60,7 @@ interface FormData { sku: string; stockQuantity: number; trackInventory: boolean; + weight: string; } export interface ProductCreatePageSubmitData extends FormData { attributes: ProductAttributeInput[]; @@ -82,6 +84,7 @@ interface ProductCreatePageProps { }>; header: string; saveButtonBarState: ConfirmButtonTransitionState; + weightUnit: string; warehouses: SearchWarehouses_search_edges_node[]; fetchCategories: (data: string) => void; fetchCollections: (data: string) => void; @@ -107,6 +110,7 @@ export const ProductCreatePage: React.FC = ({ warehouses, onBack, fetchProductTypes, + weightUnit, onSubmit }: ProductCreatePageProps) => { const intl = useIntl(); @@ -143,7 +147,8 @@ export const ProductCreatePage: React.FC = ({ seoTitle: "", sku: null, stockQuantity: null, - trackInventory: false + trackInventory: false, + weight: "" }; // Display values @@ -242,6 +247,14 @@ export const ProductCreatePage: React.FC = ({ {!!productType && !productType.hasVariants && ( <> + + = ({ + defaultWeightUnit, disabled, categories: categoryChoiceList, collections: collectionChoiceList, @@ -269,33 +272,43 @@ export const ProductUpdatePage: React.FC = ({ toggleAll={toggleAll} /> ) : ( - { - triggerChange(); - changeStockData(id, value); - }} - onFormDataChange={change} - onWarehouseStockAdd={id => { - triggerChange(); - addStock({ - data: null, - id, - label: warehouses.find( - warehouse => warehouse.id === id - ).name, - value: "0" - }); - }} - onWarehouseStockDelete={id => { - triggerChange(); - removeStock(id); - }} - /> + <> + + + { + triggerChange(); + changeStockData(id, value); + }} + onFormDataChange={change} + onWarehouseStockAdd={id => { + triggerChange(); + addStock({ + data: null, + id, + label: warehouses.find( + warehouse => warehouse.id === id + ).name, + value: "0" + }); + }} + onWarehouseStockDelete={id => { + triggerChange(); + removeStock(id); + }} + /> + )} { quantity: parseInt(stock.value, 0), warehouse: stock.id })), - trackInventory: formData.trackInventory + trackInventory: formData.trackInventory, + weight: weight(formData.weight) } }); }; @@ -157,6 +158,7 @@ export const ProductCreateView: React.FC = () => { warehouses={ warehouses.data?.warehouses.edges.map(edge => edge.node) || [] } + weightUnit={shop?.defaultWeightUnit} /> ); diff --git a/src/products/views/ProductUpdate/ProductUpdate.tsx b/src/products/views/ProductUpdate/ProductUpdate.tsx index 91d28edd31e..77423ea212a 100644 --- a/src/products/views/ProductUpdate/ProductUpdate.tsx +++ b/src/products/views/ProductUpdate/ProductUpdate.tsx @@ -17,6 +17,7 @@ import useCollectionSearch from "@saleor/searches/useCollectionSearch"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import NotFoundPage from "@saleor/components/NotFoundPage"; import { useWarehouseList } from "@saleor/warehouses/queries"; +import useShop from "@saleor/hooks/useShop"; import { getMutationState, maybe } from "../../../misc"; import ProductUpdatePage from "../../components/ProductUpdatePage"; import ProductUpdateOperations from "../../containers/ProductUpdateOperations"; @@ -75,6 +76,7 @@ export const ProductUpdate: React.FC = ({ id, params }) => { first: 50 } }); + const shop = useShop(); const [openModal, closeModal] = createDialogActionHandlers< ProductUrlDialog, @@ -213,6 +215,7 @@ export const ProductUpdate: React.FC = ({ id, params }) => { undefined} saveButtonBarState="default" warehouses={warehouseList} + weightUnit="kg" /> )) .add("When loading", () => ( @@ -55,6 +56,7 @@ storiesOf("Views / Products / Create product", module) onSubmit={() => undefined} saveButtonBarState="default" warehouses={undefined} + weightUnit="kg" /> )) .add("form errors", () => ( @@ -82,5 +84,6 @@ storiesOf("Views / Products / Create product", module) onSubmit={() => undefined} saveButtonBarState="default" warehouses={warehouseList} + weightUnit="kg" /> )); diff --git a/src/storybook/stories/products/ProductUpdatePage.tsx b/src/storybook/stories/products/ProductUpdatePage.tsx index 9bc5478f7b4..2efef0dbc72 100644 --- a/src/storybook/stories/products/ProductUpdatePage.tsx +++ b/src/storybook/stories/products/ProductUpdatePage.tsx @@ -19,6 +19,7 @@ const props: ProductUpdatePageProps = { ...listActionsProps, categories: [product.category], collections, + defaultWeightUnit: "kg", disabled: false, errors: [], fetchCategories: () => undefined, diff --git a/src/warehouses/components/WarehouseDetailsPage/WarehouseDetailsPage.tsx b/src/warehouses/components/WarehouseDetailsPage/WarehouseDetailsPage.tsx index c4c53c8112a..3877072ceee 100644 --- a/src/warehouses/components/WarehouseDetailsPage/WarehouseDetailsPage.tsx +++ b/src/warehouses/components/WarehouseDetailsPage/WarehouseDetailsPage.tsx @@ -51,7 +51,9 @@ const WarehouseDetailsPage: React.FC = ({ onSubmit }) => { const intl = useIntl(); - const [displayCountry, setDisplayCountry] = useStateFromProps(""); + const [displayCountry, setDisplayCountry] = useStateFromProps( + warehouse?.address?.country.country || "" + ); const { errors: validationErrors, From 1bbc7aa9b9b0253709f7e566828779af45ba0fae Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Thu, 9 Jul 2020 15:47:08 +0200 Subject: [PATCH 03/31] Update snapshots --- .../__snapshots__/Stories.test.ts.snap | 959 +++++++++++++++++- 1 file changed, 910 insertions(+), 49 deletions(-) diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap index ae0c2bc8f95..22bf550291c 100644 --- a/src/storybook/__snapshots__/Stories.test.ts.snap +++ b/src/storybook/__snapshots__/Stories.test.ts.snap @@ -108138,6 +108138,84 @@ exports[`Storyshots Views / Products / Create product variant add first variant
+
+
+ + Shipping + +
+
+
+
+
+
+
+ +
+ +
+
+ kg +
+
+ +
+
+
+
+
+
@@ -108732,6 +108810,84 @@ exports[`Storyshots Views / Products / Create product variant default 1`] = `
+
+
+ + Shipping + +
+
+
+
+
+
+
+ +
+ +
+
+ kg +
+
+ +
+
+
+
+
+
@@ -109250,6 +109406,85 @@ exports[`Storyshots Views / Products / Create product variant when loading data
+
+
+ + Shipping + +
+
+
+
+
+
+
+ +
+ +
+
+ kg +
+
+ +
+
+
+
+
+
@@ -109860,6 +110095,84 @@ exports[`Storyshots Views / Products / Create product variant with errors 1`] =
+
+
+ + Shipping + +
+
+
+
+
+
+
+ +
+ +
+
+ kg +
+
+ +
+
+
+
+
+
@@ -114600,6 +114913,84 @@ Ctrl + K"
+
+
+ + Shipping + +
+
+
+
+
+
+
+ +
+ +
+
+ kg +
+
+ +
+
+
+
+
+
@@ -116397,6 +116788,84 @@ Ctrl + K"
+
+
+ + Shipping + +
+
+
+
+
+
+
+ +
+ +
+
+ kg +
+
+ +
+
+
+
+
+
@@ -119545,6 +120014,85 @@ Ctrl + K"
+
+
+ + Shipping + +
+
+
+
+
+
+
+ +
+ +
+
+ kg +
+
+ +
+
+
+
+
+
@@ -123034,6 +123582,84 @@ Ctrl + K"
+
+
+ + Shipping + +
+
+
+
+
+
+
+ +
+ +
+
+ kg +
+
+ +
+
+
+
+
+
@@ -129422,55 +130048,133 @@ exports[`Storyshots Views / Products / Product variant details attribute errors

-
+
+
+ +
+ +
+
+ USD +
+
+ +
+

+ Optional +

+
+
+
+
+
+
+
+
+ + Shipping + +
+
+
+
+
+
+
+
- +
-
-
- USD -
+ kg
-
- + + + ​ + + +
@@ -130371,6 +131075,84 @@ exports[`Storyshots Views / Products / Product variant details when loaded data
+
+
+ + Shipping + +
+
+
+
+
+
+
+ +
+ +
+
+ kg +
+
+ +
+
+
+
+
+
@@ -131029,6 +131811,85 @@ exports[`Storyshots Views / Products / Product variant details when loading data
+
+
+ + Shipping + +
+
+
+
+
+
+
+ +
+ +
+
+ kg +
+
+ +
+
+
+
+
+
@@ -151786,8 +152647,8 @@ exports[`Storyshots Views / Warehouses / Warehouse details default 1`] = ` class="MuiFormControl-root-id MuiTextField-root-id MuiFormControl-fullWidth-id" > @@ -151802,7 +152663,7 @@ exports[`Storyshots Views / Warehouses / Warehouse details default 1`] = ` autocomplete="off" class="MuiInputBase-input-id MuiOutlinedInput-input-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id" type="text" - value="" + value="Szwecja" />
​ @@ -152345,8 +153206,8 @@ exports[`Storyshots Views / Warehouses / Warehouse details form errors 1`] = ` class="MuiFormControl-root-id MuiTextField-root-id MuiFormControl-fullWidth-id" > @@ -152361,7 +153222,7 @@ exports[`Storyshots Views / Warehouses / Warehouse details form errors 1`] = ` autocomplete="off" class="MuiInputBase-input-id MuiOutlinedInput-input-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id" type="text" - value="" + value="Szwecja" />
​ @@ -152396,7 +153257,7 @@ exports[`Storyshots Views / Warehouses / Warehouse details form errors 1`] = `

Invalid value

From 214dcae487f5c87c4ad12d014214c8a07d2ec9af Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Thu, 9 Jul 2020 16:03:35 +0200 Subject: [PATCH 04/31] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56c31ece83f..92e6f74e821 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable, unreleased changes to this project will be documented in this file. ## [Unreleased] +- Add weight field and fix warehouse country selection - #597 by @dominik-zeglen + ## 2.10.0 - Fix minor bugs - #244 by @dominik-zeglen From 8173624fcadc0c692ffefd61e5737da7f4a7bbae Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Mon, 13 Jul 2020 11:21:52 +0200 Subject: [PATCH 05/31] Fix order note when no user was given --- src/components/Timeline/TimelineNote.tsx | 16 +- src/orders/fixtures.ts | 24 + .../__snapshots__/Stories.test.ts.snap | 980 ++++++++++++++++++ 3 files changed, 1013 insertions(+), 7 deletions(-) diff --git a/src/components/Timeline/TimelineNote.tsx b/src/components/Timeline/TimelineNote.tsx index bdeb5cdef24..28203686a01 100644 --- a/src/components/Timeline/TimelineNote.tsx +++ b/src/components/Timeline/TimelineNote.tsx @@ -79,14 +79,16 @@ export const TimelineNote: React.FC = props => { return (
- - - + {user && ( + + + + )}
- {user.email} + {user?.email} diff --git a/src/orders/fixtures.ts b/src/orders/fixtures.ts index 41279fd34cb..fe69a4a58de 100644 --- a/src/orders/fixtures.ts +++ b/src/orders/fixtures.ts @@ -825,6 +825,30 @@ export const order = (placeholder: string): OrderDetails_order => ({ email: "admin@example.com", id: "QWRkcmVzczoxNQ==" } + }, + { + __typename: "OrderEvent", + amount: null, + date: "2019-09-17T13:22:24.376193+00:00", + email: null, + emailType: null, + id: "T3JkZXJFdmVudDo0", + message: "This is note", + quantity: null, + type: OrderEventsEnum.NOTE_ADDED, + user: null + }, + { + __typename: "OrderEvent", + amount: null, + date: "2019-09-17T13:22:24.376193+00:00", + email: null, + emailType: null, + id: "T3JkZXJFdmVudDo1", + message: "This is note", + quantity: null, + type: OrderEventsEnum.NOTE_ADDED, + user: null } ], fulfillments: [ diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap index 22bf550291c..b2c87ea1465 100644 --- a/src/storybook/__snapshots__/Stories.test.ts.snap +++ b/src/storybook/__snapshots__/Stories.test.ts.snap @@ -9159,6 +9159,76 @@ exports[`Storyshots Orders / OrderHistory default 1`] = `
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
@@ -66733,6 +66803,76 @@ exports[`Storyshots Views / Orders / Order details cancelled 1`] = `
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
@@ -67729,6 +67869,76 @@ exports[`Storyshots Views / Orders / Order details default 1`] = `
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
@@ -68755,6 +68965,76 @@ exports[`Storyshots Views / Orders / Order details fulfilled 1`] = `
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
@@ -70351,6 +70631,76 @@ exports[`Storyshots Views / Orders / Order details no customer note 1`] = `
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
@@ -71377,6 +71727,76 @@ exports[`Storyshots Views / Orders / Order details no payment 1`] = `
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
@@ -72403,6 +72823,76 @@ exports[`Storyshots Views / Orders / Order details no shipping address 1`] = `
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
@@ -73429,6 +73919,76 @@ exports[`Storyshots Views / Orders / Order details partially fulfilled 1`] = `
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
@@ -74455,6 +75015,76 @@ exports[`Storyshots Views / Orders / Order details payment confirmed 1`] = `
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
@@ -75481,6 +76111,76 @@ exports[`Storyshots Views / Orders / Order details payment error 1`] = `
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
@@ -76507,6 +77207,76 @@ exports[`Storyshots Views / Orders / Order details pending payment 1`] = `
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
@@ -77533,6 +78303,76 @@ exports[`Storyshots Views / Orders / Order details refunded payment 1`] = `
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
@@ -78559,6 +79399,76 @@ exports[`Storyshots Views / Orders / Order details rejected payment 1`] = `
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
@@ -79585,6 +80495,76 @@ exports[`Storyshots Views / Orders / Order details unfulfilled 1`] = `
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
+
+
+
+
+ +
+
+
+
+
+ This is note +
+
+
+
From d5f6f27b2ccd99bab620b3a09e556eab24b8ea2d Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Mon, 13 Jul 2020 12:17:31 +0200 Subject: [PATCH 06/31] Display correct weight unit --- .../ProductTypeCreatePage/ProductTypeCreatePage.tsx | 2 +- .../ProductTypeDetailsPage/ProductTypeDetailsPage.tsx | 2 +- .../components/ProductTypeShipping/ProductTypeShipping.tsx | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/productTypes/components/ProductTypeCreatePage/ProductTypeCreatePage.tsx b/src/productTypes/components/ProductTypeCreatePage/ProductTypeCreatePage.tsx index 6616baebdb1..3a11f570569 100644 --- a/src/productTypes/components/ProductTypeCreatePage/ProductTypeCreatePage.tsx +++ b/src/productTypes/components/ProductTypeCreatePage/ProductTypeCreatePage.tsx @@ -105,7 +105,7 @@ const ProductTypeCreatePage: React.FC = ({
diff --git a/src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx b/src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx index d463824792a..1737361f904 100644 --- a/src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx +++ b/src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx @@ -199,7 +199,7 @@ const ProductTypeDetailsPage: React.FC = ({
diff --git a/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.tsx b/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.tsx index afb146aca8d..cb8ca105f45 100644 --- a/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.tsx +++ b/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.tsx @@ -6,21 +6,20 @@ import { useIntl } from "react-intl"; import CardTitle from "@saleor/components/CardTitle"; import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; -import { WeightUnitsEnum } from "../../../types/globalTypes"; interface ProductTypeShippingProps { data: { isShippingRequired: boolean; weight: number | null; }; - defaultWeightUnit: WeightUnitsEnum; + weightUnit: string; disabled: boolean; onChange: (event: React.ChangeEvent) => void; } const ProductTypeShipping: React.FC = ({ data, - defaultWeightUnit, + weightUnit, disabled, onChange }) => { @@ -48,7 +47,7 @@ const ProductTypeShipping: React.FC = ({ {data.isShippingRequired && ( Date: Mon, 13 Jul 2020 12:26:15 +0200 Subject: [PATCH 07/31] Update messages --- locale/defaultMessages.json | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index efb38228937..c26dac2b1bd 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -3606,6 +3606,14 @@ "src_dot_products_dot_components_dot_ProductPricing_dot_3015886868": { "string": "Charge taxes for this item" }, + "src_dot_products_dot_components_dot_ProductShipping_dot_1325966144": { + "context": "product shipping", + "string": "Shipping" + }, + "src_dot_products_dot_components_dot_ProductShipping_dot_746695941": { + "context": "product weight", + "string": "Weight" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_2585918415": { "string": "SKU (Stock Keeping Unit)" }, @@ -3643,14 +3651,6 @@ "src_dot_products_dot_components_dot_ProductUpdatePage_dot_2706108815": { "string": "Add search engine title and description to make this product easier to find" }, - "src_dot_products_dot_components_dot_ProductVariantAttributes_dot_1536841622": { - "context": "product attribute error", - "string": "All attributes should have value" - }, - "src_dot_products_dot_components_dot_ProductVariantAttributes_dot_258966189": { - "context": "product attribute error", - "string": "This variant already exists" - }, "src_dot_products_dot_components_dot_ProductVariantCreatePage_dot_2853608829": { "context": "button", "string": "Save variant" @@ -5032,6 +5032,10 @@ "src_dot_utils_dot_errors_dot_attributeCannotBeAssigned": { "string": "This attribute cannot be assigned to this product type" }, + "src_dot_utils_dot_errors_dot_attributeRequired": { + "context": "product attribute error", + "string": "All attributes should have value" + }, "src_dot_utils_dot_errors_dot_attributeVariantsDisabled": { "string": "Variants are disabled in this product type" }, @@ -5136,6 +5140,10 @@ "src_dot_utils_dot_errors_dot_variantNoDigitalContent": { "string": "This variant does not have any digital content" }, + "src_dot_utils_dot_errors_dot_variantUnique": { + "context": "product attribute error", + "string": "This variant already exists" + }, "src_dot_vouchers": { "context": "vouchers section name", "string": "Vouchers" From ff7a6ef58123033866505a07078287eef2b14e6d Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Mon, 13 Jul 2020 16:44:59 +0200 Subject: [PATCH 08/31] Fix weight based rate update --- .../views/ShippingZoneDetails/data.ts | 54 ++++++++++++------- .../views/ShippingZoneDetails/index.tsx | 10 +++- 2 files changed, 43 insertions(+), 21 deletions(-) diff --git a/src/shipping/views/ShippingZoneDetails/data.ts b/src/shipping/views/ShippingZoneDetails/data.ts index 0aadca15cba..48867c1a3a5 100644 --- a/src/shipping/views/ShippingZoneDetails/data.ts +++ b/src/shipping/views/ShippingZoneDetails/data.ts @@ -2,8 +2,13 @@ import { ShippingZoneUrlQueryParams } from "@saleor/shipping/urls"; import { ShippingMethodTypeEnum } from "@saleor/types/globalTypes"; import { UpdateShippingRateVariables } from "@saleor/shipping/types/UpdateShippingRate"; import { CreateShippingRateVariables } from "@saleor/shipping/types/CreateShippingRate"; +import { ShippingZone_shippingZone_shippingMethods } from "@saleor/shipping/types/ShippingZone"; import { FormData as ShippingZoneRateDialogFormData } from "../../components/ShippingZoneRateDialog"; +function getValue(value: string, hasLimits: boolean): number | null { + return hasLimits ? null : parseFloat(value); +} + export function getCreateShippingRateVariables( data: ShippingZoneRateDialogFormData, params: ShippingZoneUrlQueryParams, @@ -13,28 +18,20 @@ export function getCreateShippingRateVariables( input: { maximumOrderPrice: params.type === ShippingMethodTypeEnum.PRICE - ? data.noLimits - ? null - : parseFloat(data.maxValue) + ? getValue(data.maxValue, data.noLimits) : null, maximumOrderWeight: params.type === ShippingMethodTypeEnum.WEIGHT - ? data.noLimits - ? null - : parseFloat(data.maxValue) + ? getValue(data.maxValue, data.noLimits) : null, minimumOrderPrice: params.type === ShippingMethodTypeEnum.PRICE - ? data.noLimits - ? null - : parseFloat(data.minValue) + ? getValue(data.maxValue, data.noLimits) : null, minimumOrderWeight: params.type === ShippingMethodTypeEnum.WEIGHT - ? data.noLimits - ? null - : parseFloat(data.minValue) + ? getValue(data.minValue, data.noLimits) : null, name: data.name, price: data.isFree ? 0 : parseFloat(data.price), @@ -46,17 +43,36 @@ export function getCreateShippingRateVariables( export function getUpdateShippingRateVariables( data: ShippingZoneRateDialogFormData, - params: ShippingZoneUrlQueryParams, - id: string + shippingRate: ShippingZone_shippingZone_shippingMethods, + shippingZoneId: string ): UpdateShippingRateVariables { - return { - id: params.id, + const base: UpdateShippingRateVariables = { + id: shippingRate.id, input: { - maximumOrderPrice: data.noLimits ? null : parseFloat(data.maxValue), - minimumOrderPrice: data.noLimits ? null : parseFloat(data.minValue), name: data.name, price: data.isFree ? 0 : parseFloat(data.price), - shippingZone: id + shippingZone: shippingZoneId, + type: shippingRate.type + } + }; + + if (shippingRate.type === ShippingMethodTypeEnum.PRICE) { + return { + ...base, + input: { + ...base.input, + maximumOrderPrice: getValue(data.maxValue, data.noLimits), + minimumOrderPrice: getValue(data.minValue, data.noLimits) + } + }; + } + + return { + ...base, + input: { + ...base.input, + maximumOrderWeight: getValue(data.maxValue, data.noLimits), + minimumOrderWeight: getValue(data.minValue, data.noLimits) } }; } diff --git a/src/shipping/views/ShippingZoneDetails/index.tsx b/src/shipping/views/ShippingZoneDetails/index.tsx index 5bb5f67917b..b8be6523a44 100644 --- a/src/shipping/views/ShippingZoneDetails/index.tsx +++ b/src/shipping/views/ShippingZoneDetails/index.tsx @@ -221,9 +221,15 @@ const ShippingZoneDetails: React.FC = ({ disabled={updateShippingRateOpts.loading} errors={updateShippingRateOpts.data?.shippingPriceUpdate.errors || []} onClose={closeModal} - onSubmit={data => + onSubmit={submitData => updateShippingRate({ - variables: getUpdateShippingRateVariables(data, params, id) + variables: getUpdateShippingRateVariables( + submitData, + data?.shippingZone?.shippingMethods.find( + shippingMethod => shippingMethod.id === params.id + ), + id + ) }) } open={params.action === "edit-rate"} From 6b08630f1e8c9d9e945091ca934e1f12cdc334b4 Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Mon, 13 Jul 2020 16:47:19 +0200 Subject: [PATCH 09/31] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92e6f74e821..779939f935f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable, unreleased changes to this project will be documented in this file. ## [Unreleased] - Add weight field and fix warehouse country selection - #597 by @dominik-zeglen +- Fix weight based rate update - #604 by @dominik-zeglen ## 2.10.0 From 0d9f8662299a98de4c89bbdf5b8142a0e1790bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20G=C4=99bala?= Date: Mon, 13 Jul 2020 17:19:29 +0200 Subject: [PATCH 10/31] Bump to 2.10.1 --- CHANGELOG.md | 2 ++ README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 779939f935f..6c61104ad17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable, unreleased changes to this project will be documented in this file. ## [Unreleased] +## 2.10.1 + - Add weight field and fix warehouse country selection - #597 by @dominik-zeglen - Fix weight based rate update - #604 by @dominik-zeglen diff --git a/README.md b/README.md index 24fa36f56c1..62bc5ce0115 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ $ cd saleor-dashboard To use the official stable release, checkout to a release tag: ``` -$ git checkout 2.10.0 +$ git checkout 2.10.1 ``` See the list of all releases here: https://github.com/mirumee/saleor-dashboard/releases/ diff --git a/package-lock.json b/package-lock.json index 0acae4294d3..c4de74a1b6a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "saleor-dashboard", - "version": "2.10.0", + "version": "2.10.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 0d18f52dca1..9a835104564 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "saleor-dashboard", - "version": "2.10.0", + "version": "2.10.1", "main": "src/index.tsx", "repository": { "type": "git", From 8a80f3dd4db7f92a6a4174d78937e3d8f6d2c912 Mon Sep 17 00:00:00 2001 From: Magdalena Markusik Date: Thu, 17 Sep 2020 16:06:13 +0200 Subject: [PATCH 11/31] Add slug field for page details wip --- src/components/SeoForm/SeoForm.tsx | 33 +++++++++++++++++++ .../PageDetailsPage/PageDetailsPage.tsx | 7 +--- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/src/components/SeoForm/SeoForm.tsx b/src/components/SeoForm/SeoForm.tsx index d2d753825eb..77e7ffc2ea7 100644 --- a/src/components/SeoForm/SeoForm.tsx +++ b/src/components/SeoForm/SeoForm.tsx @@ -81,6 +81,7 @@ const SeoForm: React.FC = props => { helperText, loading, title, + slug, titlePlaceholder, onChange } = props; @@ -115,6 +116,38 @@ const SeoForm: React.FC = props => { )} {expanded && (
+ +
+ +
+ {title.length > 0 && ( + + + + )} +
+ } + helperText={intl.formatMessage({ + defaultMessage: + "If empty, the preview shows what will be autogenerated." + })} + value={title.slice(0, 69)} + disabled={loading || disabled} + placeholder="Slug" + onChange={onChange} + fullWidth + /> + = ({ />
- Date: Fri, 18 Sep 2020 16:40:48 +0200 Subject: [PATCH 12/31] fixes afer merge --- .../CategoryCreatePage/CategoryCreatePage.tsx | 6 +++++- .../CategoryUpdatePage/CategoryUpdatePage.tsx | 8 ++++++-- src/categories/types/CategoryCreate.ts | 1 + src/categories/types/CategoryDetails.ts | 1 + src/categories/types/CategoryUpdate.ts | 1 + .../CollectionCreatePage.tsx | 6 +++++- .../CollectionDetailsPage.tsx | 6 +++++- src/collections/types/CollectionDetails.ts | 1 + src/collections/types/CollectionUpdate.ts | 1 + .../types/CollectionUpdateWithHomepage.ts | 1 + src/collections/types/CreateCollection.ts | 1 + src/components/SeoForm/SeoForm.tsx | 20 ++++++++++++------- src/fragments/categories.ts | 1 + src/fragments/collections.ts | 1 + src/fragments/products.ts | 1 + .../types/CategoryDetailsFragment.ts | 1 + .../types/CollectionDetailsFragment.ts | 1 + src/fragments/types/Product.ts | 1 + .../PageDetailsPage/PageDetailsPage.tsx | 4 ++-- .../ProductCreatePage/ProductCreatePage.tsx | 4 ++++ .../ProductUpdatePage/ProductUpdatePage.tsx | 2 ++ src/products/types/ProductCreate.ts | 1 + src/products/types/ProductDetails.ts | 1 + src/products/types/ProductImageCreate.ts | 1 + src/products/types/ProductImageUpdate.ts | 1 + src/products/types/ProductUpdate.ts | 2 ++ src/products/types/SimpleProductUpdate.ts | 1 + src/products/utils/data.ts | 2 ++ 28 files changed, 64 insertions(+), 14 deletions(-) diff --git a/src/categories/components/CategoryCreatePage/CategoryCreatePage.tsx b/src/categories/components/CategoryCreatePage/CategoryCreatePage.tsx index 202abe4045c..4659a834073 100644 --- a/src/categories/components/CategoryCreatePage/CategoryCreatePage.tsx +++ b/src/categories/components/CategoryCreatePage/CategoryCreatePage.tsx @@ -19,6 +19,7 @@ import CategoryDetailsForm from "../../components/CategoryDetailsForm"; export interface FormData extends MetadataFormData { description: RawDraftContentState; name: string; + slug: string; seoTitle: string; seoDescription: string; } @@ -29,7 +30,8 @@ const initialData: FormData = { name: "", privateMetadata: [], seoDescription: "", - seoTitle: "" + seoTitle: "", + slug: "" }; export interface CategoryCreatePageProps { @@ -81,6 +83,8 @@ export const CategoryCreatePage: React.FC = ({ defaultMessage: "Add search engine title and description to make this category easier to find" })} + slug={data.slug} + slugPlaceholder={data.name} title={data.seoTitle} titlePlaceholder={data.name} description={data.seoDescription} diff --git a/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx b/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx index 7b64d842d2a..9acb198a842 100644 --- a/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx +++ b/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx @@ -118,7 +118,8 @@ export const CategoryUpdatePage: React.FC = ({ name: category.name || "", privateMetadata: category?.privateMetadata?.map(mapMetadataItemToInput), seoDescription: category.seoDescription || "", - seoTitle: category.seoTitle || "" + seoTitle: category.seoTitle || "", + slug: category?.slug || "" } : { backgroundImageAlt: "", @@ -127,7 +128,8 @@ export const CategoryUpdatePage: React.FC = ({ name: "", privateMetadata: undefined, seoDescription: "", - seoTitle: "" + seoTitle: "", + slug: "" }; const handleSubmit = (data: FormData) => { @@ -179,6 +181,8 @@ export const CategoryUpdatePage: React.FC = ({ titlePlaceholder={data.name} description={data.seoDescription} descriptionPlaceholder={data.name} + slug={data.slug} + slugPlaceholder={data.name} loading={!category} onChange={change} disabled={disabled} diff --git a/src/categories/types/CategoryCreate.ts b/src/categories/types/CategoryCreate.ts index 21991ef8dfb..a7f5336e77e 100644 --- a/src/categories/types/CategoryCreate.ts +++ b/src/categories/types/CategoryCreate.ts @@ -38,6 +38,7 @@ export interface CategoryCreate_categoryCreate_category { privateMetadata: (CategoryCreate_categoryCreate_category_privateMetadata | null)[]; backgroundImage: CategoryCreate_categoryCreate_category_backgroundImage | null; name: string; + slug: string; descriptionJson: any; seoDescription: string | null; seoTitle: string | null; diff --git a/src/categories/types/CategoryDetails.ts b/src/categories/types/CategoryDetails.ts index 5cf7baa0805..d6ce553eb39 100644 --- a/src/categories/types/CategoryDetails.ts +++ b/src/categories/types/CategoryDetails.ts @@ -147,6 +147,7 @@ export interface CategoryDetails_category { privateMetadata: (CategoryDetails_category_privateMetadata | null)[]; backgroundImage: CategoryDetails_category_backgroundImage | null; name: string; + slug: string; descriptionJson: any; seoDescription: string | null; seoTitle: string | null; diff --git a/src/categories/types/CategoryUpdate.ts b/src/categories/types/CategoryUpdate.ts index 1be777c04c0..2a7bb442929 100644 --- a/src/categories/types/CategoryUpdate.ts +++ b/src/categories/types/CategoryUpdate.ts @@ -38,6 +38,7 @@ export interface CategoryUpdate_categoryUpdate_category { privateMetadata: (CategoryUpdate_categoryUpdate_category_privateMetadata | null)[]; backgroundImage: CategoryUpdate_categoryUpdate_category_backgroundImage | null; name: string; + slug: string; descriptionJson: any; seoDescription: string | null; seoTitle: string | null; diff --git a/src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx b/src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx index f31998883a9..6e2e31427da 100644 --- a/src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx +++ b/src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx @@ -28,6 +28,7 @@ export interface CollectionCreatePageFormData extends MetadataFormData { backgroundImageAlt: string; description: RawDraftContentState; name: string; + slug: string; publicationDate: string; isPublished: boolean; seoDescription: string; @@ -55,7 +56,8 @@ const initialForm: CollectionCreatePageFormData = { privateMetadata: [], publicationDate: "", seoDescription: "", - seoTitle: "" + seoTitle: "", + slug: "" }; const CollectionCreatePage: React.FC = ({ @@ -140,6 +142,8 @@ const CollectionCreatePage: React.FC = ({ defaultMessage: "Add search engine title and description to make this collection easier to find" })} + slug={data.slug} + slugPlaceholder={data.name} title={data.seoTitle} titlePlaceholder={data.name} onChange={change} diff --git a/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx b/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx index 8fba3282d80..a86fb1c05b1 100644 --- a/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx +++ b/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx @@ -33,6 +33,7 @@ export interface CollectionDetailsPageFormData extends MetadataFormData { backgroundImageAlt: string; description: RawDraftContentState; name: string; + slug: string; publicationDate: string; seoDescription: string; seoTitle: string; @@ -101,7 +102,8 @@ const CollectionDetailsPage: React.FC = ({ ), publicationDate: maybe(() => collection.publicationDate, ""), seoDescription: maybe(() => collection.seoDescription, ""), - seoTitle: maybe(() => collection.seoTitle, "") + seoTitle: maybe(() => collection.seoTitle, ""), + slug: collection.slug || "" }} onSubmit={handleSubmit} confirmLeave @@ -149,6 +151,8 @@ const CollectionDetailsPage: React.FC = ({ defaultMessage: "Add search engine title and description to make this collection easier to find" })} + slug={data.slug} + slugPlaceholder={data.name} title={data.seoTitle} titlePlaceholder={maybe(() => collection.name)} onChange={change} diff --git a/src/collections/types/CollectionDetails.ts b/src/collections/types/CollectionDetails.ts index f46367d6a20..1746d93fc35 100644 --- a/src/collections/types/CollectionDetails.ts +++ b/src/collections/types/CollectionDetails.ts @@ -71,6 +71,7 @@ export interface CollectionDetails_collection { metadata: (CollectionDetails_collection_metadata | null)[]; privateMetadata: (CollectionDetails_collection_privateMetadata | null)[]; backgroundImage: CollectionDetails_collection_backgroundImage | null; + slug: string; descriptionJson: any; publicationDate: any | null; seoDescription: string | null; diff --git a/src/collections/types/CollectionUpdate.ts b/src/collections/types/CollectionUpdate.ts index a3b85081f31..f390dd7beb8 100644 --- a/src/collections/types/CollectionUpdate.ts +++ b/src/collections/types/CollectionUpdate.ts @@ -34,6 +34,7 @@ export interface CollectionUpdate_collectionUpdate_collection { metadata: (CollectionUpdate_collectionUpdate_collection_metadata | null)[]; privateMetadata: (CollectionUpdate_collectionUpdate_collection_privateMetadata | null)[]; backgroundImage: CollectionUpdate_collectionUpdate_collection_backgroundImage | null; + slug: string; descriptionJson: any; publicationDate: any | null; seoDescription: string | null; diff --git a/src/collections/types/CollectionUpdateWithHomepage.ts b/src/collections/types/CollectionUpdateWithHomepage.ts index d034e7cfe15..7c982190fb0 100644 --- a/src/collections/types/CollectionUpdateWithHomepage.ts +++ b/src/collections/types/CollectionUpdateWithHomepage.ts @@ -56,6 +56,7 @@ export interface CollectionUpdateWithHomepage_collectionUpdate_collection { metadata: (CollectionUpdateWithHomepage_collectionUpdate_collection_metadata | null)[]; privateMetadata: (CollectionUpdateWithHomepage_collectionUpdate_collection_privateMetadata | null)[]; backgroundImage: CollectionUpdateWithHomepage_collectionUpdate_collection_backgroundImage | null; + slug: string; descriptionJson: any; publicationDate: any | null; seoDescription: string | null; diff --git a/src/collections/types/CreateCollection.ts b/src/collections/types/CreateCollection.ts index 7f1646436d8..efb28ca4b6d 100644 --- a/src/collections/types/CreateCollection.ts +++ b/src/collections/types/CreateCollection.ts @@ -34,6 +34,7 @@ export interface CreateCollection_collectionCreate_collection { metadata: (CreateCollection_collectionCreate_collection_metadata | null)[]; privateMetadata: (CreateCollection_collectionCreate_collection_privateMetadata | null)[]; backgroundImage: CreateCollection_collectionCreate_collection_backgroundImage | null; + slug: string; descriptionJson: any; publicationDate: any | null; seoDescription: string | null; diff --git a/src/components/SeoForm/SeoForm.tsx b/src/components/SeoForm/SeoForm.tsx index 77e7ffc2ea7..dfe4bc587ec 100644 --- a/src/components/SeoForm/SeoForm.tsx +++ b/src/components/SeoForm/SeoForm.tsx @@ -7,6 +7,7 @@ import Typography from "@material-ui/core/Typography"; import classNames from "classnames"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; +import slugify from "slugify"; import CardTitle from "../CardTitle"; import FormSpacer from "../FormSpacer"; @@ -68,6 +69,8 @@ interface SeoFormProps { loading?: boolean; helperText?: string; title: string; + slug: string; + slugPlaceholder?: string; titlePlaceholder: string; onChange(event: any); onClick?(); @@ -75,13 +78,14 @@ interface SeoFormProps { const SeoForm: React.FC = props => { const { - description, + description = "", descriptionPlaceholder, disabled, helperText, loading, - title, + title = "", slug, + slugPlaceholder = "", titlePlaceholder, onChange } = props; @@ -90,7 +94,9 @@ const SeoForm: React.FC = props => { const intl = useIntl(); const [expanded, setExpansionStatus] = React.useState(false); const toggleExpansion = () => setExpansionStatus(!expanded); + const shouldDisplayHelperText = () => helperText && !expanded; + console.log({ slug }); return ( = props => { } /> - {helperText && ( + {shouldDisplayHelperText() && ( @@ -123,14 +129,14 @@ const SeoForm: React.FC = props => {
- {title.length > 0 && ( + {slug?.length > 0 && ( @@ -141,9 +147,9 @@ const SeoForm: React.FC = props => { defaultMessage: "If empty, the preview shows what will be autogenerated." })} - value={title.slice(0, 69)} + value={slug.slice(0, 69)} disabled={loading || disabled} - placeholder="Slug" + placeholder={slug || slugify(slugPlaceholder)} onChange={onChange} fullWidth /> diff --git a/src/fragments/categories.ts b/src/fragments/categories.ts index 3eebe58d9d7..5545d622058 100644 --- a/src/fragments/categories.ts +++ b/src/fragments/categories.ts @@ -24,6 +24,7 @@ export const categoryDetailsFragment = gql` url } name + slug descriptionJson seoDescription seoTitle diff --git a/src/fragments/collections.ts b/src/fragments/collections.ts index a27129ce319..984db729b96 100644 --- a/src/fragments/collections.ts +++ b/src/fragments/collections.ts @@ -20,6 +20,7 @@ export const collectionDetailsFragment = gql` alt url } + slug descriptionJson publicationDate seoDescription diff --git a/src/fragments/products.ts b/src/fragments/products.ts index 1b651dfddc0..7df94e52783 100644 --- a/src/fragments/products.ts +++ b/src/fragments/products.ts @@ -111,6 +111,7 @@ export const productFragmentDetails = gql` ...ProductVariantAttributesFragment ...MetadataFragment name + slug descriptionJson seoTitle seoDescription diff --git a/src/fragments/types/CategoryDetailsFragment.ts b/src/fragments/types/CategoryDetailsFragment.ts index 49e5640ea02..e1b2d5fbb72 100644 --- a/src/fragments/types/CategoryDetailsFragment.ts +++ b/src/fragments/types/CategoryDetailsFragment.ts @@ -36,6 +36,7 @@ export interface CategoryDetailsFragment { privateMetadata: (CategoryDetailsFragment_privateMetadata | null)[]; backgroundImage: CategoryDetailsFragment_backgroundImage | null; name: string; + slug: string; descriptionJson: any; seoDescription: string | null; seoTitle: string | null; diff --git a/src/fragments/types/CollectionDetailsFragment.ts b/src/fragments/types/CollectionDetailsFragment.ts index d2dc154a81c..0464eb6e77a 100644 --- a/src/fragments/types/CollectionDetailsFragment.ts +++ b/src/fragments/types/CollectionDetailsFragment.ts @@ -32,6 +32,7 @@ export interface CollectionDetailsFragment { metadata: (CollectionDetailsFragment_metadata | null)[]; privateMetadata: (CollectionDetailsFragment_privateMetadata | null)[]; backgroundImage: CollectionDetailsFragment_backgroundImage | null; + slug: string; descriptionJson: any; publicationDate: any | null; seoDescription: string | null; diff --git a/src/fragments/types/Product.ts b/src/fragments/types/Product.ts index 6921ecc6788..0ae50c5df46 100644 --- a/src/fragments/types/Product.ts +++ b/src/fragments/types/Product.ts @@ -195,6 +195,7 @@ export interface Product { metadata: (Product_metadata | null)[]; privateMetadata: (Product_privateMetadata | null)[]; name: string; + slug: string; descriptionJson: any; seoTitle: string | null; seoDescription: string | null; diff --git a/src/pages/components/PageDetailsPage/PageDetailsPage.tsx b/src/pages/components/PageDetailsPage/PageDetailsPage.tsx index 6176562fa28..95f0bfb4316 100644 --- a/src/pages/components/PageDetailsPage/PageDetailsPage.tsx +++ b/src/pages/components/PageDetailsPage/PageDetailsPage.tsx @@ -23,7 +23,6 @@ import { useIntl } from "react-intl"; import { maybe } from "../../../misc"; import { PageDetails_page } from "../../types/PageDetails"; import PageInfo from "../PageInfo"; -import PageSlug from "../PageSlug"; export interface FormData { content: RawDraftContentState; @@ -31,7 +30,6 @@ export interface FormData { publicationDate: string; seoDescription: string; seoTitle: string; - seoSlug: string; slug: string; title: string; } @@ -108,6 +106,8 @@ const PageDetailsPage: React.FC = ({ "" )} onChange={change} + slug={data.slug} + slugPlaceholder={data.title} title={data.seoTitle} titlePlaceholder={data.title} helperText={intl.formatMessage({ diff --git a/src/products/components/ProductCreatePage/ProductCreatePage.tsx b/src/products/components/ProductCreatePage/ProductCreatePage.tsx index d96f30343e2..03ab907ab5f 100644 --- a/src/products/components/ProductCreatePage/ProductCreatePage.tsx +++ b/src/products/components/ProductCreatePage/ProductCreatePage.tsx @@ -59,6 +59,7 @@ interface FormData extends MetadataFormData { isAvailableForPurchase: boolean; isPublished: boolean; name: string; + slug: string; productType: string; seoDescription: string; seoTitle: string; @@ -156,6 +157,7 @@ export const ProductCreatePage: React.FC = ({ isPublished: false, metadata: [], name: "", + slug: "", privateMetadata: [], productType: "", publicationDate: "", @@ -309,6 +311,8 @@ export const ProductCreatePage: React.FC = ({ "Add search engine title and description to make this product easier to find" })} title={data.seoTitle} + slug={data.slug} + slugPlaceholder={data.name} titlePlaceholder={data.name} description={data.seoDescription} descriptionPlaceholder={data.seoTitle} diff --git a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx index d3be9d79ecd..3c5cb9ded58 100644 --- a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx +++ b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx @@ -357,6 +357,8 @@ export const ProductUpdatePage: React.FC = ({ .getPlainText() .slice(0, 300) )} + slug={data.slug} + slugPlaceholder={data.name} loading={disabled} onClick={onSeoClick} onChange={change} diff --git a/src/products/types/ProductCreate.ts b/src/products/types/ProductCreate.ts index 68c154d9151..b8dd2ca599e 100644 --- a/src/products/types/ProductCreate.ts +++ b/src/products/types/ProductCreate.ts @@ -201,6 +201,7 @@ export interface ProductCreate_productCreate_product { metadata: (ProductCreate_productCreate_product_metadata | null)[]; privateMetadata: (ProductCreate_productCreate_product_privateMetadata | null)[]; name: string; + slug: string; descriptionJson: any; seoTitle: string | null; seoDescription: string | null; diff --git a/src/products/types/ProductDetails.ts b/src/products/types/ProductDetails.ts index 06e579bae1b..094ac6d5c0d 100644 --- a/src/products/types/ProductDetails.ts +++ b/src/products/types/ProductDetails.ts @@ -195,6 +195,7 @@ export interface ProductDetails_product { metadata: (ProductDetails_product_metadata | null)[]; privateMetadata: (ProductDetails_product_privateMetadata | null)[]; name: string; + slug: string; descriptionJson: any; seoTitle: string | null; seoDescription: string | null; diff --git a/src/products/types/ProductImageCreate.ts b/src/products/types/ProductImageCreate.ts index 9c472c55681..06243ea4e2c 100644 --- a/src/products/types/ProductImageCreate.ts +++ b/src/products/types/ProductImageCreate.ts @@ -201,6 +201,7 @@ export interface ProductImageCreate_productImageCreate_product { metadata: (ProductImageCreate_productImageCreate_product_metadata | null)[]; privateMetadata: (ProductImageCreate_productImageCreate_product_privateMetadata | null)[]; name: string; + slug: string; descriptionJson: any; seoTitle: string | null; seoDescription: string | null; diff --git a/src/products/types/ProductImageUpdate.ts b/src/products/types/ProductImageUpdate.ts index e858997256b..1931b23e788 100644 --- a/src/products/types/ProductImageUpdate.ts +++ b/src/products/types/ProductImageUpdate.ts @@ -201,6 +201,7 @@ export interface ProductImageUpdate_productImageUpdate_product { metadata: (ProductImageUpdate_productImageUpdate_product_metadata | null)[]; privateMetadata: (ProductImageUpdate_productImageUpdate_product_privateMetadata | null)[]; name: string; + slug: string; descriptionJson: any; seoTitle: string | null; seoDescription: string | null; diff --git a/src/products/types/ProductUpdate.ts b/src/products/types/ProductUpdate.ts index f036044809a..c94b1772ab0 100644 --- a/src/products/types/ProductUpdate.ts +++ b/src/products/types/ProductUpdate.ts @@ -201,6 +201,7 @@ export interface ProductUpdate_productUpdate_product { metadata: (ProductUpdate_productUpdate_product_metadata | null)[]; privateMetadata: (ProductUpdate_productUpdate_product_privateMetadata | null)[]; name: string; + slug: string; descriptionJson: any; seoTitle: string | null; seoDescription: string | null; @@ -236,6 +237,7 @@ export interface ProductUpdateVariables { publicationDate?: any | null; category?: string | null; chargeTaxes: boolean; + slug?: string | null; collections?: (string | null)[] | null; descriptionJson?: any | null; isPublished: boolean; diff --git a/src/products/types/SimpleProductUpdate.ts b/src/products/types/SimpleProductUpdate.ts index e023f09b16c..c83e36fed3c 100644 --- a/src/products/types/SimpleProductUpdate.ts +++ b/src/products/types/SimpleProductUpdate.ts @@ -201,6 +201,7 @@ export interface SimpleProductUpdate_productUpdate_product { metadata: (SimpleProductUpdate_productUpdate_product_metadata | null)[]; privateMetadata: (SimpleProductUpdate_productUpdate_product_privateMetadata | null)[]; name: string; + slug: string; descriptionJson: any; seoTitle: string | null; seoDescription: string | null; diff --git a/src/products/utils/data.ts b/src/products/utils/data.ts index 28eab8a182d..ec378a288ae 100644 --- a/src/products/utils/data.ts +++ b/src/products/utils/data.ts @@ -181,6 +181,7 @@ export interface ProductUpdatePageFormData extends MetadataFormData { isAvailable: boolean; isPublished: boolean; name: string; + slug: string; publicationDate: string; seoDescription: string; seoTitle: string; @@ -222,6 +223,7 @@ export function getProductUpdatePageFormData( : undefined, "" ), + slug: product?.slug || "", trackInventory: !!product?.variants[0]?.trackInventory, visibleInListings: !!product?.visibleInListings, weight: product?.weight?.value.toString() || "" From 52cf01ed729dcdbdf5ce5cecd7e868c21e7a1a46 Mon Sep 17 00:00:00 2001 From: Magdalena Markusik Date: Mon, 21 Sep 2020 12:00:53 +0200 Subject: [PATCH 13/31] update mutation and fixtures --- src/categories/fixtures.ts | 3 ++- src/collections/fixtures.ts | 3 ++- src/components/SeoForm/SeoForm.tsx | 1 - src/products/fixtures.ts | 1 + src/products/types/ProductUpdate.ts | 1 - src/products/views/ProductUpdate/handlers.ts | 1 + 6 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/categories/fixtures.ts b/src/categories/fixtures.ts index d51e93b9366..ddc277a83af 100644 --- a/src/categories/fixtures.ts +++ b/src/categories/fixtures.ts @@ -511,7 +511,8 @@ export const category: ( } }, seoDescription: null, - seoTitle: null + seoTitle: null, + slug: "coffees" }); export const errors = [ { diff --git a/src/collections/fixtures.ts b/src/collections/fixtures.ts index 0119379c88f..f604aa19938 100644 --- a/src/collections/fixtures.ts +++ b/src/collections/fixtures.ts @@ -167,5 +167,6 @@ export const collection: ( }, publicationDate: "2018-08-25T18:45:54.125Z", seoDescription: "", - seoTitle: "" + seoTitle: "", + slug: "summer-collection" }); diff --git a/src/components/SeoForm/SeoForm.tsx b/src/components/SeoForm/SeoForm.tsx index dfe4bc587ec..9217a9cddde 100644 --- a/src/components/SeoForm/SeoForm.tsx +++ b/src/components/SeoForm/SeoForm.tsx @@ -96,7 +96,6 @@ const SeoForm: React.FC = props => { const toggleExpansion = () => setExpansionStatus(!expanded); const shouldDisplayHelperText = () => helperText && !expanded; - console.log({ slug }); return ( Date: Mon, 21 Sep 2020 12:24:11 +0200 Subject: [PATCH 14/31] update product create mutation create handler --- src/products/mutations.ts | 4 ++++ src/products/types/ProductCreate.ts | 1 + src/products/types/ProductUpdate.ts | 1 + src/products/views/ProductCreate.tsx | 1 + 4 files changed, 7 insertions(+) diff --git a/src/products/mutations.ts b/src/products/mutations.ts index 12d6d4de3a2..82261363907 100644 --- a/src/products/mutations.ts +++ b/src/products/mutations.ts @@ -145,6 +145,7 @@ export const productUpdateMutation = gql` $name: String $basePrice: PositiveDecimal $seo: SeoInput + $slug: String $visibleInListings: Boolean ) { productUpdate( @@ -160,6 +161,7 @@ export const productUpdateMutation = gql` name: $name basePrice: $basePrice seo: $seo + slug: $slug visibleInListings: $visibleInListings } ) { @@ -291,6 +293,7 @@ export const productCreateMutation = gql` $productType: ID! $sku: String $seo: SeoInput + $slug: String $stocks: [StockInput!]! $trackInventory: Boolean! $weight: WeightScalar @@ -310,6 +313,7 @@ export const productCreateMutation = gql` productType: $productType sku: $sku seo: $seo + slug: $slug stocks: $stocks trackInventory: $trackInventory weight: $weight diff --git a/src/products/types/ProductCreate.ts b/src/products/types/ProductCreate.ts index b8dd2ca599e..cd92d5e9f70 100644 --- a/src/products/types/ProductCreate.ts +++ b/src/products/types/ProductCreate.ts @@ -244,6 +244,7 @@ export interface ProductCreateVariables { productType: string; sku?: string | null; seo?: SeoInput | null; + slug?: string | null; stocks: StockInput[]; trackInventory: boolean; weight?: any | null; diff --git a/src/products/types/ProductUpdate.ts b/src/products/types/ProductUpdate.ts index 6a10c903bcc..97c82d5336e 100644 --- a/src/products/types/ProductUpdate.ts +++ b/src/products/types/ProductUpdate.ts @@ -243,5 +243,6 @@ export interface ProductUpdateVariables { name?: string | null; basePrice?: any | null; seo?: SeoInput | null; + slug?: string | null; visibleInListings?: boolean | null; } diff --git a/src/products/views/ProductCreate.tsx b/src/products/views/ProductCreate.tsx index 24d06a9da9e..2ed4172ef61 100644 --- a/src/products/views/ProductCreate.tsx +++ b/src/products/views/ProductCreate.tsx @@ -95,6 +95,7 @@ export const ProductCreateView: React.FC = () => { title: formData.seoTitle }, sku: formData.sku, + slug: formData.slug, stocks: formData.stocks.map(stock => ({ quantity: parseInt(stock.value, 0), warehouse: stock.id From 37e0ecce261ee8221742d282e8a70e359e21310d Mon Sep 17 00:00:00 2001 From: Magdalena Markusik Date: Mon, 21 Sep 2020 12:47:03 +0200 Subject: [PATCH 15/31] add slug field to category update and create --- schema.graphql | 2605 +++++++++++++++---- src/categories/views/CategoryCreate.tsx | 3 +- src/categories/views/CategoryDetails.tsx | 3 +- src/collections/views/CollectionDetails.tsx | 3 +- src/types/globalTypes.ts | 2 +- 5 files changed, 2141 insertions(+), 475 deletions(-) diff --git a/schema.graphql b/schema.graphql index e2953571b50..eacfcc2e889 100644 --- a/schema.graphql +++ b/schema.graphql @@ -4,28 +4,40 @@ schema { } type AccountAddressCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) user: User accountErrors: [AccountError!]! address: Address } type AccountAddressDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) user: User accountErrors: [AccountError!]! address: Address } type AccountAddressUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) user: User accountErrors: [AccountError!]! address: Address } type AccountDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) accountErrors: [AccountError!]! user: User } @@ -77,7 +89,10 @@ input AccountInput { } type AccountRegister { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) requiresConfirmation: Boolean accountErrors: [AccountError!]! user: User @@ -90,24 +105,36 @@ input AccountRegisterInput { } type AccountRequestDeletion { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) accountErrors: [AccountError!]! } type AccountSetDefaultAddress { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) user: User accountErrors: [AccountError!]! } type AccountUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) accountErrors: [AccountError!]! user: User } type AccountUpdateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) accountErrors: [AccountError!]! user: User } @@ -130,14 +157,20 @@ type Address implements Node { } type AddressCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) user: User accountErrors: [AccountError!]! address: Address } type AddressDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) user: User accountErrors: [AccountError!]! address: Address @@ -158,7 +191,10 @@ input AddressInput { } type AddressSetDefault { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) user: User accountErrors: [AccountError!]! } @@ -169,7 +205,10 @@ enum AddressTypeEnum { } type AddressUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) user: User accountErrors: [AccountError!]! address: Address @@ -204,8 +243,14 @@ type App implements Node & ObjectWithMetadata { tokens: [AppToken] privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") - meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") + privateMeta: [MetaStore]! + @deprecated( + reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." + ) + meta: [MetaStore]! + @deprecated( + reason: "Use the `metadata` field. This field will be removed after 2020-07-31." + ) type: AppTypeEnum webhooks: [Webhook] aboutApp: String @@ -220,7 +265,10 @@ type App implements Node & ObjectWithMetadata { } type AppActivate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) appErrors: [AppError!]! app: App } @@ -237,26 +285,38 @@ type AppCountableEdge { } type AppCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) authToken: String appErrors: [AppError!]! app: App } type AppDeactivate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) appErrors: [AppError!]! app: App } type AppDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) appErrors: [AppError!]! app: App } type AppDeleteFailedInstallation { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) appErrors: [AppError!]! appInstallation: AppInstallation } @@ -285,7 +345,10 @@ enum AppErrorCode { } type AppFetchManifest { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) manifest: Manifest appErrors: [AppError!]! } @@ -303,7 +366,10 @@ input AppInput { } type AppInstall { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) appErrors: [AppError!]! appInstallation: AppInstallation } @@ -326,7 +392,10 @@ type AppInstallation implements Node & Job { } type AppRetryInstall { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) appErrors: [AppError!]! appInstallation: AppInstallation } @@ -348,14 +417,20 @@ type AppToken implements Node { } type AppTokenCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) authToken: String appErrors: [AppError!]! appToken: AppToken } type AppTokenDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) appErrors: [AppError!]! appToken: AppToken } @@ -366,7 +441,10 @@ input AppTokenInput { } type AppTokenVerify { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) valid: Boolean! appErrors: [AppError!]! } @@ -377,25 +455,47 @@ enum AppTypeEnum { } type AppUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) appErrors: [AppError!]! app: App } type AssignNavigation { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) menu: Menu menuErrors: [MenuError!]! } type Attribute implements Node & ObjectWithMetadata { id: ID! - productTypes(before: String, after: String, first: Int, last: Int): ProductTypeCountableConnection! - productVariantTypes(before: String, after: String, first: Int, last: Int): ProductTypeCountableConnection! + productTypes( + before: String + after: String + first: Int + last: Int + ): ProductTypeCountableConnection! + productVariantTypes( + before: String + after: String + first: Int + last: Int + ): ProductTypeCountableConnection! privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") - meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") + privateMeta: [MetaStore]! + @deprecated( + reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." + ) + meta: [MetaStore]! + @deprecated( + reason: "Use the `metadata` field. This field will be removed after 2020-07-31." + ) inputType: AttributeInputTypeEnum name: String slug: String @@ -410,7 +510,10 @@ type Attribute implements Node & ObjectWithMetadata { } type AttributeAssign { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productType: ProductType productErrors: [ProductAttributeError!]! } @@ -421,19 +524,28 @@ input AttributeAssignInput { } type AttributeBulkDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! productErrors: [ProductError!]! } type AttributeClearMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! attribute: Attribute } type AttributeClearPrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! attribute: Attribute } @@ -450,7 +562,10 @@ type AttributeCountableEdge { } type AttributeCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) attribute: Attribute productErrors: [ProductError!]! } @@ -470,7 +585,10 @@ input AttributeCreateInput { } type AttributeDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! attribute: Attribute } @@ -500,7 +618,10 @@ enum AttributeInputTypeEnum { } type AttributeReorderValues { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) attribute: Attribute productErrors: [ProductError!]! } @@ -530,7 +651,10 @@ type AttributeTranslatableContent implements Node { } type AttributeTranslate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) translationErrors: [TranslationError!]! attribute: Attribute } @@ -547,13 +671,19 @@ enum AttributeTypeEnum { } type AttributeUnassign { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productType: ProductType productErrors: [ProductError!]! } type AttributeUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) attribute: Attribute productErrors: [ProductError!]! } @@ -573,13 +703,19 @@ input AttributeUpdateInput { } type AttributeUpdateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! attribute: Attribute } type AttributeUpdatePrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! attribute: Attribute } @@ -588,19 +724,28 @@ type AttributeValue implements Node { id: ID! name: String slug: String - type: AttributeValueType @deprecated(reason: "Use the `inputType` field to determine the type of attribute's value. This field will be removed after 2020-07-31.") + type: AttributeValueType + @deprecated( + reason: "Use the `inputType` field to determine the type of attribute's value. This field will be removed after 2020-07-31." + ) translation(languageCode: LanguageCodeEnum!): AttributeValueTranslation inputType: AttributeInputTypeEnum } type AttributeValueBulkDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! productErrors: [ProductError!]! } type AttributeValueCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) attribute: Attribute productErrors: [ProductError!]! attributeValue: AttributeValue @@ -611,7 +756,10 @@ input AttributeValueCreateInput { } type AttributeValueDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) attribute: Attribute productErrors: [ProductError!]! attributeValue: AttributeValue @@ -630,7 +778,10 @@ type AttributeValueTranslatableContent implements Node { } type AttributeValueTranslate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) translationErrors: [TranslationError!]! attributeValue: AttributeValue } @@ -649,7 +800,10 @@ enum AttributeValueType { } type AttributeValueUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) attribute: Attribute productErrors: [ProductError!]! attributeValue: AttributeValue @@ -661,14 +815,20 @@ type AuthorizationKey { } type AuthorizationKeyAdd { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) authorizationKey: AuthorizationKey shop: Shop shopErrors: [ShopError!]! } type AuthorizationKeyDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) authorizationKey: AuthorizationKey shop: Shop shopErrors: [ShopError!]! @@ -717,30 +877,61 @@ type Category implements Node & ObjectWithMetadata { level: Int! privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") - meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") - ancestors(before: String, after: String, first: Int, last: Int): CategoryCountableConnection - products(before: String, after: String, first: Int, last: Int): ProductCountableConnection - url: String @deprecated(reason: "This field will be removed after 2020-07-31.") - children(before: String, after: String, first: Int, last: Int): CategoryCountableConnection + privateMeta: [MetaStore]! + @deprecated( + reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." + ) + meta: [MetaStore]! + @deprecated( + reason: "Use the `metadata` field. This field will be removed after 2020-07-31." + ) + ancestors( + before: String + after: String + first: Int + last: Int + ): CategoryCountableConnection + products( + before: String + after: String + first: Int + last: Int + ): ProductCountableConnection + url: String + @deprecated(reason: "This field will be removed after 2020-07-31.") + children( + before: String + after: String + first: Int + last: Int + ): CategoryCountableConnection backgroundImage(size: Int): Image translation(languageCode: LanguageCodeEnum!): CategoryTranslation } type CategoryBulkDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! productErrors: [ProductError!]! } type CategoryClearMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! category: Category } type CategoryClearPrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! category: Category } @@ -757,13 +948,19 @@ type CategoryCountableEdge { } type CategoryCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! category: Category } type CategoryDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! category: Category } @@ -806,7 +1003,10 @@ type CategoryTranslatableContent implements Node { } type CategoryTranslate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) translationErrors: [TranslationError!]! category: Category } @@ -822,19 +1022,28 @@ type CategoryTranslation implements Node { } type CategoryUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! category: Category } type CategoryUpdateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! category: Category } type CategoryUpdatePrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! category: Category } @@ -856,8 +1065,14 @@ type Checkout implements Node & ObjectWithMetadata { id: ID! privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") - meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") + privateMeta: [MetaStore]! + @deprecated( + reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." + ) + meta: [MetaStore]! + @deprecated( + reason: "Use the `metadata` field. This field will be removed after 2020-07-31." + ) availableShippingMethods: [ShippingMethod]! availablePaymentGateways: [PaymentGateway!]! email: String! @@ -870,31 +1085,46 @@ type Checkout implements Node & ObjectWithMetadata { } type CheckoutAddPromoCode { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) checkout: Checkout checkoutErrors: [CheckoutError!]! } type CheckoutBillingAddressUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) checkout: Checkout checkoutErrors: [CheckoutError!]! } type CheckoutClearMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) checkoutErrors: [CheckoutError!]! checkout: Checkout } type CheckoutClearPrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) checkoutErrors: [CheckoutError!]! checkout: Checkout } type CheckoutComplete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) order: Order confirmationNeeded: Boolean! confirmationData: JSONString @@ -913,7 +1143,10 @@ type CheckoutCountableEdge { } type CheckoutCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) created: Boolean checkoutErrors: [CheckoutError!]! checkout: Checkout @@ -927,19 +1160,28 @@ input CheckoutCreateInput { } type CheckoutCustomerAttach { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) checkout: Checkout checkoutErrors: [CheckoutError!]! } type CheckoutCustomerDetach { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) checkout: Checkout checkoutErrors: [CheckoutError!]! } type CheckoutEmailUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) checkout: Checkout checkoutErrors: [CheckoutError!]! } @@ -994,7 +1236,10 @@ type CheckoutLineCountableEdge { } type CheckoutLineDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) checkout: Checkout checkoutErrors: [CheckoutError!]! } @@ -1005,50 +1250,74 @@ input CheckoutLineInput { } type CheckoutLinesAdd { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) checkout: Checkout checkoutErrors: [CheckoutError!]! } type CheckoutLinesUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) checkout: Checkout checkoutErrors: [CheckoutError!]! } type CheckoutPaymentCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) checkout: Checkout payment: Payment paymentErrors: [PaymentError!]! } type CheckoutRemovePromoCode { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) checkout: Checkout checkoutErrors: [CheckoutError!]! } type CheckoutShippingAddressUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) checkout: Checkout checkoutErrors: [CheckoutError!]! } type CheckoutShippingMethodUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) checkout: Checkout checkoutErrors: [CheckoutError!]! } type CheckoutUpdateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) checkoutErrors: [CheckoutError!]! checkout: Checkout } type CheckoutUpdatePrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) checkoutErrors: [CheckoutError!]! checkout: Checkout } @@ -1070,39 +1339,67 @@ type Collection implements Node & ObjectWithMetadata { slug: String! privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") - meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") - products(filter: ProductFilterInput, sortBy: ProductOrder, before: String, after: String, first: Int, last: Int): ProductCountableConnection + privateMeta: [MetaStore]! + @deprecated( + reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." + ) + meta: [MetaStore]! + @deprecated( + reason: "Use the `metadata` field. This field will be removed after 2020-07-31." + ) + products( + filter: ProductFilterInput + sortBy: ProductOrder + before: String + after: String + first: Int + last: Int + ): ProductCountableConnection backgroundImage(size: Int): Image translation(languageCode: LanguageCodeEnum!): CollectionTranslation } type CollectionAddProducts { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) collection: Collection productErrors: [ProductError!]! } type CollectionBulkDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! productErrors: [ProductError!]! } type CollectionBulkPublish { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! productErrors: [ProductError!]! } type CollectionClearMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! collection: Collection } type CollectionClearPrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! collection: Collection } @@ -1119,7 +1416,10 @@ type CollectionCountableEdge { } type CollectionCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! collection: Collection } @@ -1138,7 +1438,10 @@ input CollectionCreateInput { } type CollectionDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! collection: Collection } @@ -1152,12 +1455,12 @@ input CollectionFilterInput { input CollectionInput { isPublished: Boolean name: String - slug: String description: String descriptionJson: JSONString backgroundImage: Upload backgroundImageAlt: String seo: SeoInput + slug: String publicationDate: Date } @@ -1167,13 +1470,19 @@ enum CollectionPublished { } type CollectionRemoveProducts { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) collection: Collection productErrors: [ProductError!]! } type CollectionReorderProducts { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) collection: Collection productErrors: [ProductError!]! } @@ -1201,7 +1510,10 @@ type CollectionTranslatableContent implements Node { } type CollectionTranslate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) translationErrors: [TranslationError!]! collection: Collection } @@ -1217,19 +1529,28 @@ type CollectionTranslation implements Node { } type CollectionUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! collection: Collection } type CollectionUpdateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! collection: Collection } type CollectionUpdatePrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! collection: Collection } @@ -1255,13 +1576,19 @@ enum ConfigurationTypeFieldEnum { } type ConfirmAccount { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) user: User accountErrors: [AccountError!]! } type ConfirmEmailChange { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) user: User accountErrors: [AccountError!]! } @@ -1526,7 +1853,10 @@ type CountryDisplay { } type CreateToken { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) token: String refreshToken: String csrfToken: String @@ -1543,19 +1873,28 @@ type CreditCard { } type CustomerBulkDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! accountErrors: [AccountError!]! } type CustomerCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) accountErrors: [AccountError!]! user: User } type CustomerDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) accountErrors: [AccountError!]! user: User } @@ -1606,7 +1945,10 @@ input CustomerInput { } type CustomerUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) accountErrors: [AccountError!]! user: User } @@ -1626,18 +1968,27 @@ input DateTimeRangeInput { } type DeactivateAllUserTokens { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) accountErrors: [AccountError!]! } type DeleteMetadata { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) metadataErrors: [MetadataError!]! item: ObjectWithMetadata } type DeletePrivateMetadata { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) metadataErrors: [MetadataError!]! item: ObjectWithMetadata } @@ -1653,8 +2004,14 @@ type DigitalContent implements Node & ObjectWithMetadata { id: ID! privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") - meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") + privateMeta: [MetaStore]! + @deprecated( + reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." + ) + meta: [MetaStore]! + @deprecated( + reason: "Use the `metadata` field. This field will be removed after 2020-07-31." + ) } type DigitalContentCountableConnection { @@ -1669,14 +2026,20 @@ type DigitalContentCountableEdge { } type DigitalContentCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) variant: ProductVariant content: DigitalContent productErrors: [ProductError!]! } type DigitalContentDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) variant: ProductVariant productErrors: [ProductError!]! } @@ -1689,7 +2052,10 @@ input DigitalContentInput { } type DigitalContentUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) variant: ProductVariant content: DigitalContent productErrors: [ProductError!]! @@ -1713,7 +2079,10 @@ type DigitalContentUrl implements Node { } type DigitalContentUrlCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! digitalContentUrl: DigitalContentUrl } @@ -1755,19 +2124,28 @@ type Domain { } type DraftOrderBulkDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! orderErrors: [OrderError!]! } type DraftOrderComplete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) order: Order orderErrors: [OrderError!]! } type DraftOrderCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) orderErrors: [OrderError!]! order: Order } @@ -1785,7 +2163,10 @@ input DraftOrderCreateInput { } type DraftOrderDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) orderErrors: [OrderError!]! order: Order } @@ -1802,34 +2183,49 @@ input DraftOrderInput { } type DraftOrderLineDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) order: Order orderLine: OrderLine orderErrors: [OrderError!]! } type DraftOrderLineUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) order: Order orderErrors: [OrderError!]! orderLine: OrderLine } type DraftOrderLinesBulkDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! orderErrors: [OrderError!]! } type DraftOrderLinesCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) order: Order orderLines: [OrderLine!] orderErrors: [OrderError!]! } type DraftOrderUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) orderErrors: [OrderError!]! order: Order } @@ -1918,7 +2314,10 @@ input ExportInfoInput { } type ExportProducts { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) exportFile: ExportFile exportErrors: [ExportError!]! } @@ -1950,15 +2349,24 @@ type Fulfillment implements Node & ObjectWithMetadata { created: DateTime! privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") - meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") + privateMeta: [MetaStore]! + @deprecated( + reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." + ) + meta: [MetaStore]! + @deprecated( + reason: "Use the `metadata` field. This field will be removed after 2020-07-31." + ) lines: [FulfillmentLine] statusDisplay: String warehouse: Warehouse } type FulfillmentCancel { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) fulfillment: Fulfillment order: Order orderErrors: [OrderError!]! @@ -1969,12 +2377,18 @@ input FulfillmentCancelInput { } type FulfillmentClearMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) fulfillment: Fulfillment } type FulfillmentClearPrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) fulfillment: Fulfillment } @@ -1990,17 +2404,26 @@ enum FulfillmentStatus { } type FulfillmentUpdateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) fulfillment: Fulfillment } type FulfillmentUpdatePrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) fulfillment: Fulfillment } type FulfillmentUpdateTracking { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) fulfillment: Fulfillment order: Order orderErrors: [OrderError!]! @@ -2037,7 +2460,10 @@ type GiftCard implements Node { } type GiftCardActivate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) giftCard: GiftCard giftCardErrors: [GiftCardError!]! } @@ -2054,7 +2480,10 @@ type GiftCardCountableEdge { } type GiftCardCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) giftCardErrors: [GiftCardError!]! giftCard: GiftCard } @@ -2068,7 +2497,10 @@ input GiftCardCreateInput { } type GiftCardDeactivate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) giftCard: GiftCard giftCardErrors: [GiftCardError!]! } @@ -2089,7 +2521,10 @@ enum GiftCardErrorCode { } type GiftCardUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) giftCardErrors: [GiftCardError!]! giftCard: GiftCard } @@ -2121,7 +2556,10 @@ type GroupCountableEdge { } type HomepageCollectionUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) shop: Shop shopErrors: [ShopError!]! } @@ -2143,8 +2581,14 @@ type Invoice implements ObjectWithMetadata & Job & Node { number: String externalUrl: String privateMetadata: [MetadataItem]! - privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") - meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") + privateMeta: [MetaStore]! + @deprecated( + reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." + ) + meta: [MetaStore]! + @deprecated( + reason: "Use the `metadata` field. This field will be removed after 2020-07-31." + ) createdAt: DateTime! updatedAt: DateTime! message: String @@ -2152,7 +2596,10 @@ type Invoice implements ObjectWithMetadata & Job & Node { } type InvoiceCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) invoiceErrors: [InvoiceError!]! invoice: Invoice } @@ -2163,7 +2610,10 @@ input InvoiceCreateInput { } type InvoiceDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) invoiceErrors: [InvoiceError!]! invoice: Invoice } @@ -2185,26 +2635,38 @@ enum InvoiceErrorCode { } type InvoiceRequest { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) order: Order invoiceErrors: [InvoiceError!]! invoice: Invoice } type InvoiceRequestDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) invoiceErrors: [InvoiceError!]! invoice: Invoice } type InvoiceSendEmail { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) invoiceErrors: [InvoiceError!]! invoice: Invoice } type InvoiceUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) invoiceErrors: [InvoiceError!]! invoice: Invoice } @@ -2308,7 +2770,10 @@ type Menu implements Node { } type MenuBulkDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! menuErrors: [MenuError!]! } @@ -2325,7 +2790,10 @@ type MenuCountableEdge { } type MenuCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) menuErrors: [MenuError!]! menu: Menu } @@ -2336,7 +2804,10 @@ input MenuCreateInput { } type MenuDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) menuErrors: [MenuError!]! menu: Menu } @@ -2382,7 +2853,10 @@ type MenuItem implements Node { } type MenuItemBulkDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! menuErrors: [MenuError!]! } @@ -2399,7 +2873,10 @@ type MenuItemCountableEdge { } type MenuItemCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) menuErrors: [MenuError!]! menuItem: MenuItem } @@ -2415,7 +2892,10 @@ input MenuItemCreateInput { } type MenuItemDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) menuErrors: [MenuError!]! menuItem: MenuItem } @@ -2433,7 +2913,10 @@ input MenuItemInput { } type MenuItemMove { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) menu: Menu menuErrors: [MenuError!]! } @@ -2457,7 +2940,10 @@ type MenuItemTranslatableContent implements Node { } type MenuItemTranslate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) translationErrors: [TranslationError!]! menuItem: MenuItem } @@ -2469,7 +2955,10 @@ type MenuItemTranslation implements Node { } type MenuItemUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) menuErrors: [MenuError!]! menuItem: MenuItem } @@ -2489,7 +2978,10 @@ input MenuSortingInput { } type MenuUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) menuErrors: [MenuError!]! menu: Menu } @@ -2547,7 +3039,10 @@ type MetadataItem { type Money { currency: String! amount: Float! - localized: String! @deprecated(reason: "Price formatting according to the current locale should be handled by the frontend client. This field will be removed after 2020-07-31.") + localized: String! + @deprecated( + reason: "Price formatting according to the current locale should be handled by the frontend client. This field will be removed after 2020-07-31." + ) } type MoneyRange { @@ -2567,109 +3062,329 @@ type Mutation { createWarehouse(input: WarehouseCreateInput!): WarehouseCreate updateWarehouse(id: ID!, input: WarehouseUpdateInput!): WarehouseUpdate deleteWarehouse(id: ID!): WarehouseDelete - assignWarehouseShippingZone(id: ID!, shippingZoneIds: [ID!]!): WarehouseShippingZoneAssign - unassignWarehouseShippingZone(id: ID!, shippingZoneIds: [ID!]!): WarehouseShippingZoneUnassign - authorizationKeyAdd(input: AuthorizationKeyInput!, keyType: AuthorizationKeyType!): AuthorizationKeyAdd + assignWarehouseShippingZone( + id: ID! + shippingZoneIds: [ID!]! + ): WarehouseShippingZoneAssign + unassignWarehouseShippingZone( + id: ID! + shippingZoneIds: [ID!]! + ): WarehouseShippingZoneUnassign + authorizationKeyAdd( + input: AuthorizationKeyInput! + keyType: AuthorizationKeyType! + ): AuthorizationKeyAdd authorizationKeyDelete(keyType: AuthorizationKeyType!): AuthorizationKeyDelete - staffNotificationRecipientCreate(input: StaffNotificationRecipientInput!): StaffNotificationRecipientCreate - staffNotificationRecipientUpdate(id: ID!, input: StaffNotificationRecipientInput!): StaffNotificationRecipientUpdate + staffNotificationRecipientCreate( + input: StaffNotificationRecipientInput! + ): StaffNotificationRecipientCreate + staffNotificationRecipientUpdate( + id: ID! + input: StaffNotificationRecipientInput! + ): StaffNotificationRecipientUpdate staffNotificationRecipientDelete(id: ID!): StaffNotificationRecipientDelete homepageCollectionUpdate(collection: ID): HomepageCollectionUpdate shopDomainUpdate(input: SiteDomainInput): ShopDomainUpdate shopSettingsUpdate(input: ShopSettingsInput!): ShopSettingsUpdate shopFetchTaxRates: ShopFetchTaxRates - shopSettingsTranslate(input: ShopSettingsTranslationInput!, languageCode: LanguageCodeEnum!): ShopSettingsTranslate + shopSettingsTranslate( + input: ShopSettingsTranslationInput! + languageCode: LanguageCodeEnum! + ): ShopSettingsTranslate shopAddressUpdate(input: AddressInput): ShopAddressUpdate shippingPriceCreate(input: ShippingPriceInput!): ShippingPriceCreate shippingPriceDelete(id: ID!): ShippingPriceDelete shippingPriceBulkDelete(ids: [ID]!): ShippingPriceBulkDelete shippingPriceUpdate(id: ID!, input: ShippingPriceInput!): ShippingPriceUpdate - shippingPriceTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): ShippingPriceTranslate + shippingPriceTranslate( + id: ID! + input: NameTranslationInput! + languageCode: LanguageCodeEnum! + ): ShippingPriceTranslate shippingZoneCreate(input: ShippingZoneCreateInput!): ShippingZoneCreate shippingZoneDelete(id: ID!): ShippingZoneDelete shippingZoneBulkDelete(ids: [ID]!): ShippingZoneBulkDelete - shippingZoneUpdate(id: ID!, input: ShippingZoneUpdateInput!): ShippingZoneUpdate + shippingZoneUpdate( + id: ID! + input: ShippingZoneUpdateInput! + ): ShippingZoneUpdate attributeCreate(input: AttributeCreateInput!): AttributeCreate attributeDelete(id: ID!): AttributeDelete attributeBulkDelete(ids: [ID]!): AttributeBulkDelete - attributeAssign(operations: [AttributeAssignInput]!, productTypeId: ID!): AttributeAssign + attributeAssign( + operations: [AttributeAssignInput]! + productTypeId: ID! + ): AttributeAssign attributeUnassign(attributeIds: [ID]!, productTypeId: ID!): AttributeUnassign attributeUpdate(id: ID!, input: AttributeUpdateInput!): AttributeUpdate - attributeTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): AttributeTranslate - attributeUpdateMetadata(id: ID!, input: MetaInput!): AttributeUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") - attributeClearMetadata(id: ID!, input: MetaPath!): AttributeClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") - attributeUpdatePrivateMetadata(id: ID!, input: MetaInput!): AttributeUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - attributeClearPrivateMetadata(id: ID!, input: MetaPath!): AttributeClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - attributeValueCreate(attribute: ID!, input: AttributeValueCreateInput!): AttributeValueCreate + attributeTranslate( + id: ID! + input: NameTranslationInput! + languageCode: LanguageCodeEnum! + ): AttributeTranslate + attributeUpdateMetadata(id: ID!, input: MetaInput!): AttributeUpdateMeta + @deprecated( + reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + attributeClearMetadata(id: ID!, input: MetaPath!): AttributeClearMeta + @deprecated( + reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + attributeUpdatePrivateMetadata( + id: ID! + input: MetaInput! + ): AttributeUpdatePrivateMeta + @deprecated( + reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + attributeClearPrivateMetadata( + id: ID! + input: MetaPath! + ): AttributeClearPrivateMeta + @deprecated( + reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + attributeValueCreate( + attribute: ID! + input: AttributeValueCreateInput! + ): AttributeValueCreate attributeValueDelete(id: ID!): AttributeValueDelete attributeValueBulkDelete(ids: [ID]!): AttributeValueBulkDelete - attributeValueUpdate(id: ID!, input: AttributeValueCreateInput!): AttributeValueUpdate - attributeValueTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): AttributeValueTranslate - attributeReorderValues(attributeId: ID!, moves: [ReorderInput]!): AttributeReorderValues + attributeValueUpdate( + id: ID! + input: AttributeValueCreateInput! + ): AttributeValueUpdate + attributeValueTranslate( + id: ID! + input: NameTranslationInput! + languageCode: LanguageCodeEnum! + ): AttributeValueTranslate + attributeReorderValues( + attributeId: ID! + moves: [ReorderInput]! + ): AttributeReorderValues categoryCreate(input: CategoryInput!, parent: ID): CategoryCreate categoryDelete(id: ID!): CategoryDelete categoryBulkDelete(ids: [ID]!): CategoryBulkDelete categoryUpdate(id: ID!, input: CategoryInput!): CategoryUpdate - categoryTranslate(id: ID!, input: TranslationInput!, languageCode: LanguageCodeEnum!): CategoryTranslate - categoryUpdateMetadata(id: ID!, input: MetaInput!): CategoryUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") - categoryClearMetadata(id: ID!, input: MetaPath!): CategoryClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") - categoryUpdatePrivateMetadata(id: ID!, input: MetaInput!): CategoryUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - categoryClearPrivateMetadata(id: ID!, input: MetaPath!): CategoryClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - collectionAddProducts(collectionId: ID!, products: [ID]!): CollectionAddProducts + categoryTranslate( + id: ID! + input: TranslationInput! + languageCode: LanguageCodeEnum! + ): CategoryTranslate + categoryUpdateMetadata(id: ID!, input: MetaInput!): CategoryUpdateMeta + @deprecated( + reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + categoryClearMetadata(id: ID!, input: MetaPath!): CategoryClearMeta + @deprecated( + reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + categoryUpdatePrivateMetadata( + id: ID! + input: MetaInput! + ): CategoryUpdatePrivateMeta + @deprecated( + reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + categoryClearPrivateMetadata( + id: ID! + input: MetaPath! + ): CategoryClearPrivateMeta + @deprecated( + reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + collectionAddProducts( + collectionId: ID! + products: [ID]! + ): CollectionAddProducts collectionCreate(input: CollectionCreateInput!): CollectionCreate collectionDelete(id: ID!): CollectionDelete - collectionReorderProducts(collectionId: ID!, moves: [MoveProductInput]!): CollectionReorderProducts + collectionReorderProducts( + collectionId: ID! + moves: [MoveProductInput]! + ): CollectionReorderProducts collectionBulkDelete(ids: [ID]!): CollectionBulkDelete - collectionBulkPublish(ids: [ID]!, isPublished: Boolean!): CollectionBulkPublish - collectionRemoveProducts(collectionId: ID!, products: [ID]!): CollectionRemoveProducts + collectionBulkPublish( + ids: [ID]! + isPublished: Boolean! + ): CollectionBulkPublish + collectionRemoveProducts( + collectionId: ID! + products: [ID]! + ): CollectionRemoveProducts collectionUpdate(id: ID!, input: CollectionInput!): CollectionUpdate - collectionTranslate(id: ID!, input: TranslationInput!, languageCode: LanguageCodeEnum!): CollectionTranslate - collectionUpdateMetadata(id: ID!, input: MetaInput!): CollectionUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") - collectionClearMetadata(id: ID!, input: MetaPath!): CollectionClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") - collectionUpdatePrivateMetadata(id: ID!, input: MetaInput!): CollectionUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - collectionClearPrivateMetadata(id: ID!, input: MetaPath!): CollectionClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + collectionTranslate( + id: ID! + input: TranslationInput! + languageCode: LanguageCodeEnum! + ): CollectionTranslate + collectionUpdateMetadata(id: ID!, input: MetaInput!): CollectionUpdateMeta + @deprecated( + reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + collectionClearMetadata(id: ID!, input: MetaPath!): CollectionClearMeta + @deprecated( + reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + collectionUpdatePrivateMetadata( + id: ID! + input: MetaInput! + ): CollectionUpdatePrivateMeta + @deprecated( + reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + collectionClearPrivateMetadata( + id: ID! + input: MetaPath! + ): CollectionClearPrivateMeta + @deprecated( + reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) productCreate(input: ProductCreateInput!): ProductCreate productDelete(id: ID!): ProductDelete productBulkDelete(ids: [ID]!): ProductBulkDelete productBulkPublish(ids: [ID]!, isPublished: Boolean!): ProductBulkPublish productUpdate(id: ID!, input: ProductInput!): ProductUpdate - productTranslate(id: ID!, input: TranslationInput!, languageCode: LanguageCodeEnum!): ProductTranslate - productUpdateMetadata(id: ID!, input: MetaInput!): ProductUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") - productClearMetadata(id: ID!, input: MetaPath!): ProductClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") - productUpdatePrivateMetadata(id: ID!, input: MetaInput!): ProductUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - productClearPrivateMetadata(id: ID!, input: MetaPath!): ProductClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - productSetAvailabilityForPurchase(isAvailable: Boolean!, productId: ID!, startDate: Date): ProductSetAvailabilityForPurchase + productTranslate( + id: ID! + input: TranslationInput! + languageCode: LanguageCodeEnum! + ): ProductTranslate + productUpdateMetadata(id: ID!, input: MetaInput!): ProductUpdateMeta + @deprecated( + reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + productClearMetadata(id: ID!, input: MetaPath!): ProductClearMeta + @deprecated( + reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + productUpdatePrivateMetadata( + id: ID! + input: MetaInput! + ): ProductUpdatePrivateMeta + @deprecated( + reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + productClearPrivateMetadata( + id: ID! + input: MetaPath! + ): ProductClearPrivateMeta + @deprecated( + reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + productSetAvailabilityForPurchase( + isAvailable: Boolean! + productId: ID! + startDate: Date + ): ProductSetAvailabilityForPurchase productImageCreate(input: ProductImageCreateInput!): ProductImageCreate productImageDelete(id: ID!): ProductImageDelete productImageBulkDelete(ids: [ID]!): ProductImageBulkDelete productImageReorder(imagesIds: [ID]!, productId: ID!): ProductImageReorder - productImageUpdate(id: ID!, input: ProductImageUpdateInput!): ProductImageUpdate + productImageUpdate( + id: ID! + input: ProductImageUpdateInput! + ): ProductImageUpdate productTypeCreate(input: ProductTypeInput!): ProductTypeCreate productTypeDelete(id: ID!): ProductTypeDelete productTypeBulkDelete(ids: [ID]!): ProductTypeBulkDelete productTypeUpdate(id: ID!, input: ProductTypeInput!): ProductTypeUpdate - productTypeReorderAttributes(moves: [ReorderInput]!, productTypeId: ID!, type: AttributeTypeEnum!): ProductTypeReorderAttributes - productTypeUpdateMetadata(id: ID!, input: MetaInput!): ProductTypeUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") - productTypeClearMetadata(id: ID!, input: MetaPath!): ProductTypeClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") - productTypeUpdatePrivateMetadata(id: ID!, input: MetaInput!): ProductTypeUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - productTypeClearPrivateMetadata(id: ID!, input: MetaPath!): ProductTypeClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - digitalContentCreate(input: DigitalContentUploadInput!, variantId: ID!): DigitalContentCreate + productTypeReorderAttributes( + moves: [ReorderInput]! + productTypeId: ID! + type: AttributeTypeEnum! + ): ProductTypeReorderAttributes + productTypeUpdateMetadata(id: ID!, input: MetaInput!): ProductTypeUpdateMeta + @deprecated( + reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + productTypeClearMetadata(id: ID!, input: MetaPath!): ProductTypeClearMeta + @deprecated( + reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + productTypeUpdatePrivateMetadata( + id: ID! + input: MetaInput! + ): ProductTypeUpdatePrivateMeta + @deprecated( + reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + productTypeClearPrivateMetadata( + id: ID! + input: MetaPath! + ): ProductTypeClearPrivateMeta + @deprecated( + reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + digitalContentCreate( + input: DigitalContentUploadInput! + variantId: ID! + ): DigitalContentCreate digitalContentDelete(variantId: ID!): DigitalContentDelete - digitalContentUpdate(input: DigitalContentInput!, variantId: ID!): DigitalContentUpdate - digitalContentUrlCreate(input: DigitalContentUrlCreateInput!): DigitalContentUrlCreate + digitalContentUpdate( + input: DigitalContentInput! + variantId: ID! + ): DigitalContentUpdate + digitalContentUrlCreate( + input: DigitalContentUrlCreateInput! + ): DigitalContentUrlCreate productVariantCreate(input: ProductVariantCreateInput!): ProductVariantCreate productVariantDelete(id: ID!): ProductVariantDelete - productVariantBulkCreate(product: ID!, variants: [ProductVariantBulkCreateInput]!): ProductVariantBulkCreate + productVariantBulkCreate( + product: ID! + variants: [ProductVariantBulkCreateInput]! + ): ProductVariantBulkCreate productVariantBulkDelete(ids: [ID]!): ProductVariantBulkDelete - productVariantStocksCreate(stocks: [StockInput!]!, variantId: ID!): ProductVariantStocksCreate - productVariantStocksDelete(variantId: ID!, warehouseIds: [ID!]): ProductVariantStocksDelete - productVariantStocksUpdate(stocks: [StockInput!]!, variantId: ID!): ProductVariantStocksUpdate - productVariantUpdate(id: ID!, input: ProductVariantInput!): ProductVariantUpdate - productVariantTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): ProductVariantTranslate - productVariantUpdateMetadata(id: ID!, input: MetaInput!): ProductVariantUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") - productVariantClearMetadata(id: ID!, input: MetaPath!): ProductVariantClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") - productVariantUpdatePrivateMetadata(id: ID!, input: MetaInput!): ProductVariantUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - productVariantClearPrivateMetadata(id: ID!, input: MetaPath!): ProductVariantClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + productVariantStocksCreate( + stocks: [StockInput!]! + variantId: ID! + ): ProductVariantStocksCreate + productVariantStocksDelete( + variantId: ID! + warehouseIds: [ID!] + ): ProductVariantStocksDelete + productVariantStocksUpdate( + stocks: [StockInput!]! + variantId: ID! + ): ProductVariantStocksUpdate + productVariantUpdate( + id: ID! + input: ProductVariantInput! + ): ProductVariantUpdate + productVariantTranslate( + id: ID! + input: NameTranslationInput! + languageCode: LanguageCodeEnum! + ): ProductVariantTranslate + productVariantUpdateMetadata( + id: ID! + input: MetaInput! + ): ProductVariantUpdateMeta + @deprecated( + reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + productVariantClearMetadata( + id: ID! + input: MetaPath! + ): ProductVariantClearMeta + @deprecated( + reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + productVariantUpdatePrivateMetadata( + id: ID! + input: MetaInput! + ): ProductVariantUpdatePrivateMeta + @deprecated( + reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + productVariantClearPrivateMetadata( + id: ID! + input: MetaPath! + ): ProductVariantClearPrivateMeta + @deprecated( + reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) variantImageAssign(imageId: ID!, variantId: ID!): VariantImageAssign variantImageUnassign(imageId: ID!, variantId: ID!): VariantImageUnassign paymentCapture(amount: PositiveDecimal, paymentId: ID!): PaymentCapture @@ -2680,40 +3395,89 @@ type Mutation { pageBulkDelete(ids: [ID]!): PageBulkDelete pageBulkPublish(ids: [ID]!, isPublished: Boolean!): PageBulkPublish pageUpdate(id: ID!, input: PageInput!): PageUpdate - pageTranslate(id: ID!, input: PageTranslationInput!, languageCode: LanguageCodeEnum!): PageTranslate + pageTranslate( + id: ID! + input: PageTranslationInput! + languageCode: LanguageCodeEnum! + ): PageTranslate draftOrderComplete(id: ID!): DraftOrderComplete draftOrderCreate(input: DraftOrderCreateInput!): DraftOrderCreate draftOrderDelete(id: ID!): DraftOrderDelete draftOrderBulkDelete(ids: [ID]!): DraftOrderBulkDelete draftOrderLinesBulkDelete(ids: [ID]!): DraftOrderLinesBulkDelete - draftOrderLinesCreate(id: ID!, input: [OrderLineCreateInput]!): DraftOrderLinesCreate + draftOrderLinesCreate( + id: ID! + input: [OrderLineCreateInput]! + ): DraftOrderLinesCreate draftOrderLineDelete(id: ID!): DraftOrderLineDelete draftOrderLineUpdate(id: ID!, input: OrderLineInput!): DraftOrderLineUpdate draftOrderUpdate(id: ID!, input: DraftOrderInput!): DraftOrderUpdate orderAddNote(order: ID!, input: OrderAddNoteInput!): OrderAddNote orderCancel(id: ID!): OrderCancel orderCapture(amount: PositiveDecimal!, id: ID!): OrderCapture - orderClearPrivateMeta(id: ID!, input: MetaPath!): OrderClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - orderClearMeta(input: MetaPath!, token: UUID!): OrderClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") + orderClearPrivateMeta(id: ID!, input: MetaPath!): OrderClearPrivateMeta + @deprecated( + reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + orderClearMeta(input: MetaPath!, token: UUID!): OrderClearMeta + @deprecated( + reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31." + ) orderFulfill(input: OrderFulfillInput!, order: ID): OrderFulfill - orderFulfillmentCancel(id: ID!, input: FulfillmentCancelInput!): FulfillmentCancel - orderFulfillmentUpdateTracking(id: ID!, input: FulfillmentUpdateTrackingInput!): FulfillmentUpdateTracking - orderFulfillmentClearMeta(id: ID!, input: MetaPath!): FulfillmentClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") - orderFulfillmentClearPrivateMeta(id: ID!, input: MetaPath!): FulfillmentClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - orderFulfillmentUpdateMeta(id: ID!, input: MetaInput!): FulfillmentUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") - orderFulfillmentUpdatePrivateMeta(id: ID!, input: MetaInput!): FulfillmentUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + orderFulfillmentCancel( + id: ID! + input: FulfillmentCancelInput! + ): FulfillmentCancel + orderFulfillmentUpdateTracking( + id: ID! + input: FulfillmentUpdateTrackingInput! + ): FulfillmentUpdateTracking + orderFulfillmentClearMeta(id: ID!, input: MetaPath!): FulfillmentClearMeta + @deprecated( + reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + orderFulfillmentClearPrivateMeta( + id: ID! + input: MetaPath! + ): FulfillmentClearPrivateMeta + @deprecated( + reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + orderFulfillmentUpdateMeta(id: ID!, input: MetaInput!): FulfillmentUpdateMeta + @deprecated( + reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + orderFulfillmentUpdatePrivateMeta( + id: ID! + input: MetaInput! + ): FulfillmentUpdatePrivateMeta + @deprecated( + reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) orderMarkAsPaid(id: ID!): OrderMarkAsPaid orderRefund(amount: PositiveDecimal!, id: ID!): OrderRefund orderUpdate(id: ID!, input: OrderUpdateInput!): OrderUpdate - orderUpdateMeta(input: MetaInput!, token: UUID!): OrderUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") - orderUpdatePrivateMeta(id: ID!, input: MetaInput!): OrderUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - orderUpdateShipping(order: ID!, input: OrderUpdateShippingInput): OrderUpdateShipping + orderUpdateMeta(input: MetaInput!, token: UUID!): OrderUpdateMeta + @deprecated( + reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + orderUpdatePrivateMeta(id: ID!, input: MetaInput!): OrderUpdatePrivateMeta + @deprecated( + reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." + ) + orderUpdateShipping( + order: ID! + input: OrderUpdateShippingInput + ): OrderUpdateShipping orderVoid(id: ID!): OrderVoid orderBulkCancel(ids: [ID]!): OrderBulkCancel deleteMetadata(id: ID!, keys: [String!]!): DeleteMetadata deletePrivateMetadata(id: ID!, keys: [String!]!): DeletePrivateMetadata updateMetadata(id: ID!, input: [MetadataInput!]!): UpdateMetadata - updatePrivateMetadata(id: ID!, input: [MetadataInput!]!): UpdatePrivateMetadata + updatePrivateMetadata( + id: ID! + input: [MetadataInput!]! + ): UpdatePrivateMetadata assignNavigation(menu: ID, navigationType: NavigationType!): AssignNavigation menuCreate(input: MenuCreateInput!): MenuCreate menuDelete(id: ID!): MenuDelete @@ -2723,7 +3487,11 @@ type Mutation { menuItemDelete(id: ID!): MenuItemDelete menuItemBulkDelete(ids: [ID]!): MenuItemBulkDelete menuItemUpdate(id: ID!, input: MenuItemInput!): MenuItemUpdate - menuItemTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): MenuItemTranslate + menuItemTranslate( + id: ID! + input: NameTranslationInput! + languageCode: LanguageCodeEnum! + ): MenuItemTranslate menuItemMove(menu: ID!, moves: [MenuItemMoveInput]!): MenuItemMove invoiceRequest(number: String, orderId: ID!): InvoiceRequest invoiceRequestDelete(id: ID!): InvoiceRequestDelete @@ -2742,33 +3510,94 @@ type Mutation { saleUpdate(id: ID!, input: SaleInput!): SaleUpdate saleCataloguesAdd(id: ID!, input: CatalogueInput!): SaleAddCatalogues saleCataloguesRemove(id: ID!, input: CatalogueInput!): SaleRemoveCatalogues - saleTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): SaleTranslate + saleTranslate( + id: ID! + input: NameTranslationInput! + languageCode: LanguageCodeEnum! + ): SaleTranslate voucherCreate(input: VoucherInput!): VoucherCreate voucherDelete(id: ID!): VoucherDelete voucherBulkDelete(ids: [ID]!): VoucherBulkDelete voucherUpdate(id: ID!, input: VoucherInput!): VoucherUpdate voucherCataloguesAdd(id: ID!, input: CatalogueInput!): VoucherAddCatalogues - voucherCataloguesRemove(id: ID!, input: CatalogueInput!): VoucherRemoveCatalogues - voucherTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): VoucherTranslate + voucherCataloguesRemove( + id: ID! + input: CatalogueInput! + ): VoucherRemoveCatalogues + voucherTranslate( + id: ID! + input: NameTranslationInput! + languageCode: LanguageCodeEnum! + ): VoucherTranslate exportProducts(input: ExportProductsInput!): ExportProducts - checkoutAddPromoCode(checkoutId: ID!, promoCode: String!): CheckoutAddPromoCode - checkoutBillingAddressUpdate(billingAddress: AddressInput!, checkoutId: ID!): CheckoutBillingAddressUpdate - checkoutComplete(checkoutId: ID!, paymentData: JSONString, redirectUrl: String, storeSource: Boolean = false): CheckoutComplete + checkoutAddPromoCode( + checkoutId: ID! + promoCode: String! + ): CheckoutAddPromoCode + checkoutBillingAddressUpdate( + billingAddress: AddressInput! + checkoutId: ID! + ): CheckoutBillingAddressUpdate + checkoutComplete( + checkoutId: ID! + paymentData: JSONString + redirectUrl: String + storeSource: Boolean = false + ): CheckoutComplete checkoutCreate(input: CheckoutCreateInput!): CheckoutCreate - checkoutCustomerAttach(checkoutId: ID!, customerId: ID): CheckoutCustomerAttach + checkoutCustomerAttach( + checkoutId: ID! + customerId: ID + ): CheckoutCustomerAttach checkoutCustomerDetach(checkoutId: ID!): CheckoutCustomerDetach checkoutEmailUpdate(checkoutId: ID, email: String!): CheckoutEmailUpdate checkoutLineDelete(checkoutId: ID!, lineId: ID): CheckoutLineDelete - checkoutLinesAdd(checkoutId: ID!, lines: [CheckoutLineInput]!): CheckoutLinesAdd - checkoutLinesUpdate(checkoutId: ID!, lines: [CheckoutLineInput]!): CheckoutLinesUpdate - checkoutRemovePromoCode(checkoutId: ID!, promoCode: String!): CheckoutRemovePromoCode - checkoutPaymentCreate(checkoutId: ID!, input: PaymentInput!): CheckoutPaymentCreate - checkoutShippingAddressUpdate(checkoutId: ID!, shippingAddress: AddressInput!): CheckoutShippingAddressUpdate - checkoutShippingMethodUpdate(checkoutId: ID, shippingMethodId: ID!): CheckoutShippingMethodUpdate - checkoutUpdateMetadata(id: ID!, input: MetaInput!): CheckoutUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation. This field will be removed after 2020-07-31.") - checkoutClearMetadata(id: ID!, input: MetaPath!): CheckoutClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation. This field will be removed after 2020-07-31.") - checkoutUpdatePrivateMetadata(id: ID!, input: MetaInput!): CheckoutUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation. This field will be removed after 2020-07-31.") - checkoutClearPrivateMetadata(id: ID!, input: MetaPath!): CheckoutClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation. This field will be removed after 2020-07-31.") + checkoutLinesAdd( + checkoutId: ID! + lines: [CheckoutLineInput]! + ): CheckoutLinesAdd + checkoutLinesUpdate( + checkoutId: ID! + lines: [CheckoutLineInput]! + ): CheckoutLinesUpdate + checkoutRemovePromoCode( + checkoutId: ID! + promoCode: String! + ): CheckoutRemovePromoCode + checkoutPaymentCreate( + checkoutId: ID! + input: PaymentInput! + ): CheckoutPaymentCreate + checkoutShippingAddressUpdate( + checkoutId: ID! + shippingAddress: AddressInput! + ): CheckoutShippingAddressUpdate + checkoutShippingMethodUpdate( + checkoutId: ID + shippingMethodId: ID! + ): CheckoutShippingMethodUpdate + checkoutUpdateMetadata(id: ID!, input: MetaInput!): CheckoutUpdateMeta + @deprecated( + reason: "Use the `updateMetadata` mutation. This field will be removed after 2020-07-31." + ) + checkoutClearMetadata(id: ID!, input: MetaPath!): CheckoutClearMeta + @deprecated( + reason: "Use the `deleteMetadata` mutation. This field will be removed after 2020-07-31." + ) + checkoutUpdatePrivateMetadata( + id: ID! + input: MetaInput! + ): CheckoutUpdatePrivateMeta + @deprecated( + reason: "Use the `updatePrivateMetadata` mutation. This field will be removed after 2020-07-31." + ) + checkoutClearPrivateMetadata( + id: ID! + input: MetaPath! + ): CheckoutClearPrivateMeta + @deprecated( + reason: "Use the `deletePrivateMetadata` mutation. This field will be removed after 2020-07-31." + ) appCreate(input: AppInput!): AppCreate appUpdate(id: ID!, input: AppInput!): AppUpdate appDelete(id: ID!): AppDelete @@ -2776,7 +3605,10 @@ type Mutation { appTokenDelete(id: ID!): AppTokenDelete appTokenVerify(token: String!): AppTokenVerify appInstall(input: AppInstallInput!): AppInstall - appRetryInstall(activateAfterInstallation: Boolean = true, id: ID!): AppRetryInstall + appRetryInstall( + activateAfterInstallation: Boolean = true + id: ID! + ): AppRetryInstall appDeleteFailedInstallation(id: ID!): AppDeleteFailedInstallation appFetchManifest(manifestUrl: String!): AppFetchManifest appActivate(id: ID!): AppActivate @@ -2785,25 +3617,45 @@ type Mutation { tokenRefresh(csrfToken: String, refreshToken: String): RefreshToken tokenVerify(token: String!): VerifyToken tokensDeactivateAll: DeactivateAllUserTokens - requestPasswordReset(email: String!, redirectUrl: String!): RequestPasswordReset + requestPasswordReset( + email: String! + redirectUrl: String! + ): RequestPasswordReset confirmAccount(email: String!, token: String!): ConfirmAccount setPassword(email: String!, password: String!, token: String!): SetPassword passwordChange(newPassword: String!, oldPassword: String!): PasswordChange - requestEmailChange(newEmail: String!, password: String!, redirectUrl: String!): RequestEmailChange + requestEmailChange( + newEmail: String! + password: String! + redirectUrl: String! + ): RequestEmailChange confirmEmailChange(token: String!): ConfirmEmailChange - accountAddressCreate(input: AddressInput!, type: AddressTypeEnum): AccountAddressCreate + accountAddressCreate( + input: AddressInput! + type: AddressTypeEnum + ): AccountAddressCreate accountAddressUpdate(id: ID!, input: AddressInput!): AccountAddressUpdate accountAddressDelete(id: ID!): AccountAddressDelete - accountSetDefaultAddress(id: ID!, type: AddressTypeEnum!): AccountSetDefaultAddress + accountSetDefaultAddress( + id: ID! + type: AddressTypeEnum! + ): AccountSetDefaultAddress accountRegister(input: AccountRegisterInput!): AccountRegister accountUpdate(input: AccountInput!): AccountUpdate accountRequestDeletion(redirectUrl: String!): AccountRequestDeletion accountDelete(token: String!): AccountDelete - accountUpdateMeta(input: MetaInput!): AccountUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation. This field will be removed after 2020-07-31.") + accountUpdateMeta(input: MetaInput!): AccountUpdateMeta + @deprecated( + reason: "Use the `updateMetadata` mutation. This field will be removed after 2020-07-31." + ) addressCreate(input: AddressInput!, userId: ID!): AddressCreate addressUpdate(id: ID!, input: AddressInput!): AddressUpdate addressDelete(id: ID!): AddressDelete - addressSetDefault(addressId: ID!, type: AddressTypeEnum!, userId: ID!): AddressSetDefault + addressSetDefault( + addressId: ID! + type: AddressTypeEnum! + userId: ID! + ): AddressSetDefault customerCreate(input: UserCreateInput!): CustomerCreate customerUpdate(id: ID!, input: CustomerInput!): CustomerUpdate customerDelete(id: ID!): CustomerDelete @@ -2815,19 +3667,68 @@ type Mutation { userAvatarUpdate(image: Upload!): UserAvatarUpdate userAvatarDelete: UserAvatarDelete userBulkSetActive(ids: [ID]!, isActive: Boolean!): UserBulkSetActive - userUpdateMetadata(id: ID!, input: MetaInput!): UserUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation. This field will be removed after 2020-07-31.") - userClearMetadata(id: ID!, input: MetaPath!): UserClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation. This field will be removed after 2020-07-31.") - userUpdatePrivateMetadata(id: ID!, input: MetaInput!): UserUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation. This field will be removed after 2020-07-31.") - userClearPrivateMetadata(id: ID!, input: MetaPath!): UserClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation. This field will be removed after 2020-07-31.") - serviceAccountCreate(input: ServiceAccountInput!): ServiceAccountCreate @deprecated(reason: "Use the `appCreate` mutation instead. This field will be removed after 2020-07-31.") - serviceAccountUpdate(id: ID!, input: ServiceAccountInput!): ServiceAccountUpdate @deprecated(reason: "Use the `appUpdate` mutation instead. This field will be removed after 2020-07-31.") - serviceAccountDelete(id: ID!): ServiceAccountDelete @deprecated(reason: "Use the `appDelete` mutation instead. This field will be removed after 2020-07-31.") - serviceAccountUpdatePrivateMetadata(id: ID!, input: MetaInput!): ServiceAccountUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation with App instead.This field will be removed after 2020-07-31.") - serviceAccountClearPrivateMetadata(id: ID!, input: MetaPath!): ServiceAccountClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation with App instead.This field will be removed after 2020-07-31.") - serviceAccountTokenCreate(input: ServiceAccountTokenInput!): ServiceAccountTokenCreate @deprecated(reason: "Use the `appTokenCreate` mutation instead. This field will be removed after 2020-07-31.") - serviceAccountTokenDelete(id: ID!): ServiceAccountTokenDelete @deprecated(reason: "Use the `appTokenDelete` mutation instead. This field will be removed after 2020-07-31.") - permissionGroupCreate(input: PermissionGroupCreateInput!): PermissionGroupCreate - permissionGroupUpdate(id: ID!, input: PermissionGroupUpdateInput!): PermissionGroupUpdate + userUpdateMetadata(id: ID!, input: MetaInput!): UserUpdateMeta + @deprecated( + reason: "Use the `updateMetadata` mutation. This field will be removed after 2020-07-31." + ) + userClearMetadata(id: ID!, input: MetaPath!): UserClearMeta + @deprecated( + reason: "Use the `deleteMetadata` mutation. This field will be removed after 2020-07-31." + ) + userUpdatePrivateMetadata(id: ID!, input: MetaInput!): UserUpdatePrivateMeta + @deprecated( + reason: "Use the `updatePrivateMetadata` mutation. This field will be removed after 2020-07-31." + ) + userClearPrivateMetadata(id: ID!, input: MetaPath!): UserClearPrivateMeta + @deprecated( + reason: "Use the `deletePrivateMetadata` mutation. This field will be removed after 2020-07-31." + ) + serviceAccountCreate(input: ServiceAccountInput!): ServiceAccountCreate + @deprecated( + reason: "Use the `appCreate` mutation instead. This field will be removed after 2020-07-31." + ) + serviceAccountUpdate( + id: ID! + input: ServiceAccountInput! + ): ServiceAccountUpdate + @deprecated( + reason: "Use the `appUpdate` mutation instead. This field will be removed after 2020-07-31." + ) + serviceAccountDelete(id: ID!): ServiceAccountDelete + @deprecated( + reason: "Use the `appDelete` mutation instead. This field will be removed after 2020-07-31." + ) + serviceAccountUpdatePrivateMetadata( + id: ID! + input: MetaInput! + ): ServiceAccountUpdatePrivateMeta + @deprecated( + reason: "Use the `updatePrivateMetadata` mutation with App instead.This field will be removed after 2020-07-31." + ) + serviceAccountClearPrivateMetadata( + id: ID! + input: MetaPath! + ): ServiceAccountClearPrivateMeta + @deprecated( + reason: "Use the `deletePrivateMetadata` mutation with App instead.This field will be removed after 2020-07-31." + ) + serviceAccountTokenCreate( + input: ServiceAccountTokenInput! + ): ServiceAccountTokenCreate + @deprecated( + reason: "Use the `appTokenCreate` mutation instead. This field will be removed after 2020-07-31." + ) + serviceAccountTokenDelete(id: ID!): ServiceAccountTokenDelete + @deprecated( + reason: "Use the `appTokenDelete` mutation instead. This field will be removed after 2020-07-31." + ) + permissionGroupCreate( + input: PermissionGroupCreateInput! + ): PermissionGroupCreate + permissionGroupUpdate( + id: ID! + input: PermissionGroupUpdateInput! + ): PermissionGroupUpdate permissionGroupDelete(id: ID!): PermissionGroupDelete } @@ -2852,8 +3753,14 @@ interface Node { interface ObjectWithMetadata { privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") - meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") + privateMeta: [MetaStore]! + @deprecated( + reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." + ) + meta: [MetaStore]! + @deprecated( + reason: "Use the `metadata` field. This field will be removed after 2020-07-31." + ) } type Order implements Node & ObjectWithMetadata { @@ -2879,8 +3786,14 @@ type Order implements Node & ObjectWithMetadata { weight: Weight privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") - meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") + privateMeta: [MetaStore]! + @deprecated( + reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." + ) + meta: [MetaStore]! + @deprecated( + reason: "Use the `metadata` field. This field will be removed after 2020-07-31." + ) fulfillments: [Fulfillment]! lines: [OrderLine]! actions: [OrderAction]! @@ -2911,7 +3824,10 @@ enum OrderAction { } type OrderAddNote { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) order: Order event: OrderEvent orderErrors: [OrderError!]! @@ -2922,30 +3838,45 @@ input OrderAddNoteInput { } type OrderBulkCancel { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! orderErrors: [OrderError!]! } type OrderCancel { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) order: Order orderErrors: [OrderError!]! } type OrderCapture { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) order: Order orderErrors: [OrderError!]! } type OrderClearMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) order: Order } type OrderClearPrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) order: Order } @@ -3094,7 +4025,10 @@ input OrderFilterInput { } type OrderFulfill { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) fulfillments: [Fulfillment] order: Order orderErrors: [OrderError!]! @@ -3143,13 +4077,19 @@ input OrderLineInput { } type OrderMarkAsPaid { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) order: Order orderErrors: [OrderError!]! } type OrderRefund { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) order: Order orderErrors: [OrderError!]! } @@ -3186,7 +4126,10 @@ enum OrderStatusFilter { } type OrderUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) orderErrors: [OrderError!]! order: Order } @@ -3198,17 +4141,26 @@ input OrderUpdateInput { } type OrderUpdateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) order: Order } type OrderUpdatePrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) order: Order } type OrderUpdateShipping { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) order: Order orderErrors: [OrderError!]! } @@ -3218,7 +4170,10 @@ input OrderUpdateShippingInput { } type OrderVoid { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) order: Order orderErrors: [OrderError!]! } @@ -3238,13 +4193,19 @@ type Page implements Node { } type PageBulkDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! pageErrors: [PageError!]! } type PageBulkPublish { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! pageErrors: [PageError!]! } @@ -3261,13 +4222,19 @@ type PageCountableEdge { } type PageCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) pageErrors: [PageError!]! page: Page } type PageDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) pageErrors: [PageError!]! page: Page } @@ -3332,7 +4299,10 @@ type PageTranslatableContent implements Node { } type PageTranslate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) translationErrors: [TranslationError!]! page: PageTranslatableContent } @@ -3356,13 +4326,19 @@ input PageTranslationInput { } type PageUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) pageErrors: [PageError!]! page: Page } type PasswordChange { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) user: User accountErrors: [AccountError!]! } @@ -3388,7 +4364,10 @@ type Payment implements Node { } type PaymentCapture { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) payment: Payment paymentErrors: [PaymentError!]! } @@ -3452,7 +4431,10 @@ input PaymentInput { } type PaymentRefund { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) payment: Payment paymentErrors: [PaymentError!]! } @@ -3463,7 +4445,10 @@ type PaymentSource { } type PaymentVoid { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) payment: Payment paymentErrors: [PaymentError!]! } @@ -3492,7 +4477,10 @@ enum PermissionEnum { } type PermissionGroupCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) permissionGroupErrors: [PermissionGroupError!]! group: Group } @@ -3504,7 +4492,10 @@ input PermissionGroupCreateInput { } type PermissionGroupDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) permissionGroupErrors: [PermissionGroupError!]! group: Group } @@ -3542,7 +4533,10 @@ input PermissionGroupSortingInput { } type PermissionGroupUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) permissionGroupErrors: [PermissionGroupError!]! group: Group } @@ -3605,7 +4599,10 @@ input PluginSortingInput { } type PluginUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) plugin: Plugin pluginsErrors: [PluginError!]! } @@ -3641,9 +4638,16 @@ type Product implements Node & ObjectWithMetadata { visibleInListings: Boolean! privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") - meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") - url: String! @deprecated(reason: "This field will be removed after 2020-07-31.") + privateMeta: [MetaStore]! + @deprecated( + reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." + ) + meta: [MetaStore]! + @deprecated( + reason: "Use the `metadata` field. This field will be removed after 2020-07-31." + ) + url: String! + @deprecated(reason: "This field will be removed after 2020-07-31.") thumbnail(size: Int): Image pricing: ProductPricingInfo isAvailable: Boolean @@ -3668,25 +4672,37 @@ type ProductAttributeError { } type ProductBulkDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! productErrors: [ProductError!]! } type ProductBulkPublish { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! productErrors: [ProductError!]! } type ProductClearMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! product: Product } type ProductClearPrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! product: Product } @@ -3703,7 +4719,10 @@ type ProductCountableEdge { } type ProductCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! product: Product } @@ -3731,7 +4750,10 @@ input ProductCreateInput { } type ProductDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! product: Product } @@ -3799,13 +4821,19 @@ type ProductImage implements Node { } type ProductImageBulkDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! productErrors: [ProductError!]! } type ProductImageCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) product: Product image: ProductImage productErrors: [ProductError!]! @@ -3818,21 +4846,30 @@ input ProductImageCreateInput { } type ProductImageDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) product: Product image: ProductImage productErrors: [ProductError!]! } type ProductImageReorder { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) product: Product images: [ProductImage] productErrors: [ProductError!]! } type ProductImageUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) product: Product image: ProductImage productErrors: [ProductError!]! @@ -3887,7 +4924,10 @@ type ProductPricingInfo { } type ProductSetAvailabilityForPurchase { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) product: Product productErrors: [ProductError!]! } @@ -3909,7 +4949,10 @@ type ProductTranslatableContent implements Node { } type ProductTranslate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) translationErrors: [TranslationError!]! product: Product } @@ -3934,30 +4977,56 @@ type ProductType implements Node & ObjectWithMetadata { weight: Weight privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") - meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") - products(before: String, after: String, first: Int, last: Int): ProductCountableConnection + privateMeta: [MetaStore]! + @deprecated( + reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." + ) + meta: [MetaStore]! + @deprecated( + reason: "Use the `metadata` field. This field will be removed after 2020-07-31." + ) + products( + before: String + after: String + first: Int + last: Int + ): ProductCountableConnection taxRate: TaxRateType taxType: TaxType variantAttributes: [Attribute] productAttributes: [Attribute] - availableAttributes(filter: AttributeFilterInput, before: String, after: String, first: Int, last: Int): AttributeCountableConnection + availableAttributes( + filter: AttributeFilterInput + before: String + after: String + first: Int + last: Int + ): AttributeCountableConnection } type ProductTypeBulkDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! productErrors: [ProductError!]! } type ProductTypeClearMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! productType: ProductType } type ProductTypeClearPrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! productType: ProductType } @@ -3979,13 +5048,19 @@ type ProductTypeCountableEdge { } type ProductTypeCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! productType: ProductType } type ProductTypeDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! productType: ProductType } @@ -4015,7 +5090,10 @@ input ProductTypeInput { } type ProductTypeReorderAttributes { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productType: ProductType productErrors: [ProductError!]! } @@ -4032,37 +5110,55 @@ input ProductTypeSortingInput { } type ProductTypeUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! productType: ProductType } type ProductTypeUpdateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! productType: ProductType } type ProductTypeUpdatePrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! productType: ProductType } type ProductUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! product: Product } type ProductUpdateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! product: Product } type ProductUpdatePrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! product: Product } @@ -4076,14 +5172,32 @@ type ProductVariant implements Node & ObjectWithMetadata { weight: Weight privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") - meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") - quantity: Int! @deprecated(reason: "Use the stock field instead. This field will be removed after 2020-07-31.") - quantityAllocated: Int @deprecated(reason: "Use the stock field instead. This field will be removed after 2020-07-31.") - stockQuantity: Int! @deprecated(reason: "Use the quantityAvailable field instead. This field will be removed after 2020-07-31.") + privateMeta: [MetaStore]! + @deprecated( + reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." + ) + meta: [MetaStore]! + @deprecated( + reason: "Use the `metadata` field. This field will be removed after 2020-07-31." + ) + quantity: Int! + @deprecated( + reason: "Use the stock field instead. This field will be removed after 2020-07-31." + ) + quantityAllocated: Int + @deprecated( + reason: "Use the stock field instead. This field will be removed after 2020-07-31." + ) + stockQuantity: Int! + @deprecated( + reason: "Use the quantityAvailable field instead. This field will be removed after 2020-07-31." + ) price: Money pricing: VariantPricingInfo - isAvailable: Boolean @deprecated(reason: "Use the stock field instead. This field will be removed after 2020-07-31.") + isAvailable: Boolean + @deprecated( + reason: "Use the stock field instead. This field will be removed after 2020-07-31." + ) attributes: [SelectedAttribute!]! costPrice: Money margin: Int @@ -4097,7 +5211,10 @@ type ProductVariant implements Node & ObjectWithMetadata { } type ProductVariantBulkCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! productVariants: [ProductVariant!]! bulkProductErrors: [BulkProductError!]! @@ -4114,19 +5231,28 @@ input ProductVariantBulkCreateInput { } type ProductVariantBulkDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! productErrors: [ProductError!]! } type ProductVariantClearMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! productVariant: ProductVariant } type ProductVariantClearPrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! productVariant: ProductVariant } @@ -4143,7 +5269,10 @@ type ProductVariantCountableEdge { } type ProductVariantCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! productVariant: ProductVariant } @@ -4160,7 +5289,10 @@ input ProductVariantCreateInput { } type ProductVariantDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! productVariant: ProductVariant } @@ -4175,19 +5307,28 @@ input ProductVariantInput { } type ProductVariantStocksCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productVariant: ProductVariant bulkStockErrors: [BulkStockError!]! } type ProductVariantStocksDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productVariant: ProductVariant stockErrors: [StockError!]! } type ProductVariantStocksUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productVariant: ProductVariant bulkStockErrors: [BulkStockError!]! } @@ -4200,7 +5341,10 @@ type ProductVariantTranslatableContent implements Node { } type ProductVariantTranslate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) translationErrors: [TranslationError!]! productVariant: ProductVariant } @@ -4212,93 +5356,329 @@ type ProductVariantTranslation implements Node { } type ProductVariantUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! productVariant: ProductVariant } type ProductVariantUpdateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! productVariant: ProductVariant } type ProductVariantUpdatePrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productErrors: [ProductError!]! productVariant: ProductVariant } type Query { webhook(id: ID!): Webhook - webhooks(sortBy: WebhookSortingInput, filter: WebhookFilterInput, before: String, after: String, first: Int, last: Int): WebhookCountableConnection @deprecated(reason: "Use webhooks field on app(s) query instead. This field will be removed after 2020-07-31.") + webhooks( + sortBy: WebhookSortingInput + filter: WebhookFilterInput + before: String + after: String + first: Int + last: Int + ): WebhookCountableConnection + @deprecated( + reason: "Use webhooks field on app(s) query instead. This field will be removed after 2020-07-31." + ) webhookEvents: [WebhookEvent] webhookSamplePayload(eventType: WebhookSampleEventTypeEnum!): JSONString warehouse(id: ID!): Warehouse - warehouses(filter: WarehouseFilterInput, sortBy: WarehouseSortingInput, before: String, after: String, first: Int, last: Int): WarehouseCountableConnection - translations(kind: TranslatableKinds!, before: String, after: String, first: Int, last: Int): TranslatableItemConnection + warehouses( + filter: WarehouseFilterInput + sortBy: WarehouseSortingInput + before: String + after: String + first: Int + last: Int + ): WarehouseCountableConnection + translations( + kind: TranslatableKinds! + before: String + after: String + first: Int + last: Int + ): TranslatableItemConnection translation(id: ID!, kind: TranslatableKinds!): TranslatableItem stock(id: ID!): Stock - stocks(filter: StockFilterInput, before: String, after: String, first: Int, last: Int): StockCountableConnection + stocks( + filter: StockFilterInput + before: String + after: String + first: Int + last: Int + ): StockCountableConnection shop: Shop! shippingZone(id: ID!): ShippingZone - shippingZones(before: String, after: String, first: Int, last: Int): ShippingZoneCountableConnection + shippingZones( + before: String + after: String + first: Int + last: Int + ): ShippingZoneCountableConnection digitalContent(id: ID!): DigitalContent - digitalContents(before: String, after: String, first: Int, last: Int): DigitalContentCountableConnection - attributes(filter: AttributeFilterInput, sortBy: AttributeSortingInput, before: String, after: String, first: Int, last: Int): AttributeCountableConnection + digitalContents( + before: String + after: String + first: Int + last: Int + ): DigitalContentCountableConnection + attributes( + filter: AttributeFilterInput + sortBy: AttributeSortingInput + before: String + after: String + first: Int + last: Int + ): AttributeCountableConnection attribute(id: ID!): Attribute - categories(filter: CategoryFilterInput, sortBy: CategorySortingInput, level: Int, before: String, after: String, first: Int, last: Int): CategoryCountableConnection + categories( + filter: CategoryFilterInput + sortBy: CategorySortingInput + level: Int + before: String + after: String + first: Int + last: Int + ): CategoryCountableConnection category(id: ID, slug: String): Category collection(id: ID, slug: String): Collection - collections(filter: CollectionFilterInput, sortBy: CollectionSortingInput, before: String, after: String, first: Int, last: Int): CollectionCountableConnection + collections( + filter: CollectionFilterInput + sortBy: CollectionSortingInput + before: String + after: String + first: Int + last: Int + ): CollectionCountableConnection product(id: ID, slug: String): Product - products(filter: ProductFilterInput, sortBy: ProductOrder, stockAvailability: StockAvailability, before: String, after: String, first: Int, last: Int): ProductCountableConnection + products( + filter: ProductFilterInput + sortBy: ProductOrder + stockAvailability: StockAvailability + before: String + after: String + first: Int + last: Int + ): ProductCountableConnection productType(id: ID!): ProductType - productTypes(filter: ProductTypeFilterInput, sortBy: ProductTypeSortingInput, before: String, after: String, first: Int, last: Int): ProductTypeCountableConnection + productTypes( + filter: ProductTypeFilterInput + sortBy: ProductTypeSortingInput + before: String + after: String + first: Int + last: Int + ): ProductTypeCountableConnection productVariant(id: ID!): ProductVariant - productVariants(ids: [ID], before: String, after: String, first: Int, last: Int): ProductVariantCountableConnection - reportProductSales(period: ReportingPeriod!, before: String, after: String, first: Int, last: Int): ProductVariantCountableConnection + productVariants( + ids: [ID] + before: String + after: String + first: Int + last: Int + ): ProductVariantCountableConnection + reportProductSales( + period: ReportingPeriod! + before: String + after: String + first: Int + last: Int + ): ProductVariantCountableConnection payment(id: ID!): Payment - payments(before: String, after: String, first: Int, last: Int): PaymentCountableConnection + payments( + before: String + after: String + first: Int + last: Int + ): PaymentCountableConnection page(id: ID, slug: String): Page - pages(sortBy: PageSortingInput, filter: PageFilterInput, before: String, after: String, first: Int, last: Int): PageCountableConnection - homepageEvents(before: String, after: String, first: Int, last: Int): OrderEventCountableConnection + pages( + sortBy: PageSortingInput + filter: PageFilterInput + before: String + after: String + first: Int + last: Int + ): PageCountableConnection + homepageEvents( + before: String + after: String + first: Int + last: Int + ): OrderEventCountableConnection order(id: ID!): Order - orders(sortBy: OrderSortingInput, filter: OrderFilterInput, created: ReportingPeriod, status: OrderStatusFilter, before: String, after: String, first: Int, last: Int): OrderCountableConnection - draftOrders(sortBy: OrderSortingInput, filter: OrderDraftFilterInput, created: ReportingPeriod, before: String, after: String, first: Int, last: Int): OrderCountableConnection + orders( + sortBy: OrderSortingInput + filter: OrderFilterInput + created: ReportingPeriod + status: OrderStatusFilter + before: String + after: String + first: Int + last: Int + ): OrderCountableConnection + draftOrders( + sortBy: OrderSortingInput + filter: OrderDraftFilterInput + created: ReportingPeriod + before: String + after: String + first: Int + last: Int + ): OrderCountableConnection ordersTotal(period: ReportingPeriod): TaxedMoney orderByToken(token: UUID!): Order menu(id: ID, name: String): Menu - menus(sortBy: MenuSortingInput, filter: MenuFilterInput, before: String, after: String, first: Int, last: Int): MenuCountableConnection + menus( + sortBy: MenuSortingInput + filter: MenuFilterInput + before: String + after: String + first: Int + last: Int + ): MenuCountableConnection menuItem(id: ID!): MenuItem - menuItems(sortBy: MenuItemSortingInput, filter: MenuItemFilterInput, before: String, after: String, first: Int, last: Int): MenuItemCountableConnection + menuItems( + sortBy: MenuItemSortingInput + filter: MenuItemFilterInput + before: String + after: String + first: Int + last: Int + ): MenuItemCountableConnection giftCard(id: ID!): GiftCard - giftCards(before: String, after: String, first: Int, last: Int): GiftCardCountableConnection + giftCards( + before: String + after: String + first: Int + last: Int + ): GiftCardCountableConnection plugin(id: ID!): Plugin - plugins(filter: PluginFilterInput, sortBy: PluginSortingInput, before: String, after: String, first: Int, last: Int): PluginCountableConnection + plugins( + filter: PluginFilterInput + sortBy: PluginSortingInput + before: String + after: String + first: Int + last: Int + ): PluginCountableConnection sale(id: ID!): Sale - sales(filter: SaleFilterInput, sortBy: SaleSortingInput, query: String, before: String, after: String, first: Int, last: Int): SaleCountableConnection + sales( + filter: SaleFilterInput + sortBy: SaleSortingInput + query: String + before: String + after: String + first: Int + last: Int + ): SaleCountableConnection voucher(id: ID!): Voucher - vouchers(filter: VoucherFilterInput, sortBy: VoucherSortingInput, query: String, before: String, after: String, first: Int, last: Int): VoucherCountableConnection + vouchers( + filter: VoucherFilterInput + sortBy: VoucherSortingInput + query: String + before: String + after: String + first: Int + last: Int + ): VoucherCountableConnection exportFile(id: ID!): ExportFile - exportFiles(filter: ExportFileFilterInput, sortBy: ExportFileSortingInput, before: String, after: String, first: Int, last: Int): ExportFileCountableConnection + exportFiles( + filter: ExportFileFilterInput + sortBy: ExportFileSortingInput + before: String + after: String + first: Int + last: Int + ): ExportFileCountableConnection taxTypes: [TaxType] checkout(token: UUID): Checkout - checkouts(before: String, after: String, first: Int, last: Int): CheckoutCountableConnection + checkouts( + before: String + after: String + first: Int + last: Int + ): CheckoutCountableConnection checkoutLine(id: ID): CheckoutLine - checkoutLines(before: String, after: String, first: Int, last: Int): CheckoutLineCountableConnection + checkoutLines( + before: String + after: String + first: Int + last: Int + ): CheckoutLineCountableConnection appsInstallations: [AppInstallation!]! - apps(filter: AppFilterInput, sortBy: AppSortingInput, before: String, after: String, first: Int, last: Int): AppCountableConnection + apps( + filter: AppFilterInput + sortBy: AppSortingInput + before: String + after: String + first: Int + last: Int + ): AppCountableConnection app(id: ID!): App - addressValidationRules(countryCode: CountryCode!, countryArea: String, city: String, cityArea: String): AddressValidationData + addressValidationRules( + countryCode: CountryCode! + countryArea: String + city: String + cityArea: String + ): AddressValidationData address(id: ID!): Address - customers(filter: CustomerFilterInput, sortBy: UserSortingInput, before: String, after: String, first: Int, last: Int): UserCountableConnection - permissionGroups(filter: PermissionGroupFilterInput, sortBy: PermissionGroupSortingInput, before: String, after: String, first: Int, last: Int): GroupCountableConnection + customers( + filter: CustomerFilterInput + sortBy: UserSortingInput + before: String + after: String + first: Int + last: Int + ): UserCountableConnection + permissionGroups( + filter: PermissionGroupFilterInput + sortBy: PermissionGroupSortingInput + before: String + after: String + first: Int + last: Int + ): GroupCountableConnection permissionGroup(id: ID!): Group me: User - staffUsers(filter: StaffUserInput, sortBy: UserSortingInput, before: String, after: String, first: Int, last: Int): UserCountableConnection - serviceAccounts(filter: ServiceAccountFilterInput, sortBy: ServiceAccountSortingInput, before: String, after: String, first: Int, last: Int): ServiceAccountCountableConnection @deprecated(reason: "Use the `apps` query instead. This field will be removed after 2020-07-31.") - serviceAccount(id: ID!): ServiceAccount @deprecated(reason: "Use the `app` query instead. This field will be removed after 2020-07-31.") + staffUsers( + filter: StaffUserInput + sortBy: UserSortingInput + before: String + after: String + first: Int + last: Int + ): UserCountableConnection + serviceAccounts( + filter: ServiceAccountFilterInput + sortBy: ServiceAccountSortingInput + before: String + after: String + first: Int + last: Int + ): ServiceAccountCountableConnection + @deprecated( + reason: "Use the `apps` query instead. This field will be removed after 2020-07-31." + ) + serviceAccount(id: ID!): ServiceAccount + @deprecated( + reason: "Use the `app` query instead. This field will be removed after 2020-07-31." + ) user(id: ID!): User _entities(representations: [_Any]): [_Entity] _service: _Service @@ -4310,7 +5690,10 @@ type ReducedRate { } type RefreshToken { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) token: String user: User accountErrors: [AccountError!]! @@ -4327,13 +5710,19 @@ enum ReportingPeriod { } type RequestEmailChange { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) user: User accountErrors: [AccountError!]! } type RequestPasswordReset { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) accountErrors: [AccountError!]! } @@ -4344,20 +5733,41 @@ type Sale implements Node { value: Float! startDate: DateTime! endDate: DateTime - categories(before: String, after: String, first: Int, last: Int): CategoryCountableConnection - collections(before: String, after: String, first: Int, last: Int): CollectionCountableConnection - products(before: String, after: String, first: Int, last: Int): ProductCountableConnection + categories( + before: String + after: String + first: Int + last: Int + ): CategoryCountableConnection + collections( + before: String + after: String + first: Int + last: Int + ): CollectionCountableConnection + products( + before: String + after: String + first: Int + last: Int + ): ProductCountableConnection translation(languageCode: LanguageCodeEnum!): SaleTranslation } type SaleAddCatalogues { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) sale: Sale discountErrors: [DiscountError!]! } type SaleBulkDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! discountErrors: [DiscountError!]! } @@ -4374,13 +5784,19 @@ type SaleCountableEdge { } type SaleCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) discountErrors: [DiscountError!]! sale: Sale } type SaleDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) discountErrors: [DiscountError!]! sale: Sale } @@ -4404,7 +5820,10 @@ input SaleInput { } type SaleRemoveCatalogues { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) sale: Sale discountErrors: [DiscountError!]! } @@ -4430,7 +5849,10 @@ type SaleTranslatableContent implements Node { } type SaleTranslate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) translationErrors: [TranslationError!]! sale: Sale } @@ -4447,7 +5869,10 @@ enum SaleType { } type SaleUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) discountErrors: [DiscountError!]! sale: Sale } @@ -4471,12 +5896,21 @@ type ServiceAccount implements Node & ObjectWithMetadata { tokens: [ServiceAccountToken] privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") - meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") + privateMeta: [MetaStore]! + @deprecated( + reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." + ) + meta: [MetaStore]! + @deprecated( + reason: "Use the `metadata` field. This field will be removed after 2020-07-31." + ) } type ServiceAccountClearPrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) accountErrors: [AccountError!]! serviceAccount: ServiceAccount } @@ -4493,14 +5927,20 @@ type ServiceAccountCountableEdge { } type ServiceAccountCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) authToken: String accountErrors: [AccountError!]! serviceAccount: ServiceAccount } type ServiceAccountDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) accountErrors: [AccountError!]! serviceAccount: ServiceAccount } @@ -4533,14 +5973,20 @@ type ServiceAccountToken implements Node { } type ServiceAccountTokenCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) authToken: String accountErrors: [AccountError!]! serviceAccountToken: ServiceAccountToken } type ServiceAccountTokenDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) accountErrors: [AccountError!]! serviceAccountToken: ServiceAccountToken } @@ -4551,19 +5997,28 @@ input ServiceAccountTokenInput { } type ServiceAccountUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) accountErrors: [AccountError!]! serviceAccount: ServiceAccount } type ServiceAccountUpdatePrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) accountErrors: [AccountError!]! serviceAccount: ServiceAccount } type SetPassword { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) token: String refreshToken: String csrfToken: String @@ -4620,20 +6075,29 @@ enum ShippingMethodTypeEnum { } type ShippingPriceBulkDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! shippingErrors: [ShippingError!]! } type ShippingPriceCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) shippingZone: ShippingZone shippingErrors: [ShippingError!]! shippingMethod: ShippingMethod } type ShippingPriceDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) shippingMethod: ShippingMethod shippingZone: ShippingZone shippingErrors: [ShippingError!]! @@ -4651,13 +6115,19 @@ input ShippingPriceInput { } type ShippingPriceTranslate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) translationErrors: [TranslationError!]! shippingMethod: ShippingMethod } type ShippingPriceUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) shippingZone: ShippingZone shippingErrors: [ShippingError!]! shippingMethod: ShippingMethod @@ -4674,7 +6144,10 @@ type ShippingZone implements Node { } type ShippingZoneBulkDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! shippingErrors: [ShippingError!]! } @@ -4691,7 +6164,10 @@ type ShippingZoneCountableEdge { } type ShippingZoneCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) shippingErrors: [ShippingError!]! shippingZone: ShippingZone } @@ -4704,13 +6180,19 @@ input ShippingZoneCreateInput { } type ShippingZoneDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) shippingErrors: [ShippingError!]! shippingZone: ShippingZone } type ShippingZoneUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) shippingErrors: [ShippingError!]! shippingZone: ShippingZone } @@ -4757,13 +6239,19 @@ type Shop { } type ShopAddressUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) shop: Shop shopErrors: [ShopError!]! } type ShopDomainUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) shop: Shop shopErrors: [ShopError!]! } @@ -4785,7 +6273,10 @@ enum ShopErrorCode { } type ShopFetchTaxRates { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) shop: Shop shopErrors: [ShopError!]! } @@ -4807,7 +6298,10 @@ input ShopSettingsInput { } type ShopSettingsTranslate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) shop: Shop translationErrors: [TranslationError!]! } @@ -4818,7 +6312,10 @@ input ShopSettingsTranslationInput { } type ShopSettingsUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) shop: Shop shopErrors: [ShopError!]! } @@ -4836,13 +6333,19 @@ input SiteDomainInput { } type StaffBulkDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! staffErrors: [StaffError!]! } type StaffCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) staffErrors: [StaffError!]! user: User } @@ -4858,7 +6361,10 @@ input StaffCreateInput { } type StaffDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) staffErrors: [StaffError!]! user: User } @@ -4885,13 +6391,19 @@ type StaffNotificationRecipient implements Node { } type StaffNotificationRecipientCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) shopErrors: [ShopError!]! staffNotificationRecipient: StaffNotificationRecipient } type StaffNotificationRecipientDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) shopErrors: [ShopError!]! staffNotificationRecipient: StaffNotificationRecipient } @@ -4903,13 +6415,19 @@ input StaffNotificationRecipientInput { } type StaffNotificationRecipientUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) shopErrors: [ShopError!]! staffNotificationRecipient: StaffNotificationRecipient } type StaffUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) staffErrors: [StaffError!]! user: User } @@ -5059,7 +6577,18 @@ enum TransactionKind { CANCEL } -union TranslatableItem = ProductTranslatableContent | CollectionTranslatableContent | CategoryTranslatableContent | AttributeTranslatableContent | AttributeValueTranslatableContent | ProductVariantTranslatableContent | PageTranslatableContent | ShippingMethodTranslatableContent | SaleTranslatableContent | VoucherTranslatableContent | MenuItemTranslatableContent +union TranslatableItem = + ProductTranslatableContent + | CollectionTranslatableContent + | CategoryTranslatableContent + | AttributeTranslatableContent + | AttributeValueTranslatableContent + | ProductVariantTranslatableContent + | PageTranslatableContent + | ShippingMethodTranslatableContent + | SaleTranslatableContent + | VoucherTranslatableContent + | MenuItemTranslatableContent type TranslatableItemConnection { pageInfo: PageInfo! @@ -5114,13 +6643,19 @@ input UpdateInvoiceInput { } type UpdateMetadata { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) metadataErrors: [MetadataError!]! item: ObjectWithMetadata } type UpdatePrivateMetadata { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) metadataErrors: [MetadataError!]! item: ObjectWithMetadata } @@ -5141,13 +6676,32 @@ type User implements Node & ObjectWithMetadata { defaultBillingAddress: Address privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") - meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") + privateMeta: [MetaStore]! + @deprecated( + reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." + ) + meta: [MetaStore]! + @deprecated( + reason: "Use the `metadata` field. This field will be removed after 2020-07-31." + ) addresses: [Address] checkout: Checkout - giftCards(before: String, after: String, first: Int, last: Int): GiftCardCountableConnection - orders(before: String, after: String, first: Int, last: Int): OrderCountableConnection - permissions: [Permission] @deprecated(reason: "Will be removed in Saleor 2.11.Use the `userPermissions` instead.") + giftCards( + before: String + after: String + first: Int + last: Int + ): GiftCardCountableConnection + orders( + before: String + after: String + first: Int + last: Int + ): OrderCountableConnection + permissions: [Permission] + @deprecated( + reason: "Will be removed in Saleor 2.11.Use the `userPermissions` instead." + ) userPermissions: [UserPermission] permissionGroups: [Group] editableGroups: [Group] @@ -5157,31 +6711,46 @@ type User implements Node & ObjectWithMetadata { } type UserAvatarDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) user: User accountErrors: [AccountError!]! } type UserAvatarUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) user: User accountErrors: [AccountError!]! } type UserBulkSetActive { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! accountErrors: [AccountError!]! } type UserClearMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) accountErrors: [AccountError!]! user: User } type UserClearPrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) accountErrors: [AccountError!]! user: User } @@ -5227,13 +6796,19 @@ input UserSortingInput { } type UserUpdateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) accountErrors: [AccountError!]! user: User } type UserUpdatePrivateMeta { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) accountErrors: [AccountError!]! user: User } @@ -5245,14 +6820,20 @@ type VAT { } type VariantImageAssign { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productVariant: ProductVariant image: ProductImage productErrors: [ProductError!]! } type VariantImageUnassign { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) productVariant: ProductVariant image: ProductImage productErrors: [ProductError!]! @@ -5268,7 +6849,10 @@ type VariantPricingInfo { } type VerifyToken { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) user: User isValid: Boolean! payload: GenericScalar @@ -5290,21 +6874,42 @@ type Voucher implements Node { discountValue: Float! minSpent: Money minCheckoutItemsQuantity: Int - categories(before: String, after: String, first: Int, last: Int): CategoryCountableConnection - collections(before: String, after: String, first: Int, last: Int): CollectionCountableConnection - products(before: String, after: String, first: Int, last: Int): ProductCountableConnection + categories( + before: String + after: String + first: Int + last: Int + ): CategoryCountableConnection + collections( + before: String + after: String + first: Int + last: Int + ): CollectionCountableConnection + products( + before: String + after: String + first: Int + last: Int + ): ProductCountableConnection countries: [CountryDisplay] translation(languageCode: LanguageCodeEnum!): VoucherTranslation } type VoucherAddCatalogues { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) voucher: Voucher discountErrors: [DiscountError!]! } type VoucherBulkDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) count: Int! discountErrors: [DiscountError!]! } @@ -5321,13 +6926,19 @@ type VoucherCountableEdge { } type VoucherCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) discountErrors: [DiscountError!]! voucher: Voucher } type VoucherDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) discountErrors: [DiscountError!]! voucher: Voucher } @@ -5366,7 +6977,10 @@ input VoucherInput { } type VoucherRemoveCatalogues { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) voucher: Voucher discountErrors: [DiscountError!]! } @@ -5394,7 +7008,10 @@ type VoucherTranslatableContent implements Node { } type VoucherTranslate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) translationErrors: [TranslationError!]! voucher: Voucher } @@ -5412,7 +7029,10 @@ enum VoucherTypeEnum { } type VoucherUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) discountErrors: [DiscountError!]! voucher: Voucher } @@ -5422,7 +7042,12 @@ type Warehouse implements Node { name: String! slug: String! companyName: String! - shippingZones(before: String, after: String, first: Int, last: Int): ShippingZoneCountableConnection! + shippingZones( + before: String + after: String + first: Int + last: Int + ): ShippingZoneCountableConnection! address: Address! email: String! } @@ -5450,7 +7075,10 @@ type WarehouseCountableEdge { } type WarehouseCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) warehouseErrors: [WarehouseError!]! warehouse: Warehouse } @@ -5465,7 +7093,10 @@ input WarehouseCreateInput { } type WarehouseDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) warehouseErrors: [WarehouseError!]! warehouse: Warehouse } @@ -5491,13 +7122,19 @@ input WarehouseFilterInput { } type WarehouseShippingZoneAssign { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) warehouseErrors: [WarehouseError!]! warehouse: Warehouse } type WarehouseShippingZoneUnassign { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) warehouseErrors: [WarehouseError!]! warehouse: Warehouse } @@ -5512,7 +7149,10 @@ input WarehouseSortingInput { } type WarehouseUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) warehouseErrors: [WarehouseError!]! warehouse: Warehouse } @@ -5532,7 +7172,10 @@ type Webhook implements Node { secretKey: String id: ID! events: [WebhookEvent!]! - serviceAccount: ServiceAccount! @deprecated(reason: "Use the `app` field instead. This field will be removed after 2020-07-31.") + serviceAccount: ServiceAccount! + @deprecated( + reason: "Use the `app` field instead. This field will be removed after 2020-07-31." + ) app: App! } @@ -5548,7 +7191,10 @@ type WebhookCountableEdge { } type WebhookCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) webhookErrors: [WebhookError!]! webhook: Webhook } @@ -5564,7 +7210,10 @@ input WebhookCreateInput { } type WebhookDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) webhookErrors: [WebhookError!]! webhook: Webhook } @@ -5641,7 +7290,10 @@ input WebhookSortingInput { } type WebhookUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + errors: [Error!]! + @deprecated( + reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + ) webhookErrors: [WebhookError!]! webhook: Webhook } @@ -5672,7 +7324,18 @@ enum WeightUnitsEnum { scalar _Any -union _Entity = Address | User | Group | ServiceAccount | App | ProductVariant | Product | ProductType | Collection | Category | ProductImage +union _Entity = + Address + | User + | Group + | ServiceAccount + | App + | ProductVariant + | Product + | ProductType + | Collection + | Category + | ProductImage type _Service { sdl: String diff --git a/src/categories/views/CategoryCreate.tsx b/src/categories/views/CategoryCreate.tsx index 606fab85b1f..761b12e20fb 100644 --- a/src/categories/views/CategoryCreate.tsx +++ b/src/categories/views/CategoryCreate.tsx @@ -52,7 +52,8 @@ export const CategoryCreateView: React.FC = ({ seo: { description: formData.seoDescription, title: formData.seoTitle - } + }, + slug: formData.slug }, parent: parentId || null } diff --git a/src/categories/views/CategoryDetails.tsx b/src/categories/views/CategoryDetails.tsx index cb875d01d70..cd52af91c77 100644 --- a/src/categories/views/CategoryDetails.tsx +++ b/src/categories/views/CategoryDetails.tsx @@ -186,7 +186,8 @@ export const CategoryDetails: React.FC = ({ seo: { description: formData.seoDescription, title: formData.seoTitle - } + }, + slug: formData.slug } } }); diff --git a/src/collections/views/CollectionDetails.tsx b/src/collections/views/CollectionDetails.tsx index 9682381556e..9ca6d079899 100644 --- a/src/collections/views/CollectionDetails.tsx +++ b/src/collections/views/CollectionDetails.tsx @@ -180,7 +180,8 @@ export const CollectionDetails: React.FC = ({ seo: { description: formData.seoDescription, title: formData.seoTitle - } + }, + slug: formData.slug }; const isFeatured = data.shop.homepageCollection ? data.shop.homepageCollection.id === data.collection.id diff --git a/src/types/globalTypes.ts b/src/types/globalTypes.ts index 7430a65da35..265cefea9a0 100644 --- a/src/types/globalTypes.ts +++ b/src/types/globalTypes.ts @@ -1083,12 +1083,12 @@ export interface CollectionFilterInput { export interface CollectionInput { isPublished?: boolean | null; name?: string | null; - slug?: string | null; description?: string | null; descriptionJson?: any | null; backgroundImage?: any | null; backgroundImageAlt?: string | null; seo?: SeoInput | null; + slug?: string | null; publicationDate?: any | null; } From 77063deb4f786c5abf6264da6af9928046afa896 Mon Sep 17 00:00:00 2001 From: Magdalena Markusik Date: Mon, 21 Sep 2020 14:45:57 +0200 Subject: [PATCH 16/31] fix seo form to work with null values from some props --- .../CollectionDetailsPage.tsx | 2 +- src/components/SeoForm/SeoForm.tsx | 49 ++++++++++++++++--- 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx b/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx index a86fb1c05b1..49c1a28343a 100644 --- a/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx +++ b/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx @@ -103,7 +103,7 @@ const CollectionDetailsPage: React.FC = ({ publicationDate: maybe(() => collection.publicationDate, ""), seoDescription: maybe(() => collection.seoDescription, ""), seoTitle: maybe(() => collection.seoTitle, ""), - slug: collection.slug || "" + slug: collection?.slug || "" }} onSubmit={handleSubmit} confirmLeave diff --git a/src/components/SeoForm/SeoForm.tsx b/src/components/SeoForm/SeoForm.tsx index 9217a9cddde..89883d3267d 100644 --- a/src/components/SeoForm/SeoForm.tsx +++ b/src/components/SeoForm/SeoForm.tsx @@ -78,14 +78,14 @@ interface SeoFormProps { const SeoForm: React.FC = props => { const { - description = "", + description, descriptionPlaceholder, disabled, helperText, loading, - title = "", + title, slug, - slugPlaceholder = "", + slugPlaceholder, titlePlaceholder, onChange } = props; @@ -95,6 +95,39 @@ const SeoForm: React.FC = props => { const [expanded, setExpansionStatus] = React.useState(false); const toggleExpansion = () => setExpansionStatus(!expanded); const shouldDisplayHelperText = () => helperText && !expanded; + // const getParsedProps = () => { + // const keysToParse: Array = [ + // "slug", + // "slugPlaceholder", + // "description", + // "descriptionPlaceholder", + // "title", + // "titlePlaceholder" + // ]; + + // return reduce( + // props, + // (result, value, key: keyof SeoFormProps) => { + // console.log({ result, value, key }); + // if (keysToParse.includes(key)) { + // return { ...result, [key]: !!value ? "" : value }; + // } + // return result; + // }, + // {} as Partial + // ); + // }; + + // const { + // title, + // titlePlaceholder, + // slug, + // slugPlaceholder, + // description, + // descriptionPlaceholder + // } = getParsedProps(); + + // console.log({ ...getParsedProps() }); return ( @@ -146,7 +179,7 @@ const SeoForm: React.FC = props => { defaultMessage: "If empty, the preview shows what will be autogenerated." })} - value={slug.slice(0, 69)} + value={slug?.slice(0, 69)} disabled={loading || disabled} placeholder={slug || slugify(slugPlaceholder)} onChange={onChange} @@ -160,7 +193,7 @@ const SeoForm: React.FC = props => {
- {title.length > 0 && ( + {title?.length > 0 && ( = props => { defaultMessage: "If empty, the preview shows what will be autogenerated." })} - value={title.slice(0, 69)} + value={title?.slice(0, 69)} disabled={loading || disabled} placeholder={titlePlaceholder} onChange={onChange} @@ -192,7 +225,7 @@ const SeoForm: React.FC = props => {
- {description.length > 0 && ( + {description?.length > 0 && ( = props => { defaultMessage: "If empty, the preview shows what will be autogenerated." })} - value={description ? description.slice(0, 299) : undefined} + value={description?.slice(0, 299)} onChange={onChange} disabled={loading || disabled} fullWidth From 0f4d0f1195f30d7a8d2a48c4e54900ec688944db Mon Sep 17 00:00:00 2001 From: Magdalena Markusik Date: Mon, 21 Sep 2020 14:57:12 +0200 Subject: [PATCH 17/31] fix types and lint --- .../components/CategoryUpdatePage/CategoryUpdatePage.tsx | 1 + src/products/components/ProductCreatePage/ProductCreatePage.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx b/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx index 9acb198a842..b56aa5557e5 100644 --- a/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx +++ b/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx @@ -36,6 +36,7 @@ export interface FormData extends MetadataFormData { backgroundImageAlt: string; description: RawDraftContentState; name: string; + slug: string; seoTitle: string; seoDescription: string; } diff --git a/src/products/components/ProductCreatePage/ProductCreatePage.tsx b/src/products/components/ProductCreatePage/ProductCreatePage.tsx index 03ab907ab5f..e00125ea9f9 100644 --- a/src/products/components/ProductCreatePage/ProductCreatePage.tsx +++ b/src/products/components/ProductCreatePage/ProductCreatePage.tsx @@ -157,13 +157,13 @@ export const ProductCreatePage: React.FC = ({ isPublished: false, metadata: [], name: "", - slug: "", privateMetadata: [], productType: "", publicationDate: "", seoDescription: "", seoTitle: "", sku: null, + slug: "", stockQuantity: null, trackInventory: false, visibleInListings: false, From ca644c9bb084434cc75a4fc9b7e7d3286f6465ea Mon Sep 17 00:00:00 2001 From: Magdalena Markusik Date: Mon, 21 Sep 2020 15:34:32 +0200 Subject: [PATCH 18/31] refactor --- .prettierrc | 3 +- schema.graphql | 2389 ++++---------------- src/components/SeoForm/SeoForm.tsx | 57 +- src/pages/components/PageSlug/PageSlug.tsx | 64 - src/pages/components/PageSlug/index.ts | 2 - 5 files changed, 480 insertions(+), 2035 deletions(-) delete mode 100644 src/pages/components/PageSlug/PageSlug.tsx delete mode 100644 src/pages/components/PageSlug/index.ts diff --git a/.prettierrc b/.prettierrc index 1f5e5d140d8..f56052b7e18 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,4 +1,5 @@ { "arrowParens": "avoid", - "trailingComma": "none" + "trailingComma": "none", + "printWidth": 140 } diff --git a/schema.graphql b/schema.graphql index eacfcc2e889..6cd5b35ab45 100644 --- a/schema.graphql +++ b/schema.graphql @@ -4,40 +4,29 @@ schema { } type AccountAddressCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") user: User accountErrors: [AccountError!]! address: Address } type AccountAddressDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") user: User accountErrors: [AccountError!]! address: Address } type AccountAddressUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + user: User accountErrors: [AccountError!]! address: Address } type AccountDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") accountErrors: [AccountError!]! user: User } @@ -89,10 +78,7 @@ input AccountInput { } type AccountRegister { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") requiresConfirmation: Boolean accountErrors: [AccountError!]! user: User @@ -105,36 +91,24 @@ input AccountRegisterInput { } type AccountRequestDeletion { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") accountErrors: [AccountError!]! } type AccountSetDefaultAddress { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") user: User accountErrors: [AccountError!]! } type AccountUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") accountErrors: [AccountError!]! user: User } type AccountUpdateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") accountErrors: [AccountError!]! user: User } @@ -157,20 +131,14 @@ type Address implements Node { } type AddressCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") user: User accountErrors: [AccountError!]! address: Address } type AddressDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") user: User accountErrors: [AccountError!]! address: Address @@ -191,10 +159,7 @@ input AddressInput { } type AddressSetDefault { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") user: User accountErrors: [AccountError!]! } @@ -205,10 +170,7 @@ enum AddressTypeEnum { } type AddressUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") user: User accountErrors: [AccountError!]! address: Address @@ -243,14 +205,8 @@ type App implements Node & ObjectWithMetadata { tokens: [AppToken] privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! - @deprecated( - reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." - ) - meta: [MetaStore]! - @deprecated( - reason: "Use the `metadata` field. This field will be removed after 2020-07-31." - ) + privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") + meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") type: AppTypeEnum webhooks: [Webhook] aboutApp: String @@ -265,10 +221,7 @@ type App implements Node & ObjectWithMetadata { } type AppActivate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") appErrors: [AppError!]! app: App } @@ -285,38 +238,26 @@ type AppCountableEdge { } type AppCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") authToken: String appErrors: [AppError!]! app: App } type AppDeactivate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") appErrors: [AppError!]! app: App } type AppDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") appErrors: [AppError!]! app: App } type AppDeleteFailedInstallation { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") appErrors: [AppError!]! appInstallation: AppInstallation } @@ -345,10 +286,7 @@ enum AppErrorCode { } type AppFetchManifest { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") manifest: Manifest appErrors: [AppError!]! } @@ -366,10 +304,7 @@ input AppInput { } type AppInstall { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") appErrors: [AppError!]! appInstallation: AppInstallation } @@ -392,10 +327,7 @@ type AppInstallation implements Node & Job { } type AppRetryInstall { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") appErrors: [AppError!]! appInstallation: AppInstallation } @@ -417,20 +349,14 @@ type AppToken implements Node { } type AppTokenCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") authToken: String appErrors: [AppError!]! appToken: AppToken } type AppTokenDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") appErrors: [AppError!]! appToken: AppToken } @@ -441,10 +367,7 @@ input AppTokenInput { } type AppTokenVerify { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") valid: Boolean! appErrors: [AppError!]! } @@ -455,47 +378,25 @@ enum AppTypeEnum { } type AppUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") appErrors: [AppError!]! app: App } type AssignNavigation { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") menu: Menu menuErrors: [MenuError!]! } type Attribute implements Node & ObjectWithMetadata { id: ID! - productTypes( - before: String - after: String - first: Int - last: Int - ): ProductTypeCountableConnection! - productVariantTypes( - before: String - after: String - first: Int - last: Int - ): ProductTypeCountableConnection! + productTypes(before: String, after: String, first: Int, last: Int): ProductTypeCountableConnection! + productVariantTypes(before: String, after: String, first: Int, last: Int): ProductTypeCountableConnection! privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! - @deprecated( - reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." - ) - meta: [MetaStore]! - @deprecated( - reason: "Use the `metadata` field. This field will be removed after 2020-07-31." - ) + privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") + meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") inputType: AttributeInputTypeEnum name: String slug: String @@ -510,10 +411,7 @@ type Attribute implements Node & ObjectWithMetadata { } type AttributeAssign { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productType: ProductType productErrors: [ProductAttributeError!]! } @@ -524,28 +422,19 @@ input AttributeAssignInput { } type AttributeBulkDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! productErrors: [ProductError!]! } type AttributeClearMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! attribute: Attribute } type AttributeClearPrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! attribute: Attribute } @@ -562,10 +451,7 @@ type AttributeCountableEdge { } type AttributeCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") attribute: Attribute productErrors: [ProductError!]! } @@ -585,10 +471,7 @@ input AttributeCreateInput { } type AttributeDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! attribute: Attribute } @@ -618,10 +501,7 @@ enum AttributeInputTypeEnum { } type AttributeReorderValues { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") attribute: Attribute productErrors: [ProductError!]! } @@ -651,10 +531,7 @@ type AttributeTranslatableContent implements Node { } type AttributeTranslate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") translationErrors: [TranslationError!]! attribute: Attribute } @@ -671,19 +548,13 @@ enum AttributeTypeEnum { } type AttributeUnassign { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productType: ProductType productErrors: [ProductError!]! } type AttributeUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") attribute: Attribute productErrors: [ProductError!]! } @@ -703,19 +574,13 @@ input AttributeUpdateInput { } type AttributeUpdateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! attribute: Attribute } type AttributeUpdatePrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! attribute: Attribute } @@ -733,19 +598,13 @@ type AttributeValue implements Node { } type AttributeValueBulkDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! productErrors: [ProductError!]! } type AttributeValueCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") attribute: Attribute productErrors: [ProductError!]! attributeValue: AttributeValue @@ -756,10 +615,7 @@ input AttributeValueCreateInput { } type AttributeValueDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") attribute: Attribute productErrors: [ProductError!]! attributeValue: AttributeValue @@ -778,10 +634,7 @@ type AttributeValueTranslatableContent implements Node { } type AttributeValueTranslate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") translationErrors: [TranslationError!]! attributeValue: AttributeValue } @@ -800,10 +653,7 @@ enum AttributeValueType { } type AttributeValueUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") attribute: Attribute productErrors: [ProductError!]! attributeValue: AttributeValue @@ -815,20 +665,14 @@ type AuthorizationKey { } type AuthorizationKeyAdd { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") authorizationKey: AuthorizationKey shop: Shop shopErrors: [ShopError!]! } type AuthorizationKeyDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") authorizationKey: AuthorizationKey shop: Shop shopErrors: [ShopError!]! @@ -877,61 +721,30 @@ type Category implements Node & ObjectWithMetadata { level: Int! privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! - @deprecated( - reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." - ) - meta: [MetaStore]! - @deprecated( - reason: "Use the `metadata` field. This field will be removed after 2020-07-31." - ) - ancestors( - before: String - after: String - first: Int - last: Int - ): CategoryCountableConnection - products( - before: String - after: String - first: Int - last: Int - ): ProductCountableConnection - url: String - @deprecated(reason: "This field will be removed after 2020-07-31.") - children( - before: String - after: String - first: Int - last: Int - ): CategoryCountableConnection + privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") + meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") + ancestors(before: String, after: String, first: Int, last: Int): CategoryCountableConnection + products(before: String, after: String, first: Int, last: Int): ProductCountableConnection + url: String @deprecated(reason: "This field will be removed after 2020-07-31.") + children(before: String, after: String, first: Int, last: Int): CategoryCountableConnection backgroundImage(size: Int): Image translation(languageCode: LanguageCodeEnum!): CategoryTranslation } type CategoryBulkDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! productErrors: [ProductError!]! } type CategoryClearMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! category: Category } type CategoryClearPrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! category: Category } @@ -948,19 +761,13 @@ type CategoryCountableEdge { } type CategoryCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! category: Category } type CategoryDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! category: Category } @@ -1003,10 +810,7 @@ type CategoryTranslatableContent implements Node { } type CategoryTranslate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") translationErrors: [TranslationError!]! category: Category } @@ -1022,28 +826,19 @@ type CategoryTranslation implements Node { } type CategoryUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! category: Category } type CategoryUpdateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! category: Category } type CategoryUpdatePrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! category: Category } @@ -1065,14 +860,8 @@ type Checkout implements Node & ObjectWithMetadata { id: ID! privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! - @deprecated( - reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." - ) - meta: [MetaStore]! - @deprecated( - reason: "Use the `metadata` field. This field will be removed after 2020-07-31." - ) + privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") + meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") availableShippingMethods: [ShippingMethod]! availablePaymentGateways: [PaymentGateway!]! email: String! @@ -1085,46 +874,31 @@ type Checkout implements Node & ObjectWithMetadata { } type CheckoutAddPromoCode { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") checkout: Checkout checkoutErrors: [CheckoutError!]! } type CheckoutBillingAddressUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") checkout: Checkout checkoutErrors: [CheckoutError!]! } type CheckoutClearMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") checkoutErrors: [CheckoutError!]! checkout: Checkout } type CheckoutClearPrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") checkoutErrors: [CheckoutError!]! checkout: Checkout } type CheckoutComplete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") order: Order confirmationNeeded: Boolean! confirmationData: JSONString @@ -1143,10 +917,7 @@ type CheckoutCountableEdge { } type CheckoutCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") created: Boolean checkoutErrors: [CheckoutError!]! checkout: Checkout @@ -1160,28 +931,19 @@ input CheckoutCreateInput { } type CheckoutCustomerAttach { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") checkout: Checkout checkoutErrors: [CheckoutError!]! } type CheckoutCustomerDetach { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") checkout: Checkout checkoutErrors: [CheckoutError!]! } type CheckoutEmailUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") checkout: Checkout checkoutErrors: [CheckoutError!]! } @@ -1236,10 +998,7 @@ type CheckoutLineCountableEdge { } type CheckoutLineDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") checkout: Checkout checkoutErrors: [CheckoutError!]! } @@ -1250,74 +1009,50 @@ input CheckoutLineInput { } type CheckoutLinesAdd { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") checkout: Checkout checkoutErrors: [CheckoutError!]! } type CheckoutLinesUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") checkout: Checkout checkoutErrors: [CheckoutError!]! } type CheckoutPaymentCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") checkout: Checkout payment: Payment paymentErrors: [PaymentError!]! } type CheckoutRemovePromoCode { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") checkout: Checkout checkoutErrors: [CheckoutError!]! } type CheckoutShippingAddressUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") checkout: Checkout checkoutErrors: [CheckoutError!]! } type CheckoutShippingMethodUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") checkout: Checkout checkoutErrors: [CheckoutError!]! } type CheckoutUpdateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") checkoutErrors: [CheckoutError!]! checkout: Checkout } type CheckoutUpdatePrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") checkoutErrors: [CheckoutError!]! checkout: Checkout } @@ -1339,14 +1074,8 @@ type Collection implements Node & ObjectWithMetadata { slug: String! privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! - @deprecated( - reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." - ) - meta: [MetaStore]! - @deprecated( - reason: "Use the `metadata` field. This field will be removed after 2020-07-31." - ) + privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") + meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") products( filter: ProductFilterInput sortBy: ProductOrder @@ -1360,46 +1089,31 @@ type Collection implements Node & ObjectWithMetadata { } type CollectionAddProducts { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") collection: Collection productErrors: [ProductError!]! } type CollectionBulkDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! productErrors: [ProductError!]! } type CollectionBulkPublish { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! productErrors: [ProductError!]! } type CollectionClearMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! collection: Collection } type CollectionClearPrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! collection: Collection } @@ -1416,10 +1130,7 @@ type CollectionCountableEdge { } type CollectionCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! collection: Collection } @@ -1438,10 +1149,7 @@ input CollectionCreateInput { } type CollectionDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! collection: Collection } @@ -1470,19 +1178,13 @@ enum CollectionPublished { } type CollectionRemoveProducts { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") collection: Collection productErrors: [ProductError!]! } type CollectionReorderProducts { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") collection: Collection productErrors: [ProductError!]! } @@ -1510,10 +1212,7 @@ type CollectionTranslatableContent implements Node { } type CollectionTranslate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") translationErrors: [TranslationError!]! collection: Collection } @@ -1529,28 +1228,19 @@ type CollectionTranslation implements Node { } type CollectionUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! collection: Collection } type CollectionUpdateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! collection: Collection } type CollectionUpdatePrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! collection: Collection } @@ -1576,19 +1266,13 @@ enum ConfigurationTypeFieldEnum { } type ConfirmAccount { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") user: User accountErrors: [AccountError!]! } type ConfirmEmailChange { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") user: User accountErrors: [AccountError!]! } @@ -1853,10 +1537,7 @@ type CountryDisplay { } type CreateToken { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") token: String refreshToken: String csrfToken: String @@ -1873,28 +1554,19 @@ type CreditCard { } type CustomerBulkDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! accountErrors: [AccountError!]! } type CustomerCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") accountErrors: [AccountError!]! user: User } type CustomerDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") accountErrors: [AccountError!]! user: User } @@ -1945,10 +1617,7 @@ input CustomerInput { } type CustomerUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") accountErrors: [AccountError!]! user: User } @@ -1968,27 +1637,18 @@ input DateTimeRangeInput { } type DeactivateAllUserTokens { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") accountErrors: [AccountError!]! } type DeleteMetadata { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") metadataErrors: [MetadataError!]! item: ObjectWithMetadata } type DeletePrivateMetadata { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") metadataErrors: [MetadataError!]! item: ObjectWithMetadata } @@ -2004,14 +1664,8 @@ type DigitalContent implements Node & ObjectWithMetadata { id: ID! privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! - @deprecated( - reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." - ) - meta: [MetaStore]! - @deprecated( - reason: "Use the `metadata` field. This field will be removed after 2020-07-31." - ) + privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") + meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") } type DigitalContentCountableConnection { @@ -2026,20 +1680,14 @@ type DigitalContentCountableEdge { } type DigitalContentCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") variant: ProductVariant content: DigitalContent productErrors: [ProductError!]! } type DigitalContentDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") variant: ProductVariant productErrors: [ProductError!]! } @@ -2052,10 +1700,7 @@ input DigitalContentInput { } type DigitalContentUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") variant: ProductVariant content: DigitalContent productErrors: [ProductError!]! @@ -2079,10 +1724,7 @@ type DigitalContentUrl implements Node { } type DigitalContentUrlCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! digitalContentUrl: DigitalContentUrl } @@ -2124,28 +1766,19 @@ type Domain { } type DraftOrderBulkDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! orderErrors: [OrderError!]! } type DraftOrderComplete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") order: Order orderErrors: [OrderError!]! } type DraftOrderCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") orderErrors: [OrderError!]! order: Order } @@ -2163,10 +1796,7 @@ input DraftOrderCreateInput { } type DraftOrderDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") orderErrors: [OrderError!]! order: Order } @@ -2183,49 +1813,34 @@ input DraftOrderInput { } type DraftOrderLineDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") order: Order orderLine: OrderLine orderErrors: [OrderError!]! } type DraftOrderLineUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") order: Order orderErrors: [OrderError!]! orderLine: OrderLine } type DraftOrderLinesBulkDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! orderErrors: [OrderError!]! } type DraftOrderLinesCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") order: Order orderLines: [OrderLine!] orderErrors: [OrderError!]! } type DraftOrderUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") orderErrors: [OrderError!]! order: Order } @@ -2314,10 +1929,7 @@ input ExportInfoInput { } type ExportProducts { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") exportFile: ExportFile exportErrors: [ExportError!]! } @@ -2349,24 +1961,15 @@ type Fulfillment implements Node & ObjectWithMetadata { created: DateTime! privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! - @deprecated( - reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." - ) - meta: [MetaStore]! - @deprecated( - reason: "Use the `metadata` field. This field will be removed after 2020-07-31." - ) + privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") + meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") lines: [FulfillmentLine] statusDisplay: String warehouse: Warehouse } type FulfillmentCancel { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") fulfillment: Fulfillment order: Order orderErrors: [OrderError!]! @@ -2377,18 +1980,12 @@ input FulfillmentCancelInput { } type FulfillmentClearMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") fulfillment: Fulfillment } type FulfillmentClearPrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") fulfillment: Fulfillment } @@ -2404,26 +2001,17 @@ enum FulfillmentStatus { } type FulfillmentUpdateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") fulfillment: Fulfillment } type FulfillmentUpdatePrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") fulfillment: Fulfillment } type FulfillmentUpdateTracking { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") fulfillment: Fulfillment order: Order orderErrors: [OrderError!]! @@ -2460,10 +2048,7 @@ type GiftCard implements Node { } type GiftCardActivate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") giftCard: GiftCard giftCardErrors: [GiftCardError!]! } @@ -2480,10 +2065,7 @@ type GiftCardCountableEdge { } type GiftCardCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") giftCardErrors: [GiftCardError!]! giftCard: GiftCard } @@ -2497,10 +2079,7 @@ input GiftCardCreateInput { } type GiftCardDeactivate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") giftCard: GiftCard giftCardErrors: [GiftCardError!]! } @@ -2521,10 +2100,7 @@ enum GiftCardErrorCode { } type GiftCardUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") giftCardErrors: [GiftCardError!]! giftCard: GiftCard } @@ -2556,10 +2132,7 @@ type GroupCountableEdge { } type HomepageCollectionUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") shop: Shop shopErrors: [ShopError!]! } @@ -2581,14 +2154,8 @@ type Invoice implements ObjectWithMetadata & Job & Node { number: String externalUrl: String privateMetadata: [MetadataItem]! - privateMeta: [MetaStore]! - @deprecated( - reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." - ) - meta: [MetaStore]! - @deprecated( - reason: "Use the `metadata` field. This field will be removed after 2020-07-31." - ) + privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") + meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") createdAt: DateTime! updatedAt: DateTime! message: String @@ -2596,10 +2163,7 @@ type Invoice implements ObjectWithMetadata & Job & Node { } type InvoiceCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") invoiceErrors: [InvoiceError!]! invoice: Invoice } @@ -2610,10 +2174,7 @@ input InvoiceCreateInput { } type InvoiceDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") invoiceErrors: [InvoiceError!]! invoice: Invoice } @@ -2635,38 +2196,26 @@ enum InvoiceErrorCode { } type InvoiceRequest { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") order: Order invoiceErrors: [InvoiceError!]! invoice: Invoice } type InvoiceRequestDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") invoiceErrors: [InvoiceError!]! invoice: Invoice } type InvoiceSendEmail { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") invoiceErrors: [InvoiceError!]! invoice: Invoice } type InvoiceUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") invoiceErrors: [InvoiceError!]! invoice: Invoice } @@ -2770,10 +2319,7 @@ type Menu implements Node { } type MenuBulkDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! menuErrors: [MenuError!]! } @@ -2790,10 +2336,7 @@ type MenuCountableEdge { } type MenuCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") menuErrors: [MenuError!]! menu: Menu } @@ -2804,10 +2347,7 @@ input MenuCreateInput { } type MenuDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") menuErrors: [MenuError!]! menu: Menu } @@ -2853,10 +2393,7 @@ type MenuItem implements Node { } type MenuItemBulkDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! menuErrors: [MenuError!]! } @@ -2873,10 +2410,7 @@ type MenuItemCountableEdge { } type MenuItemCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") menuErrors: [MenuError!]! menuItem: MenuItem } @@ -2892,10 +2426,7 @@ input MenuItemCreateInput { } type MenuItemDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") menuErrors: [MenuError!]! menuItem: MenuItem } @@ -2913,10 +2444,7 @@ input MenuItemInput { } type MenuItemMove { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") menu: Menu menuErrors: [MenuError!]! } @@ -2940,10 +2468,7 @@ type MenuItemTranslatableContent implements Node { } type MenuItemTranslate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") translationErrors: [TranslationError!]! menuItem: MenuItem } @@ -2955,10 +2480,7 @@ type MenuItemTranslation implements Node { } type MenuItemUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") menuErrors: [MenuError!]! menuItem: MenuItem } @@ -2978,10 +2500,7 @@ input MenuSortingInput { } type MenuUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") menuErrors: [MenuError!]! menu: Menu } @@ -3062,329 +2581,133 @@ type Mutation { createWarehouse(input: WarehouseCreateInput!): WarehouseCreate updateWarehouse(id: ID!, input: WarehouseUpdateInput!): WarehouseUpdate deleteWarehouse(id: ID!): WarehouseDelete - assignWarehouseShippingZone( - id: ID! - shippingZoneIds: [ID!]! - ): WarehouseShippingZoneAssign - unassignWarehouseShippingZone( - id: ID! - shippingZoneIds: [ID!]! - ): WarehouseShippingZoneUnassign - authorizationKeyAdd( - input: AuthorizationKeyInput! - keyType: AuthorizationKeyType! - ): AuthorizationKeyAdd + assignWarehouseShippingZone(id: ID!, shippingZoneIds: [ID!]!): WarehouseShippingZoneAssign + unassignWarehouseShippingZone(id: ID!, shippingZoneIds: [ID!]!): WarehouseShippingZoneUnassign + authorizationKeyAdd(input: AuthorizationKeyInput!, keyType: AuthorizationKeyType!): AuthorizationKeyAdd authorizationKeyDelete(keyType: AuthorizationKeyType!): AuthorizationKeyDelete - staffNotificationRecipientCreate( - input: StaffNotificationRecipientInput! - ): StaffNotificationRecipientCreate - staffNotificationRecipientUpdate( - id: ID! - input: StaffNotificationRecipientInput! - ): StaffNotificationRecipientUpdate + staffNotificationRecipientCreate(input: StaffNotificationRecipientInput!): StaffNotificationRecipientCreate + staffNotificationRecipientUpdate(id: ID!, input: StaffNotificationRecipientInput!): StaffNotificationRecipientUpdate staffNotificationRecipientDelete(id: ID!): StaffNotificationRecipientDelete homepageCollectionUpdate(collection: ID): HomepageCollectionUpdate shopDomainUpdate(input: SiteDomainInput): ShopDomainUpdate shopSettingsUpdate(input: ShopSettingsInput!): ShopSettingsUpdate shopFetchTaxRates: ShopFetchTaxRates - shopSettingsTranslate( - input: ShopSettingsTranslationInput! - languageCode: LanguageCodeEnum! - ): ShopSettingsTranslate + shopSettingsTranslate(input: ShopSettingsTranslationInput!, languageCode: LanguageCodeEnum!): ShopSettingsTranslate shopAddressUpdate(input: AddressInput): ShopAddressUpdate shippingPriceCreate(input: ShippingPriceInput!): ShippingPriceCreate shippingPriceDelete(id: ID!): ShippingPriceDelete shippingPriceBulkDelete(ids: [ID]!): ShippingPriceBulkDelete shippingPriceUpdate(id: ID!, input: ShippingPriceInput!): ShippingPriceUpdate - shippingPriceTranslate( - id: ID! - input: NameTranslationInput! - languageCode: LanguageCodeEnum! - ): ShippingPriceTranslate + shippingPriceTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): ShippingPriceTranslate shippingZoneCreate(input: ShippingZoneCreateInput!): ShippingZoneCreate shippingZoneDelete(id: ID!): ShippingZoneDelete shippingZoneBulkDelete(ids: [ID]!): ShippingZoneBulkDelete - shippingZoneUpdate( - id: ID! - input: ShippingZoneUpdateInput! - ): ShippingZoneUpdate + shippingZoneUpdate(id: ID!, input: ShippingZoneUpdateInput!): ShippingZoneUpdate attributeCreate(input: AttributeCreateInput!): AttributeCreate attributeDelete(id: ID!): AttributeDelete attributeBulkDelete(ids: [ID]!): AttributeBulkDelete - attributeAssign( - operations: [AttributeAssignInput]! - productTypeId: ID! - ): AttributeAssign + attributeAssign(operations: [AttributeAssignInput]!, productTypeId: ID!): AttributeAssign attributeUnassign(attributeIds: [ID]!, productTypeId: ID!): AttributeUnassign attributeUpdate(id: ID!, input: AttributeUpdateInput!): AttributeUpdate - attributeTranslate( - id: ID! - input: NameTranslationInput! - languageCode: LanguageCodeEnum! - ): AttributeTranslate + attributeTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): AttributeTranslate attributeUpdateMetadata(id: ID!, input: MetaInput!): AttributeUpdateMeta - @deprecated( - reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) + @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") attributeClearMetadata(id: ID!, input: MetaPath!): AttributeClearMeta - @deprecated( - reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31." - ) - attributeUpdatePrivateMetadata( - id: ID! - input: MetaInput! - ): AttributeUpdatePrivateMeta - @deprecated( - reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) - attributeClearPrivateMetadata( - id: ID! - input: MetaPath! - ): AttributeClearPrivateMeta - @deprecated( - reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) - attributeValueCreate( - attribute: ID! - input: AttributeValueCreateInput! - ): AttributeValueCreate + @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") + attributeUpdatePrivateMetadata(id: ID!, input: MetaInput!): AttributeUpdatePrivateMeta + @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + attributeClearPrivateMetadata(id: ID!, input: MetaPath!): AttributeClearPrivateMeta + @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + attributeValueCreate(attribute: ID!, input: AttributeValueCreateInput!): AttributeValueCreate attributeValueDelete(id: ID!): AttributeValueDelete attributeValueBulkDelete(ids: [ID]!): AttributeValueBulkDelete - attributeValueUpdate( - id: ID! - input: AttributeValueCreateInput! - ): AttributeValueUpdate - attributeValueTranslate( - id: ID! - input: NameTranslationInput! - languageCode: LanguageCodeEnum! - ): AttributeValueTranslate - attributeReorderValues( - attributeId: ID! - moves: [ReorderInput]! - ): AttributeReorderValues + attributeValueUpdate(id: ID!, input: AttributeValueCreateInput!): AttributeValueUpdate + attributeValueTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): AttributeValueTranslate + attributeReorderValues(attributeId: ID!, moves: [ReorderInput]!): AttributeReorderValues categoryCreate(input: CategoryInput!, parent: ID): CategoryCreate categoryDelete(id: ID!): CategoryDelete categoryBulkDelete(ids: [ID]!): CategoryBulkDelete categoryUpdate(id: ID!, input: CategoryInput!): CategoryUpdate - categoryTranslate( - id: ID! - input: TranslationInput! - languageCode: LanguageCodeEnum! - ): CategoryTranslate + categoryTranslate(id: ID!, input: TranslationInput!, languageCode: LanguageCodeEnum!): CategoryTranslate categoryUpdateMetadata(id: ID!, input: MetaInput!): CategoryUpdateMeta - @deprecated( - reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) + @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") categoryClearMetadata(id: ID!, input: MetaPath!): CategoryClearMeta - @deprecated( - reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31." - ) - categoryUpdatePrivateMetadata( - id: ID! - input: MetaInput! - ): CategoryUpdatePrivateMeta - @deprecated( - reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) - categoryClearPrivateMetadata( - id: ID! - input: MetaPath! - ): CategoryClearPrivateMeta - @deprecated( - reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) - collectionAddProducts( - collectionId: ID! - products: [ID]! - ): CollectionAddProducts + @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") + categoryUpdatePrivateMetadata(id: ID!, input: MetaInput!): CategoryUpdatePrivateMeta + @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + categoryClearPrivateMetadata(id: ID!, input: MetaPath!): CategoryClearPrivateMeta + @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + collectionAddProducts(collectionId: ID!, products: [ID]!): CollectionAddProducts collectionCreate(input: CollectionCreateInput!): CollectionCreate collectionDelete(id: ID!): CollectionDelete - collectionReorderProducts( - collectionId: ID! - moves: [MoveProductInput]! - ): CollectionReorderProducts + collectionReorderProducts(collectionId: ID!, moves: [MoveProductInput]!): CollectionReorderProducts collectionBulkDelete(ids: [ID]!): CollectionBulkDelete - collectionBulkPublish( - ids: [ID]! - isPublished: Boolean! - ): CollectionBulkPublish - collectionRemoveProducts( - collectionId: ID! - products: [ID]! - ): CollectionRemoveProducts + collectionBulkPublish(ids: [ID]!, isPublished: Boolean!): CollectionBulkPublish + collectionRemoveProducts(collectionId: ID!, products: [ID]!): CollectionRemoveProducts collectionUpdate(id: ID!, input: CollectionInput!): CollectionUpdate - collectionTranslate( - id: ID! - input: TranslationInput! - languageCode: LanguageCodeEnum! - ): CollectionTranslate + collectionTranslate(id: ID!, input: TranslationInput!, languageCode: LanguageCodeEnum!): CollectionTranslate collectionUpdateMetadata(id: ID!, input: MetaInput!): CollectionUpdateMeta - @deprecated( - reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) + @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") collectionClearMetadata(id: ID!, input: MetaPath!): CollectionClearMeta - @deprecated( - reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31." - ) - collectionUpdatePrivateMetadata( - id: ID! - input: MetaInput! - ): CollectionUpdatePrivateMeta - @deprecated( - reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) - collectionClearPrivateMetadata( - id: ID! - input: MetaPath! - ): CollectionClearPrivateMeta - @deprecated( - reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) + @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") + collectionUpdatePrivateMetadata(id: ID!, input: MetaInput!): CollectionUpdatePrivateMeta + @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + collectionClearPrivateMetadata(id: ID!, input: MetaPath!): CollectionClearPrivateMeta + @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") productCreate(input: ProductCreateInput!): ProductCreate productDelete(id: ID!): ProductDelete productBulkDelete(ids: [ID]!): ProductBulkDelete productBulkPublish(ids: [ID]!, isPublished: Boolean!): ProductBulkPublish productUpdate(id: ID!, input: ProductInput!): ProductUpdate - productTranslate( - id: ID! - input: TranslationInput! - languageCode: LanguageCodeEnum! - ): ProductTranslate + productTranslate(id: ID!, input: TranslationInput!, languageCode: LanguageCodeEnum!): ProductTranslate productUpdateMetadata(id: ID!, input: MetaInput!): ProductUpdateMeta - @deprecated( - reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) + @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") productClearMetadata(id: ID!, input: MetaPath!): ProductClearMeta - @deprecated( - reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31." - ) - productUpdatePrivateMetadata( - id: ID! - input: MetaInput! - ): ProductUpdatePrivateMeta - @deprecated( - reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) - productClearPrivateMetadata( - id: ID! - input: MetaPath! - ): ProductClearPrivateMeta - @deprecated( - reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) - productSetAvailabilityForPurchase( - isAvailable: Boolean! - productId: ID! - startDate: Date - ): ProductSetAvailabilityForPurchase + @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") + productUpdatePrivateMetadata(id: ID!, input: MetaInput!): ProductUpdatePrivateMeta + @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + productClearPrivateMetadata(id: ID!, input: MetaPath!): ProductClearPrivateMeta + @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + productSetAvailabilityForPurchase(isAvailable: Boolean!, productId: ID!, startDate: Date): ProductSetAvailabilityForPurchase productImageCreate(input: ProductImageCreateInput!): ProductImageCreate productImageDelete(id: ID!): ProductImageDelete productImageBulkDelete(ids: [ID]!): ProductImageBulkDelete productImageReorder(imagesIds: [ID]!, productId: ID!): ProductImageReorder - productImageUpdate( - id: ID! - input: ProductImageUpdateInput! - ): ProductImageUpdate + productImageUpdate(id: ID!, input: ProductImageUpdateInput!): ProductImageUpdate productTypeCreate(input: ProductTypeInput!): ProductTypeCreate productTypeDelete(id: ID!): ProductTypeDelete productTypeBulkDelete(ids: [ID]!): ProductTypeBulkDelete productTypeUpdate(id: ID!, input: ProductTypeInput!): ProductTypeUpdate - productTypeReorderAttributes( - moves: [ReorderInput]! - productTypeId: ID! - type: AttributeTypeEnum! - ): ProductTypeReorderAttributes + productTypeReorderAttributes(moves: [ReorderInput]!, productTypeId: ID!, type: AttributeTypeEnum!): ProductTypeReorderAttributes productTypeUpdateMetadata(id: ID!, input: MetaInput!): ProductTypeUpdateMeta - @deprecated( - reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) + @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") productTypeClearMetadata(id: ID!, input: MetaPath!): ProductTypeClearMeta - @deprecated( - reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31." - ) - productTypeUpdatePrivateMetadata( - id: ID! - input: MetaInput! - ): ProductTypeUpdatePrivateMeta - @deprecated( - reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) - productTypeClearPrivateMetadata( - id: ID! - input: MetaPath! - ): ProductTypeClearPrivateMeta - @deprecated( - reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) - digitalContentCreate( - input: DigitalContentUploadInput! - variantId: ID! - ): DigitalContentCreate + @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") + productTypeUpdatePrivateMetadata(id: ID!, input: MetaInput!): ProductTypeUpdatePrivateMeta + @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + productTypeClearPrivateMetadata(id: ID!, input: MetaPath!): ProductTypeClearPrivateMeta + @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + digitalContentCreate(input: DigitalContentUploadInput!, variantId: ID!): DigitalContentCreate digitalContentDelete(variantId: ID!): DigitalContentDelete - digitalContentUpdate( - input: DigitalContentInput! - variantId: ID! - ): DigitalContentUpdate - digitalContentUrlCreate( - input: DigitalContentUrlCreateInput! - ): DigitalContentUrlCreate + digitalContentUpdate(input: DigitalContentInput!, variantId: ID!): DigitalContentUpdate + digitalContentUrlCreate(input: DigitalContentUrlCreateInput!): DigitalContentUrlCreate productVariantCreate(input: ProductVariantCreateInput!): ProductVariantCreate productVariantDelete(id: ID!): ProductVariantDelete - productVariantBulkCreate( - product: ID! - variants: [ProductVariantBulkCreateInput]! - ): ProductVariantBulkCreate + productVariantBulkCreate(product: ID!, variants: [ProductVariantBulkCreateInput]!): ProductVariantBulkCreate productVariantBulkDelete(ids: [ID]!): ProductVariantBulkDelete - productVariantStocksCreate( - stocks: [StockInput!]! - variantId: ID! - ): ProductVariantStocksCreate - productVariantStocksDelete( - variantId: ID! - warehouseIds: [ID!] - ): ProductVariantStocksDelete - productVariantStocksUpdate( - stocks: [StockInput!]! - variantId: ID! - ): ProductVariantStocksUpdate - productVariantUpdate( - id: ID! - input: ProductVariantInput! - ): ProductVariantUpdate - productVariantTranslate( - id: ID! - input: NameTranslationInput! - languageCode: LanguageCodeEnum! - ): ProductVariantTranslate - productVariantUpdateMetadata( - id: ID! - input: MetaInput! - ): ProductVariantUpdateMeta - @deprecated( - reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) - productVariantClearMetadata( - id: ID! - input: MetaPath! - ): ProductVariantClearMeta - @deprecated( - reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31." - ) - productVariantUpdatePrivateMetadata( - id: ID! - input: MetaInput! - ): ProductVariantUpdatePrivateMeta - @deprecated( - reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) - productVariantClearPrivateMetadata( - id: ID! - input: MetaPath! - ): ProductVariantClearPrivateMeta - @deprecated( - reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) + productVariantStocksCreate(stocks: [StockInput!]!, variantId: ID!): ProductVariantStocksCreate + productVariantStocksDelete(variantId: ID!, warehouseIds: [ID!]): ProductVariantStocksDelete + productVariantStocksUpdate(stocks: [StockInput!]!, variantId: ID!): ProductVariantStocksUpdate + productVariantUpdate(id: ID!, input: ProductVariantInput!): ProductVariantUpdate + productVariantTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): ProductVariantTranslate + productVariantUpdateMetadata(id: ID!, input: MetaInput!): ProductVariantUpdateMeta + @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") + productVariantClearMetadata(id: ID!, input: MetaPath!): ProductVariantClearMeta + @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") + productVariantUpdatePrivateMetadata(id: ID!, input: MetaInput!): ProductVariantUpdatePrivateMeta + @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + productVariantClearPrivateMetadata(id: ID!, input: MetaPath!): ProductVariantClearPrivateMeta + @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") variantImageAssign(imageId: ID!, variantId: ID!): VariantImageAssign variantImageUnassign(imageId: ID!, variantId: ID!): VariantImageUnassign paymentCapture(amount: PositiveDecimal, paymentId: ID!): PaymentCapture @@ -3395,20 +2718,13 @@ type Mutation { pageBulkDelete(ids: [ID]!): PageBulkDelete pageBulkPublish(ids: [ID]!, isPublished: Boolean!): PageBulkPublish pageUpdate(id: ID!, input: PageInput!): PageUpdate - pageTranslate( - id: ID! - input: PageTranslationInput! - languageCode: LanguageCodeEnum! - ): PageTranslate + pageTranslate(id: ID!, input: PageTranslationInput!, languageCode: LanguageCodeEnum!): PageTranslate draftOrderComplete(id: ID!): DraftOrderComplete draftOrderCreate(input: DraftOrderCreateInput!): DraftOrderCreate draftOrderDelete(id: ID!): DraftOrderDelete draftOrderBulkDelete(ids: [ID]!): DraftOrderBulkDelete draftOrderLinesBulkDelete(ids: [ID]!): DraftOrderLinesBulkDelete - draftOrderLinesCreate( - id: ID! - input: [OrderLineCreateInput]! - ): DraftOrderLinesCreate + draftOrderLinesCreate(id: ID!, input: [OrderLineCreateInput]!): DraftOrderLinesCreate draftOrderLineDelete(id: ID!): DraftOrderLineDelete draftOrderLineUpdate(id: ID!, input: OrderLineInput!): DraftOrderLineUpdate draftOrderUpdate(id: ID!, input: DraftOrderInput!): DraftOrderUpdate @@ -3416,68 +2732,34 @@ type Mutation { orderCancel(id: ID!): OrderCancel orderCapture(amount: PositiveDecimal!, id: ID!): OrderCapture orderClearPrivateMeta(id: ID!, input: MetaPath!): OrderClearPrivateMeta - @deprecated( - reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) + @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") orderClearMeta(input: MetaPath!, token: UUID!): OrderClearMeta - @deprecated( - reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31." - ) + @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") orderFulfill(input: OrderFulfillInput!, order: ID): OrderFulfill - orderFulfillmentCancel( - id: ID! - input: FulfillmentCancelInput! - ): FulfillmentCancel - orderFulfillmentUpdateTracking( - id: ID! - input: FulfillmentUpdateTrackingInput! - ): FulfillmentUpdateTracking + orderFulfillmentCancel(id: ID!, input: FulfillmentCancelInput!): FulfillmentCancel + orderFulfillmentUpdateTracking(id: ID!, input: FulfillmentUpdateTrackingInput!): FulfillmentUpdateTracking orderFulfillmentClearMeta(id: ID!, input: MetaPath!): FulfillmentClearMeta - @deprecated( - reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31." - ) - orderFulfillmentClearPrivateMeta( - id: ID! - input: MetaPath! - ): FulfillmentClearPrivateMeta - @deprecated( - reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) + @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") + orderFulfillmentClearPrivateMeta(id: ID!, input: MetaPath!): FulfillmentClearPrivateMeta + @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") orderFulfillmentUpdateMeta(id: ID!, input: MetaInput!): FulfillmentUpdateMeta - @deprecated( - reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) - orderFulfillmentUpdatePrivateMeta( - id: ID! - input: MetaInput! - ): FulfillmentUpdatePrivateMeta - @deprecated( - reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) + @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") + orderFulfillmentUpdatePrivateMeta(id: ID!, input: MetaInput!): FulfillmentUpdatePrivateMeta + @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") orderMarkAsPaid(id: ID!): OrderMarkAsPaid orderRefund(amount: PositiveDecimal!, id: ID!): OrderRefund orderUpdate(id: ID!, input: OrderUpdateInput!): OrderUpdate orderUpdateMeta(input: MetaInput!, token: UUID!): OrderUpdateMeta - @deprecated( - reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) + @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") orderUpdatePrivateMeta(id: ID!, input: MetaInput!): OrderUpdatePrivateMeta - @deprecated( - reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31." - ) - orderUpdateShipping( - order: ID! - input: OrderUpdateShippingInput - ): OrderUpdateShipping + @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + orderUpdateShipping(order: ID!, input: OrderUpdateShippingInput): OrderUpdateShipping orderVoid(id: ID!): OrderVoid orderBulkCancel(ids: [ID]!): OrderBulkCancel deleteMetadata(id: ID!, keys: [String!]!): DeleteMetadata deletePrivateMetadata(id: ID!, keys: [String!]!): DeletePrivateMetadata updateMetadata(id: ID!, input: [MetadataInput!]!): UpdateMetadata - updatePrivateMetadata( - id: ID! - input: [MetadataInput!]! - ): UpdatePrivateMetadata + updatePrivateMetadata(id: ID!, input: [MetadataInput!]!): UpdatePrivateMetadata assignNavigation(menu: ID, navigationType: NavigationType!): AssignNavigation menuCreate(input: MenuCreateInput!): MenuCreate menuDelete(id: ID!): MenuDelete @@ -3487,11 +2769,7 @@ type Mutation { menuItemDelete(id: ID!): MenuItemDelete menuItemBulkDelete(ids: [ID]!): MenuItemBulkDelete menuItemUpdate(id: ID!, input: MenuItemInput!): MenuItemUpdate - menuItemTranslate( - id: ID! - input: NameTranslationInput! - languageCode: LanguageCodeEnum! - ): MenuItemTranslate + menuItemTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): MenuItemTranslate menuItemMove(menu: ID!, moves: [MenuItemMoveInput]!): MenuItemMove invoiceRequest(number: String, orderId: ID!): InvoiceRequest invoiceRequestDelete(id: ID!): InvoiceRequestDelete @@ -3510,94 +2788,37 @@ type Mutation { saleUpdate(id: ID!, input: SaleInput!): SaleUpdate saleCataloguesAdd(id: ID!, input: CatalogueInput!): SaleAddCatalogues saleCataloguesRemove(id: ID!, input: CatalogueInput!): SaleRemoveCatalogues - saleTranslate( - id: ID! - input: NameTranslationInput! - languageCode: LanguageCodeEnum! - ): SaleTranslate + saleTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): SaleTranslate voucherCreate(input: VoucherInput!): VoucherCreate voucherDelete(id: ID!): VoucherDelete voucherBulkDelete(ids: [ID]!): VoucherBulkDelete voucherUpdate(id: ID!, input: VoucherInput!): VoucherUpdate voucherCataloguesAdd(id: ID!, input: CatalogueInput!): VoucherAddCatalogues - voucherCataloguesRemove( - id: ID! - input: CatalogueInput! - ): VoucherRemoveCatalogues - voucherTranslate( - id: ID! - input: NameTranslationInput! - languageCode: LanguageCodeEnum! - ): VoucherTranslate + voucherCataloguesRemove(id: ID!, input: CatalogueInput!): VoucherRemoveCatalogues + voucherTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): VoucherTranslate exportProducts(input: ExportProductsInput!): ExportProducts - checkoutAddPromoCode( - checkoutId: ID! - promoCode: String! - ): CheckoutAddPromoCode - checkoutBillingAddressUpdate( - billingAddress: AddressInput! - checkoutId: ID! - ): CheckoutBillingAddressUpdate - checkoutComplete( - checkoutId: ID! - paymentData: JSONString - redirectUrl: String - storeSource: Boolean = false - ): CheckoutComplete + checkoutAddPromoCode(checkoutId: ID!, promoCode: String!): CheckoutAddPromoCode + checkoutBillingAddressUpdate(billingAddress: AddressInput!, checkoutId: ID!): CheckoutBillingAddressUpdate + checkoutComplete(checkoutId: ID!, paymentData: JSONString, redirectUrl: String, storeSource: Boolean = false): CheckoutComplete checkoutCreate(input: CheckoutCreateInput!): CheckoutCreate - checkoutCustomerAttach( - checkoutId: ID! - customerId: ID - ): CheckoutCustomerAttach + checkoutCustomerAttach(checkoutId: ID!, customerId: ID): CheckoutCustomerAttach checkoutCustomerDetach(checkoutId: ID!): CheckoutCustomerDetach checkoutEmailUpdate(checkoutId: ID, email: String!): CheckoutEmailUpdate checkoutLineDelete(checkoutId: ID!, lineId: ID): CheckoutLineDelete - checkoutLinesAdd( - checkoutId: ID! - lines: [CheckoutLineInput]! - ): CheckoutLinesAdd - checkoutLinesUpdate( - checkoutId: ID! - lines: [CheckoutLineInput]! - ): CheckoutLinesUpdate - checkoutRemovePromoCode( - checkoutId: ID! - promoCode: String! - ): CheckoutRemovePromoCode - checkoutPaymentCreate( - checkoutId: ID! - input: PaymentInput! - ): CheckoutPaymentCreate - checkoutShippingAddressUpdate( - checkoutId: ID! - shippingAddress: AddressInput! - ): CheckoutShippingAddressUpdate - checkoutShippingMethodUpdate( - checkoutId: ID - shippingMethodId: ID! - ): CheckoutShippingMethodUpdate + checkoutLinesAdd(checkoutId: ID!, lines: [CheckoutLineInput]!): CheckoutLinesAdd + checkoutLinesUpdate(checkoutId: ID!, lines: [CheckoutLineInput]!): CheckoutLinesUpdate + checkoutRemovePromoCode(checkoutId: ID!, promoCode: String!): CheckoutRemovePromoCode + checkoutPaymentCreate(checkoutId: ID!, input: PaymentInput!): CheckoutPaymentCreate + checkoutShippingAddressUpdate(checkoutId: ID!, shippingAddress: AddressInput!): CheckoutShippingAddressUpdate + checkoutShippingMethodUpdate(checkoutId: ID, shippingMethodId: ID!): CheckoutShippingMethodUpdate checkoutUpdateMetadata(id: ID!, input: MetaInput!): CheckoutUpdateMeta - @deprecated( - reason: "Use the `updateMetadata` mutation. This field will be removed after 2020-07-31." - ) + @deprecated(reason: "Use the `updateMetadata` mutation. This field will be removed after 2020-07-31.") checkoutClearMetadata(id: ID!, input: MetaPath!): CheckoutClearMeta - @deprecated( - reason: "Use the `deleteMetadata` mutation. This field will be removed after 2020-07-31." - ) - checkoutUpdatePrivateMetadata( - id: ID! - input: MetaInput! - ): CheckoutUpdatePrivateMeta - @deprecated( - reason: "Use the `updatePrivateMetadata` mutation. This field will be removed after 2020-07-31." - ) - checkoutClearPrivateMetadata( - id: ID! - input: MetaPath! - ): CheckoutClearPrivateMeta - @deprecated( - reason: "Use the `deletePrivateMetadata` mutation. This field will be removed after 2020-07-31." - ) + @deprecated(reason: "Use the `deleteMetadata` mutation. This field will be removed after 2020-07-31.") + checkoutUpdatePrivateMetadata(id: ID!, input: MetaInput!): CheckoutUpdatePrivateMeta + @deprecated(reason: "Use the `updatePrivateMetadata` mutation. This field will be removed after 2020-07-31.") + checkoutClearPrivateMetadata(id: ID!, input: MetaPath!): CheckoutClearPrivateMeta + @deprecated(reason: "Use the `deletePrivateMetadata` mutation. This field will be removed after 2020-07-31.") appCreate(input: AppInput!): AppCreate appUpdate(id: ID!, input: AppInput!): AppUpdate appDelete(id: ID!): AppDelete @@ -3605,10 +2826,7 @@ type Mutation { appTokenDelete(id: ID!): AppTokenDelete appTokenVerify(token: String!): AppTokenVerify appInstall(input: AppInstallInput!): AppInstall - appRetryInstall( - activateAfterInstallation: Boolean = true - id: ID! - ): AppRetryInstall + appRetryInstall(activateAfterInstallation: Boolean = true, id: ID!): AppRetryInstall appDeleteFailedInstallation(id: ID!): AppDeleteFailedInstallation appFetchManifest(manifestUrl: String!): AppFetchManifest appActivate(id: ID!): AppActivate @@ -3617,45 +2835,26 @@ type Mutation { tokenRefresh(csrfToken: String, refreshToken: String): RefreshToken tokenVerify(token: String!): VerifyToken tokensDeactivateAll: DeactivateAllUserTokens - requestPasswordReset( - email: String! - redirectUrl: String! - ): RequestPasswordReset + requestPasswordReset(email: String!, redirectUrl: String!): RequestPasswordReset confirmAccount(email: String!, token: String!): ConfirmAccount setPassword(email: String!, password: String!, token: String!): SetPassword passwordChange(newPassword: String!, oldPassword: String!): PasswordChange - requestEmailChange( - newEmail: String! - password: String! - redirectUrl: String! - ): RequestEmailChange + requestEmailChange(newEmail: String!, password: String!, redirectUrl: String!): RequestEmailChange confirmEmailChange(token: String!): ConfirmEmailChange - accountAddressCreate( - input: AddressInput! - type: AddressTypeEnum - ): AccountAddressCreate + accountAddressCreate(input: AddressInput!, type: AddressTypeEnum): AccountAddressCreate accountAddressUpdate(id: ID!, input: AddressInput!): AccountAddressUpdate accountAddressDelete(id: ID!): AccountAddressDelete - accountSetDefaultAddress( - id: ID! - type: AddressTypeEnum! - ): AccountSetDefaultAddress + accountSetDefaultAddress(id: ID!, type: AddressTypeEnum!): AccountSetDefaultAddress accountRegister(input: AccountRegisterInput!): AccountRegister accountUpdate(input: AccountInput!): AccountUpdate accountRequestDeletion(redirectUrl: String!): AccountRequestDeletion accountDelete(token: String!): AccountDelete accountUpdateMeta(input: MetaInput!): AccountUpdateMeta - @deprecated( - reason: "Use the `updateMetadata` mutation. This field will be removed after 2020-07-31." - ) + @deprecated(reason: "Use the `updateMetadata` mutation. This field will be removed after 2020-07-31.") addressCreate(input: AddressInput!, userId: ID!): AddressCreate addressUpdate(id: ID!, input: AddressInput!): AddressUpdate addressDelete(id: ID!): AddressDelete - addressSetDefault( - addressId: ID! - type: AddressTypeEnum! - userId: ID! - ): AddressSetDefault + addressSetDefault(addressId: ID!, type: AddressTypeEnum!, userId: ID!): AddressSetDefault customerCreate(input: UserCreateInput!): CustomerCreate customerUpdate(id: ID!, input: CustomerInput!): CustomerUpdate customerDelete(id: ID!): CustomerDelete @@ -3668,67 +2867,29 @@ type Mutation { userAvatarDelete: UserAvatarDelete userBulkSetActive(ids: [ID]!, isActive: Boolean!): UserBulkSetActive userUpdateMetadata(id: ID!, input: MetaInput!): UserUpdateMeta - @deprecated( - reason: "Use the `updateMetadata` mutation. This field will be removed after 2020-07-31." - ) + @deprecated(reason: "Use the `updateMetadata` mutation. This field will be removed after 2020-07-31.") userClearMetadata(id: ID!, input: MetaPath!): UserClearMeta - @deprecated( - reason: "Use the `deleteMetadata` mutation. This field will be removed after 2020-07-31." - ) + @deprecated(reason: "Use the `deleteMetadata` mutation. This field will be removed after 2020-07-31.") userUpdatePrivateMetadata(id: ID!, input: MetaInput!): UserUpdatePrivateMeta - @deprecated( - reason: "Use the `updatePrivateMetadata` mutation. This field will be removed after 2020-07-31." - ) + @deprecated(reason: "Use the `updatePrivateMetadata` mutation. This field will be removed after 2020-07-31.") userClearPrivateMetadata(id: ID!, input: MetaPath!): UserClearPrivateMeta - @deprecated( - reason: "Use the `deletePrivateMetadata` mutation. This field will be removed after 2020-07-31." - ) + @deprecated(reason: "Use the `deletePrivateMetadata` mutation. This field will be removed after 2020-07-31.") serviceAccountCreate(input: ServiceAccountInput!): ServiceAccountCreate - @deprecated( - reason: "Use the `appCreate` mutation instead. This field will be removed after 2020-07-31." - ) - serviceAccountUpdate( - id: ID! - input: ServiceAccountInput! - ): ServiceAccountUpdate - @deprecated( - reason: "Use the `appUpdate` mutation instead. This field will be removed after 2020-07-31." - ) + @deprecated(reason: "Use the `appCreate` mutation instead. This field will be removed after 2020-07-31.") + serviceAccountUpdate(id: ID!, input: ServiceAccountInput!): ServiceAccountUpdate + @deprecated(reason: "Use the `appUpdate` mutation instead. This field will be removed after 2020-07-31.") serviceAccountDelete(id: ID!): ServiceAccountDelete - @deprecated( - reason: "Use the `appDelete` mutation instead. This field will be removed after 2020-07-31." - ) - serviceAccountUpdatePrivateMetadata( - id: ID! - input: MetaInput! - ): ServiceAccountUpdatePrivateMeta - @deprecated( - reason: "Use the `updatePrivateMetadata` mutation with App instead.This field will be removed after 2020-07-31." - ) - serviceAccountClearPrivateMetadata( - id: ID! - input: MetaPath! - ): ServiceAccountClearPrivateMeta - @deprecated( - reason: "Use the `deletePrivateMetadata` mutation with App instead.This field will be removed after 2020-07-31." - ) - serviceAccountTokenCreate( - input: ServiceAccountTokenInput! - ): ServiceAccountTokenCreate - @deprecated( - reason: "Use the `appTokenCreate` mutation instead. This field will be removed after 2020-07-31." - ) + @deprecated(reason: "Use the `appDelete` mutation instead. This field will be removed after 2020-07-31.") + serviceAccountUpdatePrivateMetadata(id: ID!, input: MetaInput!): ServiceAccountUpdatePrivateMeta + @deprecated(reason: "Use the `updatePrivateMetadata` mutation with App instead.This field will be removed after 2020-07-31.") + serviceAccountClearPrivateMetadata(id: ID!, input: MetaPath!): ServiceAccountClearPrivateMeta + @deprecated(reason: "Use the `deletePrivateMetadata` mutation with App instead.This field will be removed after 2020-07-31.") + serviceAccountTokenCreate(input: ServiceAccountTokenInput!): ServiceAccountTokenCreate + @deprecated(reason: "Use the `appTokenCreate` mutation instead. This field will be removed after 2020-07-31.") serviceAccountTokenDelete(id: ID!): ServiceAccountTokenDelete - @deprecated( - reason: "Use the `appTokenDelete` mutation instead. This field will be removed after 2020-07-31." - ) - permissionGroupCreate( - input: PermissionGroupCreateInput! - ): PermissionGroupCreate - permissionGroupUpdate( - id: ID! - input: PermissionGroupUpdateInput! - ): PermissionGroupUpdate + @deprecated(reason: "Use the `appTokenDelete` mutation instead. This field will be removed after 2020-07-31.") + permissionGroupCreate(input: PermissionGroupCreateInput!): PermissionGroupCreate + permissionGroupUpdate(id: ID!, input: PermissionGroupUpdateInput!): PermissionGroupUpdate permissionGroupDelete(id: ID!): PermissionGroupDelete } @@ -3753,14 +2914,8 @@ interface Node { interface ObjectWithMetadata { privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! - @deprecated( - reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." - ) - meta: [MetaStore]! - @deprecated( - reason: "Use the `metadata` field. This field will be removed after 2020-07-31." - ) + privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") + meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") } type Order implements Node & ObjectWithMetadata { @@ -3786,14 +2941,8 @@ type Order implements Node & ObjectWithMetadata { weight: Weight privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! - @deprecated( - reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." - ) - meta: [MetaStore]! - @deprecated( - reason: "Use the `metadata` field. This field will be removed after 2020-07-31." - ) + privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") + meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") fulfillments: [Fulfillment]! lines: [OrderLine]! actions: [OrderAction]! @@ -3824,10 +2973,7 @@ enum OrderAction { } type OrderAddNote { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") order: Order event: OrderEvent orderErrors: [OrderError!]! @@ -3838,45 +2984,30 @@ input OrderAddNoteInput { } type OrderBulkCancel { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! orderErrors: [OrderError!]! } type OrderCancel { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") order: Order orderErrors: [OrderError!]! } type OrderCapture { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") order: Order orderErrors: [OrderError!]! } type OrderClearMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") order: Order } type OrderClearPrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") order: Order } @@ -4025,10 +3156,7 @@ input OrderFilterInput { } type OrderFulfill { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") fulfillments: [Fulfillment] order: Order orderErrors: [OrderError!]! @@ -4077,19 +3205,13 @@ input OrderLineInput { } type OrderMarkAsPaid { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") order: Order orderErrors: [OrderError!]! } type OrderRefund { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") order: Order orderErrors: [OrderError!]! } @@ -4126,10 +3248,7 @@ enum OrderStatusFilter { } type OrderUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") orderErrors: [OrderError!]! order: Order } @@ -4141,26 +3260,17 @@ input OrderUpdateInput { } type OrderUpdateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") order: Order } type OrderUpdatePrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") order: Order } type OrderUpdateShipping { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") order: Order orderErrors: [OrderError!]! } @@ -4170,10 +3280,7 @@ input OrderUpdateShippingInput { } type OrderVoid { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") order: Order orderErrors: [OrderError!]! } @@ -4193,19 +3300,13 @@ type Page implements Node { } type PageBulkDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! pageErrors: [PageError!]! } type PageBulkPublish { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! pageErrors: [PageError!]! } @@ -4222,19 +3323,13 @@ type PageCountableEdge { } type PageCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") pageErrors: [PageError!]! page: Page } type PageDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") pageErrors: [PageError!]! page: Page } @@ -4299,10 +3394,7 @@ type PageTranslatableContent implements Node { } type PageTranslate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") translationErrors: [TranslationError!]! page: PageTranslatableContent } @@ -4326,19 +3418,13 @@ input PageTranslationInput { } type PageUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") pageErrors: [PageError!]! page: Page } type PasswordChange { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") user: User accountErrors: [AccountError!]! } @@ -4364,10 +3450,7 @@ type Payment implements Node { } type PaymentCapture { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") payment: Payment paymentErrors: [PaymentError!]! } @@ -4431,10 +3514,7 @@ input PaymentInput { } type PaymentRefund { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") payment: Payment paymentErrors: [PaymentError!]! } @@ -4445,10 +3525,7 @@ type PaymentSource { } type PaymentVoid { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") payment: Payment paymentErrors: [PaymentError!]! } @@ -4477,10 +3554,7 @@ enum PermissionEnum { } type PermissionGroupCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") permissionGroupErrors: [PermissionGroupError!]! group: Group } @@ -4492,10 +3566,7 @@ input PermissionGroupCreateInput { } type PermissionGroupDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") permissionGroupErrors: [PermissionGroupError!]! group: Group } @@ -4533,10 +3604,7 @@ input PermissionGroupSortingInput { } type PermissionGroupUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") permissionGroupErrors: [PermissionGroupError!]! group: Group } @@ -4599,10 +3667,7 @@ input PluginSortingInput { } type PluginUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") plugin: Plugin pluginsErrors: [PluginError!]! } @@ -4638,16 +3703,9 @@ type Product implements Node & ObjectWithMetadata { visibleInListings: Boolean! privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! - @deprecated( - reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." - ) - meta: [MetaStore]! - @deprecated( - reason: "Use the `metadata` field. This field will be removed after 2020-07-31." - ) - url: String! - @deprecated(reason: "This field will be removed after 2020-07-31.") + privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") + meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") + url: String! @deprecated(reason: "This field will be removed after 2020-07-31.") thumbnail(size: Int): Image pricing: ProductPricingInfo isAvailable: Boolean @@ -4672,37 +3730,25 @@ type ProductAttributeError { } type ProductBulkDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! productErrors: [ProductError!]! } type ProductBulkPublish { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! productErrors: [ProductError!]! } type ProductClearMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! product: Product } type ProductClearPrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! product: Product } @@ -4719,10 +3765,7 @@ type ProductCountableEdge { } type ProductCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! product: Product } @@ -4750,10 +3793,7 @@ input ProductCreateInput { } type ProductDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! product: Product } @@ -4821,19 +3861,13 @@ type ProductImage implements Node { } type ProductImageBulkDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! productErrors: [ProductError!]! } type ProductImageCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") product: Product image: ProductImage productErrors: [ProductError!]! @@ -4846,30 +3880,21 @@ input ProductImageCreateInput { } type ProductImageDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") product: Product image: ProductImage productErrors: [ProductError!]! } type ProductImageReorder { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") product: Product images: [ProductImage] productErrors: [ProductError!]! } type ProductImageUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") product: Product image: ProductImage productErrors: [ProductError!]! @@ -4924,10 +3949,7 @@ type ProductPricingInfo { } type ProductSetAvailabilityForPurchase { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") product: Product productErrors: [ProductError!]! } @@ -4949,10 +3971,7 @@ type ProductTranslatableContent implements Node { } type ProductTranslate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") translationErrors: [TranslationError!]! product: Product } @@ -4977,56 +3996,30 @@ type ProductType implements Node & ObjectWithMetadata { weight: Weight privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! - @deprecated( - reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." - ) - meta: [MetaStore]! - @deprecated( - reason: "Use the `metadata` field. This field will be removed after 2020-07-31." - ) - products( - before: String - after: String - first: Int - last: Int - ): ProductCountableConnection + privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") + meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") + products(before: String, after: String, first: Int, last: Int): ProductCountableConnection taxRate: TaxRateType taxType: TaxType variantAttributes: [Attribute] productAttributes: [Attribute] - availableAttributes( - filter: AttributeFilterInput - before: String - after: String - first: Int - last: Int - ): AttributeCountableConnection + availableAttributes(filter: AttributeFilterInput, before: String, after: String, first: Int, last: Int): AttributeCountableConnection } type ProductTypeBulkDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! productErrors: [ProductError!]! } type ProductTypeClearMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! productType: ProductType } type ProductTypeClearPrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! productType: ProductType } @@ -5048,19 +4041,13 @@ type ProductTypeCountableEdge { } type ProductTypeCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! productType: ProductType } type ProductTypeDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! productType: ProductType } @@ -5090,10 +4077,7 @@ input ProductTypeInput { } type ProductTypeReorderAttributes { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productType: ProductType productErrors: [ProductError!]! } @@ -5110,55 +4094,37 @@ input ProductTypeSortingInput { } type ProductTypeUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! productType: ProductType } type ProductTypeUpdateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! productType: ProductType } type ProductTypeUpdatePrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! productType: ProductType } type ProductUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! product: Product } type ProductUpdateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! product: Product } type ProductUpdatePrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! product: Product } @@ -5172,32 +4138,14 @@ type ProductVariant implements Node & ObjectWithMetadata { weight: Weight privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! - @deprecated( - reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." - ) - meta: [MetaStore]! - @deprecated( - reason: "Use the `metadata` field. This field will be removed after 2020-07-31." - ) - quantity: Int! - @deprecated( - reason: "Use the stock field instead. This field will be removed after 2020-07-31." - ) - quantityAllocated: Int - @deprecated( - reason: "Use the stock field instead. This field will be removed after 2020-07-31." - ) - stockQuantity: Int! - @deprecated( - reason: "Use the quantityAvailable field instead. This field will be removed after 2020-07-31." - ) + privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") + meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") + quantity: Int! @deprecated(reason: "Use the stock field instead. This field will be removed after 2020-07-31.") + quantityAllocated: Int @deprecated(reason: "Use the stock field instead. This field will be removed after 2020-07-31.") + stockQuantity: Int! @deprecated(reason: "Use the quantityAvailable field instead. This field will be removed after 2020-07-31.") price: Money pricing: VariantPricingInfo - isAvailable: Boolean - @deprecated( - reason: "Use the stock field instead. This field will be removed after 2020-07-31." - ) + isAvailable: Boolean @deprecated(reason: "Use the stock field instead. This field will be removed after 2020-07-31.") attributes: [SelectedAttribute!]! costPrice: Money margin: Int @@ -5211,10 +4159,7 @@ type ProductVariant implements Node & ObjectWithMetadata { } type ProductVariantBulkCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! productVariants: [ProductVariant!]! bulkProductErrors: [BulkProductError!]! @@ -5231,28 +4176,19 @@ input ProductVariantBulkCreateInput { } type ProductVariantBulkDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! productErrors: [ProductError!]! } type ProductVariantClearMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! productVariant: ProductVariant } type ProductVariantClearPrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! productVariant: ProductVariant } @@ -5269,10 +4205,7 @@ type ProductVariantCountableEdge { } type ProductVariantCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! productVariant: ProductVariant } @@ -5289,10 +4222,7 @@ input ProductVariantCreateInput { } type ProductVariantDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! productVariant: ProductVariant } @@ -5307,28 +4237,19 @@ input ProductVariantInput { } type ProductVariantStocksCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productVariant: ProductVariant bulkStockErrors: [BulkStockError!]! } type ProductVariantStocksDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productVariant: ProductVariant stockErrors: [StockError!]! } type ProductVariantStocksUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productVariant: ProductVariant bulkStockErrors: [BulkStockError!]! } @@ -5341,10 +4262,7 @@ type ProductVariantTranslatableContent implements Node { } type ProductVariantTranslate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") translationErrors: [TranslationError!]! productVariant: ProductVariant } @@ -5356,28 +4274,19 @@ type ProductVariantTranslation implements Node { } type ProductVariantUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! productVariant: ProductVariant } type ProductVariantUpdateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! productVariant: ProductVariant } type ProductVariantUpdatePrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productErrors: [ProductError!]! productVariant: ProductVariant } @@ -5392,9 +4301,7 @@ type Query { first: Int last: Int ): WebhookCountableConnection - @deprecated( - reason: "Use webhooks field on app(s) query instead. This field will be removed after 2020-07-31." - ) + @deprecated(reason: "Use webhooks field on app(s) query instead. This field will be removed after 2020-07-31.") webhookEvents: [WebhookEvent] webhookSamplePayload(eventType: WebhookSampleEventTypeEnum!): JSONString warehouse(id: ID!): Warehouse @@ -5406,37 +4313,15 @@ type Query { first: Int last: Int ): WarehouseCountableConnection - translations( - kind: TranslatableKinds! - before: String - after: String - first: Int - last: Int - ): TranslatableItemConnection + translations(kind: TranslatableKinds!, before: String, after: String, first: Int, last: Int): TranslatableItemConnection translation(id: ID!, kind: TranslatableKinds!): TranslatableItem stock(id: ID!): Stock - stocks( - filter: StockFilterInput - before: String - after: String - first: Int - last: Int - ): StockCountableConnection + stocks(filter: StockFilterInput, before: String, after: String, first: Int, last: Int): StockCountableConnection shop: Shop! shippingZone(id: ID!): ShippingZone - shippingZones( - before: String - after: String - first: Int - last: Int - ): ShippingZoneCountableConnection + shippingZones(before: String, after: String, first: Int, last: Int): ShippingZoneCountableConnection digitalContent(id: ID!): DigitalContent - digitalContents( - before: String - after: String - first: Int - last: Int - ): DigitalContentCountableConnection + digitalContents(before: String, after: String, first: Int, last: Int): DigitalContentCountableConnection attributes( filter: AttributeFilterInput sortBy: AttributeSortingInput @@ -5485,42 +4370,13 @@ type Query { last: Int ): ProductTypeCountableConnection productVariant(id: ID!): ProductVariant - productVariants( - ids: [ID] - before: String - after: String - first: Int - last: Int - ): ProductVariantCountableConnection - reportProductSales( - period: ReportingPeriod! - before: String - after: String - first: Int - last: Int - ): ProductVariantCountableConnection + productVariants(ids: [ID], before: String, after: String, first: Int, last: Int): ProductVariantCountableConnection + reportProductSales(period: ReportingPeriod!, before: String, after: String, first: Int, last: Int): ProductVariantCountableConnection payment(id: ID!): Payment - payments( - before: String - after: String - first: Int - last: Int - ): PaymentCountableConnection + payments(before: String, after: String, first: Int, last: Int): PaymentCountableConnection page(id: ID, slug: String): Page - pages( - sortBy: PageSortingInput - filter: PageFilterInput - before: String - after: String - first: Int - last: Int - ): PageCountableConnection - homepageEvents( - before: String - after: String - first: Int - last: Int - ): OrderEventCountableConnection + pages(sortBy: PageSortingInput, filter: PageFilterInput, before: String, after: String, first: Int, last: Int): PageCountableConnection + homepageEvents(before: String, after: String, first: Int, last: Int): OrderEventCountableConnection order(id: ID!): Order orders( sortBy: OrderSortingInput @@ -5544,14 +4400,7 @@ type Query { ordersTotal(period: ReportingPeriod): TaxedMoney orderByToken(token: UUID!): Order menu(id: ID, name: String): Menu - menus( - sortBy: MenuSortingInput - filter: MenuFilterInput - before: String - after: String - first: Int - last: Int - ): MenuCountableConnection + menus(sortBy: MenuSortingInput, filter: MenuFilterInput, before: String, after: String, first: Int, last: Int): MenuCountableConnection menuItem(id: ID!): MenuItem menuItems( sortBy: MenuItemSortingInput @@ -5562,12 +4411,7 @@ type Query { last: Int ): MenuItemCountableConnection giftCard(id: ID!): GiftCard - giftCards( - before: String - after: String - first: Int - last: Int - ): GiftCardCountableConnection + giftCards(before: String, after: String, first: Int, last: Int): GiftCardCountableConnection plugin(id: ID!): Plugin plugins( filter: PluginFilterInput @@ -5608,35 +4452,13 @@ type Query { ): ExportFileCountableConnection taxTypes: [TaxType] checkout(token: UUID): Checkout - checkouts( - before: String - after: String - first: Int - last: Int - ): CheckoutCountableConnection + checkouts(before: String, after: String, first: Int, last: Int): CheckoutCountableConnection checkoutLine(id: ID): CheckoutLine - checkoutLines( - before: String - after: String - first: Int - last: Int - ): CheckoutLineCountableConnection + checkoutLines(before: String, after: String, first: Int, last: Int): CheckoutLineCountableConnection appsInstallations: [AppInstallation!]! - apps( - filter: AppFilterInput - sortBy: AppSortingInput - before: String - after: String - first: Int - last: Int - ): AppCountableConnection + apps(filter: AppFilterInput, sortBy: AppSortingInput, before: String, after: String, first: Int, last: Int): AppCountableConnection app(id: ID!): App - addressValidationRules( - countryCode: CountryCode! - countryArea: String - city: String - cityArea: String - ): AddressValidationData + addressValidationRules(countryCode: CountryCode!, countryArea: String, city: String, cityArea: String): AddressValidationData address(id: ID!): Address customers( filter: CustomerFilterInput @@ -5671,14 +4493,8 @@ type Query { after: String first: Int last: Int - ): ServiceAccountCountableConnection - @deprecated( - reason: "Use the `apps` query instead. This field will be removed after 2020-07-31." - ) - serviceAccount(id: ID!): ServiceAccount - @deprecated( - reason: "Use the `app` query instead. This field will be removed after 2020-07-31." - ) + ): ServiceAccountCountableConnection @deprecated(reason: "Use the `apps` query instead. This field will be removed after 2020-07-31.") + serviceAccount(id: ID!): ServiceAccount @deprecated(reason: "Use the `app` query instead. This field will be removed after 2020-07-31.") user(id: ID!): User _entities(representations: [_Any]): [_Entity] _service: _Service @@ -5690,10 +4506,7 @@ type ReducedRate { } type RefreshToken { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") token: String user: User accountErrors: [AccountError!]! @@ -5710,19 +4523,13 @@ enum ReportingPeriod { } type RequestEmailChange { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") user: User accountErrors: [AccountError!]! } type RequestPasswordReset { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") accountErrors: [AccountError!]! } @@ -5733,41 +4540,20 @@ type Sale implements Node { value: Float! startDate: DateTime! endDate: DateTime - categories( - before: String - after: String - first: Int - last: Int - ): CategoryCountableConnection - collections( - before: String - after: String - first: Int - last: Int - ): CollectionCountableConnection - products( - before: String - after: String - first: Int - last: Int - ): ProductCountableConnection + categories(before: String, after: String, first: Int, last: Int): CategoryCountableConnection + collections(before: String, after: String, first: Int, last: Int): CollectionCountableConnection + products(before: String, after: String, first: Int, last: Int): ProductCountableConnection translation(languageCode: LanguageCodeEnum!): SaleTranslation } type SaleAddCatalogues { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") sale: Sale discountErrors: [DiscountError!]! } type SaleBulkDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! discountErrors: [DiscountError!]! } @@ -5784,19 +4570,13 @@ type SaleCountableEdge { } type SaleCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") discountErrors: [DiscountError!]! sale: Sale } type SaleDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") discountErrors: [DiscountError!]! sale: Sale } @@ -5820,10 +4600,7 @@ input SaleInput { } type SaleRemoveCatalogues { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") sale: Sale discountErrors: [DiscountError!]! } @@ -5849,10 +4626,7 @@ type SaleTranslatableContent implements Node { } type SaleTranslate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") translationErrors: [TranslationError!]! sale: Sale } @@ -5869,10 +4643,7 @@ enum SaleType { } type SaleUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") discountErrors: [DiscountError!]! sale: Sale } @@ -5896,21 +4667,12 @@ type ServiceAccount implements Node & ObjectWithMetadata { tokens: [ServiceAccountToken] privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! - @deprecated( - reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." - ) - meta: [MetaStore]! - @deprecated( - reason: "Use the `metadata` field. This field will be removed after 2020-07-31." - ) + privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") + meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") } type ServiceAccountClearPrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") accountErrors: [AccountError!]! serviceAccount: ServiceAccount } @@ -5927,20 +4689,14 @@ type ServiceAccountCountableEdge { } type ServiceAccountCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") authToken: String accountErrors: [AccountError!]! serviceAccount: ServiceAccount } type ServiceAccountDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") accountErrors: [AccountError!]! serviceAccount: ServiceAccount } @@ -5973,20 +4729,14 @@ type ServiceAccountToken implements Node { } type ServiceAccountTokenCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") authToken: String accountErrors: [AccountError!]! serviceAccountToken: ServiceAccountToken } type ServiceAccountTokenDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") accountErrors: [AccountError!]! serviceAccountToken: ServiceAccountToken } @@ -5997,28 +4747,19 @@ input ServiceAccountTokenInput { } type ServiceAccountUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") accountErrors: [AccountError!]! serviceAccount: ServiceAccount } type ServiceAccountUpdatePrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") accountErrors: [AccountError!]! serviceAccount: ServiceAccount } type SetPassword { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") token: String refreshToken: String csrfToken: String @@ -6075,29 +4816,20 @@ enum ShippingMethodTypeEnum { } type ShippingPriceBulkDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! shippingErrors: [ShippingError!]! } type ShippingPriceCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") shippingZone: ShippingZone shippingErrors: [ShippingError!]! shippingMethod: ShippingMethod } type ShippingPriceDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") shippingMethod: ShippingMethod shippingZone: ShippingZone shippingErrors: [ShippingError!]! @@ -6115,19 +4847,13 @@ input ShippingPriceInput { } type ShippingPriceTranslate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") translationErrors: [TranslationError!]! shippingMethod: ShippingMethod } type ShippingPriceUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") shippingZone: ShippingZone shippingErrors: [ShippingError!]! shippingMethod: ShippingMethod @@ -6144,10 +4870,7 @@ type ShippingZone implements Node { } type ShippingZoneBulkDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! shippingErrors: [ShippingError!]! } @@ -6164,10 +4887,7 @@ type ShippingZoneCountableEdge { } type ShippingZoneCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") shippingErrors: [ShippingError!]! shippingZone: ShippingZone } @@ -6180,19 +4900,13 @@ input ShippingZoneCreateInput { } type ShippingZoneDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") shippingErrors: [ShippingError!]! shippingZone: ShippingZone } type ShippingZoneUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") shippingErrors: [ShippingError!]! shippingZone: ShippingZone } @@ -6239,19 +4953,13 @@ type Shop { } type ShopAddressUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") shop: Shop shopErrors: [ShopError!]! } type ShopDomainUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") shop: Shop shopErrors: [ShopError!]! } @@ -6273,10 +4981,7 @@ enum ShopErrorCode { } type ShopFetchTaxRates { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") shop: Shop shopErrors: [ShopError!]! } @@ -6298,10 +5003,7 @@ input ShopSettingsInput { } type ShopSettingsTranslate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") shop: Shop translationErrors: [TranslationError!]! } @@ -6312,10 +5014,7 @@ input ShopSettingsTranslationInput { } type ShopSettingsUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") shop: Shop shopErrors: [ShopError!]! } @@ -6333,19 +5032,13 @@ input SiteDomainInput { } type StaffBulkDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! staffErrors: [StaffError!]! } type StaffCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") staffErrors: [StaffError!]! user: User } @@ -6361,10 +5054,7 @@ input StaffCreateInput { } type StaffDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") staffErrors: [StaffError!]! user: User } @@ -6391,19 +5081,13 @@ type StaffNotificationRecipient implements Node { } type StaffNotificationRecipientCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") shopErrors: [ShopError!]! staffNotificationRecipient: StaffNotificationRecipient } type StaffNotificationRecipientDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") shopErrors: [ShopError!]! staffNotificationRecipient: StaffNotificationRecipient } @@ -6415,19 +5099,13 @@ input StaffNotificationRecipientInput { } type StaffNotificationRecipientUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") shopErrors: [ShopError!]! staffNotificationRecipient: StaffNotificationRecipient } type StaffUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") staffErrors: [StaffError!]! user: User } @@ -6643,19 +5321,13 @@ input UpdateInvoiceInput { } type UpdateMetadata { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") metadataErrors: [MetadataError!]! item: ObjectWithMetadata } type UpdatePrivateMetadata { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") metadataErrors: [MetadataError!]! item: ObjectWithMetadata } @@ -6676,32 +5348,13 @@ type User implements Node & ObjectWithMetadata { defaultBillingAddress: Address privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - privateMeta: [MetaStore]! - @deprecated( - reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31." - ) - meta: [MetaStore]! - @deprecated( - reason: "Use the `metadata` field. This field will be removed after 2020-07-31." - ) + privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") + meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") addresses: [Address] checkout: Checkout - giftCards( - before: String - after: String - first: Int - last: Int - ): GiftCardCountableConnection - orders( - before: String - after: String - first: Int - last: Int - ): OrderCountableConnection - permissions: [Permission] - @deprecated( - reason: "Will be removed in Saleor 2.11.Use the `userPermissions` instead." - ) + giftCards(before: String, after: String, first: Int, last: Int): GiftCardCountableConnection + orders(before: String, after: String, first: Int, last: Int): OrderCountableConnection + permissions: [Permission] @deprecated(reason: "Will be removed in Saleor 2.11.Use the `userPermissions` instead.") userPermissions: [UserPermission] permissionGroups: [Group] editableGroups: [Group] @@ -6711,46 +5364,31 @@ type User implements Node & ObjectWithMetadata { } type UserAvatarDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") user: User accountErrors: [AccountError!]! } type UserAvatarUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") user: User accountErrors: [AccountError!]! } type UserBulkSetActive { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! accountErrors: [AccountError!]! } type UserClearMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") accountErrors: [AccountError!]! user: User } type UserClearPrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") accountErrors: [AccountError!]! user: User } @@ -6796,19 +5434,13 @@ input UserSortingInput { } type UserUpdateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") accountErrors: [AccountError!]! user: User } type UserUpdatePrivateMeta { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") accountErrors: [AccountError!]! user: User } @@ -6820,20 +5452,14 @@ type VAT { } type VariantImageAssign { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productVariant: ProductVariant image: ProductImage productErrors: [ProductError!]! } type VariantImageUnassign { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") productVariant: ProductVariant image: ProductImage productErrors: [ProductError!]! @@ -6849,10 +5475,7 @@ type VariantPricingInfo { } type VerifyToken { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") user: User isValid: Boolean! payload: GenericScalar @@ -6874,42 +5497,21 @@ type Voucher implements Node { discountValue: Float! minSpent: Money minCheckoutItemsQuantity: Int - categories( - before: String - after: String - first: Int - last: Int - ): CategoryCountableConnection - collections( - before: String - after: String - first: Int - last: Int - ): CollectionCountableConnection - products( - before: String - after: String - first: Int - last: Int - ): ProductCountableConnection + categories(before: String, after: String, first: Int, last: Int): CategoryCountableConnection + collections(before: String, after: String, first: Int, last: Int): CollectionCountableConnection + products(before: String, after: String, first: Int, last: Int): ProductCountableConnection countries: [CountryDisplay] translation(languageCode: LanguageCodeEnum!): VoucherTranslation } type VoucherAddCatalogues { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") voucher: Voucher discountErrors: [DiscountError!]! } type VoucherBulkDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") count: Int! discountErrors: [DiscountError!]! } @@ -6926,19 +5528,13 @@ type VoucherCountableEdge { } type VoucherCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") discountErrors: [DiscountError!]! voucher: Voucher } type VoucherDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") discountErrors: [DiscountError!]! voucher: Voucher } @@ -6977,10 +5573,7 @@ input VoucherInput { } type VoucherRemoveCatalogues { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") voucher: Voucher discountErrors: [DiscountError!]! } @@ -7008,10 +5601,7 @@ type VoucherTranslatableContent implements Node { } type VoucherTranslate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") translationErrors: [TranslationError!]! voucher: Voucher } @@ -7029,10 +5619,7 @@ enum VoucherTypeEnum { } type VoucherUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") discountErrors: [DiscountError!]! voucher: Voucher } @@ -7042,12 +5629,7 @@ type Warehouse implements Node { name: String! slug: String! companyName: String! - shippingZones( - before: String - after: String - first: Int - last: Int - ): ShippingZoneCountableConnection! + shippingZones(before: String, after: String, first: Int, last: Int): ShippingZoneCountableConnection! address: Address! email: String! } @@ -7075,10 +5657,7 @@ type WarehouseCountableEdge { } type WarehouseCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") warehouseErrors: [WarehouseError!]! warehouse: Warehouse } @@ -7093,10 +5672,7 @@ input WarehouseCreateInput { } type WarehouseDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") warehouseErrors: [WarehouseError!]! warehouse: Warehouse } @@ -7122,19 +5698,13 @@ input WarehouseFilterInput { } type WarehouseShippingZoneAssign { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") warehouseErrors: [WarehouseError!]! warehouse: Warehouse } type WarehouseShippingZoneUnassign { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") warehouseErrors: [WarehouseError!]! warehouse: Warehouse } @@ -7149,10 +5719,7 @@ input WarehouseSortingInput { } type WarehouseUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") warehouseErrors: [WarehouseError!]! warehouse: Warehouse } @@ -7172,10 +5739,7 @@ type Webhook implements Node { secretKey: String id: ID! events: [WebhookEvent!]! - serviceAccount: ServiceAccount! - @deprecated( - reason: "Use the `app` field instead. This field will be removed after 2020-07-31." - ) + serviceAccount: ServiceAccount! @deprecated(reason: "Use the `app` field instead. This field will be removed after 2020-07-31.") app: App! } @@ -7191,10 +5755,7 @@ type WebhookCountableEdge { } type WebhookCreate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") webhookErrors: [WebhookError!]! webhook: Webhook } @@ -7210,10 +5771,7 @@ input WebhookCreateInput { } type WebhookDelete { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") webhookErrors: [WebhookError!]! webhook: Webhook } @@ -7290,10 +5848,7 @@ input WebhookSortingInput { } type WebhookUpdate { - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") webhookErrors: [WebhookError!]! webhook: Webhook } diff --git a/src/components/SeoForm/SeoForm.tsx b/src/components/SeoForm/SeoForm.tsx index 89883d3267d..113a66b707a 100644 --- a/src/components/SeoForm/SeoForm.tsx +++ b/src/components/SeoForm/SeoForm.tsx @@ -95,39 +95,6 @@ const SeoForm: React.FC = props => { const [expanded, setExpansionStatus] = React.useState(false); const toggleExpansion = () => setExpansionStatus(!expanded); const shouldDisplayHelperText = () => helperText && !expanded; - // const getParsedProps = () => { - // const keysToParse: Array = [ - // "slug", - // "slugPlaceholder", - // "description", - // "descriptionPlaceholder", - // "title", - // "titlePlaceholder" - // ]; - - // return reduce( - // props, - // (result, value, key: keyof SeoFormProps) => { - // console.log({ result, value, key }); - // if (keysToParse.includes(key)) { - // return { ...result, [key]: !!value ? "" : value }; - // } - // return result; - // }, - // {} as Partial - // ); - // }; - - // const { - // title, - // titlePlaceholder, - // slug, - // slugPlaceholder, - // description, - // descriptionPlaceholder - // } = getParsedProps(); - - // console.log({ ...getParsedProps() }); return ( @@ -137,21 +104,12 @@ const SeoForm: React.FC = props => { })} toolbar={ } /> - {shouldDisplayHelperText() && ( - - {helperText} - - )} + {shouldDisplayHelperText() && {helperText}} {expanded && (
= props => {
} helperText={intl.formatMessage({ - defaultMessage: - "If empty, the preview shows what will be autogenerated." + defaultMessage: "If empty, the preview shows what will be autogenerated." })} value={slug?.slice(0, 69)} disabled={loading || disabled} - placeholder={slug || slugify(slugPlaceholder)} + placeholder={slug || slugify(slugPlaceholder, { lower: true })} onChange={onChange} fullWidth /> @@ -208,8 +165,7 @@ const SeoForm: React.FC = props => {
} helperText={intl.formatMessage({ - defaultMessage: - "If empty, the preview shows what will be autogenerated." + defaultMessage: "If empty, the preview shows what will be autogenerated." })} value={title?.slice(0, 69)} disabled={loading || disabled} @@ -240,8 +196,7 @@ const SeoForm: React.FC = props => {
} helperText={intl.formatMessage({ - defaultMessage: - "If empty, the preview shows what will be autogenerated." + defaultMessage: "If empty, the preview shows what will be autogenerated." })} value={description?.slice(0, 299)} onChange={onChange} diff --git a/src/pages/components/PageSlug/PageSlug.tsx b/src/pages/components/PageSlug/PageSlug.tsx deleted file mode 100644 index 256ddcfd4aa..00000000000 --- a/src/pages/components/PageSlug/PageSlug.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; -import CardTitle from "@saleor/components/CardTitle"; -import { PageErrorFragment } from "@saleor/fragments/types/PageErrorFragment"; -import { getFormErrors } from "@saleor/utils/errors"; -import getPageErrorMessage from "@saleor/utils/errors/page"; -import React from "react"; -import { useIntl } from "react-intl"; -import slugify from "slugify"; - -import { FormData } from "../PageDetailsPage"; - -export interface PageSlugProps { - data: FormData; - disabled: boolean; - errors: PageErrorFragment[]; - onChange: (event: React.ChangeEvent) => void; -} - -const PageSlug: React.FC = ({ - data, - disabled, - errors, - onChange -}) => { - const intl = useIntl(); - - const formErrors = getFormErrors(["slug"], errors); - - return ( - - - - - - - ); -}; -PageSlug.displayName = "PageSlug"; -export default PageSlug; diff --git a/src/pages/components/PageSlug/index.ts b/src/pages/components/PageSlug/index.ts deleted file mode 100644 index d307cb899d1..00000000000 --- a/src/pages/components/PageSlug/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default } from "./PageSlug"; -export * from "./PageSlug"; From d8a770b5b3dd3327c8ae2ae59749cbd48414ee22 Mon Sep 17 00:00:00 2001 From: Magdalena Markusik Date: Mon, 21 Sep 2020 15:36:41 +0200 Subject: [PATCH 19/31] refactor --- .prettierrc | 3 +- schema.graphql | 362 ++++++++++--------------------------------------- 2 files changed, 73 insertions(+), 292 deletions(-) diff --git a/.prettierrc b/.prettierrc index f56052b7e18..1f5e5d140d8 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,5 +1,4 @@ { "arrowParens": "avoid", - "trailingComma": "none", - "printWidth": 140 + "trailingComma": "none" } diff --git a/schema.graphql b/schema.graphql index 6cd5b35ab45..e2953571b50 100644 --- a/schema.graphql +++ b/schema.graphql @@ -19,7 +19,6 @@ type AccountAddressDelete { type AccountAddressUpdate { errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") - user: User accountErrors: [AccountError!]! address: Address @@ -589,10 +588,7 @@ type AttributeValue implements Node { id: ID! name: String slug: String - type: AttributeValueType - @deprecated( - reason: "Use the `inputType` field to determine the type of attribute's value. This field will be removed after 2020-07-31." - ) + type: AttributeValueType @deprecated(reason: "Use the `inputType` field to determine the type of attribute's value. This field will be removed after 2020-07-31.") translation(languageCode: LanguageCodeEnum!): AttributeValueTranslation inputType: AttributeInputTypeEnum } @@ -1076,14 +1072,7 @@ type Collection implements Node & ObjectWithMetadata { metadata: [MetadataItem]! privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") - products( - filter: ProductFilterInput - sortBy: ProductOrder - before: String - after: String - first: Int - last: Int - ): ProductCountableConnection + products(filter: ProductFilterInput, sortBy: ProductOrder, before: String, after: String, first: Int, last: Int): ProductCountableConnection backgroundImage(size: Int): Image translation(languageCode: LanguageCodeEnum!): CollectionTranslation } @@ -1163,12 +1152,12 @@ input CollectionFilterInput { input CollectionInput { isPublished: Boolean name: String + slug: String description: String descriptionJson: JSONString backgroundImage: Upload backgroundImageAlt: String seo: SeoInput - slug: String publicationDate: Date } @@ -2558,10 +2547,7 @@ type MetadataItem { type Money { currency: String! amount: Float! - localized: String! - @deprecated( - reason: "Price formatting according to the current locale should be handled by the frontend client. This field will be removed after 2020-07-31." - ) + localized: String! @deprecated(reason: "Price formatting according to the current locale should be handled by the frontend client. This field will be removed after 2020-07-31.") } type MoneyRange { @@ -2610,14 +2596,10 @@ type Mutation { attributeUnassign(attributeIds: [ID]!, productTypeId: ID!): AttributeUnassign attributeUpdate(id: ID!, input: AttributeUpdateInput!): AttributeUpdate attributeTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): AttributeTranslate - attributeUpdateMetadata(id: ID!, input: MetaInput!): AttributeUpdateMeta - @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") - attributeClearMetadata(id: ID!, input: MetaPath!): AttributeClearMeta - @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") - attributeUpdatePrivateMetadata(id: ID!, input: MetaInput!): AttributeUpdatePrivateMeta - @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - attributeClearPrivateMetadata(id: ID!, input: MetaPath!): AttributeClearPrivateMeta - @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + attributeUpdateMetadata(id: ID!, input: MetaInput!): AttributeUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") + attributeClearMetadata(id: ID!, input: MetaPath!): AttributeClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") + attributeUpdatePrivateMetadata(id: ID!, input: MetaInput!): AttributeUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + attributeClearPrivateMetadata(id: ID!, input: MetaPath!): AttributeClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") attributeValueCreate(attribute: ID!, input: AttributeValueCreateInput!): AttributeValueCreate attributeValueDelete(id: ID!): AttributeValueDelete attributeValueBulkDelete(ids: [ID]!): AttributeValueBulkDelete @@ -2629,14 +2611,10 @@ type Mutation { categoryBulkDelete(ids: [ID]!): CategoryBulkDelete categoryUpdate(id: ID!, input: CategoryInput!): CategoryUpdate categoryTranslate(id: ID!, input: TranslationInput!, languageCode: LanguageCodeEnum!): CategoryTranslate - categoryUpdateMetadata(id: ID!, input: MetaInput!): CategoryUpdateMeta - @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") - categoryClearMetadata(id: ID!, input: MetaPath!): CategoryClearMeta - @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") - categoryUpdatePrivateMetadata(id: ID!, input: MetaInput!): CategoryUpdatePrivateMeta - @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - categoryClearPrivateMetadata(id: ID!, input: MetaPath!): CategoryClearPrivateMeta - @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + categoryUpdateMetadata(id: ID!, input: MetaInput!): CategoryUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") + categoryClearMetadata(id: ID!, input: MetaPath!): CategoryClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") + categoryUpdatePrivateMetadata(id: ID!, input: MetaInput!): CategoryUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + categoryClearPrivateMetadata(id: ID!, input: MetaPath!): CategoryClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") collectionAddProducts(collectionId: ID!, products: [ID]!): CollectionAddProducts collectionCreate(input: CollectionCreateInput!): CollectionCreate collectionDelete(id: ID!): CollectionDelete @@ -2646,28 +2624,20 @@ type Mutation { collectionRemoveProducts(collectionId: ID!, products: [ID]!): CollectionRemoveProducts collectionUpdate(id: ID!, input: CollectionInput!): CollectionUpdate collectionTranslate(id: ID!, input: TranslationInput!, languageCode: LanguageCodeEnum!): CollectionTranslate - collectionUpdateMetadata(id: ID!, input: MetaInput!): CollectionUpdateMeta - @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") - collectionClearMetadata(id: ID!, input: MetaPath!): CollectionClearMeta - @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") - collectionUpdatePrivateMetadata(id: ID!, input: MetaInput!): CollectionUpdatePrivateMeta - @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - collectionClearPrivateMetadata(id: ID!, input: MetaPath!): CollectionClearPrivateMeta - @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + collectionUpdateMetadata(id: ID!, input: MetaInput!): CollectionUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") + collectionClearMetadata(id: ID!, input: MetaPath!): CollectionClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") + collectionUpdatePrivateMetadata(id: ID!, input: MetaInput!): CollectionUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + collectionClearPrivateMetadata(id: ID!, input: MetaPath!): CollectionClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") productCreate(input: ProductCreateInput!): ProductCreate productDelete(id: ID!): ProductDelete productBulkDelete(ids: [ID]!): ProductBulkDelete productBulkPublish(ids: [ID]!, isPublished: Boolean!): ProductBulkPublish productUpdate(id: ID!, input: ProductInput!): ProductUpdate productTranslate(id: ID!, input: TranslationInput!, languageCode: LanguageCodeEnum!): ProductTranslate - productUpdateMetadata(id: ID!, input: MetaInput!): ProductUpdateMeta - @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") - productClearMetadata(id: ID!, input: MetaPath!): ProductClearMeta - @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") - productUpdatePrivateMetadata(id: ID!, input: MetaInput!): ProductUpdatePrivateMeta - @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - productClearPrivateMetadata(id: ID!, input: MetaPath!): ProductClearPrivateMeta - @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + productUpdateMetadata(id: ID!, input: MetaInput!): ProductUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") + productClearMetadata(id: ID!, input: MetaPath!): ProductClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") + productUpdatePrivateMetadata(id: ID!, input: MetaInput!): ProductUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + productClearPrivateMetadata(id: ID!, input: MetaPath!): ProductClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") productSetAvailabilityForPurchase(isAvailable: Boolean!, productId: ID!, startDate: Date): ProductSetAvailabilityForPurchase productImageCreate(input: ProductImageCreateInput!): ProductImageCreate productImageDelete(id: ID!): ProductImageDelete @@ -2679,14 +2649,10 @@ type Mutation { productTypeBulkDelete(ids: [ID]!): ProductTypeBulkDelete productTypeUpdate(id: ID!, input: ProductTypeInput!): ProductTypeUpdate productTypeReorderAttributes(moves: [ReorderInput]!, productTypeId: ID!, type: AttributeTypeEnum!): ProductTypeReorderAttributes - productTypeUpdateMetadata(id: ID!, input: MetaInput!): ProductTypeUpdateMeta - @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") - productTypeClearMetadata(id: ID!, input: MetaPath!): ProductTypeClearMeta - @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") - productTypeUpdatePrivateMetadata(id: ID!, input: MetaInput!): ProductTypeUpdatePrivateMeta - @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - productTypeClearPrivateMetadata(id: ID!, input: MetaPath!): ProductTypeClearPrivateMeta - @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + productTypeUpdateMetadata(id: ID!, input: MetaInput!): ProductTypeUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") + productTypeClearMetadata(id: ID!, input: MetaPath!): ProductTypeClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") + productTypeUpdatePrivateMetadata(id: ID!, input: MetaInput!): ProductTypeUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + productTypeClearPrivateMetadata(id: ID!, input: MetaPath!): ProductTypeClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") digitalContentCreate(input: DigitalContentUploadInput!, variantId: ID!): DigitalContentCreate digitalContentDelete(variantId: ID!): DigitalContentDelete digitalContentUpdate(input: DigitalContentInput!, variantId: ID!): DigitalContentUpdate @@ -2700,14 +2666,10 @@ type Mutation { productVariantStocksUpdate(stocks: [StockInput!]!, variantId: ID!): ProductVariantStocksUpdate productVariantUpdate(id: ID!, input: ProductVariantInput!): ProductVariantUpdate productVariantTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): ProductVariantTranslate - productVariantUpdateMetadata(id: ID!, input: MetaInput!): ProductVariantUpdateMeta - @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") - productVariantClearMetadata(id: ID!, input: MetaPath!): ProductVariantClearMeta - @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") - productVariantUpdatePrivateMetadata(id: ID!, input: MetaInput!): ProductVariantUpdatePrivateMeta - @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - productVariantClearPrivateMetadata(id: ID!, input: MetaPath!): ProductVariantClearPrivateMeta - @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + productVariantUpdateMetadata(id: ID!, input: MetaInput!): ProductVariantUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") + productVariantClearMetadata(id: ID!, input: MetaPath!): ProductVariantClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") + productVariantUpdatePrivateMetadata(id: ID!, input: MetaInput!): ProductVariantUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + productVariantClearPrivateMetadata(id: ID!, input: MetaPath!): ProductVariantClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") variantImageAssign(imageId: ID!, variantId: ID!): VariantImageAssign variantImageUnassign(imageId: ID!, variantId: ID!): VariantImageUnassign paymentCapture(amount: PositiveDecimal, paymentId: ID!): PaymentCapture @@ -2731,28 +2693,20 @@ type Mutation { orderAddNote(order: ID!, input: OrderAddNoteInput!): OrderAddNote orderCancel(id: ID!): OrderCancel orderCapture(amount: PositiveDecimal!, id: ID!): OrderCapture - orderClearPrivateMeta(id: ID!, input: MetaPath!): OrderClearPrivateMeta - @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - orderClearMeta(input: MetaPath!, token: UUID!): OrderClearMeta - @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") + orderClearPrivateMeta(id: ID!, input: MetaPath!): OrderClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + orderClearMeta(input: MetaPath!, token: UUID!): OrderClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") orderFulfill(input: OrderFulfillInput!, order: ID): OrderFulfill orderFulfillmentCancel(id: ID!, input: FulfillmentCancelInput!): FulfillmentCancel orderFulfillmentUpdateTracking(id: ID!, input: FulfillmentUpdateTrackingInput!): FulfillmentUpdateTracking - orderFulfillmentClearMeta(id: ID!, input: MetaPath!): FulfillmentClearMeta - @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") - orderFulfillmentClearPrivateMeta(id: ID!, input: MetaPath!): FulfillmentClearPrivateMeta - @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - orderFulfillmentUpdateMeta(id: ID!, input: MetaInput!): FulfillmentUpdateMeta - @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") - orderFulfillmentUpdatePrivateMeta(id: ID!, input: MetaInput!): FulfillmentUpdatePrivateMeta - @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + orderFulfillmentClearMeta(id: ID!, input: MetaPath!): FulfillmentClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") + orderFulfillmentClearPrivateMeta(id: ID!, input: MetaPath!): FulfillmentClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + orderFulfillmentUpdateMeta(id: ID!, input: MetaInput!): FulfillmentUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") + orderFulfillmentUpdatePrivateMeta(id: ID!, input: MetaInput!): FulfillmentUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") orderMarkAsPaid(id: ID!): OrderMarkAsPaid orderRefund(amount: PositiveDecimal!, id: ID!): OrderRefund orderUpdate(id: ID!, input: OrderUpdateInput!): OrderUpdate - orderUpdateMeta(input: MetaInput!, token: UUID!): OrderUpdateMeta - @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") - orderUpdatePrivateMeta(id: ID!, input: MetaInput!): OrderUpdatePrivateMeta - @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + orderUpdateMeta(input: MetaInput!, token: UUID!): OrderUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") + orderUpdatePrivateMeta(id: ID!, input: MetaInput!): OrderUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") orderUpdateShipping(order: ID!, input: OrderUpdateShippingInput): OrderUpdateShipping orderVoid(id: ID!): OrderVoid orderBulkCancel(ids: [ID]!): OrderBulkCancel @@ -2811,14 +2765,10 @@ type Mutation { checkoutPaymentCreate(checkoutId: ID!, input: PaymentInput!): CheckoutPaymentCreate checkoutShippingAddressUpdate(checkoutId: ID!, shippingAddress: AddressInput!): CheckoutShippingAddressUpdate checkoutShippingMethodUpdate(checkoutId: ID, shippingMethodId: ID!): CheckoutShippingMethodUpdate - checkoutUpdateMetadata(id: ID!, input: MetaInput!): CheckoutUpdateMeta - @deprecated(reason: "Use the `updateMetadata` mutation. This field will be removed after 2020-07-31.") - checkoutClearMetadata(id: ID!, input: MetaPath!): CheckoutClearMeta - @deprecated(reason: "Use the `deleteMetadata` mutation. This field will be removed after 2020-07-31.") - checkoutUpdatePrivateMetadata(id: ID!, input: MetaInput!): CheckoutUpdatePrivateMeta - @deprecated(reason: "Use the `updatePrivateMetadata` mutation. This field will be removed after 2020-07-31.") - checkoutClearPrivateMetadata(id: ID!, input: MetaPath!): CheckoutClearPrivateMeta - @deprecated(reason: "Use the `deletePrivateMetadata` mutation. This field will be removed after 2020-07-31.") + checkoutUpdateMetadata(id: ID!, input: MetaInput!): CheckoutUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation. This field will be removed after 2020-07-31.") + checkoutClearMetadata(id: ID!, input: MetaPath!): CheckoutClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation. This field will be removed after 2020-07-31.") + checkoutUpdatePrivateMetadata(id: ID!, input: MetaInput!): CheckoutUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation. This field will be removed after 2020-07-31.") + checkoutClearPrivateMetadata(id: ID!, input: MetaPath!): CheckoutClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation. This field will be removed after 2020-07-31.") appCreate(input: AppInput!): AppCreate appUpdate(id: ID!, input: AppInput!): AppUpdate appDelete(id: ID!): AppDelete @@ -2849,8 +2799,7 @@ type Mutation { accountUpdate(input: AccountInput!): AccountUpdate accountRequestDeletion(redirectUrl: String!): AccountRequestDeletion accountDelete(token: String!): AccountDelete - accountUpdateMeta(input: MetaInput!): AccountUpdateMeta - @deprecated(reason: "Use the `updateMetadata` mutation. This field will be removed after 2020-07-31.") + accountUpdateMeta(input: MetaInput!): AccountUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation. This field will be removed after 2020-07-31.") addressCreate(input: AddressInput!, userId: ID!): AddressCreate addressUpdate(id: ID!, input: AddressInput!): AddressUpdate addressDelete(id: ID!): AddressDelete @@ -2866,28 +2815,17 @@ type Mutation { userAvatarUpdate(image: Upload!): UserAvatarUpdate userAvatarDelete: UserAvatarDelete userBulkSetActive(ids: [ID]!, isActive: Boolean!): UserBulkSetActive - userUpdateMetadata(id: ID!, input: MetaInput!): UserUpdateMeta - @deprecated(reason: "Use the `updateMetadata` mutation. This field will be removed after 2020-07-31.") - userClearMetadata(id: ID!, input: MetaPath!): UserClearMeta - @deprecated(reason: "Use the `deleteMetadata` mutation. This field will be removed after 2020-07-31.") - userUpdatePrivateMetadata(id: ID!, input: MetaInput!): UserUpdatePrivateMeta - @deprecated(reason: "Use the `updatePrivateMetadata` mutation. This field will be removed after 2020-07-31.") - userClearPrivateMetadata(id: ID!, input: MetaPath!): UserClearPrivateMeta - @deprecated(reason: "Use the `deletePrivateMetadata` mutation. This field will be removed after 2020-07-31.") - serviceAccountCreate(input: ServiceAccountInput!): ServiceAccountCreate - @deprecated(reason: "Use the `appCreate` mutation instead. This field will be removed after 2020-07-31.") - serviceAccountUpdate(id: ID!, input: ServiceAccountInput!): ServiceAccountUpdate - @deprecated(reason: "Use the `appUpdate` mutation instead. This field will be removed after 2020-07-31.") - serviceAccountDelete(id: ID!): ServiceAccountDelete - @deprecated(reason: "Use the `appDelete` mutation instead. This field will be removed after 2020-07-31.") - serviceAccountUpdatePrivateMetadata(id: ID!, input: MetaInput!): ServiceAccountUpdatePrivateMeta - @deprecated(reason: "Use the `updatePrivateMetadata` mutation with App instead.This field will be removed after 2020-07-31.") - serviceAccountClearPrivateMetadata(id: ID!, input: MetaPath!): ServiceAccountClearPrivateMeta - @deprecated(reason: "Use the `deletePrivateMetadata` mutation with App instead.This field will be removed after 2020-07-31.") - serviceAccountTokenCreate(input: ServiceAccountTokenInput!): ServiceAccountTokenCreate - @deprecated(reason: "Use the `appTokenCreate` mutation instead. This field will be removed after 2020-07-31.") - serviceAccountTokenDelete(id: ID!): ServiceAccountTokenDelete - @deprecated(reason: "Use the `appTokenDelete` mutation instead. This field will be removed after 2020-07-31.") + userUpdateMetadata(id: ID!, input: MetaInput!): UserUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation. This field will be removed after 2020-07-31.") + userClearMetadata(id: ID!, input: MetaPath!): UserClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation. This field will be removed after 2020-07-31.") + userUpdatePrivateMetadata(id: ID!, input: MetaInput!): UserUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation. This field will be removed after 2020-07-31.") + userClearPrivateMetadata(id: ID!, input: MetaPath!): UserClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation. This field will be removed after 2020-07-31.") + serviceAccountCreate(input: ServiceAccountInput!): ServiceAccountCreate @deprecated(reason: "Use the `appCreate` mutation instead. This field will be removed after 2020-07-31.") + serviceAccountUpdate(id: ID!, input: ServiceAccountInput!): ServiceAccountUpdate @deprecated(reason: "Use the `appUpdate` mutation instead. This field will be removed after 2020-07-31.") + serviceAccountDelete(id: ID!): ServiceAccountDelete @deprecated(reason: "Use the `appDelete` mutation instead. This field will be removed after 2020-07-31.") + serviceAccountUpdatePrivateMetadata(id: ID!, input: MetaInput!): ServiceAccountUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation with App instead.This field will be removed after 2020-07-31.") + serviceAccountClearPrivateMetadata(id: ID!, input: MetaPath!): ServiceAccountClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation with App instead.This field will be removed after 2020-07-31.") + serviceAccountTokenCreate(input: ServiceAccountTokenInput!): ServiceAccountTokenCreate @deprecated(reason: "Use the `appTokenCreate` mutation instead. This field will be removed after 2020-07-31.") + serviceAccountTokenDelete(id: ID!): ServiceAccountTokenDelete @deprecated(reason: "Use the `appTokenDelete` mutation instead. This field will be removed after 2020-07-31.") permissionGroupCreate(input: PermissionGroupCreateInput!): PermissionGroupCreate permissionGroupUpdate(id: ID!, input: PermissionGroupUpdateInput!): PermissionGroupUpdate permissionGroupDelete(id: ID!): PermissionGroupDelete @@ -4293,26 +4231,11 @@ type ProductVariantUpdatePrivateMeta { type Query { webhook(id: ID!): Webhook - webhooks( - sortBy: WebhookSortingInput - filter: WebhookFilterInput - before: String - after: String - first: Int - last: Int - ): WebhookCountableConnection - @deprecated(reason: "Use webhooks field on app(s) query instead. This field will be removed after 2020-07-31.") + webhooks(sortBy: WebhookSortingInput, filter: WebhookFilterInput, before: String, after: String, first: Int, last: Int): WebhookCountableConnection @deprecated(reason: "Use webhooks field on app(s) query instead. This field will be removed after 2020-07-31.") webhookEvents: [WebhookEvent] webhookSamplePayload(eventType: WebhookSampleEventTypeEnum!): JSONString warehouse(id: ID!): Warehouse - warehouses( - filter: WarehouseFilterInput - sortBy: WarehouseSortingInput - before: String - after: String - first: Int - last: Int - ): WarehouseCountableConnection + warehouses(filter: WarehouseFilterInput, sortBy: WarehouseSortingInput, before: String, after: String, first: Int, last: Int): WarehouseCountableConnection translations(kind: TranslatableKinds!, before: String, after: String, first: Int, last: Int): TranslatableItemConnection translation(id: ID!, kind: TranslatableKinds!): TranslatableItem stock(id: ID!): Stock @@ -4322,53 +4245,16 @@ type Query { shippingZones(before: String, after: String, first: Int, last: Int): ShippingZoneCountableConnection digitalContent(id: ID!): DigitalContent digitalContents(before: String, after: String, first: Int, last: Int): DigitalContentCountableConnection - attributes( - filter: AttributeFilterInput - sortBy: AttributeSortingInput - before: String - after: String - first: Int - last: Int - ): AttributeCountableConnection + attributes(filter: AttributeFilterInput, sortBy: AttributeSortingInput, before: String, after: String, first: Int, last: Int): AttributeCountableConnection attribute(id: ID!): Attribute - categories( - filter: CategoryFilterInput - sortBy: CategorySortingInput - level: Int - before: String - after: String - first: Int - last: Int - ): CategoryCountableConnection + categories(filter: CategoryFilterInput, sortBy: CategorySortingInput, level: Int, before: String, after: String, first: Int, last: Int): CategoryCountableConnection category(id: ID, slug: String): Category collection(id: ID, slug: String): Collection - collections( - filter: CollectionFilterInput - sortBy: CollectionSortingInput - before: String - after: String - first: Int - last: Int - ): CollectionCountableConnection + collections(filter: CollectionFilterInput, sortBy: CollectionSortingInput, before: String, after: String, first: Int, last: Int): CollectionCountableConnection product(id: ID, slug: String): Product - products( - filter: ProductFilterInput - sortBy: ProductOrder - stockAvailability: StockAvailability - before: String - after: String - first: Int - last: Int - ): ProductCountableConnection + products(filter: ProductFilterInput, sortBy: ProductOrder, stockAvailability: StockAvailability, before: String, after: String, first: Int, last: Int): ProductCountableConnection productType(id: ID!): ProductType - productTypes( - filter: ProductTypeFilterInput - sortBy: ProductTypeSortingInput - before: String - after: String - first: Int - last: Int - ): ProductTypeCountableConnection + productTypes(filter: ProductTypeFilterInput, sortBy: ProductTypeSortingInput, before: String, after: String, first: Int, last: Int): ProductTypeCountableConnection productVariant(id: ID!): ProductVariant productVariants(ids: [ID], before: String, after: String, first: Int, last: Int): ProductVariantCountableConnection reportProductSales(period: ReportingPeriod!, before: String, after: String, first: Int, last: Int): ProductVariantCountableConnection @@ -4378,78 +4264,24 @@ type Query { pages(sortBy: PageSortingInput, filter: PageFilterInput, before: String, after: String, first: Int, last: Int): PageCountableConnection homepageEvents(before: String, after: String, first: Int, last: Int): OrderEventCountableConnection order(id: ID!): Order - orders( - sortBy: OrderSortingInput - filter: OrderFilterInput - created: ReportingPeriod - status: OrderStatusFilter - before: String - after: String - first: Int - last: Int - ): OrderCountableConnection - draftOrders( - sortBy: OrderSortingInput - filter: OrderDraftFilterInput - created: ReportingPeriod - before: String - after: String - first: Int - last: Int - ): OrderCountableConnection + orders(sortBy: OrderSortingInput, filter: OrderFilterInput, created: ReportingPeriod, status: OrderStatusFilter, before: String, after: String, first: Int, last: Int): OrderCountableConnection + draftOrders(sortBy: OrderSortingInput, filter: OrderDraftFilterInput, created: ReportingPeriod, before: String, after: String, first: Int, last: Int): OrderCountableConnection ordersTotal(period: ReportingPeriod): TaxedMoney orderByToken(token: UUID!): Order menu(id: ID, name: String): Menu menus(sortBy: MenuSortingInput, filter: MenuFilterInput, before: String, after: String, first: Int, last: Int): MenuCountableConnection menuItem(id: ID!): MenuItem - menuItems( - sortBy: MenuItemSortingInput - filter: MenuItemFilterInput - before: String - after: String - first: Int - last: Int - ): MenuItemCountableConnection + menuItems(sortBy: MenuItemSortingInput, filter: MenuItemFilterInput, before: String, after: String, first: Int, last: Int): MenuItemCountableConnection giftCard(id: ID!): GiftCard giftCards(before: String, after: String, first: Int, last: Int): GiftCardCountableConnection plugin(id: ID!): Plugin - plugins( - filter: PluginFilterInput - sortBy: PluginSortingInput - before: String - after: String - first: Int - last: Int - ): PluginCountableConnection + plugins(filter: PluginFilterInput, sortBy: PluginSortingInput, before: String, after: String, first: Int, last: Int): PluginCountableConnection sale(id: ID!): Sale - sales( - filter: SaleFilterInput - sortBy: SaleSortingInput - query: String - before: String - after: String - first: Int - last: Int - ): SaleCountableConnection + sales(filter: SaleFilterInput, sortBy: SaleSortingInput, query: String, before: String, after: String, first: Int, last: Int): SaleCountableConnection voucher(id: ID!): Voucher - vouchers( - filter: VoucherFilterInput - sortBy: VoucherSortingInput - query: String - before: String - after: String - first: Int - last: Int - ): VoucherCountableConnection + vouchers(filter: VoucherFilterInput, sortBy: VoucherSortingInput, query: String, before: String, after: String, first: Int, last: Int): VoucherCountableConnection exportFile(id: ID!): ExportFile - exportFiles( - filter: ExportFileFilterInput - sortBy: ExportFileSortingInput - before: String - after: String - first: Int - last: Int - ): ExportFileCountableConnection + exportFiles(filter: ExportFileFilterInput, sortBy: ExportFileSortingInput, before: String, after: String, first: Int, last: Int): ExportFileCountableConnection taxTypes: [TaxType] checkout(token: UUID): Checkout checkouts(before: String, after: String, first: Int, last: Int): CheckoutCountableConnection @@ -4460,40 +4292,12 @@ type Query { app(id: ID!): App addressValidationRules(countryCode: CountryCode!, countryArea: String, city: String, cityArea: String): AddressValidationData address(id: ID!): Address - customers( - filter: CustomerFilterInput - sortBy: UserSortingInput - before: String - after: String - first: Int - last: Int - ): UserCountableConnection - permissionGroups( - filter: PermissionGroupFilterInput - sortBy: PermissionGroupSortingInput - before: String - after: String - first: Int - last: Int - ): GroupCountableConnection + customers(filter: CustomerFilterInput, sortBy: UserSortingInput, before: String, after: String, first: Int, last: Int): UserCountableConnection + permissionGroups(filter: PermissionGroupFilterInput, sortBy: PermissionGroupSortingInput, before: String, after: String, first: Int, last: Int): GroupCountableConnection permissionGroup(id: ID!): Group me: User - staffUsers( - filter: StaffUserInput - sortBy: UserSortingInput - before: String - after: String - first: Int - last: Int - ): UserCountableConnection - serviceAccounts( - filter: ServiceAccountFilterInput - sortBy: ServiceAccountSortingInput - before: String - after: String - first: Int - last: Int - ): ServiceAccountCountableConnection @deprecated(reason: "Use the `apps` query instead. This field will be removed after 2020-07-31.") + staffUsers(filter: StaffUserInput, sortBy: UserSortingInput, before: String, after: String, first: Int, last: Int): UserCountableConnection + serviceAccounts(filter: ServiceAccountFilterInput, sortBy: ServiceAccountSortingInput, before: String, after: String, first: Int, last: Int): ServiceAccountCountableConnection @deprecated(reason: "Use the `apps` query instead. This field will be removed after 2020-07-31.") serviceAccount(id: ID!): ServiceAccount @deprecated(reason: "Use the `app` query instead. This field will be removed after 2020-07-31.") user(id: ID!): User _entities(representations: [_Any]): [_Entity] @@ -5255,18 +5059,7 @@ enum TransactionKind { CANCEL } -union TranslatableItem = - ProductTranslatableContent - | CollectionTranslatableContent - | CategoryTranslatableContent - | AttributeTranslatableContent - | AttributeValueTranslatableContent - | ProductVariantTranslatableContent - | PageTranslatableContent - | ShippingMethodTranslatableContent - | SaleTranslatableContent - | VoucherTranslatableContent - | MenuItemTranslatableContent +union TranslatableItem = ProductTranslatableContent | CollectionTranslatableContent | CategoryTranslatableContent | AttributeTranslatableContent | AttributeValueTranslatableContent | ProductVariantTranslatableContent | PageTranslatableContent | ShippingMethodTranslatableContent | SaleTranslatableContent | VoucherTranslatableContent | MenuItemTranslatableContent type TranslatableItemConnection { pageInfo: PageInfo! @@ -5879,18 +5672,7 @@ enum WeightUnitsEnum { scalar _Any -union _Entity = - Address - | User - | Group - | ServiceAccount - | App - | ProductVariant - | Product - | ProductType - | Collection - | Category - | ProductImage +union _Entity = Address | User | Group | ServiceAccount | App | ProductVariant | Product | ProductType | Collection | Category | ProductImage type _Service { sdl: String From e69c7057bda1313932c8192d99bd659628ff1c9a Mon Sep 17 00:00:00 2001 From: Magdalena Markusik Date: Mon, 21 Sep 2020 16:30:18 +0200 Subject: [PATCH 20/31] fix lint --- src/components/SeoForm/SeoForm.tsx | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/components/SeoForm/SeoForm.tsx b/src/components/SeoForm/SeoForm.tsx index 113a66b707a..544f6f2d405 100644 --- a/src/components/SeoForm/SeoForm.tsx +++ b/src/components/SeoForm/SeoForm.tsx @@ -104,12 +104,21 @@ const SeoForm: React.FC = props => { })} toolbar={ } /> - {shouldDisplayHelperText() && {helperText}} + {shouldDisplayHelperText() && ( + + {helperText} + + )} {expanded && (
= props => {
} helperText={intl.formatMessage({ - defaultMessage: "If empty, the preview shows what will be autogenerated." + defaultMessage: + "If empty, the preview shows what will be autogenerated." })} value={slug?.slice(0, 69)} disabled={loading || disabled} @@ -165,7 +175,8 @@ const SeoForm: React.FC = props => {
} helperText={intl.formatMessage({ - defaultMessage: "If empty, the preview shows what will be autogenerated." + defaultMessage: + "If empty, the preview shows what will be autogenerated." })} value={title?.slice(0, 69)} disabled={loading || disabled} @@ -196,7 +207,8 @@ const SeoForm: React.FC = props => {
} helperText={intl.formatMessage({ - defaultMessage: "If empty, the preview shows what will be autogenerated." + defaultMessage: + "If empty, the preview shows what will be autogenerated." })} value={description?.slice(0, 299)} onChange={onChange} From d0339408df54edecd1ed9c9ba7dce858d99350d2 Mon Sep 17 00:00:00 2001 From: Magdalena Markusik Date: Mon, 21 Sep 2020 16:36:08 +0200 Subject: [PATCH 21/31] update messages --- locale/defaultMessages.json | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index 105c9bf12f6..5ce46df6b8d 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -1829,6 +1829,9 @@ "src_dot_components_dot_SeoForm_dot_3468022343": { "string": "Search Engine Preview" }, + "src_dot_components_dot_SeoForm_dot_3478065224": { + "string": "Slug" + }, "src_dot_components_dot_SeoForm_dot_3877274856": { "context": "character limit", "string": "{numberOfCharacters} of {maxCharacters} characters" @@ -3564,16 +3567,6 @@ "context": "page status", "string": "Not Published" }, - "src_dot_pages_dot_components_dot_PageSlug_dot_1324178587": { - "string": "URL" - }, - "src_dot_pages_dot_components_dot_PageSlug_dot_3478065224": { - "context": "page internal name", - "string": "Slug" - }, - "src_dot_pages_dot_components_dot_PageSlug_dot_4210828158": { - "string": "If empty, URL will be autogenerated from Page Name" - }, "src_dot_pages_dot_views_dot_1068617485": { "context": "header", "string": "Create Page" From 977fbce34c561264939b391d6e7caba11ebc67d2 Mon Sep 17 00:00:00 2001 From: Magdalena Markusik Date: Mon, 21 Sep 2020 16:55:49 +0200 Subject: [PATCH 22/31] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4d457413f0..30fceb0db10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ All notable, unreleased changes to this project will be documented in this file. - Update schema with PositiveDecimal type - #695 by @AlicjaSzu - Restyle side menu - #697 by @dominik-zeglen - Add error info when fetching taxes - #701 by @dominik-zeglen +- Add slug field to product, collection, category & page details (update and create) - #720 by @mmarkusik ## 2.10.1 From c20c84da3571da4cc3f9431bfb8aa7e3efef6044 Mon Sep 17 00:00:00 2001 From: Magdalena Markusik Date: Tue, 22 Sep 2020 13:10:53 +0200 Subject: [PATCH 23/31] refactor --- src/components/SeoForm/SeoForm.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/SeoForm/SeoForm.tsx b/src/components/SeoForm/SeoForm.tsx index 544f6f2d405..0fc24395186 100644 --- a/src/components/SeoForm/SeoForm.tsx +++ b/src/components/SeoForm/SeoForm.tsx @@ -94,7 +94,7 @@ const SeoForm: React.FC = props => { const intl = useIntl(); const [expanded, setExpansionStatus] = React.useState(false); const toggleExpansion = () => setExpansionStatus(!expanded); - const shouldDisplayHelperText = () => helperText && !expanded; + const shouldDisplayHelperText = helperText && !expanded; return ( @@ -112,7 +112,7 @@ const SeoForm: React.FC = props => { } /> - {shouldDisplayHelperText() && ( + {shouldDisplayHelperText && ( From 828e2072090ccfea027c4b7411a799fb0d891902 Mon Sep 17 00:00:00 2001 From: Magdalena Markusik Date: Thu, 24 Sep 2020 14:11:30 +0200 Subject: [PATCH 24/31] add error handling to seo form --- .../CategoryCreatePage/CategoryCreatePage.tsx | 1 + .../CollectionCreatePage.tsx | 1 + src/components/SeoForm/SeoForm.tsx | 81 ++++++++++++++++--- .../PageDetailsPage/PageDetailsPage.tsx | 6 +- .../ProductCreatePage/ProductCreatePage.tsx | 1 + .../ProductUpdatePage/ProductUpdatePage.tsx | 1 + 6 files changed, 79 insertions(+), 12 deletions(-) diff --git a/src/categories/components/CategoryCreatePage/CategoryCreatePage.tsx b/src/categories/components/CategoryCreatePage/CategoryCreatePage.tsx index 4659a834073..ed71cf471bc 100644 --- a/src/categories/components/CategoryCreatePage/CategoryCreatePage.tsx +++ b/src/categories/components/CategoryCreatePage/CategoryCreatePage.tsx @@ -79,6 +79,7 @@ export const CategoryCreatePage: React.FC = ({ /> = ({ /> ({ addressBar: { @@ -66,8 +86,10 @@ interface SeoFormProps { description?: string; descriptionPlaceholder: string; disabled?: boolean; + errors?: ProductErrorFragment[] | PageErrorFragment[]; loading?: boolean; helperText?: string; + isCreating?: boolean; title: string; slug: string; slugPlaceholder?: string; @@ -81,7 +103,9 @@ const SeoForm: React.FC = props => { description, descriptionPlaceholder, disabled, + errors, helperText, + isCreating = false, loading, title, slug, @@ -96,6 +120,43 @@ const SeoForm: React.FC = props => { const toggleExpansion = () => setExpansionStatus(!expanded); const shouldDisplayHelperText = helperText && !expanded; + const getFilteredErrors = () => + (errors as Error[])?.filter(({ field }) => + Object.keys(SeoField).includes(field) + ) || []; + + const getError = (fieldName: SeoField) => + getFilteredErrors().find(({ field }) => fieldName === field); + + const isError = (fieldName: SeoField) => !!getError(fieldName); + + const getSlugHelperText = () => { + const error = isError(SeoField.slug); + + if (isCreating && !error) { + return intl.formatMessage({ + defaultMessage: DEFAULT_INPUT_MESSAGE + }); + } + + if (error) { + return getSlugErrorHelperText(); + } + + return ""; + }; + + const getSlugErrorHelperText = () => { + const error = getError(SeoField.slug); + const { __typename: type } = error; + + return type === "ProductError" + ? getProductErrorMessage(error as ProductErrorFragment, intl) + : getPageErrorMessage(error as PageErrorFragment, intl); + }; + + // .replace(/[^\x00-\x7F]/g, "") + return ( = props => { {expanded && (
@@ -142,10 +204,7 @@ const SeoForm: React.FC = props => { )}
} - helperText={intl.formatMessage({ - defaultMessage: - "If empty, the preview shows what will be autogenerated." - })} + helperText={getSlugHelperText()} value={slug?.slice(0, 69)} disabled={loading || disabled} placeholder={slug || slugify(slugPlaceholder, { lower: true })} @@ -154,7 +213,8 @@ const SeoForm: React.FC = props => { />
@@ -175,8 +235,7 @@ const SeoForm: React.FC = props => {
} helperText={intl.formatMessage({ - defaultMessage: - "If empty, the preview shows what will be autogenerated." + defaultMessage: DEFAULT_INPUT_MESSAGE })} value={title?.slice(0, 69)} disabled={loading || disabled} @@ -186,7 +245,8 @@ const SeoForm: React.FC = props => { />
@@ -207,8 +267,7 @@ const SeoForm: React.FC = props => {
} helperText={intl.formatMessage({ - defaultMessage: - "If empty, the preview shows what will be autogenerated." + defaultMessage: DEFAULT_INPUT_MESSAGE })} value={description?.slice(0, 299)} onChange={onChange} diff --git a/src/pages/components/PageDetailsPage/PageDetailsPage.tsx b/src/pages/components/PageDetailsPage/PageDetailsPage.tsx index 95f0bfb4316..10696254d34 100644 --- a/src/pages/components/PageDetailsPage/PageDetailsPage.tsx +++ b/src/pages/components/PageDetailsPage/PageDetailsPage.tsx @@ -38,6 +38,7 @@ export interface PageDetailsPageProps { disabled: boolean; errors: PageErrorFragment[]; page: PageDetails_page; + isCreating?: boolean; saveButtonBarState: ConfirmButtonTransitionState; onBack: () => void; onRemove: () => void; @@ -55,6 +56,7 @@ const PageDetailsPage: React.FC = ({ }) => { const intl = useIntl(); const localizeDate = useDateLocalize(); + const pageExists = page === null; const initialForm: FormData = { content: maybe( @@ -77,7 +79,7 @@ const PageDetailsPage: React.FC = ({ = ({ /> = ({ )} = ({ )} Date: Thu, 24 Sep 2020 14:17:26 +0200 Subject: [PATCH 25/31] Fix mutation for simple product update --- src/products/mutations.ts | 2 ++ src/products/types/ProductVariantReorder.ts | 1 + src/products/types/SimpleProductUpdate.ts | 1 + src/types/globalTypes.ts | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/products/mutations.ts b/src/products/mutations.ts index d90a7af8093..abbfeae5a4e 100644 --- a/src/products/mutations.ts +++ b/src/products/mutations.ts @@ -203,6 +203,7 @@ export const simpleProductUpdateMutation = gql` $productVariantId: ID! $productVariantInput: ProductVariantInput! $seo: SeoInput + $slug: String $addStocks: [StockInput!]! $deleteStocks: [ID!]! $updateStocks: [StockInput!]! @@ -222,6 +223,7 @@ export const simpleProductUpdateMutation = gql` name: $name basePrice: $basePrice seo: $seo + slug: $slug weight: $weight visibleInListings: $visibleInListings } diff --git a/src/products/types/ProductVariantReorder.ts b/src/products/types/ProductVariantReorder.ts index 8c5f1741fdb..6a9c244462a 100644 --- a/src/products/types/ProductVariantReorder.ts +++ b/src/products/types/ProductVariantReorder.ts @@ -201,6 +201,7 @@ export interface ProductVariantReorder_productVariantReorder_product { metadata: (ProductVariantReorder_productVariantReorder_product_metadata | null)[]; privateMetadata: (ProductVariantReorder_productVariantReorder_product_privateMetadata | null)[]; name: string; + slug: string; descriptionJson: any; seoTitle: string | null; seoDescription: string | null; diff --git a/src/products/types/SimpleProductUpdate.ts b/src/products/types/SimpleProductUpdate.ts index c83e36fed3c..60f1101ce16 100644 --- a/src/products/types/SimpleProductUpdate.ts +++ b/src/products/types/SimpleProductUpdate.ts @@ -827,6 +827,7 @@ export interface SimpleProductUpdateVariables { productVariantId: string; productVariantInput: ProductVariantInput; seo?: SeoInput | null; + slug?: string | null; addStocks: StockInput[]; deleteStocks: string[]; updateStocks: StockInput[]; diff --git a/src/types/globalTypes.ts b/src/types/globalTypes.ts index 35aa094a7cb..5d626b4dfb8 100644 --- a/src/types/globalTypes.ts +++ b/src/types/globalTypes.ts @@ -1085,12 +1085,12 @@ export interface CollectionFilterInput { export interface CollectionInput { isPublished?: boolean | null; name?: string | null; + slug?: string | null; description?: string | null; descriptionJson?: any | null; backgroundImage?: any | null; backgroundImageAlt?: string | null; seo?: SeoInput | null; - slug?: string | null; publicationDate?: any | null; } From 2519ed9496e1224a9f99e2dbab008a801790a971 Mon Sep 17 00:00:00 2001 From: Magdalena Markusik Date: Thu, 24 Sep 2020 15:30:16 +0200 Subject: [PATCH 26/31] add pattern matching for slug field not to use special characters --- src/components/SeoForm/SeoForm.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/components/SeoForm/SeoForm.tsx b/src/components/SeoForm/SeoForm.tsx index e273455f972..4432bfd723e 100644 --- a/src/components/SeoForm/SeoForm.tsx +++ b/src/components/SeoForm/SeoForm.tsx @@ -32,6 +32,8 @@ interface Error { code: ProductErrorCode | PageErrorCode; } +const SLUG_REGEX = /^[a-z0-9]+(?:[\-a-z0-9]+)*$/; + const useStyles = makeStyles( theme => ({ addressBar: { @@ -116,8 +118,11 @@ const SeoForm: React.FC = props => { const classes = useStyles(props); const intl = useIntl(); + const [expanded, setExpansionStatus] = React.useState(false); + const toggleExpansion = () => setExpansionStatus(!expanded); + const shouldDisplayHelperText = helperText && !expanded; const getFilteredErrors = () => @@ -155,7 +160,13 @@ const SeoForm: React.FC = props => { : getPageErrorMessage(error as PageErrorFragment, intl); }; - // .replace(/[^\x00-\x7F]/g, "") + const handleSlugChange = event => { + const { value } = event.target; + + if (value === "" || !!value.match(SLUG_REGEX)) { + onChange(event); + } + }; return ( @@ -208,7 +219,7 @@ const SeoForm: React.FC = props => { value={slug?.slice(0, 69)} disabled={loading || disabled} placeholder={slug || slugify(slugPlaceholder, { lower: true })} - onChange={onChange} + onChange={handleSlugChange} fullWidth /> From c0d02d69430cbdd81a9e84e35d9d4f7a31d5a46b Mon Sep 17 00:00:00 2001 From: Magdalena Markusik Date: Thu, 24 Sep 2020 15:31:29 +0200 Subject: [PATCH 27/31] refactor --- src/components/SeoForm/SeoForm.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/SeoForm/SeoForm.tsx b/src/components/SeoForm/SeoForm.tsx index 4432bfd723e..302ef76d452 100644 --- a/src/components/SeoForm/SeoForm.tsx +++ b/src/components/SeoForm/SeoForm.tsx @@ -145,13 +145,13 @@ const SeoForm: React.FC = props => { } if (error) { - return getSlugErrorHelperText(); + return getSlugErrorText(); } return ""; }; - const getSlugErrorHelperText = () => { + const getSlugErrorText = () => { const error = getError(SeoField.slug); const { __typename: type } = error; From cc166f463cfe079c888a8c0f1eda9a107bc8c79e Mon Sep 17 00:00:00 2001 From: Magdalena Markusik Date: Fri, 25 Sep 2020 15:27:57 +0200 Subject: [PATCH 28/31] refactor after review --- src/components/SeoForm/SeoForm.tsx | 66 +++++++++++------------------- src/utils/errors/product.ts | 5 +++ 2 files changed, 29 insertions(+), 42 deletions(-) diff --git a/src/components/SeoForm/SeoForm.tsx b/src/components/SeoForm/SeoForm.tsx index 302ef76d452..717afc81caf 100644 --- a/src/components/SeoForm/SeoForm.tsx +++ b/src/components/SeoForm/SeoForm.tsx @@ -6,12 +6,11 @@ import TextField from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; import { PageErrorFragment } from "@saleor/fragments/types/PageErrorFragment"; import { ProductErrorFragment } from "@saleor/fragments/types/ProductErrorFragment"; -import { PageErrorCode, ProductErrorCode } from "@saleor/types/globalTypes"; -import { getProductErrorMessage } from "@saleor/utils/errors"; +import { getFieldError, getProductErrorMessage } from "@saleor/utils/errors"; import getPageErrorMessage from "@saleor/utils/errors/page"; import classNames from "classnames"; import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; +import { defineMessages, FormattedMessage, useIntl } from "react-intl"; import slugify from "slugify"; import CardTitle from "../CardTitle"; @@ -23,16 +22,7 @@ enum SeoField { description = "seoDescription" } -const DEFAULT_INPUT_MESSAGE = - "If empty, the preview shows what will be autogenerated."; - -interface Error { - __typename: "ProductError" | "PageError"; - field: string | null; - code: ProductErrorCode | PageErrorCode; -} - -const SLUG_REGEX = /^[a-z0-9]+(?:[\-a-z0-9]+)*$/; +const SLUG_REGEX = /^[a-zA-Z0-9\-\_]+$/; const useStyles = makeStyles( theme => ({ @@ -88,7 +78,7 @@ interface SeoFormProps { description?: string; descriptionPlaceholder: string; disabled?: boolean; - errors?: ProductErrorFragment[] | PageErrorFragment[]; + errors?: Array; loading?: boolean; helperText?: string; isCreating?: boolean; @@ -105,7 +95,7 @@ const SeoForm: React.FC = props => { description, descriptionPlaceholder, disabled, - errors, + errors = [], helperText, isCreating = false, loading, @@ -125,33 +115,27 @@ const SeoForm: React.FC = props => { const shouldDisplayHelperText = helperText && !expanded; - const getFilteredErrors = () => - (errors as Error[])?.filter(({ field }) => - Object.keys(SeoField).includes(field) - ) || []; - - const getError = (fieldName: SeoField) => - getFilteredErrors().find(({ field }) => fieldName === field); - - const isError = (fieldName: SeoField) => !!getError(fieldName); + const { seoFieldMessage } = defineMessages({ + seoFieldMessage: { + defaultMessage: "If empty, the preview shows what will be autogenerated." + } + }); - const getSlugHelperText = () => { - const error = isError(SeoField.slug); + const getSlugHelperMessage = () => { + const error = !!getError(SeoField.slug); if (isCreating && !error) { - return intl.formatMessage({ - defaultMessage: DEFAULT_INPUT_MESSAGE - }); + return intl.formatMessage(seoFieldMessage); } if (error) { - return getSlugErrorText(); + return getSlugErrorMessage(); } return ""; }; - const getSlugErrorText = () => { + const getSlugErrorMessage = () => { const error = getError(SeoField.slug); const { __typename: type } = error; @@ -163,11 +147,13 @@ const SeoForm: React.FC = props => { const handleSlugChange = event => { const { value } = event.target; - if (value === "" || !!value.match(SLUG_REGEX)) { + if (value === "" || SLUG_REGEX.test(value)) { onChange(event); } }; + const getError = fieldName => getFieldError(errors, fieldName); + return ( = props => { {expanded && (
@@ -215,7 +201,7 @@ const SeoForm: React.FC = props => { )}
} - helperText={getSlugHelperText()} + helperText={getSlugHelperMessage()} value={slug?.slice(0, 69)} disabled={loading || disabled} placeholder={slug || slugify(slugPlaceholder, { lower: true })} @@ -225,7 +211,7 @@ const SeoForm: React.FC = props => {
@@ -245,9 +231,7 @@ const SeoForm: React.FC = props => { )}
} - helperText={intl.formatMessage({ - defaultMessage: DEFAULT_INPUT_MESSAGE - })} + helperText={intl.formatMessage(seoFieldMessage)} value={title?.slice(0, 69)} disabled={loading || disabled} placeholder={titlePlaceholder} @@ -256,7 +240,7 @@ const SeoForm: React.FC = props => { /> @@ -277,9 +261,7 @@ const SeoForm: React.FC = props => { )}
} - helperText={intl.formatMessage({ - defaultMessage: DEFAULT_INPUT_MESSAGE - })} + helperText={intl.formatMessage(seoFieldMessage)} value={description?.slice(0, 299)} onChange={onChange} disabled={loading || disabled} diff --git a/src/utils/errors/product.ts b/src/utils/errors/product.ts index 976010a4bdc..45a1e36dc9d 100644 --- a/src/utils/errors/product.ts +++ b/src/utils/errors/product.ts @@ -24,6 +24,9 @@ const messages = defineMessages({ duplicatedInputItem: { defaultMessage: "Variant with these attributes already exists" }, + nameAlreadyTaken: { + defaultMessage: "This name is already taken. Please provide another." + }, skuUnique: { defaultMessage: "SKUs must be unique", description: "bulk variant create error" @@ -59,6 +62,8 @@ function getProductErrorMessage( return intl.formatMessage(messages.variantNoDigitalContent); case ProductErrorCode.INVALID: return intl.formatMessage(commonErrorMessages.invalid); + case ProductErrorCode.UNIQUE: + return intl.formatMessage(messages.nameAlreadyTaken); default: return intl.formatMessage(commonErrorMessages.unknownError); } From fe2b15c7987f505fcd85a70325044926931309ad Mon Sep 17 00:00:00 2001 From: Magdalena Markusik Date: Fri, 25 Sep 2020 15:56:27 +0200 Subject: [PATCH 29/31] update messages --- locale/defaultMessages.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index b9f79d83dd6..c8e658d8e77 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -1819,9 +1819,6 @@ "src_dot_components_dot_SeoForm_dot_1991321627": { "string": "Search engine description" }, - "src_dot_components_dot_SeoForm_dot_2378618579": { - "string": "If empty, the preview shows what will be autogenerated." - }, "src_dot_components_dot_SeoForm_dot_3198271020": { "context": "button", "string": "Edit website SEO" @@ -1836,6 +1833,9 @@ "context": "character limit", "string": "{numberOfCharacters} of {maxCharacters} characters" }, + "src_dot_components_dot_SeoForm_dot_seoFieldMessage": { + "string": "If empty, the preview shows what will be autogenerated." + }, "src_dot_components_dot_SingleAutocompleteSelectField_dot_1477537381": { "context": "add custom select input option", "string": "Add new value: {value}" @@ -5695,6 +5695,9 @@ "src_dot_utils_dot_errors_dot_misconfigured": { "string": "Plugin is misconfigured and cannot be activated" }, + "src_dot_utils_dot_errors_dot_nameAlreadyTaken": { + "string": "This name is already taken. Please provide another." + }, "src_dot_utils_dot_errors_dot_noShippingAddress": { "context": "error message", "string": "Cannot choose a shipping method for an order without the shipping address" From f956be3fbcb24da7d1ad468434dc4911a40de348 Mon Sep 17 00:00:00 2001 From: Magdalena Markusik Date: Fri, 25 Sep 2020 16:21:10 +0200 Subject: [PATCH 30/31] refactor after review --- .../CategoryCreatePage/CategoryCreatePage.tsx | 2 +- .../CollectionCreatePage.tsx | 2 +- src/components/SeoForm/SeoForm.tsx | 18 ++++++------------ .../PageDetailsPage/PageDetailsPage.tsx | 8 ++++---- .../ProductCreatePage/ProductCreatePage.tsx | 2 +- 5 files changed, 13 insertions(+), 19 deletions(-) diff --git a/src/categories/components/CategoryCreatePage/CategoryCreatePage.tsx b/src/categories/components/CategoryCreatePage/CategoryCreatePage.tsx index ed71cf471bc..0ac32984142 100644 --- a/src/categories/components/CategoryCreatePage/CategoryCreatePage.tsx +++ b/src/categories/components/CategoryCreatePage/CategoryCreatePage.tsx @@ -79,7 +79,7 @@ export const CategoryCreatePage: React.FC = ({ /> = ({ /> ; loading?: boolean; helperText?: string; - isCreating?: boolean; + allowEmptySlug?: boolean; title: string; slug: string; slugPlaceholder?: string; @@ -97,7 +97,7 @@ const SeoForm: React.FC = props => { disabled, errors = [], helperText, - isCreating = false, + allowEmptySlug = false, loading, title, slug, @@ -124,15 +124,11 @@ const SeoForm: React.FC = props => { const getSlugHelperMessage = () => { const error = !!getError(SeoField.slug); - if (isCreating && !error) { + if (allowEmptySlug && !error) { return intl.formatMessage(seoFieldMessage); } - if (error) { - return getSlugErrorMessage(); - } - - return ""; + return error ? getSlugErrorMessage() : ""; }; const getSlugErrorMessage = () => { @@ -144,7 +140,7 @@ const SeoForm: React.FC = props => { : getPageErrorMessage(error as PageErrorFragment, intl); }; - const handleSlugChange = event => { + const handleSlugChange = (event: React.ChangeEvent) => { const { value } = event.target; if (value === "" || SLUG_REGEX.test(value)) { @@ -152,7 +148,7 @@ const SeoForm: React.FC = props => { } }; - const getError = fieldName => getFieldError(errors, fieldName); + const getError = (fieldName: SeoField) => getFieldError(errors, fieldName); return ( @@ -211,7 +207,6 @@ const SeoForm: React.FC = props => {
@@ -240,7 +235,6 @@ const SeoForm: React.FC = props => { /> diff --git a/src/pages/components/PageDetailsPage/PageDetailsPage.tsx b/src/pages/components/PageDetailsPage/PageDetailsPage.tsx index 10696254d34..772049b043e 100644 --- a/src/pages/components/PageDetailsPage/PageDetailsPage.tsx +++ b/src/pages/components/PageDetailsPage/PageDetailsPage.tsx @@ -38,7 +38,7 @@ export interface PageDetailsPageProps { disabled: boolean; errors: PageErrorFragment[]; page: PageDetails_page; - isCreating?: boolean; + allowEmptySlug?: boolean; saveButtonBarState: ConfirmButtonTransitionState; onBack: () => void; onRemove: () => void; @@ -56,7 +56,7 @@ const PageDetailsPage: React.FC = ({ }) => { const intl = useIntl(); const localizeDate = useDateLocalize(); - const pageExists = page === null; + const pageExists = page !== null; const initialForm: FormData = { content: maybe( @@ -79,7 +79,7 @@ const PageDetailsPage: React.FC = ({ = ({ = ({ )} Date: Fri, 25 Sep 2020 18:02:28 +0200 Subject: [PATCH 31/31] fixes --- .../CategoryUpdatePage/CategoryUpdatePage.tsx | 1 + .../CollectionDetailsPage/CollectionDetailsPage.tsx | 1 + src/utils/errors/page.ts | 10 +++++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx b/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx index b56aa5557e5..eb0d7280a47 100644 --- a/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx +++ b/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx @@ -178,6 +178,7 @@ export const CategoryUpdatePage: React.FC = ({ defaultMessage: "Add search engine title and description to make this category easier to find" })} + errors={errors} title={data.seoTitle} titlePlaceholder={data.name} description={data.seoDescription} diff --git a/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx b/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx index 49c1a28343a..3127745b373 100644 --- a/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx +++ b/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx @@ -151,6 +151,7 @@ const CollectionDetailsPage: React.FC = ({ defaultMessage: "Add search engine title and description to make this collection easier to find" })} + errors={errors} slug={data.slug} slugPlaceholder={data.name} title={data.seoTitle} diff --git a/src/utils/errors/page.ts b/src/utils/errors/page.ts index 500c9e60e09..7784ad89d70 100644 --- a/src/utils/errors/page.ts +++ b/src/utils/errors/page.ts @@ -1,10 +1,16 @@ import { PageErrorFragment } from "@saleor/fragments/types/PageErrorFragment"; import { commonMessages } from "@saleor/intl"; import { PageErrorCode } from "@saleor/types/globalTypes"; -import { IntlShape } from "react-intl"; +import { defineMessages, IntlShape } from "react-intl"; import commonErrorMessages from "./common"; +const messages = defineMessages({ + nameAlreadyTaken: { + defaultMessage: "This name is already taken. Please provide another." + } +}); + function getPageErrorMessage( err: Omit | undefined, intl: IntlShape @@ -17,6 +23,8 @@ function getPageErrorMessage( return intl.formatMessage(commonMessages.requiredField); case PageErrorCode.INVALID: return intl.formatMessage(commonErrorMessages.invalid); + case PageErrorCode.UNIQUE: + return intl.formatMessage(messages.nameAlreadyTaken); default: return intl.formatMessage(commonErrorMessages.unknownError); }