"""Groups fields and operations into named groups."""
directive @doc(
  """Name of the grouping category"""
  category: String!
) on ENUM | FIELD | FIELD_DEFINITION | INPUT_OBJECT | OBJECT

"""Webhook events triggered by a specific location."""
directive @webhookEventsInfo(
  """List of asynchronous webhook events triggered by a specific location."""
  asyncEvents: [WebhookEventTypeAsyncEnum!]!

  """List of synchronous webhook events triggered by a specific location."""
  syncEvents: [WebhookEventTypeSyncEnum!]!
) on FIELD | FIELD_DEFINITION | INPUT_OBJECT | OBJECT

"""
Create a new address for the customer.

Requires one of following set of permissions: AUTHENTICATED_USER or AUTHENTICATED_APP + IMPERSONATE_USER.

Triggers the following webhook events:
- CUSTOMER_UPDATED (async): A customer account was updated.
- ADDRESS_CREATED (async): An address was created.
"""
type AccountAddressCreate {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  address: Address
  errors: [AccountError!]!

  """A user instance for which the address was created."""
  user: User
}

"""
Delete an address of the logged-in user. Requires one of the following permissions: MANAGE_USERS, IS_OWNER.

Triggers the following webhook events:
- ADDRESS_DELETED (async): An address was deleted.
"""
type AccountAddressDelete {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  address: Address
  errors: [AccountError!]!

  """A user instance for which the address was deleted."""
  user: User
}

"""
Updates an address of the logged-in user. Requires one of the following permissions: MANAGE_USERS, IS_OWNER.

Triggers the following webhook events:
- ADDRESS_UPDATED (async): An address was updated.
"""
type AccountAddressUpdate {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  address: Address
  errors: [AccountError!]!

  """A user object for which the address was edited."""
  user: User
}

"""
Event sent when account change email is requested.

Added in Saleor 3.15.
"""
type AccountChangeEmailRequested implements Event {
  """The channel data."""
  channel: Channel

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The new email address the user wants to change to."""
  newEmail: String

  """The application receiving the webhook."""
  recipient: App

  """The URL to redirect the user after he accepts the request."""
  redirectUrl: String

  """Shop data."""
  shop: Shop

  """The token required to confirm request."""
  token: String

  """The user the event relates to."""
  user: User

  """Saleor version that triggered the event."""
  version: String
}

"""
Event sent when account confirmation requested. This event is always sent. enableAccountConfirmationByEmail flag set to True is not required.

Added in Saleor 3.15.
"""
type AccountConfirmationRequested implements Event {
  """The channel data."""
  channel: Channel

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The URL to redirect the user after he accepts the request."""
  redirectUrl: String

  """Shop data."""
  shop: Shop

  """The token required to confirm request."""
  token: String

  """The user the event relates to."""
  user: User

  """Saleor version that triggered the event."""
  version: String
}

"""
Event sent when account is confirmed.

Added in Saleor 3.15.
"""
type AccountConfirmed implements Event {
  """The channel data."""
  channel: Channel

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The URL to redirect the user after he accepts the request."""
  redirectUrl: String

  """Shop data."""
  shop: Shop

  """The token required to confirm request."""
  token: String

  """The user the event relates to."""
  user: User

  """Saleor version that triggered the event."""
  version: String
}

"""
Remove user account. 

Requires one of the following permissions: AUTHENTICATED_USER.

Triggers the following webhook events:
- ACCOUNT_DELETED (async): Account was deleted.
"""
type AccountDelete {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AccountError!]!
  user: User
}

"""
Event sent when account delete is requested.

Added in Saleor 3.15.
"""
type AccountDeleteRequested implements Event {
  """The channel data."""
  channel: Channel

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The URL to redirect the user after he accepts the request."""
  redirectUrl: String

  """Shop data."""
  shop: Shop

  """The token required to confirm request."""
  token: String

  """The user the event relates to."""
  user: User

  """Saleor version that triggered the event."""
  version: String
}

"""
Event sent when account is deleted.

Added in Saleor 3.15.
"""
type AccountDeleted implements Event {
  """The channel data."""
  channel: Channel

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The URL to redirect the user after he accepts the request."""
  redirectUrl: String

  """Shop data."""
  shop: Shop

  """The token required to confirm request."""
  token: String

  """The user the event relates to."""
  user: User

  """Saleor version that triggered the event."""
  version: String
}

"""
Event sent when account email is changed.

Added in Saleor 3.15.
"""
type AccountEmailChanged implements Event {
  """The channel data."""
  channel: Channel

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The new email address."""
  newEmail: String

  """The application receiving the webhook."""
  recipient: App

  """The URL to redirect the user after he accepts the request."""
  redirectUrl: String

  """Shop data."""
  shop: Shop

  """The token required to confirm request."""
  token: String

  """The user the event relates to."""
  user: User

  """Saleor version that triggered the event."""
  version: String
}

"""Represents errors in account mutations."""
type AccountError {
  """A type of address that causes the error."""
  addressType: AddressTypeEnum

  """The error code."""
  code: AccountErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum AccountErrorCode {
  ACCOUNT_NOT_CONFIRMED
  ACTIVATE_OWN_ACCOUNT
  ACTIVATE_SUPERUSER_ACCOUNT
  CHANNEL_INACTIVE
  DEACTIVATE_OWN_ACCOUNT
  DEACTIVATE_SUPERUSER_ACCOUNT
  DELETE_NON_STAFF_USER
  DELETE_OWN_ACCOUNT
  DELETE_STAFF_ACCOUNT
  DELETE_SUPERUSER_ACCOUNT
  DUPLICATED_INPUT_ITEM
  GRAPHQL_ERROR
  INACTIVE
  INVALID
  INVALID_CREDENTIALS
  INVALID_PASSWORD
  JWT_DECODE_ERROR
  JWT_INVALID_CSRF_TOKEN
  JWT_INVALID_TOKEN
  JWT_MISSING_TOKEN
  JWT_SIGNATURE_EXPIRED
  LEFT_NOT_MANAGEABLE_PERMISSION
  LOGIN_ATTEMPT_DELAYED
  MISSING_CHANNEL_SLUG
  NOT_FOUND
  OUT_OF_SCOPE_GROUP
  OUT_OF_SCOPE_PERMISSION
  OUT_OF_SCOPE_USER
  PASSWORD_ENTIRELY_NUMERIC
  PASSWORD_RESET_ALREADY_REQUESTED
  PASSWORD_TOO_COMMON
  PASSWORD_TOO_SHORT
  PASSWORD_TOO_SIMILAR
  REQUIRED
  UNIQUE
  UNKNOWN_IP_ADDRESS
}

"""Fields required to update the user."""
input AccountInput {
  """Billing address of the customer."""
  defaultBillingAddress: AddressInput

  """Shipping address of the customer."""
  defaultShippingAddress: AddressInput

  """Given name."""
  firstName: String

  """User language code."""
  languageCode: LanguageCodeEnum

  """Family name."""
  lastName: String

  """
  Fields required to update the user metadata.
  
  Added in Saleor 3.14.
  """
  metadata: [MetadataInput!]
}

"""
Register a new user.

Triggers the following webhook events:
- CUSTOMER_CREATED (async): A new customer account was created.
- NOTIFY_USER (async): A notification for account confirmation.
- ACCOUNT_CONFIRMATION_REQUESTED (async): An user confirmation was requested. This event is always sent regardless of settings.
"""
type AccountRegister {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AccountError!]!

  """Informs whether users need to confirm their email address."""
  requiresConfirmation: Boolean
  user: User
}

"""Fields required to create a user."""
input AccountRegisterInput {
  """
  Slug of a channel which will be used to notify users. Optional when only one channel exists.
  """
  channel: String

  """The email address of the user."""
  email: String!

  """Given name."""
  firstName: String

  """User language code."""
  languageCode: LanguageCodeEnum

  """Family name."""
  lastName: String

  """User public metadata."""
  metadata: [MetadataInput!]

  """Password."""
  password: String!

  """
  Base of frontend URL that will be needed to create confirmation URL. Required when account confirmation is enabled.
  """
  redirectUrl: String
}

"""
Sends an email with the account removal link for the logged-in user. 

Requires one of the following permissions: AUTHENTICATED_USER.

Triggers the following webhook events:
- NOTIFY_USER (async): A notification for account delete request.
- ACCOUNT_DELETE_REQUESTED (async): An account delete requested.
"""
type AccountRequestDeletion {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AccountError!]!
}

"""
Sets a default address for the authenticated user. 

Requires one of the following permissions: AUTHENTICATED_USER.

Triggers the following webhook events:
- CUSTOMER_UPDATED (async): A customer's address was updated.
"""
type AccountSetDefaultAddress {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AccountError!]!

  """An updated user instance."""
  user: User
}

"""
Event sent when setting a new password is requested.

Added in Saleor 3.15.
"""
type AccountSetPasswordRequested implements Event {
  """The channel data."""
  channel: Channel

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The URL to redirect the user after he accepts the request."""
  redirectUrl: String

  """Shop data."""
  shop: Shop

  """The token required to confirm request."""
  token: String

  """The user the event relates to."""
  user: User

  """Saleor version that triggered the event."""
  version: String
}

"""
Updates the account of the logged-in user.

Requires one of following set of permissions: AUTHENTICATED_USER or AUTHENTICATED_APP + IMPERSONATE_USER.

Triggers the following webhook events:
- CUSTOMER_UPDATED (async): A customer account was updated.
- CUSTOMER_METADATA_UPDATED (async): Optionally called when customer's metadata was updated.
"""
type AccountUpdate {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AccountError!]!
  user: User
}

"""Represents user address data."""
type Address implements Node & ObjectWithMetadata {
  """The city of the address."""
  city: String!

  """The district of the address."""
  cityArea: String!

  """Company or organization name."""
  companyName: String!

  """The country of the address."""
  country: CountryDisplay!

  """The country area of the address."""
  countryArea: String!

  """The given name of the address."""
  firstName: String!

  """The ID of the address."""
  id: ID!

  """Address is user's default billing address."""
  isDefaultBillingAddress: Boolean

  """Address is user's default shipping address."""
  isDefaultShippingAddress: Boolean

  """The family name of the address."""
  lastName: String!

  """
  List of public metadata items. Can be accessed without permissions.
  
  Added in Saleor 3.10.
  """
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.10.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.10.
  """
  metafields(keys: [String!]): Metadata

  """The phone number assigned the address."""
  phone: String

  """The postal code of the address."""
  postalCode: String!

  """
  List of private metadata items. Requires staff permissions to access.
  
  Added in Saleor 3.10.
  """
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.10.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.10.
  """
  privateMetafields(keys: [String!]): Metadata

  """The first line of the address."""
  streetAddress1: String!

  """The second line of the address."""
  streetAddress2: String!
}

"""
Creates user address. 

Requires one of the following permissions: MANAGE_USERS.

Triggers the following webhook events:
- ADDRESS_CREATED (async): A new address was created.
"""
type AddressCreate {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  address: Address
  errors: [AccountError!]!

  """A user instance for which the address was created."""
  user: User
}

"""
Event sent when new address is created.

Added in Saleor 3.5.
"""
type AddressCreated implements Event {
  """The address the event relates to."""
  address: Address

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Deletes an address. 

Requires one of the following permissions: MANAGE_USERS.

Triggers the following webhook events:
- ADDRESS_DELETED (async): An address was deleted.
"""
type AddressDelete {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  address: Address
  errors: [AccountError!]!

  """A user instance for which the address was deleted."""
  user: User
}

"""
Event sent when address is deleted.

Added in Saleor 3.5.
"""
type AddressDeleted implements Event {
  """The address the event relates to."""
  address: Address

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

input AddressInput {
  """City."""
  city: String

  """District."""
  cityArea: String

  """Company or organization."""
  companyName: String

  """Country."""
  country: CountryCode

  """State or province."""
  countryArea: String

  """Given name."""
  firstName: String

  """Family name."""
  lastName: String

  """
  Address public metadata.
  
  Added in Saleor 3.15.
  """
  metadata: [MetadataInput!]

  """
  Phone number.
  
  Phone numbers are validated with Google's [libphonenumber](https://github.com/google/libphonenumber) library.
  """
  phone: String

  """Postal code."""
  postalCode: String

  """
  Determine if the address should be validated. By default, Saleor accepts only address inputs matching ruleset from [Google Address Data]{https://chromium-i18n.appspot.com/ssl-address), using [i18naddress](https://github.com/mirumee/google-i18n-address) library. Some mutations may require additional permissions to use the the field. More info about permissions can be found in relevant mutation.
  
  Added in Saleor 3.19.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  skipValidation: Boolean = false

  """Address."""
  streetAddress1: String

  """Address."""
  streetAddress2: String
}

"""
Sets a default address for the given user. 

Requires one of the following permissions: MANAGE_USERS.

Triggers the following webhook events:
- CUSTOMER_UPDATED (async): A customer was updated.
"""
type AddressSetDefault {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AccountError!]!

  """An updated user instance."""
  user: User
}

enum AddressTypeEnum {
  BILLING
  SHIPPING
}

"""
Updates an address. 

Requires one of the following permissions: MANAGE_USERS.

Triggers the following webhook events:
- ADDRESS_UPDATED (async): An address was updated.
"""
type AddressUpdate {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  address: Address
  errors: [AccountError!]!

  """A user object for which the address was edited."""
  user: User
}

"""
Event sent when address is updated.

Added in Saleor 3.5.
"""
type AddressUpdated implements Event {
  """The address the event relates to."""
  address: Address

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""Represents address validation rules for a country."""
type AddressValidationData {
  """
  The address format of the address validation rule.
  
  Many fields in the JSON refer to address fields by one-letter abbreviations. These are defined as follows:
  
  - `N`: Name
  - `O`: Organization
  - `A`: Street Address Line(s)
  - `D`: Dependent locality (may be an inner-city district or a suburb)
  - `C`: City or Locality
  - `S`: Administrative area such as a state, province, island etc
  - `Z`: Zip or postal code
  - `X`: Sorting code
  
  [Click here for more information.](https://github.com/google/libaddressinput/wiki/AddressValidationMetadata)
  """
  addressFormat: String!

  """
  The latin address format of the address validation rule.
  
  Many fields in the JSON refer to address fields by one-letter abbreviations. These are defined as follows:
  
  - `N`: Name
  - `O`: Organization
  - `A`: Street Address Line(s)
  - `D`: Dependent locality (may be an inner-city district or a suburb)
  - `C`: City or Locality
  - `S`: Administrative area such as a state, province, island etc
  - `Z`: Zip or postal code
  - `X`: Sorting code
  
  [Click here for more information.](https://github.com/google/libaddressinput/wiki/AddressValidationMetadata)
  """
  addressLatinFormat: String!

  """The allowed fields to use in address."""
  allowedFields: [String!]!

  """
  The available choices for the city area of the address validation rule.
  """
  cityAreaChoices: [ChoiceValue!]!

  """The formal name of the city area of the address validation rule."""
  cityAreaType: String!

  """The available choices for the city of the address validation rule."""
  cityChoices: [ChoiceValue!]!

  """The formal name of the city of the address validation rule."""
  cityType: String!

  """
  The available choices for the country area of the address validation rule.
  """
  countryAreaChoices: [ChoiceValue!]!

  """The formal name of the county area of the address validation rule."""
  countryAreaType: String!

  """The country code of the address validation rule."""
  countryCode: String!

  """The country name of the address validation rule."""
  countryName: String!

  """The example postal code of the address validation rule."""
  postalCodeExamples: [String!]!

  """The regular expression for postal code validation."""
  postalCodeMatchers: [String!]!

  """The postal code prefix of the address validation rule."""
  postalCodePrefix: String!

  """The formal name of the postal code of the address validation rule."""
  postalCodeType: String!

  """The required fields to create a valid address."""
  requiredFields: [String!]!

  """
  The list of fields that should be in upper case for address validation rule.
  """
  upperFields: [String!]!
}

"""Represents allocation."""
type Allocation implements Node {
  """The ID of allocation."""
  id: ID!

  """
  Quantity allocated for orders.
  
  Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS.
  """
  quantity: Int!

  """
  The warehouse were items were allocated.
  
  Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS.
  """
  warehouse: Warehouse!
}

"""
Determine the allocation strategy for the channel.

    PRIORITIZE_SORTING_ORDER - allocate stocks according to the warehouses' order
    within the channel

    PRIORITIZE_HIGH_STOCK - allocate stock in a warehouse with the most stock
"""
enum AllocationStrategyEnum {
  PRIORITIZE_HIGH_STOCK
  PRIORITIZE_SORTING_ORDER
}

"""Represents app data."""
type App implements Node & ObjectWithMetadata {
  """Description of this app."""
  aboutApp: String

  """JWT token used to authenticate by third-party app."""
  accessToken: String

  """URL to iframe with the app."""
  appUrl: String

  """
  The App's author name.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  author: String

  """
  App's brand data.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  brand: AppBrand

  """URL to iframe with the configuration for the app."""
  configurationUrl: String @deprecated(reason: "This field will be removed in Saleor 4.0. Use `appUrl` instead.")

  """The date and time when the app was created."""
  created: DateTime

  """Description of the data privacy defined for this app."""
  dataPrivacy: String @deprecated(reason: "This field will be removed in Saleor 4.0. Use `dataPrivacyUrl` instead.")

  """URL to details about the privacy policy on the app owner page."""
  dataPrivacyUrl: String

  """
  App's dashboard extensions.
  
  Added in Saleor 3.1.
  """
  extensions: [AppExtension!]!

  """Homepage of the app."""
  homepageUrl: String

  """The ID of the app."""
  id: ID!

  """
  Canonical app ID from the manifest
  
  Added in Saleor 3.19.
  """
  identifier: String

  """Determine if app will be set active or not."""
  isActive: Boolean

  """
  URL to manifest used during app's installation.
  
  Added in Saleor 3.5.
  """
  manifestUrl: String

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """Name of the app."""
  name: String

  """List of the app's permissions."""
  permissions: [Permission!]

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """Support page for the app."""
  supportUrl: String

  """
  Last 4 characters of the tokens.
  
  Requires one of the following permissions: MANAGE_APPS, OWNER.
  """
  tokens: [AppToken!]

  """Type of the app."""
  type: AppTypeEnum

  """Version number of the app."""
  version: String

  """
  List of webhooks assigned to this app.
  
  Requires one of the following permissions: MANAGE_APPS, OWNER.
  """
  webhooks: [Webhook!]
}

"""
Activate the app. 

Requires one of the following permissions: MANAGE_APPS.

Triggers the following webhook events:
- APP_STATUS_CHANGED (async): An app was activated.
"""
type AppActivate {
  app: App
  appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AppError!]!
}

"""
Represents the app's brand data.

Added in Saleor 3.14.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type AppBrand {
  """
  App's logos details.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  logo: AppBrandLogo!
}

"""
Represents the app's brand logo data.

Added in Saleor 3.14.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type AppBrandLogo {
  """
  URL to the default logo image.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  default(
    """
    The format of the image. When not provided, format of the original image will be used.
    
    Added in Saleor 3.14.
    
    Note: this API is currently in Feature Preview and can be subject to changes at later point.
    """
    format: IconThumbnailFormatEnum = ORIGINAL

    """
    Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended).
    """
    size: Int
  ): String!
}

type AppCountableConnection {
  edges: [AppCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type AppCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: App!
}

"""
Creates a new app. Requires the following permissions: AUTHENTICATED_STAFF_USER and MANAGE_APPS.

Triggers the following webhook events:
- APP_INSTALLED (async): An app was installed.
"""
type AppCreate {
  app: App
  appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """The newly created authentication token."""
  authToken: String
  errors: [AppError!]!
}

"""
Deactivate the app. 

Requires one of the following permissions: MANAGE_APPS.

Triggers the following webhook events:
- APP_STATUS_CHANGED (async): An app was deactivated.
"""
type AppDeactivate {
  app: App
  appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AppError!]!
}

"""
Deletes an app. 

Requires one of the following permissions: MANAGE_APPS.

Triggers the following webhook events:
- APP_DELETED (async): An app was deleted.
"""
type AppDelete {
  app: App
  appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AppError!]!
}

"""
Delete failed installation. 

Requires one of the following permissions: MANAGE_APPS.
"""
type AppDeleteFailedInstallation {
  appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  appInstallation: AppInstallation
  errors: [AppError!]!
}

"""
Event sent when app is deleted.

Added in Saleor 3.4.
"""
type AppDeleted implements Event {
  """The application the event relates to."""
  app: App

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

type AppError {
  """The error code."""
  code: AppErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String

  """List of permissions which causes the error."""
  permissions: [PermissionEnum!]
}

enum AppErrorCode {
  FORBIDDEN
  GRAPHQL_ERROR
  INVALID
  INVALID_CUSTOM_HEADERS
  INVALID_MANIFEST_FORMAT
  INVALID_PERMISSION
  INVALID_STATUS
  INVALID_URL_FORMAT
  MANIFEST_URL_CANT_CONNECT
  NOT_FOUND
  OUT_OF_SCOPE_APP
  OUT_OF_SCOPE_PERMISSION
  REQUIRED
  UNIQUE
  UNSUPPORTED_SALEOR_VERSION
}

"""Represents app data."""
type AppExtension implements Node {
  """JWT token used to authenticate by third-party app extension."""
  accessToken: String

  """The app assigned to app extension."""
  app: App!

  """The ID of the app extension."""
  id: ID!

  """Label of the extension to show in the dashboard."""
  label: String!

  """Place where given extension will be mounted."""
  mount: AppExtensionMountEnum!

  """List of the app extension's permissions."""
  permissions: [Permission!]!

  """Type of way how app extension will be opened."""
  target: AppExtensionTargetEnum!

  """URL of a view where extension's iframe is placed."""
  url: String!
}

type AppExtensionCountableConnection {
  edges: [AppExtensionCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type AppExtensionCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: AppExtension!
}

input AppExtensionFilterInput {
  mount: [AppExtensionMountEnum!]
  target: AppExtensionTargetEnum
}

"""All places where app extension can be mounted."""
enum AppExtensionMountEnum {
  CUSTOMER_DETAILS_MORE_ACTIONS
  CUSTOMER_OVERVIEW_CREATE
  CUSTOMER_OVERVIEW_MORE_ACTIONS
  NAVIGATION_CATALOG
  NAVIGATION_CUSTOMERS
  NAVIGATION_DISCOUNTS
  NAVIGATION_ORDERS
  NAVIGATION_PAGES
  NAVIGATION_TRANSLATIONS
  ORDER_DETAILS_MORE_ACTIONS
  ORDER_OVERVIEW_CREATE
  ORDER_OVERVIEW_MORE_ACTIONS
  PRODUCT_DETAILS_MORE_ACTIONS
  PRODUCT_OVERVIEW_CREATE
  PRODUCT_OVERVIEW_MORE_ACTIONS
}

"""
All available ways of opening an app extension.

    POPUP - app's extension will be mounted as a popup window
    APP_PAGE - redirect to app's page
"""
enum AppExtensionTargetEnum {
  APP_PAGE
  POPUP
}

"""
Fetch and validate manifest. 

Requires one of the following permissions: MANAGE_APPS.
"""
type AppFetchManifest {
  appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AppError!]!

  """The validated manifest."""
  manifest: Manifest
}

input AppFilterInput {
  isActive: Boolean
  search: String
  type: AppTypeEnum
}

input AppInput {
  """
  Canonical app ID. If not provided, the identifier will be generated based on app.id.
  
  Added in Saleor 3.19.
  """
  identifier: String

  """Name of the app."""
  name: String

  """List of permission code names to assign to this app."""
  permissions: [PermissionEnum!]
}

"""
Install new app by using app manifest. Requires the following permissions: AUTHENTICATED_STAFF_USER and MANAGE_APPS.
"""
type AppInstall {
  appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  appInstallation: AppInstallation
  errors: [AppError!]!
}

input AppInstallInput {
  """Determine if app will be set active or not."""
  activateAfterInstallation: Boolean = true

  """Name of the app to install."""
  appName: String

  """URL to app's manifest in JSON format."""
  manifestUrl: String

  """List of permission code names to assign to this app."""
  permissions: [PermissionEnum!]
}

"""Represents ongoing installation of app."""
type AppInstallation implements Job & Node {
  """The name of the app installation."""
  appName: String!

  """
  App's brand data.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  brand: AppBrand

  """Created date time of job in ISO 8601 format."""
  createdAt: DateTime!

  """The ID of the app installation."""
  id: ID!

  """The URL address of manifest for the app installation."""
  manifestUrl: String!

  """Job message."""
  message: String

  """Job status."""
  status: JobStatusEnum!

  """Date time of job last update in ISO 8601 format."""
  updatedAt: DateTime!
}

"""
Event sent when new app is installed.

Added in Saleor 3.4.
"""
type AppInstalled implements Event {
  """The application the event relates to."""
  app: App

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Represents the app's manifest brand data.

Added in Saleor 3.14.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type AppManifestBrand {
  """
  App's logos details.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  logo: AppManifestBrandLogo!
}

"""
Represents the app's manifest brand data.

Added in Saleor 3.14.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type AppManifestBrandLogo {
  """
  Data URL with a base64 encoded logo image.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  default(
    """
    The format of the image. When not provided, format of the original image will be used.
    
    Added in Saleor 3.14.
    
    Note: this API is currently in Feature Preview and can be subject to changes at later point.
    """
    format: IconThumbnailFormatEnum = ORIGINAL

    """
    Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended).
    """
    size: Int
  ): String!
}

type AppManifestExtension {
  """Label of the extension to show in the dashboard."""
  label: String!

  """Place where given extension will be mounted."""
  mount: AppExtensionMountEnum!

  """List of the app extension's permissions."""
  permissions: [Permission!]!

  """Type of way how app extension will be opened."""
  target: AppExtensionTargetEnum!

  """URL of a view where extension's iframe is placed."""
  url: String!
}

type AppManifestRequiredSaleorVersion {
  """
  Required Saleor version as semver range.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  constraint: String!

  """
  Informs if the Saleor version matches the required one.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  satisfied: Boolean!
}

type AppManifestWebhook {
  """The asynchronous events that webhook wants to subscribe."""
  asyncEvents: [WebhookEventTypeAsyncEnum!]

  """The name of the webhook."""
  name: String!

  """Subscription query of a webhook"""
  query: String!

  """The synchronous events that webhook wants to subscribe."""
  syncEvents: [WebhookEventTypeSyncEnum!]

  """The url to receive the payload."""
  targetUrl: String!
}

"""
Retry failed installation of new app. 

Requires one of the following permissions: MANAGE_APPS.

Triggers the following webhook events:
- APP_INSTALLED (async): An app was installed.
"""
type AppRetryInstall {
  appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  appInstallation: AppInstallation
  errors: [AppError!]!
}

enum AppSortField {
  """Sort apps by creation date."""
  CREATION_DATE

  """Sort apps by name."""
  NAME
}

input AppSortingInput {
  """Specifies the direction in which to sort apps."""
  direction: OrderDirection!

  """Sort apps by the selected field."""
  field: AppSortField!
}

"""
Event sent when app status has changed.

Added in Saleor 3.4.
"""
type AppStatusChanged implements Event {
  """The application the event relates to."""
  app: App

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""Represents token data."""
type AppToken implements Node {
  """Last 4 characters of the token."""
  authToken: String

  """The ID of the app token."""
  id: ID!

  """Name of the authenticated token."""
  name: String
}

"""
Creates a new token. 

Requires one of the following permissions: MANAGE_APPS.
"""
type AppTokenCreate {
  appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  appToken: AppToken

  """The newly created authentication token."""
  authToken: String
  errors: [AppError!]!
}

"""
Deletes an authentication token assigned to app. 

Requires one of the following permissions: MANAGE_APPS.
"""
type AppTokenDelete {
  appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  appToken: AppToken
  errors: [AppError!]!
}

input AppTokenInput {
  """ID of app."""
  app: ID!

  """Name of the token."""
  name: String
}

"""Verify provided app token."""
type AppTokenVerify {
  appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AppError!]!

  """Determine if token is valid or not."""
  valid: Boolean!
}

"""Enum determining type of your App."""
enum AppTypeEnum {
  """
  Local Saleor App. The app is fully manageable from dashboard. You can change assigned permissions, add webhooks, or authentication token
  """
  LOCAL

  """
  Third party external App. Installation is fully automated. Saleor uses a defined App manifest to gather all required information.
  """
  THIRDPARTY
}

"""
Updates an existing app. 

Requires one of the following permissions: MANAGE_APPS.

Triggers the following webhook events:
- APP_UPDATED (async): An app was updated.
"""
type AppUpdate {
  app: App
  appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AppError!]!
}

"""
Event sent when app is updated.

Added in Saleor 3.4.
"""
type AppUpdated implements Event {
  """The application the event relates to."""
  app: App

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

enum AreaUnitsEnum {
  SQ_CM
  SQ_DM
  SQ_FT
  SQ_INCH
  SQ_KM
  SQ_M
  SQ_MM
  SQ_YD
}

"""
Assigns storefront's navigation menus. 

Requires one of the following permissions: MANAGE_MENUS, MANAGE_SETTINGS.
"""
type AssignNavigation {
  errors: [MenuError!]!

  """Assigned navigation menu."""
  menu: Menu
  menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Represents assigned attribute to variant with variant selection attached.

Added in Saleor 3.1.
"""
type AssignedVariantAttribute {
  """Attribute assigned to variant."""
  attribute: Attribute!

  """
  Determines, whether assigned attribute is allowed for variant selection. Supported variant types for variant selection are: ['dropdown', 'boolean', 'swatch', 'numeric']
  """
  variantSelection: Boolean!
}

"""
Custom attribute of a product. Attributes can be assigned to products and variants at the product type level.
"""
type Attribute implements Node & ObjectWithMetadata {
  """
  Whether the attribute can be displayed in the admin product list. Requires one of the following permissions: MANAGE_PAGES, MANAGE_PAGE_TYPES_AND_ATTRIBUTES, MANAGE_PRODUCTS, MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
  """
  availableInGrid: Boolean! @deprecated(reason: "This field will be removed in Saleor 4.0.")

  """List of attribute's values."""
  choices(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Filtering options for attribute choices."""
    filter: AttributeValueFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Sort attribute choices."""
    sortBy: AttributeChoicesSortingInput
  ): AttributeValueCountableConnection

  """The entity type which can be used as a reference."""
  entityType: AttributeEntityTypeEnum

  """
  External ID of this attribute. 
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """
  Whether the attribute can be filtered in dashboard. Requires one of the following permissions: MANAGE_PAGES, MANAGE_PAGE_TYPES_AND_ATTRIBUTES, MANAGE_PRODUCTS, MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
  """
  filterableInDashboard: Boolean!

  """
  Whether the attribute can be filtered in storefront. Requires one of the following permissions: MANAGE_PAGES, MANAGE_PAGE_TYPES_AND_ATTRIBUTES, MANAGE_PRODUCTS, MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
  """
  filterableInStorefront: Boolean! @deprecated(reason: "This field will be removed in Saleor 4.0.")

  """The ID of the attribute."""
  id: ID!

  """The input type to use for entering attribute values in the dashboard."""
  inputType: AttributeInputTypeEnum

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """Name of an attribute displayed in the interface."""
  name: String

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """
  A list of product types that use this attribute as a product attribute.
  """
  productTypes(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): ProductTypeCountableConnection!

  """
  A list of product types that use this attribute as a product variant attribute.
  """
  productVariantTypes(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): ProductTypeCountableConnection!

  """Internal representation of an attribute name."""
  slug: String

  """
  The position of the attribute in the storefront navigation (0 by default). Requires one of the following permissions: MANAGE_PAGES, MANAGE_PAGE_TYPES_AND_ATTRIBUTES, MANAGE_PRODUCTS, MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
  """
  storefrontSearchPosition: Int! @deprecated(reason: "This field will be removed in Saleor 4.0.")

  """Returns translated attribute fields for the given language code."""
  translation(
    """A language code to return the translation for attribute."""
    languageCode: LanguageCodeEnum!
  ): AttributeTranslation

  """The attribute type."""
  type: AttributeTypeEnum

  """The unit of attribute values."""
  unit: MeasurementUnitsEnum

  """
  Whether the attribute requires values to be passed or not. Requires one of the following permissions: MANAGE_PAGES, MANAGE_PAGE_TYPES_AND_ATTRIBUTES, MANAGE_PRODUCTS, MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
  """
  valueRequired: Boolean!

  """
  Whether the attribute should be visible or not in storefront. Requires one of the following permissions: MANAGE_PAGES, MANAGE_PAGE_TYPES_AND_ATTRIBUTES, MANAGE_PRODUCTS, MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
  """
  visibleInStorefront: Boolean!

  """Flag indicating that attribute has predefined choices."""
  withChoices: Boolean!
}

"""
Creates attributes.

Added in Saleor 3.15.

Note: this API is currently in Feature Preview and can be subject to changes at later point.

Triggers the following webhook events:
- ATTRIBUTE_CREATED (async): An attribute was created.
"""
type AttributeBulkCreate {
  """Returns how many objects were created."""
  count: Int!
  errors: [AttributeBulkCreateError!]!

  """List of the created attributes."""
  results: [AttributeBulkCreateResult!]!
}

type AttributeBulkCreateError {
  """The error code."""
  code: AttributeBulkCreateErrorCode!

  """The error message."""
  message: String

  """
  Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  path: String
}

enum AttributeBulkCreateErrorCode {
  ALREADY_EXISTS
  BLANK
  DUPLICATED_INPUT_ITEM
  GRAPHQL_ERROR
  INVALID
  MAX_LENGTH
  NOT_FOUND
  REQUIRED
  UNIQUE
}

type AttributeBulkCreateResult {
  """Attribute data."""
  attribute: Attribute

  """List of errors occurred on create attempt."""
  errors: [AttributeBulkCreateError!]
}

"""
Deletes attributes. 

Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.

Triggers the following webhook events:
- ATTRIBUTE_DELETED (async): An attribute was deleted.
"""
type AttributeBulkDelete {
  attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """Returns how many objects were affected."""
  count: Int!
  errors: [AttributeError!]!
}

"""
Creates/updates translations for attributes.

Added in Saleor 3.14.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
type AttributeBulkTranslate {
  """Returns how many translations were created/updated."""
  count: Int!
  errors: [AttributeBulkTranslateError!]!

  """List of the translations."""
  results: [AttributeBulkTranslateResult!]!
}

type AttributeBulkTranslateError {
  """The error code."""
  code: AttributeTranslateErrorCode!

  """The error message."""
  message: String

  """
  Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  path: String
}

input AttributeBulkTranslateInput {
  """External reference of an attribute."""
  externalReference: String

  """Attribute ID."""
  id: ID

  """Translation language code."""
  languageCode: LanguageCodeEnum!

  """Translation fields."""
  translationFields: NameTranslationInput!
}

type AttributeBulkTranslateResult {
  """List of errors occurred on translation attempt."""
  errors: [AttributeBulkTranslateError!]

  """Attribute translation data."""
  translation: AttributeTranslation
}

"""
Updates attributes.

Added in Saleor 3.15.

Note: this API is currently in Feature Preview and can be subject to changes at later point.

Triggers the following webhook events:
- ATTRIBUTE_UPDATED (async): An attribute was updated. Optionally called when new attribute value was created or deleted.
- ATTRIBUTE_VALUE_CREATED (async): Called optionally when an attribute value was created.
- ATTRIBUTE_VALUE_DELETED (async): Called optionally when an attribute value was deleted.
"""
type AttributeBulkUpdate {
  """Returns how many objects were updated."""
  count: Int!
  errors: [AttributeBulkUpdateError!]!

  """List of the updated attributes."""
  results: [AttributeBulkUpdateResult!]!
}

type AttributeBulkUpdateError {
  """The error code."""
  code: AttributeBulkUpdateErrorCode!

  """The error message."""
  message: String

  """
  Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  path: String
}

enum AttributeBulkUpdateErrorCode {
  ALREADY_EXISTS
  BLANK
  DUPLICATED_INPUT_ITEM
  GRAPHQL_ERROR
  INVALID
  MAX_LENGTH
  NOT_FOUND
  REQUIRED
  UNIQUE
}

input AttributeBulkUpdateInput {
  """External ID of this attribute."""
  externalReference: String

  """Fields to update."""
  fields: AttributeUpdateInput!

  """ID of an attribute to update."""
  id: ID
}

type AttributeBulkUpdateResult {
  """Attribute data."""
  attribute: Attribute

  """List of errors occurred on update attempt."""
  errors: [AttributeBulkUpdateError!]
}

enum AttributeChoicesSortField {
  """Sort attribute choice by name."""
  NAME

  """Sort attribute choice by slug."""
  SLUG
}

input AttributeChoicesSortingInput {
  """Specifies the direction in which to sort attribute choices."""
  direction: OrderDirection!

  """Sort attribute choices by the selected field."""
  field: AttributeChoicesSortField!
}

type AttributeCountableConnection {
  edges: [AttributeCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type AttributeCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: Attribute!
}

"""
Creates an attribute.

Triggers the following webhook events:
- ATTRIBUTE_CREATED (async): An attribute was created.
"""
type AttributeCreate {
  attribute: Attribute
  attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AttributeError!]!
}

"""
Represents an input for create of attribute.

NOTE: Deprecated fields `filterableInStorefront`, `storefrontSearchPosition` and `availableInGrid` are not supported in bulk mutations: `attributeBulkCreate`, `attributeBulkUpdate`.
"""
input AttributeCreateInput {
  """
  Whether the attribute can be displayed in the admin product list.
  
  DEPRECATED: this field will be removed in Saleor 4.0.
  """
  availableInGrid: Boolean

  """The entity type which can be used as a reference."""
  entityType: AttributeEntityTypeEnum

  """
  External ID of this attribute.
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """Whether the attribute can be filtered in dashboard."""
  filterableInDashboard: Boolean

  """
  Whether the attribute can be filtered in storefront.
  
  DEPRECATED: this field will be removed in Saleor 4.0.
  """
  filterableInStorefront: Boolean

  """The input type to use for entering attribute values in the dashboard."""
  inputType: AttributeInputTypeEnum

  """Whether the attribute is for variants only."""
  isVariantOnly: Boolean

  """Name of an attribute displayed in the interface."""
  name: String!

  """Internal representation of an attribute name."""
  slug: String

  """
  The position of the attribute in the storefront navigation (0 by default).
  
  DEPRECATED: this field will be removed in Saleor 4.0.
  """
  storefrontSearchPosition: Int

  """The attribute type."""
  type: AttributeTypeEnum!

  """The unit of attribute values."""
  unit: MeasurementUnitsEnum

  """Whether the attribute requires values to be passed or not."""
  valueRequired: Boolean

  """List of attribute's values."""
  values: [AttributeValueCreateInput!]

  """Whether the attribute should be visible or not in storefront."""
  visibleInStorefront: Boolean
}

"""
Event sent when new attribute is created.

Added in Saleor 3.5.
"""
type AttributeCreated implements Event {
  """The attribute the event relates to."""
  attribute: Attribute

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Deletes an attribute. 

Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.

Triggers the following webhook events:
- ATTRIBUTE_DELETED (async): An attribute was deleted.
"""
type AttributeDelete {
  attribute: Attribute
  attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AttributeError!]!
}

"""
Event sent when attribute is deleted.

Added in Saleor 3.5.
"""
type AttributeDeleted implements Event {
  """The attribute the event relates to."""
  attribute: Attribute

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

enum AttributeEntityTypeEnum {
  PAGE
  PRODUCT
  PRODUCT_VARIANT
}

input AttributeEntityTypeEnumFilterInput {
  """The value equal to."""
  eq: AttributeEntityTypeEnum

  """The value included in."""
  oneOf: [AttributeEntityTypeEnum!]
}

type AttributeError {
  """The error code."""
  code: AttributeErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum AttributeErrorCode {
  ALREADY_EXISTS
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  REQUIRED
  UNIQUE
}

input AttributeFilterInput {
  availableInGrid: Boolean

  """
  Specifies the channel by which the data should be filtered. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead.
  """
  channel: String
  filterableInDashboard: Boolean
  filterableInStorefront: Boolean
  ids: [ID!]
  inCategory: ID
  inCollection: ID
  isVariantOnly: Boolean
  metadata: [MetadataFilter!]
  search: String
  slugs: [String!]
  type: AttributeTypeEnum
  valueRequired: Boolean
  visibleInStorefront: Boolean
}

input AttributeInput {
  """The boolean value of the attribute."""
  boolean: Boolean

  """
  The date range that the returned values should be in. In case of date/time attributes, the UTC midnight of the given date is used.
  """
  date: DateRangeInput

  """The date/time range that the returned values should be in."""
  dateTime: DateTimeRangeInput

  """Internal representation of an attribute name."""
  slug: String!

  """Internal representation of a value (unique per attribute)."""
  values: [String!]

  """The range that the returned values should be in."""
  valuesRange: IntRangeInput
}

enum AttributeInputTypeEnum {
  BOOLEAN
  DATE
  DATE_TIME
  DROPDOWN
  FILE
  MULTISELECT
  NUMERIC
  PLAIN_TEXT
  REFERENCE
  RICH_TEXT
  SWATCH
}

input AttributeInputTypeEnumFilterInput {
  """The value equal to."""
  eq: AttributeInputTypeEnum

  """The value included in."""
  oneOf: [AttributeInputTypeEnum!]
}

"""
Reorder the values of an attribute. 

Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.

Triggers the following webhook events:
- ATTRIBUTE_VALUE_UPDATED (async): An attribute value was updated.
- ATTRIBUTE_UPDATED (async): An attribute was updated.
"""
type AttributeReorderValues {
  """Attribute from which values are reordered."""
  attribute: Attribute
  attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AttributeError!]!
}

enum AttributeSortField {
  """
  Sort attributes based on whether they can be displayed or not in a product grid.
  """
  AVAILABLE_IN_GRID

  """Sort attributes by the filterable in dashboard flag"""
  FILTERABLE_IN_DASHBOARD

  """Sort attributes by the filterable in storefront flag"""
  FILTERABLE_IN_STOREFRONT

  """Sort attributes by the variant only flag"""
  IS_VARIANT_ONLY

  """Sort attributes by name"""
  NAME

  """Sort attributes by slug"""
  SLUG

  """Sort attributes by their position in storefront"""
  STOREFRONT_SEARCH_POSITION

  """Sort attributes by the value required flag"""
  VALUE_REQUIRED

  """Sort attributes by visibility in the storefront"""
  VISIBLE_IN_STOREFRONT
}

input AttributeSortingInput {
  """Specifies the direction in which to sort attributes."""
  direction: OrderDirection!

  """Sort attributes by the selected field."""
  field: AttributeSortField!
}

"""
Represents attribute's original translatable fields and related translations.
"""
type AttributeTranslatableContent implements Node {
  """Custom attribute of a product."""
  attribute: Attribute @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.")

  """
  The ID of the attribute to translate.
  
  Added in Saleor 3.14.
  """
  attributeId: ID!

  """The ID of the attribute translatable content."""
  id: ID!

  """Name of the attribute to translate."""
  name: String!

  """Returns translated attribute fields for the given language code."""
  translation(
    """A language code to return the translation for attribute."""
    languageCode: LanguageCodeEnum!
  ): AttributeTranslation
}

"""
Creates/updates translations for an attribute. 

Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
type AttributeTranslate {
  attribute: Attribute
  errors: [TranslationError!]!
  translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

enum AttributeTranslateErrorCode {
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  REQUIRED
}

"""Represents attribute translations."""
type AttributeTranslation implements Node {
  """The ID of the attribute translation."""
  id: ID!

  """Translation language."""
  language: LanguageDisplay!

  """Translated attribute name."""
  name: String!

  """
  Represents the attribute fields to translate.
  
  Added in Saleor 3.14.
  """
  translatableContent: AttributeTranslatableContent
}

enum AttributeTypeEnum {
  PAGE_TYPE
  PRODUCT_TYPE
}

input AttributeTypeEnumFilterInput {
  """The value equal to."""
  eq: AttributeTypeEnum

  """The value included in."""
  oneOf: [AttributeTypeEnum!]
}

"""
Updates attribute. 

Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.

Triggers the following webhook events:
- ATTRIBUTE_UPDATED (async): An attribute was updated.
"""
type AttributeUpdate {
  attribute: Attribute
  attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AttributeError!]!
}

"""
Represents an input for update of attribute.

NOTE: Deprecated fields `filterableInStorefront`, `storefrontSearchPosition` and `availableInGrid` are not supported in bulk mutations: `attributeBulkCreate`, `attributeBulkUpdate`.
"""
input AttributeUpdateInput {
  """New values to be created for this attribute."""
  addValues: [AttributeValueUpdateInput!]

  """
  Whether the attribute can be displayed in the admin product list.
  
  DEPRECATED: this field will be removed in Saleor 4.0.
  """
  availableInGrid: Boolean

  """
  External ID of this product.
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """Whether the attribute can be filtered in dashboard."""
  filterableInDashboard: Boolean

  """
  Whether the attribute can be filtered in storefront.
  
  DEPRECATED: this field will be removed in Saleor 4.0.
  """
  filterableInStorefront: Boolean

  """Whether the attribute is for variants only."""
  isVariantOnly: Boolean

  """Name of an attribute displayed in the interface."""
  name: String

  """IDs of values to be removed from this attribute."""
  removeValues: [ID!]

  """Internal representation of an attribute name."""
  slug: String

  """
  The position of the attribute in the storefront navigation (0 by default).
  
  DEPRECATED: this field will be removed in Saleor 4.0.
  """
  storefrontSearchPosition: Int

  """The unit of attribute values."""
  unit: MeasurementUnitsEnum

  """Whether the attribute requires values to be passed or not."""
  valueRequired: Boolean

  """Whether the attribute should be visible or not in storefront."""
  visibleInStorefront: Boolean
}

"""
Event sent when attribute is updated.

Added in Saleor 3.5.
"""
type AttributeUpdated implements Event {
  """The attribute the event relates to."""
  attribute: Attribute

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""Represents a value of an attribute."""
type AttributeValue implements Node {
  """Represents the boolean value of the attribute value."""
  boolean: Boolean

  """Represents the date value of the attribute value."""
  date: Date

  """Represents the date/time value of the attribute value."""
  dateTime: DateTime

  """
  External ID of this attribute value. 
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """Represents file URL and content type (if attribute value is a file)."""
  file: File

  """The ID of the attribute value."""
  id: ID!

  """The input type to use for entering attribute values in the dashboard."""
  inputType: AttributeInputTypeEnum

  """Name of a value displayed in the interface."""
  name: String

  """
  Represents the text of the attribute value, plain text without formatting.
  """
  plainText: String

  """The ID of the attribute reference."""
  reference: ID

  """
  Represents the text of the attribute value, includes formatting.
  
  Rich text format. For reference see https://editorjs.io/
  """
  richText: JSONString

  """Internal representation of a value (unique per attribute)."""
  slug: String

  """Returns translated attribute value fields for the given language code."""
  translation(
    """A language code to return the translation for attribute value."""
    languageCode: LanguageCodeEnum!
  ): AttributeValueTranslation

  """
  Represent value of the attribute value (e.g. color values for swatch attributes).
  """
  value: String
}

"""
Deletes values of attributes. 

Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.

Triggers the following webhook events:
- ATTRIBUTE_VALUE_DELETED (async): An attribute value was deleted.
- ATTRIBUTE_UPDATED (async): An attribute was updated.
"""
type AttributeValueBulkDelete {
  attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """Returns how many objects were affected."""
  count: Int!
  errors: [AttributeError!]!
}

"""
Creates/updates translations for attributes values.

Added in Saleor 3.14.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
type AttributeValueBulkTranslate {
  """Returns how many translations were created/updated."""
  count: Int!
  errors: [AttributeValueBulkTranslateError!]!

  """List of the translations."""
  results: [AttributeValueBulkTranslateResult!]!
}

type AttributeValueBulkTranslateError {
  """The error code."""
  code: AttributeValueTranslateErrorCode!

  """The error message."""
  message: String

  """
  Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  path: String
}

input AttributeValueBulkTranslateInput {
  """External reference of an attribute value."""
  externalReference: String

  """Attribute value ID."""
  id: ID

  """Translation language code."""
  languageCode: LanguageCodeEnum!

  """Translation fields."""
  translationFields: AttributeValueTranslationInput!
}

type AttributeValueBulkTranslateResult {
  """List of errors occurred on translation attempt."""
  errors: [AttributeValueBulkTranslateError!]

  """Attribute value translation data."""
  translation: AttributeValueTranslation
}

type AttributeValueCountableConnection {
  edges: [AttributeValueCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type AttributeValueCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: AttributeValue!
}

"""
Creates a value for an attribute. 

Requires one of the following permissions: MANAGE_PRODUCTS.

Triggers the following webhook events:
- ATTRIBUTE_VALUE_CREATED (async): An attribute value was created.
- ATTRIBUTE_UPDATED (async): An attribute was updated.
"""
type AttributeValueCreate {
  """The updated attribute."""
  attribute: Attribute
  attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  attributeValue: AttributeValue
  errors: [AttributeError!]!
}

input AttributeValueCreateInput {
  """File content type."""
  contentType: String

  """
  External ID of this attribute value.
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """URL of the file attribute. Every time, a new value is created."""
  fileUrl: String

  """Name of a value displayed in the interface."""
  name: String!

  """
  Represents the text of the attribute value, plain text without formatting.
  
  DEPRECATED: this field will be removed in Saleor 4.0.The plain text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute.
  """
  plainText: String

  """
  Represents the text of the attribute value, includes formatting.
  
  Rich text format. For reference see https://editorjs.io/
  
  DEPRECATED: this field will be removed in Saleor 4.0.The rich text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute.
  """
  richText: JSONString

  """
  Represent value of the attribute value (e.g. color values for swatch attributes).
  """
  value: String
}

"""
Event sent when new attribute value is created.

Added in Saleor 3.5.
"""
type AttributeValueCreated implements Event {
  """The attribute value the event relates to."""
  attributeValue: AttributeValue

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Deletes a value of an attribute. 

Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.

Triggers the following webhook events:
- ATTRIBUTE_VALUE_DELETED (async): An attribute value was deleted.
- ATTRIBUTE_UPDATED (async): An attribute was updated.
"""
type AttributeValueDelete {
  """The updated attribute."""
  attribute: Attribute
  attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  attributeValue: AttributeValue
  errors: [AttributeError!]!
}

"""
Event sent when attribute value is deleted.

Added in Saleor 3.5.
"""
type AttributeValueDeleted implements Event {
  """The attribute value the event relates to."""
  attributeValue: AttributeValue

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

input AttributeValueFilterInput {
  ids: [ID!]
  search: String
  slugs: [String!]
}

input AttributeValueInput {
  """Represents the boolean value of the attribute value."""
  boolean: Boolean

  """File content type."""
  contentType: String

  """Represents the date value of the attribute value."""
  date: Date

  """Represents the date/time value of the attribute value."""
  dateTime: DateTime

  """
  Attribute value ID or external reference.
  
  Added in Saleor 3.9.
  """
  dropdown: AttributeValueSelectableTypeInput

  """
  External ID of this attribute.
  
  Added in Saleor 3.14.
  """
  externalReference: String

  """URL of the file attribute. Every time, a new value is created."""
  file: String

  """ID of the selected attribute."""
  id: ID

  """
  List of attribute value IDs or external references.
  
  Added in Saleor 3.9.
  """
  multiselect: [AttributeValueSelectableTypeInput!]

  """
  Numeric value of an attribute.
  
  Added in Saleor 3.9.
  """
  numeric: String

  """Plain text content."""
  plainText: String

  """List of entity IDs that will be used as references."""
  references: [ID!]

  """Text content in JSON format."""
  richText: JSONString

  """
  Attribute value ID or external reference.
  
  Added in Saleor 3.9.
  """
  swatch: AttributeValueSelectableTypeInput

  """
  The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. This field will be removed in Saleor 4.0.
  """
  values: [String!]
}

"""
Represents attribute value.
1. If ID is provided, then attribute value will be resolved by ID.
2. If externalReference is provided, then attribute value will be resolved by external reference.
3. If value is provided, then attribute value will be resolved by value. If this attribute value doesn't exist, then it will be created.
4. If externalReference and value is provided then new attribute value will be created.

Added in Saleor 3.9.
"""
input AttributeValueSelectableTypeInput {
  """
  External reference of an attribute value.
  
  Added in Saleor 3.14.
  """
  externalReference: String

  """ID of an attribute value."""
  id: ID

  """
  The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created.
  """
  value: String
}

"""
Represents attribute value's original translatable fields and related translations.
"""
type AttributeValueTranslatableContent implements Node {
  """
  Associated attribute that can be translated.
  
  Added in Saleor 3.9.
  """
  attribute: AttributeTranslatableContent

  """Represents a value of an attribute."""
  attributeValue: AttributeValue @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.")

  """
  The ID of the attribute value to translate.
  
  Added in Saleor 3.14.
  """
  attributeValueId: ID!

  """The ID of the attribute value translatable content."""
  id: ID!

  """Name of the attribute value to translate."""
  name: String!

  """Attribute plain text value."""
  plainText: String

  """
  Attribute value.
  
  Rich text format. For reference see https://editorjs.io/
  """
  richText: JSONString

  """Returns translated attribute value fields for the given language code."""
  translation(
    """A language code to return the translation for attribute value."""
    languageCode: LanguageCodeEnum!
  ): AttributeValueTranslation
}

"""
Creates/updates translations for an attribute value. 

Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
type AttributeValueTranslate {
  attributeValue: AttributeValue
  errors: [TranslationError!]!
  translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

enum AttributeValueTranslateErrorCode {
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  REQUIRED
}

"""Represents attribute value translations."""
type AttributeValueTranslation implements Node {
  """The ID of the attribute value translation."""
  id: ID!

  """Translation language."""
  language: LanguageDisplay!

  """Translated attribute value name."""
  name: String!

  """Translated plain text attribute value ."""
  plainText: String

  """
  Translated rich-text attribute value.
  
  Rich text format. For reference see https://editorjs.io/
  """
  richText: JSONString

  """
  Represents the attribute value fields to translate.
  
  Added in Saleor 3.14.
  """
  translatableContent: AttributeValueTranslatableContent
}

input AttributeValueTranslationInput {
  name: String

  """Translated text."""
  plainText: String

  """
  Translated text.
  
  Rich text format. For reference see https://editorjs.io/
  """
  richText: JSONString
}

"""
Updates value of an attribute. 

Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.

Triggers the following webhook events:
- ATTRIBUTE_VALUE_UPDATED (async): An attribute value was updated.
- ATTRIBUTE_UPDATED (async): An attribute was updated.
"""
type AttributeValueUpdate {
  """The updated attribute."""
  attribute: Attribute
  attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  attributeValue: AttributeValue
  errors: [AttributeError!]!
}

input AttributeValueUpdateInput {
  """File content type."""
  contentType: String

  """
  External ID of this attribute value.
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """URL of the file attribute. Every time, a new value is created."""
  fileUrl: String

  """Name of a value displayed in the interface."""
  name: String

  """
  Represents the text of the attribute value, plain text without formatting.
  
  DEPRECATED: this field will be removed in Saleor 4.0.The plain text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute.
  """
  plainText: String

  """
  Represents the text of the attribute value, includes formatting.
  
  Rich text format. For reference see https://editorjs.io/
  
  DEPRECATED: this field will be removed in Saleor 4.0.The rich text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute.
  """
  richText: JSONString

  """
  Represent value of the attribute value (e.g. color values for swatch attributes).
  """
  value: String
}

"""
Event sent when attribute value is updated.

Added in Saleor 3.5.
"""
type AttributeValueUpdated implements Event {
  """The attribute value the event relates to."""
  attributeValue: AttributeValue

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Where filtering options.

Added in Saleor 3.11.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
input AttributeWhereInput {
  """List of conditions that must be met."""
  AND: [AttributeWhereInput!]

  """A list of conditions of which at least one must be met."""
  OR: [AttributeWhereInput!]
  entityType: AttributeEntityTypeEnumFilterInput
  filterableInDashboard: Boolean
  ids: [ID!]
  inCategory: ID
  inCollection: ID
  inputType: AttributeInputTypeEnumFilterInput
  metadata: [MetadataFilter!]
  name: StringFilterInput
  slug: StringFilterInput
  type: AttributeTypeEnumFilterInput
  unit: MeasurementUnitsEnumFilterInput
  valueRequired: Boolean
  visibleInStorefront: Boolean
  withChoices: Boolean
}

input BulkAttributeValueInput {
  """
  The boolean value of an attribute to resolve. If the passed value is non-existent, it will be created.
  """
  boolean: Boolean

  """
  File content type.
  
  Added in Saleor 3.12.
  """
  contentType: String

  """
  Represents the date value of the attribute value.
  
  Added in Saleor 3.12.
  """
  date: Date

  """
  Represents the date/time value of the attribute value.
  
  Added in Saleor 3.12.
  """
  dateTime: DateTime

  """
  Attribute value ID.
  
  Added in Saleor 3.12.
  """
  dropdown: AttributeValueSelectableTypeInput

  """
  External ID of this attribute.
  
  Added in Saleor 3.14.
  """
  externalReference: String

  """
  URL of the file attribute. Every time, a new value is created.
  
  Added in Saleor 3.12.
  """
  file: String

  """ID of the selected attribute."""
  id: ID

  """
  List of attribute value IDs.
  
  Added in Saleor 3.12.
  """
  multiselect: [AttributeValueSelectableTypeInput!]

  """
  Numeric value of an attribute.
  
  Added in Saleor 3.12.
  """
  numeric: String

  """
  Plain text content.
  
  Added in Saleor 3.12.
  """
  plainText: String

  """
  List of entity IDs that will be used as references.
  
  Added in Saleor 3.12.
  """
  references: [ID!]

  """
  Text content in JSON format.
  
  Added in Saleor 3.12.
  """
  richText: JSONString

  """
  Attribute value ID.
  
  Added in Saleor 3.12.
  """
  swatch: AttributeValueSelectableTypeInput

  """
  The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created.This field will be removed in Saleor 4.0.
  """
  values: [String!]
}

type BulkProductError {
  """List of attributes IDs which causes the error."""
  attributes: [ID!]

  """List of channel IDs which causes the error."""
  channels: [ID!]

  """The error code."""
  code: ProductErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """Index of an input list item that caused the error."""
  index: Int

  """The error message."""
  message: String

  """List of attribute values IDs which causes the error."""
  values: [ID!]

  """List of warehouse IDs which causes the error."""
  warehouses: [ID!]
}

type BulkStockError {
  """List of attributes IDs which causes the error."""
  attributes: [ID!]

  """The error code."""
  code: ProductErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """Index of an input list item that caused the error."""
  index: Int

  """The error message."""
  message: String

  """List of attribute values IDs which causes the error."""
  values: [ID!]
}

"""
Synchronous webhook for calculating checkout/order taxes.

Added in Saleor 3.7.
"""
type CalculateTaxes implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App
  taxBase: TaxableObject!

  """Saleor version that triggered the event."""
  version: String
}

input CardInput {
  """
  Payment method nonce, a token returned by the appropriate provider's SDK.
  """
  code: String!

  """Card security code."""
  cvc: String

  """Information about currency and amount."""
  money: MoneyInput!
}

input CatalogueInput {
  """Categories related to the discount."""
  categories: [ID!]

  """Collections related to the discount."""
  collections: [ID!]

  """Products related to the discount."""
  products: [ID!]

  """
  Product variant related to the discount.
  
  Added in Saleor 3.1.
  """
  variants: [ID!]
}

input CataloguePredicateInput {
  """List of conditions that must be met."""
  AND: [CataloguePredicateInput!]

  """A list of conditions of which at least one must be met."""
  OR: [CataloguePredicateInput!]

  """Defines the category conditions to be met."""
  categoryPredicate: CategoryWhereInput

  """Defines the collection conditions to be met."""
  collectionPredicate: CollectionWhereInput

  """Defines the product conditions to be met."""
  productPredicate: ProductWhereInput

  """Defines the product variant conditions to be met."""
  variantPredicate: ProductVariantWhereInput
}

"""
Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront.
"""
type Category implements Node & ObjectWithMetadata {
  """List of ancestors of the category."""
  ancestors(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): CategoryCountableConnection

  """Background image of the category."""
  backgroundImage(
    """
    The format of the image. When not provided, format of the original image will be used.
    
    Added in Saleor 3.6.
    """
    format: ThumbnailFormatEnum = ORIGINAL

    """
    Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended).
    """
    size: Int
  ): Image

  """List of children of the category."""
  children(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): CategoryCountableConnection

  """
  Description of the category.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """
  Description of the category.
  
  Rich text format. For reference see https://editorjs.io/
  """
  descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.")

  """The ID of the category."""
  id: ID!

  """Level of the category."""
  level: Int!

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """Name of category"""
  name: String!

  """Parent category."""
  parent: Category

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """
  List of products in the category. Requires the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS.
  """
  products(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Slug of a channel for which the data should be returned."""
    channel: String

    """
    Filtering options for products.
    
    Added in Saleor 3.10.
    """
    filter: ProductFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """
    Sort products.
    
    Added in Saleor 3.10.
    """
    sortBy: ProductOrder

    """
    Filtering options for products.
    
    Added in Saleor 3.14.
    
    Note: this API is currently in Feature Preview and can be subject to changes at later point.
    """
    where: ProductWhereInput
  ): ProductCountableConnection

  """SEO description of category."""
  seoDescription: String

  """SEO title of category."""
  seoTitle: String

  """Slug of the category."""
  slug: String!

  """Returns translated category fields for the given language code."""
  translation(
    """A language code to return the translation for category."""
    languageCode: LanguageCodeEnum!
  ): CategoryTranslation

  """
  The date and time when the category was last updated.
  
  Added in Saleor 3.17.
  """
  updatedAt: DateTime!
}

"""
Deletes categories. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type CategoryBulkDelete {
  """Returns how many objects were affected."""
  count: Int!
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

type CategoryCountableConnection {
  edges: [CategoryCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type CategoryCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: Category!
}

"""
Creates a new category. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type CategoryCreate {
  category: Category
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when new category is created.

Added in Saleor 3.2.
"""
type CategoryCreated implements Event {
  """The category the event relates to."""
  category: Category

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Deletes a category. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type CategoryDelete {
  category: Category
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when category is deleted.

Added in Saleor 3.2.
"""
type CategoryDeleted implements Event {
  """The category the event relates to."""
  category: Category

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

input CategoryFilterInput {
  ids: [ID!]
  metadata: [MetadataFilter!]
  search: String
  slugs: [String!]

  """
  Filter by when was the most recent update. 
  
  Added in Saleor 3.17.
  """
  updatedAt: DateTimeRangeInput
}

input CategoryInput {
  """Background image file."""
  backgroundImage: Upload

  """Alt text for a product media."""
  backgroundImageAlt: String

  """
  Category description.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """
  Fields required to update the category metadata.
  
  Added in Saleor 3.8.
  """
  metadata: [MetadataInput!]

  """Category name."""
  name: String

  """
  Fields required to update the category private metadata.
  
  Added in Saleor 3.8.
  """
  privateMetadata: [MetadataInput!]

  """Search engine optimization fields."""
  seo: SeoInput

  """Category slug."""
  slug: String
}

enum CategorySortField {
  """Sort categories by name."""
  NAME

  """Sort categories by product count."""
  PRODUCT_COUNT

  """Sort categories by subcategory count."""
  SUBCATEGORY_COUNT
}

input CategorySortingInput {
  """
  Specifies the channel in which to sort the data.
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead.
  """
  channel: String

  """Specifies the direction in which to sort categories."""
  direction: OrderDirection!

  """Sort categories by the selected field."""
  field: CategorySortField!
}

"""
Represents category original translatable fields and related translations.
"""
type CategoryTranslatableContent implements Node {
  """Represents a single category of products."""
  category: Category @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.")

  """
  The ID of the category to translate.
  
  Added in Saleor 3.14.
  """
  categoryId: ID!

  """
  Category description to translate.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """
  Description of the category.
  
  Rich text format. For reference see https://editorjs.io/
  """
  descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.")

  """The ID of the category translatable content."""
  id: ID!

  """Name of the category translatable content."""
  name: String!

  """SEO description to translate."""
  seoDescription: String

  """SEO title to translate."""
  seoTitle: String

  """Returns translated category fields for the given language code."""
  translation(
    """A language code to return the translation for category."""
    languageCode: LanguageCodeEnum!
  ): CategoryTranslation
}

"""
Creates/updates translations for a category. 

Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
type CategoryTranslate {
  category: Category
  errors: [TranslationError!]!
  translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""Represents category translations."""
type CategoryTranslation implements Node {
  """
  Translated description of the category.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """
  Translated description of the category.
  
  Rich text format. For reference see https://editorjs.io/
  """
  descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.")

  """The ID of the category translation."""
  id: ID!

  """Translation language."""
  language: LanguageDisplay!

  """Translated category name."""
  name: String

  """Translated SEO description."""
  seoDescription: String

  """Translated SEO title."""
  seoTitle: String

  """
  Represents the category fields to translate.
  
  Added in Saleor 3.14.
  """
  translatableContent: CategoryTranslatableContent
}

"""
Updates a category. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type CategoryUpdate {
  category: Category
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when category is updated.

Added in Saleor 3.2.
"""
type CategoryUpdated implements Event {
  """The category the event relates to."""
  category: Category

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

input CategoryWhereInput {
  """List of conditions that must be met."""
  AND: [CategoryWhereInput!]

  """A list of conditions of which at least one must be met."""
  OR: [CategoryWhereInput!]
  ids: [ID!]
  metadata: [MetadataFilter!]
}

"""Represents channel."""
type Channel implements Node & ObjectWithMetadata {
  """
  Shipping methods that are available for the channel.
  
  Added in Saleor 3.6.
  """
  availableShippingMethodsPerCountry(countries: [CountryCode!]): [ShippingMethodsPerCountry!]

  """
  Channel-specific checkout settings.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  
  Requires one of the following permissions: MANAGE_CHANNELS, MANAGE_CHECKOUTS.
  """
  checkoutSettings: CheckoutSettings!

  """
  List of shippable countries for the channel.
  
  Added in Saleor 3.6.
  """
  countries: [CountryDisplay!]

  """
  A currency that is assigned to the channel.
  
  Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER.
  """
  currencyCode: String!

  """
  Default country for the channel. Default country can be used in checkout to determine the stock quantities or calculate taxes when the country was not explicitly provided.
  
  Added in Saleor 3.1.
  
  Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER.
  """
  defaultCountry: CountryDisplay!

  """
  Whether a channel has associated orders.
  
  Requires one of the following permissions: MANAGE_CHANNELS.
  """
  hasOrders: Boolean!

  """The ID of the channel."""
  id: ID!

  """
  Whether the channel is active.
  
  Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER.
  """
  isActive: Boolean!

  """
  List of public metadata items. Can be accessed without permissions.
  
  Added in Saleor 3.15.
  """
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.15.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.15.
  """
  metafields(keys: [String!]): Metadata

  """
  Name of the channel.
  
  Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER.
  """
  name: String!

  """
  Channel-specific order settings.
  
  Added in Saleor 3.12.
  
  Requires one of the following permissions: MANAGE_CHANNELS, MANAGE_ORDERS.
  """
  orderSettings: OrderSettings!

  """
  Channel-specific payment settings.
  
  Added in Saleor 3.16.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  
  Requires one of the following permissions: MANAGE_CHANNELS, HANDLE_PAYMENTS.
  """
  paymentSettings: PaymentSettings!

  """
  List of private metadata items. Requires staff permissions to access.
  
  Added in Saleor 3.15.
  """
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.15.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.15.
  """
  privateMetafields(keys: [String!]): Metadata

  """Slug of the channel."""
  slug: String!

  """
  Define the stock setting for this channel.
  
  Added in Saleor 3.7.
  
  Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER.
  """
  stockSettings: StockSettings!

  """
  Channel specific tax configuration.
  
  Added in Saleor 3.20.
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.
  """
  taxConfiguration: TaxConfiguration!

  """
  List of warehouses assigned to this channel.
  
  Added in Saleor 3.5.
  
  Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER.
  """
  warehouses: [Warehouse!]!
}

"""
Activate a channel. 

Requires one of the following permissions: MANAGE_CHANNELS.

Triggers the following webhook events:
- CHANNEL_STATUS_CHANGED (async): A channel was activated.
"""
type ChannelActivate {
  """Activated channel."""
  channel: Channel
  channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [ChannelError!]!
}

"""
Creates new channel. 

Requires one of the following permissions: MANAGE_CHANNELS.

Triggers the following webhook events:
- CHANNEL_CREATED (async): A channel was created.
"""
type ChannelCreate {
  channel: Channel
  channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [ChannelError!]!
}

input ChannelCreateInput {
  """List of shipping zones to assign to the channel."""
  addShippingZones: [ID!]

  """
  List of warehouses to assign to the channel.
  
  Added in Saleor 3.5.
  """
  addWarehouses: [ID!]

  """
  The channel checkout settings
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  checkoutSettings: CheckoutSettingsInput

  """Currency of the channel."""
  currencyCode: String!

  """
  Default country for the channel. Default country can be used in checkout to determine the stock quantities or calculate taxes when the country was not explicitly provided.
  
  Added in Saleor 3.1.
  """
  defaultCountry: CountryCode!

  """Determine if channel will be set active or not."""
  isActive: Boolean

  """
  Channel public metadata.
  
  Added in Saleor 3.15.
  """
  metadata: [MetadataInput!]

  """Name of the channel."""
  name: String!

  """
  The channel order settings
  
  Added in Saleor 3.12.
  """
  orderSettings: OrderSettingsInput

  """
  The channel payment settings
  
  Added in Saleor 3.16.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  paymentSettings: PaymentSettingsInput

  """
  Channel private metadata.
  
  Added in Saleor 3.15.
  """
  privateMetadata: [MetadataInput!]

  """Slug of the channel."""
  slug: String!

  """
  The channel stock settings.
  
  Added in Saleor 3.7.
  """
  stockSettings: StockSettingsInput
}

"""
Event sent when new channel is created.

Added in Saleor 3.2.
"""
type ChannelCreated implements Event {
  """The channel the event relates to."""
  channel: Channel

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Deactivate a channel. 

Requires one of the following permissions: MANAGE_CHANNELS.

Triggers the following webhook events:
- CHANNEL_STATUS_CHANGED (async): A channel was deactivated.
"""
type ChannelDeactivate {
  """Deactivated channel."""
  channel: Channel
  channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [ChannelError!]!
}

"""
Delete a channel. Orders associated with the deleted channel will be moved to the target channel. Checkouts, product availability, and pricing will be removed. 

Requires one of the following permissions: MANAGE_CHANNELS.

Triggers the following webhook events:
- CHANNEL_DELETED (async): A channel was deleted.
"""
type ChannelDelete {
  channel: Channel
  channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [ChannelError!]!
}

input ChannelDeleteInput {
  """ID of channel to migrate orders from origin channel."""
  channelId: ID!
}

"""
Event sent when channel is deleted.

Added in Saleor 3.2.
"""
type ChannelDeleted implements Event {
  """The channel the event relates to."""
  channel: Channel

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

type ChannelError {
  """The error code."""
  code: ChannelErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String

  """List of shipping zone IDs which causes the error."""
  shippingZones: [ID!]

  """List of warehouses IDs which causes the error."""
  warehouses: [ID!]
}

enum ChannelErrorCode {
  ALREADY_EXISTS
  CHANNELS_CURRENCY_MUST_BE_THE_SAME
  CHANNEL_WITH_ORDERS
  DUPLICATED_INPUT_ITEM
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  REQUIRED
  UNIQUE
}

input ChannelListingUpdateInput {
  """ID of a channel listing."""
  channelListing: ID!

  """Cost price of the variant in channel."""
  costPrice: PositiveDecimal

  """The threshold for preorder variant in channel."""
  preorderThreshold: Int

  """Price of the particular variant in channel."""
  price: PositiveDecimal
}

"""
Event sent when channel metadata is updated.

Added in Saleor 3.15.
"""
type ChannelMetadataUpdated implements Event {
  """The channel the event relates to."""
  channel: Channel

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Reorder the warehouses of a channel.

Added in Saleor 3.7. 

Requires one of the following permissions: MANAGE_CHANNELS.
"""
type ChannelReorderWarehouses {
  """Channel within the warehouses are reordered."""
  channel: Channel
  errors: [ChannelError!]!
}

"""
Event sent when channel status has changed.

Added in Saleor 3.2.
"""
type ChannelStatusChanged implements Event {
  """The channel the event relates to."""
  channel: Channel

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Update a channel.

Requires one of the following permissions: MANAGE_CHANNELS.
Requires one of the following permissions when updating only `orderSettings` field: `MANAGE_CHANNELS`, `MANAGE_ORDERS`.
Requires one of the following permissions when updating only `checkoutSettings` field: `MANAGE_CHANNELS`, `MANAGE_CHECKOUTS`.
Requires one of the following permissions when updating only `paymentSettings` field: `MANAGE_CHANNELS`, `HANDLE_PAYMENTS`.

Triggers the following webhook events:
- CHANNEL_UPDATED (async): A channel was updated.
- CHANNEL_METADATA_UPDATED (async): Optionally triggered when public or private metadata is updated.
"""
type ChannelUpdate {
  channel: Channel
  channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [ChannelError!]!
}

input ChannelUpdateInput {
  """List of shipping zones to assign to the channel."""
  addShippingZones: [ID!]

  """
  List of warehouses to assign to the channel.
  
  Added in Saleor 3.5.
  """
  addWarehouses: [ID!]

  """
  The channel checkout settings
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  checkoutSettings: CheckoutSettingsInput

  """
  Default country for the channel. Default country can be used in checkout to determine the stock quantities or calculate taxes when the country was not explicitly provided.
  
  Added in Saleor 3.1.
  """
  defaultCountry: CountryCode

  """Determine if channel will be set active or not."""
  isActive: Boolean

  """
  Channel public metadata.
  
  Added in Saleor 3.15.
  """
  metadata: [MetadataInput!]

  """Name of the channel."""
  name: String

  """
  The channel order settings
  
  Added in Saleor 3.12.
  """
  orderSettings: OrderSettingsInput

  """
  The channel payment settings
  
  Added in Saleor 3.16.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  paymentSettings: PaymentSettingsInput

  """
  Channel private metadata.
  
  Added in Saleor 3.15.
  """
  privateMetadata: [MetadataInput!]

  """List of shipping zones to unassign from the channel."""
  removeShippingZones: [ID!]

  """
  List of warehouses to unassign from the channel.
  
  Added in Saleor 3.5.
  """
  removeWarehouses: [ID!]

  """Slug of the channel."""
  slug: String

  """
  The channel stock settings.
  
  Added in Saleor 3.7.
  """
  stockSettings: StockSettingsInput
}

"""
Event sent when channel is updated.

Added in Saleor 3.2.
"""
type ChannelUpdated implements Event {
  """The channel the event relates to."""
  channel: Channel

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""Checkout object."""
type Checkout implements Node & ObjectWithMetadata {
  """
  The authorize status of the checkout.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  
  Triggers the following webhook events:
  - CHECKOUT_CALCULATE_TAXES (sync): Optionally triggered when checkout prices are expired.
  """
  authorizeStatus: CheckoutAuthorizeStatusEnum!

  """
  Collection points that can be used for this order.
  
  Added in Saleor 3.1.
  """
  availableCollectionPoints: [Warehouse!]!

  """
  List of available payment gateways.
  
  Triggers the following webhook events:
  - PAYMENT_LIST_GATEWAYS (sync): Fetch payment gateways available for checkout.
  """
  availablePaymentGateways: [PaymentGateway!]!

  """
  Shipping methods that can be used with this checkout.
  
  Triggers the following webhook events:
  - SHIPPING_LIST_METHODS_FOR_CHECKOUT (sync): Optionally triggered when cached external shipping methods are invalid.
  - CHECKOUT_FILTER_SHIPPING_METHODS (sync): Optionally triggered when cached filtered shipping methods are invalid.
  """
  availableShippingMethods: [ShippingMethod!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `shippingMethods` instead.")

  """The billing address of the checkout."""
  billingAddress: Address

  """The channel for which checkout was created."""
  channel: Channel!

  """
  The charge status of the checkout.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  
  Triggers the following webhook events:
  - CHECKOUT_CALCULATE_TAXES (sync): Optionally triggered when checkout prices are expired.
  """
  chargeStatus: CheckoutChargeStatusEnum!

  """The date and time when the checkout was created."""
  created: DateTime!

  """
  The delivery method selected for this checkout.
  
  Added in Saleor 3.1.
  
  Triggers the following webhook events:
  - SHIPPING_LIST_METHODS_FOR_CHECKOUT (sync): Optionally triggered when cached external shipping methods are invalid.
  - CHECKOUT_FILTER_SHIPPING_METHODS (sync): Optionally triggered when cached filtered shipping methods are invalid.
  """
  deliveryMethod: DeliveryMethod

  """
  The total discount applied to the checkout. Note: Only discount created via voucher are included in this field.
  """
  discount: Money

  """The name of voucher assigned to the checkout."""
  discountName: String

  """
  Determines whether displayed prices should include taxes.
  
  Added in Saleor 3.9.
  """
  displayGrossPrices: Boolean!

  """Email of a customer."""
  email: String

  """List of gift cards associated with this checkout."""
  giftCards: [GiftCard!]!

  """The ID of the checkout."""
  id: ID!

  """Returns True, if checkout requires shipping."""
  isShippingRequired: Boolean!

  """Checkout language code."""
  languageCode: LanguageCodeEnum!
  lastChange: DateTime! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `updatedAt` instead.")

  """
  A list of checkout lines, each containing information about an item in the checkout.
  """
  lines: [CheckoutLine!]!

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """The note for the checkout."""
  note: String!

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """
  List of problems with the checkout.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  problems: [CheckoutProblem!]

  """The number of items purchased."""
  quantity: Int!

  """The shipping address of the checkout."""
  shippingAddress: Address

  """
  The shipping method related with checkout.
  
  Triggers the following webhook events:
  - SHIPPING_LIST_METHODS_FOR_CHECKOUT (sync): Optionally triggered when cached external shipping methods are invalid.
  - CHECKOUT_FILTER_SHIPPING_METHODS (sync): Optionally triggered when cached filtered shipping methods are invalid.
  """
  shippingMethod: ShippingMethod @deprecated(reason: "This field will be removed in Saleor 4.0. Use `deliveryMethod` instead.")

  """
  Shipping methods that can be used with this checkout.
  
  Triggers the following webhook events:
  - SHIPPING_LIST_METHODS_FOR_CHECKOUT (sync): Optionally triggered when cached external shipping methods are invalid.
  - CHECKOUT_FILTER_SHIPPING_METHODS (sync): Optionally triggered when cached filtered shipping methods are invalid.
  """
  shippingMethods: [ShippingMethod!]!

  """
  The price of the shipping, with all the taxes included. Set to 0 when no delivery method is selected.
  
  Triggers the following webhook events:
  - CHECKOUT_CALCULATE_TAXES (sync): Optionally triggered when checkout prices are expired.
  """
  shippingPrice: TaxedMoney!

  """
  Date when oldest stock reservation for this checkout expires or null if no stock is reserved.
  
  Added in Saleor 3.1.
  """
  stockReservationExpires: DateTime

  """
  List of user's stored payment methods that can be used in this checkout session. It uses the channel that the checkout was created in. When `amount` is not provided, `checkout.total` will be used as a default value.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  storedPaymentMethods(
    """Amount that will be used to fetch stored payment methods."""
    amount: PositiveDecimal
  ): [StoredPaymentMethod!]

  """
  The price of the checkout before shipping, with taxes included.
  
  Triggers the following webhook events:
  - CHECKOUT_CALCULATE_TAXES (sync): Optionally triggered when checkout prices are expired.
  """
  subtotalPrice: TaxedMoney!

  """
  Returns True if checkout has to be exempt from taxes.
  
  Added in Saleor 3.8.
  """
  taxExemption: Boolean!

  """The checkout's token."""
  token: UUID!

  """
  The difference between the paid and the checkout total amount.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  
  Triggers the following webhook events:
  - CHECKOUT_CALCULATE_TAXES (sync): Optionally triggered when checkout prices are expired.
  """
  totalBalance: Money!

  """
  The sum of the checkout line prices, with all the taxes,shipping costs, and discounts included.
  
  Triggers the following webhook events:
  - CHECKOUT_CALCULATE_TAXES (sync): Optionally triggered when checkout prices are expired.
  """
  totalPrice: TaxedMoney!

  """
  List of transactions for the checkout. Requires one of the following permissions: MANAGE_CHECKOUTS, HANDLE_PAYMENTS.
  
  Added in Saleor 3.4.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  transactions: [TransactionItem!]

  """
  Translation of the discountName field in the language set in Checkout.languageCode field.Note: this field is set automatically when Checkout.languageCode is defined; otherwise it's null
  """
  translatedDiscountName: String

  """
  Time of last modification of the given checkout.
  
  Added in Saleor 3.13.
  """
  updatedAt: DateTime!

  """
  The user assigned to the checkout. Requires one of the following permissions: MANAGE_USERS, HANDLE_PAYMENTS, OWNER.
  """
  user: User

  """
  The voucher assigned to the checkout.
  
  Added in Saleor 3.18.
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  """
  voucher: Voucher

  """The code of voucher assigned to the checkout."""
  voucherCode: String
}

"""
Adds a gift card or a voucher to a checkout.

Triggers the following webhook events:
- CHECKOUT_UPDATED (async): A checkout was updated.
"""
type CheckoutAddPromoCode {
  """The checkout with the added gift card or voucher."""
  checkout: Checkout
  checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [CheckoutError!]!
}

input CheckoutAddressValidationRules {
  """
  Determines if an error should be raised when the provided address doesn't match the expected format. Example: using letters for postal code when the numbers are expected.
  """
  checkFieldsFormat: Boolean = true

  """
  Determines if an error should be raised when the provided address doesn't have all the required fields. The list of required fields is dynamic and depends on the country code (use the `addressValidationRules` query to fetch them). Note: country code is mandatory for all addresses regardless of the rules provided in this input.
  """
  checkRequiredFields: Boolean = true

  """
  Determines if Saleor should apply normalization on address fields. Example: converting city field to uppercase letters.
  """
  enableFieldsNormalization: Boolean = true
}

"""
Determine a current authorize status for checkout.

    We treat the checkout as fully authorized when the sum of authorized and charged
    funds cover the checkout.total.
    We treat the checkout as partially authorized when the sum of authorized and charged
    funds covers only part of the checkout.total
    We treat the checkout as not authorized when the sum of authorized and charged funds
    is 0.

    NONE - the funds are not authorized
    PARTIAL - the cover funds don't cover fully the checkout's total
    FULL - the cover funds covers the checkout's total
"""
enum CheckoutAuthorizeStatusEnum {
  FULL
  NONE
  PARTIAL
}

"""
Update billing address in the existing checkout.

Triggers the following webhook events:
- CHECKOUT_UPDATED (async): A checkout was updated.
"""
type CheckoutBillingAddressUpdate {
  """An updated checkout."""
  checkout: Checkout
  checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [CheckoutError!]!
}

"""
Determine the current charge status for the checkout.

    The checkout is considered overcharged when the sum of the transactionItem's charge
    amounts exceeds the value of `checkout.total`.
    If the sum of the transactionItem's charge amounts equals
    `checkout.total`, we consider the checkout to be fully charged.
    If the sum of the transactionItem's charge amounts covers a part of the
    `checkout.total`, we treat the checkout as partially charged.


    NONE - the funds are not charged.
    PARTIAL - the funds that are charged don't cover the checkout's total
    FULL - the funds that are charged fully cover the checkout's total
    OVERCHARGED - the charged funds are bigger than checkout's total
"""
enum CheckoutChargeStatusEnum {
  FULL
  NONE
  OVERCHARGED
  PARTIAL
}

"""
Completes the checkout. As a result a new order is created. The mutation allows to create the unpaid order when setting `orderSettings.allowUnpaidOrders` for given `Channel` is set to `true`. When `orderSettings.allowUnpaidOrders` is set to `false`, checkout can be completed only when attached `Payment`/`TransactionItem`s fully cover the checkout's total. When processing the checkout with `Payment`, in case of required additional confirmation step like 3D secure, the `confirmationNeeded` flag will be set to True and no order will be created until payment is confirmed with second call of this mutation.

Triggers the following webhook events:
- SHIPPING_LIST_METHODS_FOR_CHECKOUT (sync): Optionally triggered when cached external shipping methods are invalid.
- CHECKOUT_FILTER_SHIPPING_METHODS (sync): Optionally triggered when cached filtered shipping methods are invalid.
- CHECKOUT_CALCULATE_TAXES (sync): Optionally triggered when checkout prices are expired.
- ORDER_CREATED (async): Triggered when order is created.
- NOTIFY_USER (async): A notification for order placement.
- NOTIFY_USER (async): A staff notification for order placement.
- ORDER_UPDATED (async): Triggered when order received the update after placement.
- ORDER_PAID (async): Triggered when newly created order is paid.
- ORDER_FULLY_PAID (async): Triggered when newly created order is fully paid.
- ORDER_CONFIRMED (async): Optionally triggered when newly created order are automatically marked as confirmed.
"""
type CheckoutComplete {
  checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """Confirmation data used to process additional authorization steps."""
  confirmationData: JSONString

  """
  Set to true if payment needs to be confirmed before checkout is complete.
  """
  confirmationNeeded: Boolean!
  errors: [CheckoutError!]!

  """Placed order."""
  order: Order
}

type CheckoutCountableConnection {
  edges: [CheckoutCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type CheckoutCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: Checkout!
}

"""
Create a new checkout.

`skipValidation` field requires HANDLE_CHECKOUTS and AUTHENTICATED_APP permissions.

Triggers the following webhook events:
- CHECKOUT_CREATED (async): A checkout was created.
"""
type CheckoutCreate {
  checkout: Checkout
  checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """
  Whether the checkout was created or the current active one was returned. Refer to checkoutLinesAdd and checkoutLinesUpdate to merge a cart with an active checkout.
  """
  created: Boolean @deprecated(reason: "This field will be removed in Saleor 4.0. Always returns `true`.")
  errors: [CheckoutError!]!
}

"""
Create new checkout from existing order.

Added in Saleor 3.14.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type CheckoutCreateFromOrder {
  """Created checkout."""
  checkout: Checkout
  errors: [CheckoutCreateFromOrderError!]!

  """Variants that were not attached to the checkout."""
  unavailableVariants: [CheckoutCreateFromOrderUnavailableVariant!]
}

type CheckoutCreateFromOrderError {
  """The error code."""
  code: CheckoutCreateFromOrderErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum CheckoutCreateFromOrderErrorCode {
  CHANNEL_INACTIVE
  GRAPHQL_ERROR
  INVALID
  ORDER_NOT_FOUND
  TAX_ERROR
}

type CheckoutCreateFromOrderUnavailableVariant {
  """The error code."""
  code: CheckoutCreateFromOrderUnavailableVariantErrorCode!

  """Order line ID that is unavailable."""
  lineId: ID!

  """The error message."""
  message: String!

  """Variant ID that is unavailable."""
  variantId: ID!
}

enum CheckoutCreateFromOrderUnavailableVariantErrorCode {
  INSUFFICIENT_STOCK
  NOT_FOUND
  PRODUCT_NOT_PUBLISHED
  PRODUCT_UNAVAILABLE_FOR_PURCHASE
  QUANTITY_GREATER_THAN_LIMIT
  UNAVAILABLE_VARIANT_IN_CHANNEL
}

input CheckoutCreateInput {
  """
  Billing address of the customer. `skipValidation` requires HANDLE_CHECKOUTS and AUTHENTICATED_APP permissions.
  """
  billingAddress: AddressInput

  """Slug of a channel in which to create a checkout."""
  channel: String

  """The customer's email address."""
  email: String

  """Checkout language code."""
  languageCode: LanguageCodeEnum

  """
  A list of checkout lines, each containing information about an item in the checkout.
  """
  lines: [CheckoutLineInput!]!

  """
  The mailing address to where the checkout will be shipped. Note: the address will be ignored if the checkout doesn't contain shippable items. `skipValidation` requires HANDLE_CHECKOUTS and AUTHENTICATED_APP permissions.
  """
  shippingAddress: AddressInput

  """
  The checkout validation rules that can be changed.
  
  Added in Saleor 3.5.
  """
  validationRules: CheckoutValidationRules
}

"""
Event sent when new checkout is created.

Added in Saleor 3.2.
"""
type CheckoutCreated implements Event {
  """The checkout the event relates to."""
  checkout: Checkout

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Sets the customer as the owner of the checkout. 

Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_USER.

Triggers the following webhook events:
- CHECKOUT_UPDATED (async): A checkout was updated.
"""
type CheckoutCustomerAttach {
  """An updated checkout."""
  checkout: Checkout
  checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [CheckoutError!]!
}

"""
Removes the user assigned as the owner of the checkout. 

Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_USER.

Triggers the following webhook events:
- CHECKOUT_UPDATED (async): A checkout was updated.
"""
type CheckoutCustomerDetach {
  """An updated checkout."""
  checkout: Checkout
  checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [CheckoutError!]!
}

"""
Updates the delivery method (shipping method or pick up point) of the checkout. Updates the checkout shipping_address for click and collect delivery for a warehouse address. 

Added in Saleor 3.1.

Triggers the following webhook events:
- SHIPPING_LIST_METHODS_FOR_CHECKOUT (sync): Triggered when updating the checkout delivery method with the external one.
- CHECKOUT_UPDATED (async): A checkout was updated.
"""
type CheckoutDeliveryMethodUpdate {
  """An updated checkout."""
  checkout: Checkout
  errors: [CheckoutError!]!
}

"""
Updates email address in the existing checkout object.

Triggers the following webhook events:
- CHECKOUT_UPDATED (async): A checkout was updated.
"""
type CheckoutEmailUpdate {
  """An updated checkout."""
  checkout: Checkout
  checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [CheckoutError!]!
}

type CheckoutError {
  """A type of address that causes the error."""
  addressType: AddressTypeEnum

  """The error code."""
  code: CheckoutErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """List of line Ids which cause the error."""
  lines: [ID!]

  """The error message."""
  message: String

  """List of variant IDs which causes the error."""
  variants: [ID!]
}

enum CheckoutErrorCode {
  BILLING_ADDRESS_NOT_SET
  CHANNEL_INACTIVE
  CHECKOUT_NOT_FULLY_PAID
  DELIVERY_METHOD_NOT_APPLICABLE
  EMAIL_NOT_SET
  GIFT_CARD_NOT_APPLICABLE
  GRAPHQL_ERROR
  INACTIVE_PAYMENT
  INSUFFICIENT_STOCK
  INVALID
  INVALID_SHIPPING_METHOD
  MISSING_CHANNEL_SLUG
  NON_EDITABLE_GIFT_LINE
  NON_REMOVABLE_GIFT_LINE
  NOT_FOUND
  NO_LINES
  PAYMENT_ERROR
  PRODUCT_NOT_PUBLISHED
  PRODUCT_UNAVAILABLE_FOR_PURCHASE
  QUANTITY_GREATER_THAN_LIMIT
  REQUIRED
  SHIPPING_ADDRESS_NOT_SET
  SHIPPING_CHANGE_FORBIDDEN
  SHIPPING_METHOD_NOT_APPLICABLE
  SHIPPING_METHOD_NOT_SET
  SHIPPING_NOT_REQUIRED
  TAX_ERROR
  UNAVAILABLE_VARIANT_IN_CHANNEL
  UNIQUE
  VOUCHER_NOT_APPLICABLE
  ZERO_QUANTITY
}

input CheckoutFilterInput {
  authorizeStatus: [CheckoutAuthorizeStatusEnum!]
  channels: [ID!]
  chargeStatus: [CheckoutChargeStatusEnum!]
  created: DateRangeInput
  customer: String
  metadata: [MetadataFilter!]
  search: String
  updatedAt: DateRangeInput
}

"""
Filter shipping methods for checkout.

Added in Saleor 3.6.
"""
type CheckoutFilterShippingMethods implements Event {
  """The checkout the event relates to."""
  checkout: Checkout

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """
  Shipping methods that can be used with this checkout.
  
  Added in Saleor 3.6.
  """
  shippingMethods: [ShippingMethod!]

  """Saleor version that triggered the event."""
  version: String
}

"""
Event sent when checkout is fully paid with transactions. The checkout is considered as fully paid when the checkout `charge_status` is `FULL` or `OVERCHARGED`. The event is not sent when the checkout authorization flow strategy is used.

Added in Saleor 3.13.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type CheckoutFullyPaid implements Event {
  """The checkout the event relates to."""
  checkout: Checkout

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Update language code in the existing checkout.

Triggers the following webhook events:
- CHECKOUT_UPDATED (async): A checkout was updated.
"""
type CheckoutLanguageCodeUpdate {
  """An updated checkout."""
  checkout: Checkout
  checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [CheckoutError!]!
}

"""Represents an item in the checkout."""
type CheckoutLine implements Node & ObjectWithMetadata {
  """The ID of the checkout line."""
  id: ID!

  """
  Determine if the line is a gift.
  
  Added in Saleor 3.19.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  isGift: Boolean

  """
  List of public metadata items. Can be accessed without permissions.
  
  Added in Saleor 3.5.
  """
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.5.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.5.
  """
  metafields(keys: [String!]): Metadata

  """
  List of private metadata items. Requires staff permissions to access.
  
  Added in Saleor 3.5.
  """
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.5.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.5.
  """
  privateMetafields(keys: [String!]): Metadata

  """
  List of problems with the checkout line.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  problems: [CheckoutLineProblem!]

  """The quantity of product variant assigned to the checkout line."""
  quantity: Int!

  """Indicates whether the item need to be delivered."""
  requiresShipping: Boolean!

  """
  The sum of the checkout line price, taxes and discounts.
  
  Triggers the following webhook events:
  - CHECKOUT_CALCULATE_TAXES (sync): Optionally triggered when checkout prices are expired.
  """
  totalPrice: TaxedMoney!

  """The sum of the checkout line price, without discounts."""
  undiscountedTotalPrice: Money!

  """The unit price of the checkout line, without discounts."""
  undiscountedUnitPrice: Money!

  """
  The unit price of the checkout line, with taxes and discounts.
  
  Triggers the following webhook events:
  - CHECKOUT_CALCULATE_TAXES (sync): Optionally triggered when checkout prices are expired.
  """
  unitPrice: TaxedMoney!

  """The product variant from which the checkout line was created."""
  variant: ProductVariant!
}

type CheckoutLineCountableConnection {
  edges: [CheckoutLineCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type CheckoutLineCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: CheckoutLine!
}

"""
Deletes a CheckoutLine.

Triggers the following webhook events:
- CHECKOUT_UPDATED (async): A checkout was updated.
"""
type CheckoutLineDelete {
  """An updated checkout."""
  checkout: Checkout
  checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [CheckoutError!]!
}

input CheckoutLineInput {
  """
  Flag that allow force splitting the same variant into multiple lines by skipping the matching logic. 
  
  Added in Saleor 3.6.
  """
  forceNewLine: Boolean = false

  """
  Fields required to update the object's metadata.
  
  Added in Saleor 3.8.
  """
  metadata: [MetadataInput!]

  """
  Custom price of the item. Can be set only by apps with `HANDLE_CHECKOUTS` permission. When the line with the same variant will be provided multiple times, the last price will be used.
  
  Added in Saleor 3.1.
  """
  price: PositiveDecimal

  """The number of items purchased."""
  quantity: Int!

  """ID of the product variant."""
  variantId: ID!
}

"""
Represents an problem in the checkout line.

Added in Saleor 3.15.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
union CheckoutLineProblem = CheckoutLineProblemInsufficientStock | CheckoutLineProblemVariantNotAvailable

"""
Indicates insufficient stock for a given checkout line.Placing the order will not be possible until solving this problem.

Added in Saleor 3.15.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type CheckoutLineProblemInsufficientStock {
  """Available quantity of a variant."""
  availableQuantity: Int

  """The line that has variant with insufficient stock."""
  line: CheckoutLine!

  """The variant with insufficient stock."""
  variant: ProductVariant!
}

"""
The variant assigned to the checkout line is not available.Placing the order will not be possible until solving this problem.

Added in Saleor 3.15.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type CheckoutLineProblemVariantNotAvailable {
  """The line that has variant that is not available."""
  line: CheckoutLine!
}

input CheckoutLineUpdateInput {
  """
  ID of the line.
  
  Added in Saleor 3.6.
  """
  lineId: ID

  """
  Custom price of the item. Can be set only by apps with `HANDLE_CHECKOUTS` permission. When the line with the same variant will be provided multiple times, the last price will be used.
  
  Added in Saleor 3.1.
  """
  price: PositiveDecimal

  """
  The number of items purchased. Optional for apps, required for any other users.
  """
  quantity: Int

  """
  ID of the product variant. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use `lineId` instead.
  """
  variantId: ID
}

"""
Adds a checkout line to the existing checkout.If line was already in checkout, its quantity will be increased.

Triggers the following webhook events:
- CHECKOUT_UPDATED (async): A checkout was updated.
"""
type CheckoutLinesAdd {
  """An updated checkout."""
  checkout: Checkout
  checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [CheckoutError!]!
}

"""
Deletes checkout lines.

Triggers the following webhook events:
- CHECKOUT_UPDATED (async): A checkout was updated.
"""
type CheckoutLinesDelete {
  """An updated checkout."""
  checkout: Checkout
  errors: [CheckoutError!]!
}

"""
Updates checkout line in the existing checkout.

Triggers the following webhook events:
- CHECKOUT_UPDATED (async): A checkout was updated.
"""
type CheckoutLinesUpdate {
  """An updated checkout."""
  checkout: Checkout
  checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [CheckoutError!]!
}

"""
Event sent when checkout metadata is updated.

Added in Saleor 3.8.
"""
type CheckoutMetadataUpdated implements Event {
  """The checkout the event relates to."""
  checkout: Checkout

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""Create a new payment for given checkout."""
type CheckoutPaymentCreate {
  """Related checkout object."""
  checkout: Checkout
  errors: [PaymentError!]!

  """A newly created payment."""
  payment: Payment
  paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Represents an problem in the checkout.

Added in Saleor 3.15.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
union CheckoutProblem = CheckoutLineProblemInsufficientStock | CheckoutLineProblemVariantNotAvailable

"""
Remove a gift card or a voucher from a checkout.

Triggers the following webhook events:
- CHECKOUT_UPDATED (async): A checkout was updated.
"""
type CheckoutRemovePromoCode {
  """The checkout with the removed gift card or voucher."""
  checkout: Checkout
  checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [CheckoutError!]!
}

"""
Represents the channel-specific checkout settings.

Added in Saleor 3.15.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type CheckoutSettings {
  """
  Default `false`. Determines if the paid checkouts should be automatically completed. This setting applies only to checkouts where payment was processed through transactions.When enabled, the checkout will be automatically completed once the checkout `charge_status` reaches `FULL`. This occurs when the total sum of charged and authorized transaction amounts equals or exceeds the checkout's total amount.
  
  Added in Saleor 3.20.
  """
  automaticallyCompleteFullyPaidCheckouts: Boolean!

  """
  Default `true`. Determines if the checkout mutations should use legacy error flow. In legacy flow, all mutations can raise an exception unrelated to the requested action - (e.g. out-of-stock exception when updating checkoutShippingAddress.) If `false`, the errors will be aggregated in `checkout.problems` field. Some of the `problems` can block the finalizing checkout process. The legacy flow will be removed in Saleor 4.0. The flow with `checkout.problems` will be the default one.
  
  Added in Saleor 3.15.This field will be removed in Saleor 4.0.
  """
  useLegacyErrorFlow: Boolean!
}

input CheckoutSettingsInput {
  """
  Default `false`. Determines if the paid checkouts should be automatically completed. This setting applies only to checkouts where payment was processed through transactions.When enabled, the checkout will be automatically completed once the checkout `charge_status` reaches `FULL`. This occurs when the total sum of charged and authorized transaction amounts equals or exceeds the checkout's total amount.
  
  Added in Saleor 3.20.
  """
  automaticallyCompleteFullyPaidCheckouts: Boolean

  """
  Default `true`. Determines if the checkout mutations should use legacy error flow. In legacy flow, all mutations can raise an exception unrelated to the requested action - (e.g. out-of-stock exception when updating checkoutShippingAddress.) If `false`, the errors will be aggregated in `checkout.problems` field. Some of the `problems` can block the finalizing checkout process. The legacy flow will be removed in Saleor 4.0. The flow with `checkout.problems` will be the default one. 
  
  Added in Saleor 3.15.
  
  DEPRECATED: this field will be removed in Saleor 4.0.
  """
  useLegacyErrorFlow: Boolean
}

"""
Update shipping address in the existing checkout.

Triggers the following webhook events:
- CHECKOUT_UPDATED (async): A checkout was updated.
"""
type CheckoutShippingAddressUpdate {
  """An updated checkout."""
  checkout: Checkout
  checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [CheckoutError!]!
}

"""
Updates the shipping method of the checkout.

Triggers the following webhook events:
- SHIPPING_LIST_METHODS_FOR_CHECKOUT (sync): Triggered when updating the checkout shipping method with the external one.
- CHECKOUT_UPDATED (async): A checkout was updated.
"""
type CheckoutShippingMethodUpdate {
  """An updated checkout."""
  checkout: Checkout
  checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [CheckoutError!]!
}

enum CheckoutSortField {
  """Sort checkouts by creation date."""
  CREATION_DATE

  """Sort checkouts by customer."""
  CUSTOMER

  """Sort checkouts by payment."""
  PAYMENT
}

input CheckoutSortingInput {
  """Specifies the direction in which to sort checkouts."""
  direction: OrderDirection!

  """Sort checkouts by the selected field."""
  field: CheckoutSortField!
}

"""
Event sent when checkout is updated.

Added in Saleor 3.2.
"""
type CheckoutUpdated implements Event {
  """The checkout the event relates to."""
  checkout: Checkout

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

input CheckoutValidationRules {
  """
  The validation rules that can be applied to provided billing address data.
  """
  billingAddress: CheckoutAddressValidationRules

  """
  The validation rules that can be applied to provided shipping address data.
  """
  shippingAddress: CheckoutAddressValidationRules
}

type ChoiceValue {
  """The raw name of the choice."""
  raw: String

  """The verbose name of the choice."""
  verbose: String
}

"""Represents a collection of products."""
type Collection implements Node & ObjectWithMetadata {
  """Background image of the collection."""
  backgroundImage(
    """
    The format of the image. When not provided, format of the original image will be used.
    
    Added in Saleor 3.6.
    """
    format: ThumbnailFormatEnum = ORIGINAL

    """
    Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended).
    """
    size: Int
  ): Image

  """
  Channel given to retrieve this collection. Also used by federation gateway to resolve this object in a federated query.
  """
  channel: String

  """
  List of channels in which the collection is available.
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  channelListings: [CollectionChannelListing!]

  """
  Description of the collection.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """
  Description of the collection.
  
  Rich text format. For reference see https://editorjs.io/
  """
  descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.")

  """The ID of the collection."""
  id: ID!

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """Name of the collection."""
  name: String!

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """List of products in this collection."""
  products(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Filtering options for products."""
    filter: ProductFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Sort products."""
    sortBy: ProductOrder

    """
    Filtering options for products.
    
    Added in Saleor 3.14.
    
    Note: this API is currently in Feature Preview and can be subject to changes at later point.
    """
    where: ProductWhereInput
  ): ProductCountableConnection

  """SEO description of the collection."""
  seoDescription: String

  """SEO title of the collection."""
  seoTitle: String

  """Slug of the collection."""
  slug: String!

  """Returns translated collection fields for the given language code."""
  translation(
    """A language code to return the translation for collection."""
    languageCode: LanguageCodeEnum!
  ): CollectionTranslation
}

"""
Adds products to a collection. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type CollectionAddProducts {
  """Collection to which products will be added."""
  collection: Collection
  collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [CollectionError!]!
}

"""
Deletes collections. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type CollectionBulkDelete {
  collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """Returns how many objects were affected."""
  count: Int!
  errors: [CollectionError!]!
}

"""Represents collection channel listing."""
type CollectionChannelListing implements Node {
  """The channel to which the collection belongs."""
  channel: Channel!

  """The ID of the collection channel listing."""
  id: ID!

  """Indicates if the collection is published in the channel."""
  isPublished: Boolean!
  publicationDate: Date @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `publishedAt` field to fetch the publication date.")

  """
  The collection publication date.
  
  Added in Saleor 3.3.
  """
  publishedAt: DateTime
}

type CollectionChannelListingError {
  """List of attributes IDs which causes the error."""
  attributes: [ID!]

  """List of channels IDs which causes the error."""
  channels: [ID!]

  """The error code."""
  code: ProductErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String

  """List of attribute values IDs which causes the error."""
  values: [ID!]
}

"""
Manage collection's availability in channels. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type CollectionChannelListingUpdate {
  """An updated collection instance."""
  collection: Collection
  collectionChannelListingErrors: [CollectionChannelListingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [CollectionChannelListingError!]!
}

input CollectionChannelListingUpdateInput {
  """List of channels to which the collection should be assigned."""
  addChannels: [PublishableChannelListingInput!]

  """List of channels from which the collection should be unassigned."""
  removeChannels: [ID!]
}

"""Represents a connection to a list of collections."""
type CollectionCountableConnection {
  edges: [CollectionCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type CollectionCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: Collection!
}

"""
Creates a new collection. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type CollectionCreate {
  collection: Collection
  collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [CollectionError!]!
}

input CollectionCreateInput {
  """Background image file."""
  backgroundImage: Upload

  """Alt text for an image."""
  backgroundImageAlt: String

  """
  Description of the collection.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """Informs whether a collection is published."""
  isPublished: Boolean

  """
  Fields required to update the collection metadata.
  
  Added in Saleor 3.8.
  """
  metadata: [MetadataInput!]

  """Name of the collection."""
  name: String

  """
  Fields required to update the collection private metadata.
  
  Added in Saleor 3.8.
  """
  privateMetadata: [MetadataInput!]

  """List of products to be added to the collection."""
  products: [ID!]

  """
  Publication date. ISO 8601 standard. 
  
  DEPRECATED: this field will be removed in Saleor 4.0.
  """
  publicationDate: Date

  """Search engine optimization fields."""
  seo: SeoInput

  """Slug of the collection."""
  slug: String
}

"""
Event sent when new collection is created.

Added in Saleor 3.2.
"""
type CollectionCreated implements Event {
  """The collection the event relates to."""
  collection(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): Collection

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Deletes a collection. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type CollectionDelete {
  collection: Collection
  collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [CollectionError!]!
}

"""
Event sent when collection is deleted.

Added in Saleor 3.2.
"""
type CollectionDeleted implements Event {
  """The collection the event relates to."""
  collection(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): Collection

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

type CollectionError {
  """The error code."""
  code: CollectionErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String

  """List of products IDs which causes the error."""
  products: [ID!]
}

enum CollectionErrorCode {
  CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT
  DUPLICATED_INPUT_ITEM
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  REQUIRED
  UNIQUE
}

input CollectionFilterInput {
  """
  Specifies the channel by which the data should be filtered. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead.
  """
  channel: String
  ids: [ID!]
  metadata: [MetadataFilter!]
  published: CollectionPublished
  search: String
  slugs: [String!]
}

input CollectionInput {
  """Background image file."""
  backgroundImage: Upload

  """Alt text for an image."""
  backgroundImageAlt: String

  """
  Description of the collection.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """Informs whether a collection is published."""
  isPublished: Boolean

  """
  Fields required to update the collection metadata.
  
  Added in Saleor 3.8.
  """
  metadata: [MetadataInput!]

  """Name of the collection."""
  name: String

  """
  Fields required to update the collection private metadata.
  
  Added in Saleor 3.8.
  """
  privateMetadata: [MetadataInput!]

  """
  Publication date. ISO 8601 standard. 
  
  DEPRECATED: this field will be removed in Saleor 4.0.
  """
  publicationDate: Date

  """Search engine optimization fields."""
  seo: SeoInput

  """Slug of the collection."""
  slug: String
}

"""
Event sent when collection metadata is updated.

Added in Saleor 3.8.
"""
type CollectionMetadataUpdated implements Event {
  """The collection the event relates to."""
  collection(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): Collection

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

enum CollectionPublished {
  HIDDEN
  PUBLISHED
}

"""
Remove products from a collection. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type CollectionRemoveProducts {
  """Collection from which products will be removed."""
  collection: Collection
  collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [CollectionError!]!
}

"""
Reorder the products of a collection. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type CollectionReorderProducts {
  """Collection from which products are reordered."""
  collection: Collection
  collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [CollectionError!]!
}

enum CollectionSortField {
  """
  Sort collections by availability.
  
  This option requires a channel filter to work as the values can vary between channels.
  """
  AVAILABILITY

  """Sort collections by name."""
  NAME

  """Sort collections by product count."""
  PRODUCT_COUNT

  """
  Sort collections by publication date.
  
  This option requires a channel filter to work as the values can vary between channels.
  """
  PUBLICATION_DATE

  """
  Sort collections by publication date.
  
  This option requires a channel filter to work as the values can vary between channels.
  """
  PUBLISHED_AT
}

input CollectionSortingInput {
  """
  Specifies the channel in which to sort the data.
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead.
  """
  channel: String

  """Specifies the direction in which to sort collections."""
  direction: OrderDirection!

  """Sort collections by the selected field."""
  field: CollectionSortField!
}

"""
Represents collection's original translatable fields and related translations.
"""
type CollectionTranslatableContent implements Node {
  """Represents a collection of products."""
  collection: Collection @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.")

  """
  The ID of the collection to translate.
  
  Added in Saleor 3.14.
  """
  collectionId: ID!

  """
  Collection's description to translate.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """
  Description of the collection.
  
  Rich text format. For reference see https://editorjs.io/
  """
  descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.")

  """The ID of the collection translatable content."""
  id: ID!

  """Collection's name to translate."""
  name: String!

  """SEO description to translate."""
  seoDescription: String

  """SEO title to translate."""
  seoTitle: String

  """Returns translated collection fields for the given language code."""
  translation(
    """A language code to return the translation for collection."""
    languageCode: LanguageCodeEnum!
  ): CollectionTranslation
}

"""
Creates/updates translations for a collection. 

Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
type CollectionTranslate {
  collection: Collection
  errors: [TranslationError!]!
  translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""Represents collection translations."""
type CollectionTranslation implements Node {
  """
  Translated description of the collection.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """
  Translated description of the collection.
  
  Rich text format. For reference see https://editorjs.io/
  """
  descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.")

  """The ID of the collection translation."""
  id: ID!

  """Translation language."""
  language: LanguageDisplay!

  """Translated collection name."""
  name: String

  """Translated SEO description."""
  seoDescription: String

  """Translated SEO title."""
  seoTitle: String

  """
  Represents the collection fields to translate.
  
  Added in Saleor 3.14.
  """
  translatableContent: CollectionTranslatableContent
}

"""
Updates a collection. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type CollectionUpdate {
  collection: Collection
  collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [CollectionError!]!
}

"""
Event sent when collection is updated.

Added in Saleor 3.2.
"""
type CollectionUpdated implements Event {
  """The collection the event relates to."""
  collection(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): Collection

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

input CollectionWhereInput {
  """List of conditions that must be met."""
  AND: [CollectionWhereInput!]

  """A list of conditions of which at least one must be met."""
  OR: [CollectionWhereInput!]
  ids: [ID!]
  metadata: [MetadataFilter!]
}

"""Stores information about a single configuration field."""
type ConfigurationItem {
  """Help text for the field."""
  helpText: String

  """Label for the field."""
  label: String

  """Name of the field."""
  name: String!

  """Type of the field."""
  type: ConfigurationTypeFieldEnum

  """Current value of the field."""
  value: String
}

input ConfigurationItemInput {
  """Name of the field to update."""
  name: String!

  """Value of the given field to update."""
  value: String
}

enum ConfigurationTypeFieldEnum {
  BOOLEAN
  MULTILINE
  OUTPUT
  PASSWORD
  SECRET
  SECRETMULTILINE
  STRING
}

"""
Confirm user account with token sent by email during registration.

Triggers the following webhook events:
- ACCOUNT_CONFIRMED (async): Account was confirmed.
"""
type ConfirmAccount {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AccountError!]!

  """An activated user account."""
  user: User
}

"""
Confirm the email change of the logged-in user. 

Requires one of the following permissions: AUTHENTICATED_USER.

Triggers the following webhook events:
- CUSTOMER_UPDATED (async): A customer account was updated.
- NOTIFY_USER (async): A notification that account email change was confirmed.
- ACCOUNT_EMAIL_CHANGED (async): An account email was changed.
"""
type ConfirmEmailChange {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AccountError!]!

  """A user instance with a new email."""
  user: User
}

"""
Represents country codes defined by the ISO 3166-1 alpha-2 standard.

The `EU` value is DEPRECATED and will be removed in Saleor 3.21.
"""
enum CountryCode {
  AD
  AE
  AF
  AG
  AI
  AL
  AM
  AO
  AQ
  AR
  AS
  AT
  AU
  AW
  AX
  AZ
  BA
  BB
  BD
  BE
  BF
  BG
  BH
  BI
  BJ
  BL
  BM
  BN
  BO
  BQ
  BR
  BS
  BT
  BV
  BW
  BY
  BZ
  CA
  CC
  CD
  CF
  CG
  CH
  CI
  CK
  CL
  CM
  CN
  CO
  CR
  CU
  CV
  CW
  CX
  CY
  CZ
  DE
  DJ
  DK
  DM
  DO
  DZ
  EC
  EE
  EG
  EH
  ER
  ES
  ET
  EU
  FI
  FJ
  FK
  FM
  FO
  FR
  GA
  GB
  GD
  GE
  GF
  GG
  GH
  GI
  GL
  GM
  GN
  GP
  GQ
  GR
  GS
  GT
  GU
  GW
  GY
  HK
  HM
  HN
  HR
  HT
  HU
  ID
  IE
  IL
  IM
  IN
  IO
  IQ
  IR
  IS
  IT
  JE
  JM
  JO
  JP
  KE
  KG
  KH
  KI
  KM
  KN
  KP
  KR
  KW
  KY
  KZ
  LA
  LB
  LC
  LI
  LK
  LR
  LS
  LT
  LU
  LV
  LY
  MA
  MC
  MD
  ME
  MF
  MG
  MH
  MK
  ML
  MM
  MN
  MO
  MP
  MQ
  MR
  MS
  MT
  MU
  MV
  MW
  MX
  MY
  MZ
  NA
  NC
  NE
  NF
  NG
  NI
  NL
  NO
  NP
  NR
  NU
  NZ
  OM
  PA
  PE
  PF
  PG
  PH
  PK
  PL
  PM
  PN
  PR
  PS
  PT
  PW
  PY
  QA
  RE
  RO
  RS
  RU
  RW
  SA
  SB
  SC
  SD
  SE
  SG
  SH
  SI
  SJ
  SK
  SL
  SM
  SN
  SO
  SR
  SS
  ST
  SV
  SX
  SY
  SZ
  TC
  TD
  TF
  TG
  TH
  TJ
  TK
  TL
  TM
  TN
  TO
  TR
  TT
  TV
  TW
  TZ
  UA
  UG
  UM
  US
  UY
  UZ
  VA
  VC
  VE
  VG
  VI
  VN
  VU
  WF
  WS
  YE
  YT
  ZA
  ZM
  ZW
}

type CountryDisplay {
  """Country code."""
  code: String!

  """Country name."""
  country: String!

  """Country tax."""
  vat: VAT @deprecated(reason: "This field will be removed in Saleor 4.0. Always returns `null`. Use `TaxClassCountryRate` type to manage tax rates per country.")
}

input CountryFilterInput {
  """
  Boolean for filtering countries by having shipping zone assigned.If 'true', return countries with shipping zone assigned.If 'false', return countries without any shipping zone assigned.If the argument is not provided (null), return all countries.
  """
  attachedToShippingZones: Boolean
}

input CountryRateInput {
  """Country in which this rate applies."""
  countryCode: CountryCode!

  """
  Tax rate value provided as percentage. Example: provide `23` to represent `23%` tax rate.
  """
  rate: Float!
}

input CountryRateUpdateInput {
  """Country in which this rate applies."""
  countryCode: CountryCode!

  """
  Tax rate value provided as percentage. Example: provide `23` to represent `23%` tax rate. Provide `null` to remove the particular rate.
  """
  rate: Float
}

"""Create JWT token."""
type CreateToken {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """CSRF token required to re-generate access token."""
  csrfToken: String
  errors: [AccountError!]!

  """JWT refresh token, required to re-generate access token."""
  refreshToken: String

  """JWT token, required to authenticate."""
  token: String

  """A user instance."""
  user: User
}

type CreditCard {
  """Card brand."""
  brand: String!

  """Two-digit number representing the card’s expiration month."""
  expMonth: Int

  """Four-digit number representing the card’s expiration year."""
  expYear: Int

  """First 4 digits of the card number."""
  firstDigits: String

  """Last 4 digits of the card number."""
  lastDigits: String!
}

"""
Deletes customers. 

Requires one of the following permissions: MANAGE_USERS.

Triggers the following webhook events:
- CUSTOMER_DELETED (async): A customer account was deleted.
"""
type CustomerBulkDelete {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """Returns how many objects were affected."""
  count: Int!
  errors: [AccountError!]!
}

type CustomerBulkResult {
  """Customer data."""
  customer: User

  """List of errors that occurred during the update attempt."""
  errors: [CustomerBulkUpdateError!]
}

"""
Updates customers.

Added in Saleor 3.13.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: MANAGE_USERS.

Triggers the following webhook events:
- CUSTOMER_UPDATED (async): A customer account was updated.
- CUSTOMER_METADATA_UPDATED (async): Optionally called when customer's metadata was updated.
"""
type CustomerBulkUpdate {
  """Returns how many objects were created."""
  count: Int!
  errors: [CustomerBulkUpdateError!]!

  """List of the updated customers."""
  results: [CustomerBulkResult!]!
}

type CustomerBulkUpdateError {
  """The error code."""
  code: CustomerBulkUpdateErrorCode!

  """The error message."""
  message: String

  """
  Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  path: String
}

enum CustomerBulkUpdateErrorCode {
  BLANK
  DUPLICATED_INPUT_ITEM
  GRAPHQL_ERROR
  INVALID
  MAX_LENGTH
  NOT_FOUND
  REQUIRED
  UNIQUE
}

input CustomerBulkUpdateInput {
  """External ID of a customer to update."""
  externalReference: String

  """ID of a customer to update."""
  id: ID

  """Fields required to update a customer."""
  input: CustomerInput!
}

"""
Creates a new customer. 

Requires one of the following permissions: MANAGE_USERS.

Triggers the following webhook events:
- CUSTOMER_CREATED (async): A new customer account was created.
- CUSTOMER_METADATA_UPDATED (async): Optionally called when customer's metadata was updated.
- NOTIFY_USER (async): A notification for setting the password.
- ACCOUNT_SET_PASSWORD_REQUESTED (async): Setting a new password for the account is requested.
"""
type CustomerCreate {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AccountError!]!
  user: User
}

"""
Event sent when new customer user is created.

Added in Saleor 3.2.
"""
type CustomerCreated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The user the event relates to."""
  user: User

  """Saleor version that triggered the event."""
  version: String
}

"""
Deletes a customer. 

Requires one of the following permissions: MANAGE_USERS.

Triggers the following webhook events:
- CUSTOMER_DELETED (async): A customer account was deleted.
"""
type CustomerDelete {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AccountError!]!
  user: User
}

"""History log of the customer."""
type CustomerEvent implements Node {
  """App that performed the action."""
  app: App

  """Number of objects concerned by the event."""
  count: Int

  """Date when event happened at in ISO 8601 format."""
  date: DateTime

  """The ID of the customer event."""
  id: ID!

  """Content of the event."""
  message: String

  """The concerned order."""
  order: Order

  """The concerned order line."""
  orderLine: OrderLine

  """Customer event type."""
  type: CustomerEventsEnum

  """User who performed the action."""
  user: User
}

enum CustomerEventsEnum {
  ACCOUNT_ACTIVATED
  ACCOUNT_CREATED
  ACCOUNT_DEACTIVATED
  CUSTOMER_DELETED
  DIGITAL_LINK_DOWNLOADED
  EMAIL_ASSIGNED
  EMAIL_CHANGED
  EMAIL_CHANGED_REQUEST
  NAME_ASSIGNED
  NOTE_ADDED
  NOTE_ADDED_TO_ORDER
  PASSWORD_CHANGED
  PASSWORD_RESET
  PASSWORD_RESET_LINK_SENT
  PLACED_ORDER
}

input CustomerFilterInput {
  dateJoined: DateRangeInput

  """
  Filter by ids. 
  
  Added in Saleor 3.8.
  """
  ids: [ID!]
  metadata: [MetadataFilter!]
  numberOfOrders: IntRangeInput
  placedOrders: DateRangeInput
  search: String
  updatedAt: DateTimeRangeInput
}

input CustomerInput {
  """Billing address of the customer."""
  defaultBillingAddress: AddressInput

  """Shipping address of the customer."""
  defaultShippingAddress: AddressInput

  """The unique email address of the user."""
  email: String

  """
  External ID of the customer.
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """Given name."""
  firstName: String

  """User account is active."""
  isActive: Boolean

  """
  User account is confirmed.
  
  Added in Saleor 3.15.
  """
  isConfirmed: Boolean

  """User language code."""
  languageCode: LanguageCodeEnum

  """Family name."""
  lastName: String

  """
  Fields required to update the user metadata.
  
  Added in Saleor 3.14.
  """
  metadata: [MetadataInput!]

  """A note about the user."""
  note: String

  """
  Fields required to update the user private metadata.
  
  Added in Saleor 3.14.
  """
  privateMetadata: [MetadataInput!]
}

"""
Event sent when customer user metadata is updated.

Added in Saleor 3.8.
"""
type CustomerMetadataUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The user the event relates to."""
  user: User

  """Saleor version that triggered the event."""
  version: String
}

"""
Updates an existing customer. 

Requires one of the following permissions: MANAGE_USERS.

Triggers the following webhook events:
- CUSTOMER_UPDATED (async): A new customer account was updated.
- CUSTOMER_METADATA_UPDATED (async): Optionally called when customer's metadata was updated.
"""
type CustomerUpdate {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AccountError!]!
  user: User
}

"""
Event sent when customer user is updated.

Added in Saleor 3.2.
"""
type CustomerUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The user the event relates to."""
  user: User

  """Saleor version that triggered the event."""
  version: String
}

"""
The `Date` scalar type represents a Date
value as specified by
[iso8601](https://en.wikipedia.org/wiki/ISO_8601).
"""
scalar Date

input DateRangeInput {
  """Start date."""
  gte: Date

  """End date."""
  lte: Date
}

"""
The `DateTime` scalar type represents a DateTime
value as specified by
[iso8601](https://en.wikipedia.org/wiki/ISO_8601).
"""
scalar DateTime

"""
Define the filtering options for date time fields.

Added in Saleor 3.11.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
input DateTimeFilterInput {
  """The value equal to."""
  eq: DateTime

  """The value included in."""
  oneOf: [DateTime!]

  """The value in range."""
  range: DateTimeRangeInput
}

input DateTimeRangeInput {
  """Start date."""
  gte: DateTime

  """End date."""
  lte: DateTime
}

"""The `Day` scalar type represents number of days by integer value."""
scalar Day

"""
Deactivate all JWT tokens of the currently authenticated user. 

Requires one of the following permissions: AUTHENTICATED_USER.
"""
type DeactivateAllUserTokens {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AccountError!]!
}

"""
Custom Decimal implementation.

Returns Decimal as a float in the API,
parses float to the Decimal on the way back.
"""
scalar Decimal

"""
Define the filtering options for decimal fields.

Added in Saleor 3.14.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
input DecimalFilterInput {
  """The value equal to."""
  eq: Decimal

  """The value included in."""
  oneOf: [Decimal!]

  """The value in range."""
  range: DecimalRangeInput
}

input DecimalRangeInput {
  """Decimal value greater than or equal to."""
  gte: Decimal

  """Decimal value less than or equal to."""
  lte: Decimal
}

"""
Delete metadata of an object. To use it, you need to have access to the modified object.
"""
type DeleteMetadata {
  errors: [MetadataError!]!
  item: ObjectWithMetadata
  metadataErrors: [MetadataError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Delete object's private metadata. To use it, you need to be an authenticated staff user or an app and have access to the modified object.
"""
type DeletePrivateMetadata {
  errors: [MetadataError!]!
  item: ObjectWithMetadata
  metadataErrors: [MetadataError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Represents a delivery method chosen for the checkout. `Warehouse` type is used when checkout is marked as "click and collect" and `ShippingMethod` otherwise.

Added in Saleor 3.1.
"""
union DeliveryMethod = ShippingMethod | Warehouse

"""Represents digital content associated with a product variant."""
type DigitalContent implements Node & ObjectWithMetadata {
  """Indicator for automatic fulfillment of digital content."""
  automaticFulfillment: Boolean!

  """File associated with digital content."""
  contentFile: String!

  """The ID of the digital content."""
  id: ID!

  """Maximum number of allowed downloads for the digital content."""
  maxDownloads: Int

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """Product variant assigned to digital content."""
  productVariant: ProductVariant!

  """Number of days the URL for the digital content remains valid."""
  urlValidDays: Int

  """List of URLs for the digital variant."""
  urls: [DigitalContentUrl!]

  """Default settings indicator for digital content."""
  useDefaultSettings: Boolean!
}

"""A connection to a list of digital content items."""
type DigitalContentCountableConnection {
  edges: [DigitalContentCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type DigitalContentCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: DigitalContent!
}

"""
Create new digital content. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type DigitalContentCreate {
  content: DigitalContent
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  variant: ProductVariant
}

"""
Remove digital content assigned to given variant. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type DigitalContentDelete {
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  variant: ProductVariant
}

input DigitalContentInput {
  """Overwrite default automatic_fulfillment setting for variant."""
  automaticFulfillment: Boolean

  """
  Determines how many times a download link can be accessed by a customer.
  """
  maxDownloads: Int

  """
  Fields required to update the digital content metadata.
  
  Added in Saleor 3.8.
  """
  metadata: [MetadataInput!]

  """
  Fields required to update the digital content private metadata.
  
  Added in Saleor 3.8.
  """
  privateMetadata: [MetadataInput!]

  """
  Determines for how many days a download link is active since it was generated.
  """
  urlValidDays: Int

  """Use default digital content settings for this product."""
  useDefaultSettings: Boolean!
}

"""
Update digital content. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type DigitalContentUpdate {
  content: DigitalContent
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  variant: ProductVariant
}

input DigitalContentUploadInput {
  """Overwrite default automatic_fulfillment setting for variant."""
  automaticFulfillment: Boolean

  """Represents an file in a multipart request."""
  contentFile: Upload!

  """
  Determines how many times a download link can be accessed by a customer.
  """
  maxDownloads: Int

  """
  Fields required to update the digital content metadata.
  
  Added in Saleor 3.8.
  """
  metadata: [MetadataInput!]

  """
  Fields required to update the digital content private metadata.
  
  Added in Saleor 3.8.
  """
  privateMetadata: [MetadataInput!]

  """
  Determines for how many days a download link is active since it was generated.
  """
  urlValidDays: Int

  """Use default digital content settings for this product."""
  useDefaultSettings: Boolean!
}

"""Represents a URL for digital content."""
type DigitalContentUrl implements Node {
  """Digital content associated with the URL."""
  content: DigitalContent!

  """Date and time when the digital content URL was created."""
  created: DateTime!

  """Number of times digital content has been downloaded."""
  downloadNum: Int!

  """The ID of the digital content URL."""
  id: ID!

  """UUID of digital content."""
  token: UUID!

  """URL for digital content."""
  url: String
}

"""
Generate new URL to digital content. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type DigitalContentUrlCreate {
  digitalContentUrl: DigitalContentUrl
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input DigitalContentUrlCreateInput {
  """Digital content ID which URL will belong to."""
  content: ID!
}

type DiscountError {
  """List of channels IDs which causes the error."""
  channels: [ID!]

  """The error code."""
  code: DiscountErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String

  """List of products IDs which causes the error."""
  products: [ID!]

  """
  List of voucher codes which causes the error.
  
  Added in Saleor 3.18.
  """
  voucherCodes: [String!]
}

enum DiscountErrorCode {
  ALREADY_EXISTS
  CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT
  DUPLICATED_INPUT_ITEM
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  REQUIRED
  UNIQUE
  VOUCHER_ALREADY_USED
}

enum DiscountStatusEnum {
  ACTIVE
  EXPIRED
  SCHEDULED
}

enum DiscountValueTypeEnum {
  FIXED
  PERCENTAGE
}

input DiscountedObjectWhereInput {
  """List of conditions that must be met."""
  AND: [DiscountedObjectWhereInput!]

  """A list of conditions of which at least one must be met."""
  OR: [DiscountedObjectWhereInput!]

  """Filter by the base subtotal price."""
  baseSubtotalPrice: DecimalFilterInput

  """Filter by the base total price."""
  baseTotalPrice: DecimalFilterInput
}

enum DistanceUnitsEnum {
  CM
  DM
  FT
  INCH
  KM
  M
  MM
  YD
}

"""Represents API domain."""
type Domain {
  """The host name of the domain."""
  host: String!

  """Inform if SSL is enabled."""
  sslEnabled: Boolean!

  """The absolute URL of the API."""
  url: String!
}

"""
Deletes draft orders. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type DraftOrderBulkDelete {
  """Returns how many objects were affected."""
  count: Int!
  errors: [OrderError!]!
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Completes creating an order. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type DraftOrderComplete {
  errors: [OrderError!]!

  """Completed order."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Creates a new draft order. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type DraftOrderCreate {
  errors: [OrderError!]!
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input DraftOrderCreateInput {
  """Billing address of the customer."""
  billingAddress: AddressInput

  """ID of the channel associated with the order."""
  channelId: ID

  """A note from a customer. Visible by customers in the order summary."""
  customerNote: String

  """Discount amount for the order."""
  discount: PositiveDecimal

  """
  External ID of this order.
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """Variant line input consisting of variant ID and quantity of products."""
  lines: [OrderLineCreateInput!]

  """
  URL of a view where users should be redirected to see the order details. URL in RFC 1808 format.
  """
  redirectUrl: String

  """Shipping address of the customer."""
  shippingAddress: AddressInput

  """ID of a selected shipping method."""
  shippingMethod: ID

  """Customer associated with the draft order."""
  user: ID

  """Email address of the customer."""
  userEmail: String

  """ID of the voucher associated with the order."""
  voucher: ID

  """
  A code of the voucher associated with the order.
  
  Added in Saleor 3.18.
  """
  voucherCode: String
}

"""
Event sent when new draft order is created.

Added in Saleor 3.2.
"""
type DraftOrderCreated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The order the event relates to."""
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Deletes a draft order. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type DraftOrderDelete {
  errors: [OrderError!]!
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when draft order is deleted.

Added in Saleor 3.2.
"""
type DraftOrderDeleted implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The order the event relates to."""
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

input DraftOrderInput {
  """Billing address of the customer."""
  billingAddress: AddressInput

  """ID of the channel associated with the order."""
  channelId: ID

  """A note from a customer. Visible by customers in the order summary."""
  customerNote: String

  """Discount amount for the order."""
  discount: PositiveDecimal

  """
  External ID of this order.
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """
  URL of a view where users should be redirected to see the order details. URL in RFC 1808 format.
  """
  redirectUrl: String

  """Shipping address of the customer."""
  shippingAddress: AddressInput

  """ID of a selected shipping method."""
  shippingMethod: ID

  """Customer associated with the draft order."""
  user: ID

  """Email address of the customer."""
  userEmail: String

  """ID of the voucher associated with the order."""
  voucher: ID

  """
  A code of the voucher associated with the order.
  
  Added in Saleor 3.18.
  """
  voucherCode: String
}

"""
Deletes order lines. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type DraftOrderLinesBulkDelete {
  """Returns how many objects were affected."""
  count: Int!
  errors: [OrderError!]!
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Updates a draft order. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type DraftOrderUpdate {
  errors: [OrderError!]!
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when draft order is updated.

Added in Saleor 3.2.
"""
type DraftOrderUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The order the event relates to."""
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

enum ErrorPolicyEnum {
  """
  Save what is possible within a single row. If there are errors in an input data row, try to save it partially and skip the invalid part.
  """
  IGNORE_FAILED

  """Reject all rows if there is at least one error in any of them."""
  REJECT_EVERYTHING

  """Reject rows with errors."""
  REJECT_FAILED_ROWS
}

interface Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""Event delivery."""
type EventDelivery implements Node {
  """Event delivery attempts."""
  attempts(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Event delivery sorter"""
    sortBy: EventDeliveryAttemptSortingInput
  ): EventDeliveryAttemptCountableConnection

  """Creation time of an event delivery."""
  createdAt: DateTime!

  """Webhook event type."""
  eventType: WebhookEventTypeEnum!

  """The ID of an event delivery."""
  id: ID!

  """Event payload."""
  payload: String

  """Event delivery status."""
  status: EventDeliveryStatusEnum!
}

"""Event delivery attempts."""
type EventDeliveryAttempt implements Node {
  """Event delivery creation date and time."""
  createdAt: DateTime!

  """Delivery attempt duration."""
  duration: Float

  """The ID of Event Delivery Attempt."""
  id: ID!

  """Request headers for delivery attempt."""
  requestHeaders: String

  """Delivery attempt response content."""
  response: String

  """Response headers for delivery attempt."""
  responseHeaders: String

  """Delivery attempt response status code."""
  responseStatusCode: Int

  """Event delivery status."""
  status: EventDeliveryStatusEnum!

  """Task id for delivery attempt."""
  taskId: String
}

type EventDeliveryAttemptCountableConnection {
  edges: [EventDeliveryAttemptCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type EventDeliveryAttemptCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: EventDeliveryAttempt!
}

enum EventDeliveryAttemptSortField {
  """Sort event delivery attempts by created at."""
  CREATED_AT
}

input EventDeliveryAttemptSortingInput {
  """Specifies the direction in which to sort attempts."""
  direction: OrderDirection!

  """Sort attempts by the selected field."""
  field: EventDeliveryAttemptSortField!
}

type EventDeliveryCountableConnection {
  edges: [EventDeliveryCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type EventDeliveryCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: EventDelivery!
}

input EventDeliveryFilterInput {
  eventType: WebhookEventTypeEnum
  status: EventDeliveryStatusEnum
}

"""
Retries event delivery. 

Requires one of the following permissions: MANAGE_APPS.
"""
type EventDeliveryRetry {
  """Event delivery."""
  delivery: EventDelivery
  errors: [WebhookError!]!
}

enum EventDeliverySortField {
  """Sort event deliveries by created at."""
  CREATED_AT
}

input EventDeliverySortingInput {
  """Specifies the direction in which to sort deliveries."""
  direction: OrderDirection!

  """Sort deliveries by the selected field."""
  field: EventDeliverySortField!
}

enum EventDeliveryStatusEnum {
  FAILED
  PENDING
  SUCCESS
}

type ExportError {
  """The error code."""
  code: ExportErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum ExportErrorCode {
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  REQUIRED
}

"""History log of export file."""
type ExportEvent implements Node {
  """
  App which performed the action. Requires one of the following permissions: OWNER, MANAGE_APPS.
  """
  app: App

  """Date when event happened at in ISO 8601 format."""
  date: DateTime!

  """The ID of the object."""
  id: ID!

  """Content of the event."""
  message: String!

  """Export event type."""
  type: ExportEventsEnum!

  """
  User who performed the action. Requires one of the following permissions: OWNER, MANAGE_STAFF.
  """
  user: User
}

enum ExportEventsEnum {
  EXPORTED_FILE_SENT
  EXPORT_DELETED
  EXPORT_FAILED
  EXPORT_FAILED_INFO_SENT
  EXPORT_PENDING
  EXPORT_SUCCESS
}

"""Represents a job data of exported file."""
type ExportFile implements Job & Node {
  """The app which requests file export."""
  app: App

  """Created date time of job in ISO 8601 format."""
  createdAt: DateTime!

  """List of events associated with the export."""
  events: [ExportEvent!]

  """The ID of the export file."""
  id: ID!

  """Job message."""
  message: String

  """Job status."""
  status: JobStatusEnum!

  """Date time of job last update in ISO 8601 format."""
  updatedAt: DateTime!

  """The URL of field to download."""
  url: String

  """The user who requests file export."""
  user: User
}

type ExportFileCountableConnection {
  edges: [ExportFileCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type ExportFileCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: ExportFile!
}

input ExportFileFilterInput {
  app: String
  createdAt: DateTimeRangeInput
  status: JobStatusEnum
  updatedAt: DateTimeRangeInput
  user: String
}

enum ExportFileSortField {
  CREATED_AT
  LAST_MODIFIED_AT
  STATUS
  UPDATED_AT
}

input ExportFileSortingInput {
  """Specifies the direction in which to sort export file."""
  direction: OrderDirection!

  """Sort export file by the selected field."""
  field: ExportFileSortField!
}

"""
Export gift cards to csv file.

Added in Saleor 3.1. 

Requires one of the following permissions: MANAGE_GIFT_CARD.

Triggers the following webhook events:
- NOTIFY_USER (async): A notification for the exported file.
- GIFT_CARD_EXPORT_COMPLETED (async): A notification for the exported file.
"""
type ExportGiftCards {
  errors: [ExportError!]!

  """
  The newly created export file job which is responsible for export data.
  """
  exportFile: ExportFile
}

input ExportGiftCardsInput {
  """Type of exported file."""
  fileType: FileTypesEnum!

  """Filtering options for gift cards."""
  filter: GiftCardFilterInput

  """List of gift cards IDs to export."""
  ids: [ID!]

  """Determine which gift cards should be exported."""
  scope: ExportScope!
}

input ExportInfoInput {
  """List of attribute ids witch should be exported."""
  attributes: [ID!]

  """List of channels ids which should be exported."""
  channels: [ID!]

  """List of product fields witch should be exported."""
  fields: [ProductFieldEnum!]

  """List of warehouse ids witch should be exported."""
  warehouses: [ID!]
}

"""
Export products to csv file. 

Requires one of the following permissions: MANAGE_PRODUCTS.

Triggers the following webhook events:
- NOTIFY_USER (async): A notification for the exported file.
- PRODUCT_EXPORT_COMPLETED (async): A notification for the exported file.
"""
type ExportProducts {
  errors: [ExportError!]!
  exportErrors: [ExportError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """
  The newly created export file job which is responsible for export data.
  """
  exportFile: ExportFile
}

input ExportProductsInput {
  """Input with info about fields which should be exported."""
  exportInfo: ExportInfoInput

  """Type of exported file."""
  fileType: FileTypesEnum!

  """Filtering options for products."""
  filter: ProductFilterInput

  """List of products IDs to export."""
  ids: [ID!]

  """Determine which products should be exported."""
  scope: ExportScope!
}

enum ExportScope {
  """Export all products."""
  ALL

  """Export the filtered products."""
  FILTER

  """Export products with given ids."""
  IDS
}

"""
Export voucher codes to csv/xlsx file.

Added in Saleor 3.18.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- VOUCHER_CODE_EXPORT_COMPLETED (async): A notification for the exported file.
"""
type ExportVoucherCodes {
  errors: [ExportError!]!

  """
  The newly created export file job which is responsible for export data.
  """
  exportFile: ExportFile
}

input ExportVoucherCodesInput {
  """Type of exported file."""
  fileType: FileTypesEnum!

  """List of voucher code IDs to export."""
  ids: [ID!]

  """
  The ID of the voucher. If provided, exports all codes belonging to the voucher.
  """
  voucherId: ID
}

"""External authentication plugin."""
type ExternalAuthentication {
  """ID of external authentication plugin."""
  id: String!

  """Name of external authentication plugin."""
  name: String
}

"""Prepare external authentication URL for user by custom plugin."""
type ExternalAuthenticationUrl {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """The data returned by authentication plugin."""
  authenticationData: JSONString
  errors: [AccountError!]!
}

"""Logout user by custom plugin."""
type ExternalLogout {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AccountError!]!

  """The data returned by authentication plugin."""
  logoutData: JSONString
}

type ExternalNotificationError {
  """The error code."""
  code: ExternalNotificationErrorCodes!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum ExternalNotificationErrorCodes {
  CHANNEL_INACTIVE
  INVALID_MODEL_TYPE
  NOT_FOUND
  REQUIRED
}

"""
Trigger sending a notification with the notify plugin method. Serializes nodes provided as ids parameter and includes this data in the notification payload.

Added in Saleor 3.1.
"""
type ExternalNotificationTrigger {
  errors: [ExternalNotificationError!]!
}

input ExternalNotificationTriggerInput {
  """
  External event type. This field is passed to a plugin as an event type.
  """
  externalEventType: String!

  """
  Additional payload that will be merged with the one based on the business object ID.
  """
  extraPayload: JSONString

  """
  The list of customers or orders node IDs that will be serialized and included in the notification payload.
  """
  ids: [ID!]!
}

"""Obtain external access tokens for user by custom plugin."""
type ExternalObtainAccessTokens {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """CSRF token required to re-generate external access token."""
  csrfToken: String
  errors: [AccountError!]!

  """The refresh token, required to re-generate external access token."""
  refreshToken: String

  """The token, required to authenticate."""
  token: String

  """A user instance."""
  user: User
}

"""Refresh user's access by custom plugin."""
type ExternalRefresh {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """CSRF token required to re-generate external access token."""
  csrfToken: String
  errors: [AccountError!]!

  """The refresh token, required to re-generate external access token."""
  refreshToken: String

  """The token, required to authenticate."""
  token: String

  """A user instance."""
  user: User
}

"""Verify external authentication data by plugin."""
type ExternalVerify {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AccountError!]!

  """Determine if authentication data is valid or not."""
  isValid: Boolean!

  """User assigned to data."""
  user: User

  """External data."""
  verifyData: JSONString
}

type File {
  """Content type of the file."""
  contentType: String

  """The URL of the file."""
  url: String!
}

enum FileTypesEnum {
  CSV
  XLSX
}

"""
Upload a file. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec 

Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER.
"""
type FileUpload {
  errors: [UploadError!]!
  uploadErrors: [UploadError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  uploadedFile: File
}

"""Represents order fulfillment."""
type Fulfillment implements Node & ObjectWithMetadata {
  """Date and time when fulfillment was created."""
  created: DateTime!

  """Sequence in which the fulfillments were created for an order."""
  fulfillmentOrder: Int!

  """ID of the fulfillment."""
  id: ID!

  """List of lines for the fulfillment."""
  lines: [FulfillmentLine!]

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """
  Amount of refunded shipping price.
  
  Added in Saleor 3.14.
  """
  shippingRefundedAmount: Money

  """Status of fulfillment."""
  status: FulfillmentStatus!

  """User-friendly fulfillment status."""
  statusDisplay: String

  """
  Total refunded amount assigned to this fulfillment.
  
  Added in Saleor 3.14.
  """
  totalRefundedAmount: Money

  """Fulfillment tracking number."""
  trackingNumber: String!

  """Warehouse from fulfillment was fulfilled."""
  warehouse: Warehouse
}

"""
Approve existing fulfillment.

Added in Saleor 3.1. 

Requires one of the following permissions: MANAGE_ORDERS.

Triggers the following webhook events:
- FULFILLMENT_APPROVED (async): Fulfillment is approved.
"""
type FulfillmentApprove {
  errors: [OrderError!]!

  """An approved fulfillment."""
  fulfillment: Fulfillment

  """Order which fulfillment was approved."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when fulfillment is approved.

Added in Saleor 3.7.
"""
type FulfillmentApproved implements Event {
  """The fulfillment the event relates to."""
  fulfillment: Fulfillment

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """
  If true, send a notification to the customer.
  
  Added in Saleor 3.16.
  """
  notifyCustomer: Boolean!

  """The order the fulfillment belongs to."""
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Cancels existing fulfillment and optionally restocks items. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type FulfillmentCancel {
  errors: [OrderError!]!

  """A canceled fulfillment."""
  fulfillment: Fulfillment

  """Order which fulfillment was cancelled."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input FulfillmentCancelInput {
  """
  ID of a warehouse where items will be restocked. Optional when fulfillment is in WAITING_FOR_APPROVAL state.
  """
  warehouseId: ID
}

"""
Event sent when fulfillment is canceled.

Added in Saleor 3.4.
"""
type FulfillmentCanceled implements Event {
  """The fulfillment the event relates to."""
  fulfillment: Fulfillment

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The order the fulfillment belongs to."""
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Event sent when new fulfillment is created.

Added in Saleor 3.4.
"""
type FulfillmentCreated implements Event {
  """The fulfillment the event relates to."""
  fulfillment: Fulfillment

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """
  If true, the app should send a notification to the customer.
  
  Added in Saleor 3.16.
  """
  notifyCustomer: Boolean!

  """The order the fulfillment belongs to."""
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""Represents line of the fulfillment."""
type FulfillmentLine implements Node {
  """ID of the fulfillment line."""
  id: ID!

  """The order line to which the fulfillment line is related."""
  orderLine: OrderLine

  """The number of items included in the fulfillment line."""
  quantity: Int!
}

"""
Event sent when fulfillment metadata is updated.

Added in Saleor 3.8.
"""
type FulfillmentMetadataUpdated implements Event {
  """The fulfillment the event relates to."""
  fulfillment: Fulfillment

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The order the fulfillment belongs to."""
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Refund products. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type FulfillmentRefundProducts {
  errors: [OrderError!]!

  """A refunded fulfillment."""
  fulfillment: Fulfillment

  """Order which fulfillment was refunded."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Return products. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type FulfillmentReturnProducts {
  errors: [OrderError!]!

  """Order which fulfillment was returned."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """A replace fulfillment."""
  replaceFulfillment: Fulfillment

  """A draft order which was created for products with replace flag."""
  replaceOrder: Order

  """A return fulfillment."""
  returnFulfillment: Fulfillment
}

enum FulfillmentStatus {
  CANCELED
  FULFILLED
  REFUNDED
  REFUNDED_AND_RETURNED
  REPLACED
  RETURNED
  WAITING_FOR_APPROVAL
}

"""
Event sent when the tracking number is updated.

Added in Saleor 3.16.
"""
type FulfillmentTrackingNumberUpdated implements Event {
  """The fulfillment the event relates to."""
  fulfillment: Fulfillment

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The order the fulfillment belongs to."""
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Updates a fulfillment for an order. 

Requires one of the following permissions: MANAGE_ORDERS.

Triggers the following webhook events:
- FULFILLMENT_TRACKING_NUMBER_UPDATED (async): Fulfillment tracking number is updated.
"""
type FulfillmentUpdateTracking {
  errors: [OrderError!]!

  """A fulfillment with updated tracking."""
  fulfillment: Fulfillment

  """Order for which fulfillment was updated."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input FulfillmentUpdateTrackingInput {
  """If true, send an email notification to the customer."""
  notifyCustomer: Boolean = false

  """Fulfillment tracking number."""
  trackingNumber: String
}

"""Payment gateway client configuration key and value pair."""
type GatewayConfigLine {
  """Gateway config key."""
  field: String!

  """Gateway config value for key."""
  value: String
}

"""
The `GenericScalar` scalar type represents a generic
GraphQL scalar value that could be:
String, Boolean, Int, Float, List or Object.
"""
scalar GenericScalar

"""
A gift card is a prepaid electronic payment card accepted in stores. They can be used during checkout by providing a valid gift card codes.
"""
type GiftCard implements Node & ObjectWithMetadata {
  """
  App which created the gift card.
  
  Added in Saleor 3.1.
  
  Requires one of the following permissions: MANAGE_APPS, OWNER.
  """
  app: App

  """
  Slug of the channel where the gift card was bought.
  
  Added in Saleor 3.1.
  """
  boughtInChannel: String

  """
  Gift card code. It can be fetched both by a staff member with 'MANAGE_GIFT_CARD' when gift card hasn't been used yet or a user who bought or issued the gift card.
  
  Requires one of the following permissions: MANAGE_GIFT_CARD, OWNER.
  """
  code: String!

  """Date and time when gift card was created."""
  created: DateTime!

  """
  The user who bought or issued a gift card.
  
  Added in Saleor 3.1.
  """
  createdBy: User

  """
  Email address of the user who bought or issued gift card.
  
  Added in Saleor 3.1.
  
  Requires one of the following permissions: MANAGE_USERS, OWNER.
  """
  createdByEmail: String
  currentBalance: Money!

  """Code in format which allows displaying in a user interface."""
  displayCode: String!

  """End date of gift card."""
  endDate: DateTime @deprecated(reason: "This field will be removed in Saleor 4.0. Use `expiryDate` field instead.")

  """
  List of events associated with the gift card.
  
  Added in Saleor 3.1.
  
  Requires one of the following permissions: MANAGE_GIFT_CARD.
  """
  events(
    """Filtering options for gift card events."""
    filter: GiftCardEventFilterInput
  ): [GiftCardEvent!]!

  """Expiry date of the gift card."""
  expiryDate: Date

  """ID of the gift card."""
  id: ID!
  initialBalance: Money!
  isActive: Boolean!

  """Last 4 characters of gift card code."""
  last4CodeChars: String!

  """Date and time when gift card was last used."""
  lastUsedOn: DateTime

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """
  Related gift card product.
  
  Added in Saleor 3.1.
  """
  product: Product

  """Start date of gift card."""
  startDate: DateTime @deprecated(reason: "This field will be removed in Saleor 4.0.")

  """
  The gift card tag.
  
  Added in Saleor 3.1.
  
  Requires one of the following permissions: MANAGE_GIFT_CARD.
  """
  tags: [GiftCardTag!]!

  """
  The customer who used a gift card.
  
  Added in Saleor 3.1.
  """
  usedBy: User @deprecated(reason: "This field will be removed in Saleor 4.0.")

  """
  Email address of the customer who used a gift card.
  
  Added in Saleor 3.1.
  """
  usedByEmail: String @deprecated(reason: "This field will be removed in Saleor 4.0.")

  """The customer who bought a gift card."""
  user: User @deprecated(reason: "This field will be removed in Saleor 4.0. Use `createdBy` field instead.")
}

"""
Activate a gift card. 

Requires one of the following permissions: MANAGE_GIFT_CARD.

Triggers the following webhook events:
- GIFT_CARD_STATUS_CHANGED (async): A gift card was activated.
"""
type GiftCardActivate {
  errors: [GiftCardError!]!

  """Activated gift card."""
  giftCard: GiftCard
  giftCardErrors: [GiftCardError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Adds note to the gift card.

Added in Saleor 3.1. 

Requires one of the following permissions: MANAGE_GIFT_CARD.

Triggers the following webhook events:
- GIFT_CARD_UPDATED (async): A gift card was updated.
"""
type GiftCardAddNote {
  errors: [GiftCardError!]!

  """Gift card note created."""
  event: GiftCardEvent

  """Gift card with the note added."""
  giftCard: GiftCard
}

input GiftCardAddNoteInput {
  """Note message."""
  message: String!
}

"""
Activate gift cards.

Added in Saleor 3.1. 

Requires one of the following permissions: MANAGE_GIFT_CARD.

Triggers the following webhook events:
- GIFT_CARD_STATUS_CHANGED (async): A gift card was activated.
"""
type GiftCardBulkActivate {
  """Returns how many objects were affected."""
  count: Int!
  errors: [GiftCardError!]!
}

"""
Create gift cards.

Added in Saleor 3.1. 

Requires one of the following permissions: MANAGE_GIFT_CARD.

Triggers the following webhook events:
- GIFT_CARD_CREATED (async): A gift card was created.
- NOTIFY_USER (async): A notification for created gift card.
"""
type GiftCardBulkCreate {
  """Returns how many objects were created."""
  count: Int!
  errors: [GiftCardError!]!

  """List of created gift cards."""
  giftCards: [GiftCard!]!
}

input GiftCardBulkCreateInput {
  """Balance of the gift card."""
  balance: PriceInput!

  """The number of cards to issue."""
  count: Int!

  """The gift card expiry date."""
  expiryDate: Date

  """Determine if gift card is active."""
  isActive: Boolean!

  """The gift card tags."""
  tags: [String!]
}

"""
Deactivate gift cards.

Added in Saleor 3.1. 

Requires one of the following permissions: MANAGE_GIFT_CARD.

Triggers the following webhook events:
- GIFT_CARD_STATUS_CHANGED (async): A gift card was deactivated.
"""
type GiftCardBulkDeactivate {
  """Returns how many objects were affected."""
  count: Int!
  errors: [GiftCardError!]!
}

"""
Delete gift cards.

Added in Saleor 3.1. 

Requires one of the following permissions: MANAGE_GIFT_CARD.

Triggers the following webhook events:
- GIFT_CARD_DELETED (async): A gift card was deleted.
"""
type GiftCardBulkDelete {
  """Returns how many objects were affected."""
  count: Int!
  errors: [GiftCardError!]!
}

type GiftCardCountableConnection {
  edges: [GiftCardCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type GiftCardCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: GiftCard!
}

"""
Creates a new gift card. 

Requires one of the following permissions: MANAGE_GIFT_CARD.

Triggers the following webhook events:
- GIFT_CARD_CREATED (async): A gift card was created.
- NOTIFY_USER (async): A notification for created gift card.
"""
type GiftCardCreate {
  errors: [GiftCardError!]!
  giftCard: GiftCard
  giftCardErrors: [GiftCardError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input GiftCardCreateInput {
  """
  The gift card tags to add.
  
  Added in Saleor 3.1.
  """
  addTags: [String!]

  """Balance of the gift card."""
  balance: PriceInput!

  """
  Slug of a channel from which the email should be sent.
  
  Added in Saleor 3.1.
  """
  channel: String

  """
  Code to use the gift card. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. The code is now auto generated.
  """
  code: String

  """
  End date of the gift card in ISO 8601 format. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use `expiryDate` from `expirySettings` instead.
  """
  endDate: Date

  """
  The gift card expiry date.
  
  Added in Saleor 3.1.
  """
  expiryDate: Date

  """
  Determine if gift card is active.
  
  Added in Saleor 3.1.
  """
  isActive: Boolean!

  """
  The gift card note from the staff member.
  
  Added in Saleor 3.1.
  """
  note: String

  """
  Start date of the gift card in ISO 8601 format. 
  
  DEPRECATED: this field will be removed in Saleor 4.0.
  """
  startDate: Date

  """Email of the customer to whom gift card will be sent."""
  userEmail: String
}

"""
Event sent when new gift card is created.

Added in Saleor 3.2.
"""
type GiftCardCreated implements Event {
  """The gift card the event relates to."""
  giftCard: GiftCard

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Deactivate a gift card. 

Requires one of the following permissions: MANAGE_GIFT_CARD.

Triggers the following webhook events:
- GIFT_CARD_STATUS_CHANGED (async): A gift card was deactivated.
"""
type GiftCardDeactivate {
  errors: [GiftCardError!]!

  """Deactivated gift card."""
  giftCard: GiftCard
  giftCardErrors: [GiftCardError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Delete gift card.

Added in Saleor 3.1. 

Requires one of the following permissions: MANAGE_GIFT_CARD.

Triggers the following webhook events:
- GIFT_CARD_DELETED (async): A gift card was deleted.
"""
type GiftCardDelete {
  errors: [GiftCardError!]!
  giftCard: GiftCard
  giftCardErrors: [GiftCardError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when gift card is deleted.

Added in Saleor 3.2.
"""
type GiftCardDeleted implements Event {
  """The gift card the event relates to."""
  giftCard: GiftCard

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

type GiftCardError {
  """The error code."""
  code: GiftCardErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String

  """List of tag values that cause the error."""
  tags: [String!]
}

enum GiftCardErrorCode {
  ALREADY_EXISTS
  DUPLICATED_INPUT_ITEM
  EXPIRED_GIFT_CARD
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  REQUIRED
  UNIQUE
}

"""
History log of the gift card.

Added in Saleor 3.1.
"""
type GiftCardEvent implements Node {
  """
  App that performed the action. Requires one of the following permissions: MANAGE_APPS, OWNER.
  """
  app: App

  """The gift card balance."""
  balance: GiftCardEventBalance

  """Date when event happened at in ISO 8601 format."""
  date: DateTime

  """Email of the customer."""
  email: String

  """The gift card expiry date."""
  expiryDate: Date

  """ID of the event associated with a gift card."""
  id: ID!

  """Content of the event."""
  message: String

  """Previous gift card expiry date."""
  oldExpiryDate: Date

  """The list of old gift card tags."""
  oldTags: [String!]

  """The order ID where gift card was used or bought."""
  orderId: ID

  """User-friendly number of an order where gift card was used or bought."""
  orderNumber: String

  """The list of gift card tags."""
  tags: [String!]

  """Gift card event type."""
  type: GiftCardEventsEnum

  """
  User who performed the action. Requires one of the following permissions: MANAGE_USERS, MANAGE_STAFF, OWNER.
  """
  user: User
}

type GiftCardEventBalance {
  """Current balance of the gift card."""
  currentBalance: Money!

  """Initial balance of the gift card."""
  initialBalance: Money

  """Previous current balance of the gift card."""
  oldCurrentBalance: Money

  """Previous initial balance of the gift card."""
  oldInitialBalance: Money
}

input GiftCardEventFilterInput {
  orders: [ID!]
  type: GiftCardEventsEnum
}

enum GiftCardEventsEnum {
  ACTIVATED
  BALANCE_RESET
  BOUGHT
  DEACTIVATED
  EXPIRY_DATE_UPDATED
  ISSUED
  NOTE_ADDED
  RESENT
  SENT_TO_CUSTOMER
  TAGS_UPDATED
  UPDATED
  USED_IN_ORDER
}

"""
Event sent when gift card export is completed.

Added in Saleor 3.16.
"""
type GiftCardExportCompleted implements Event {
  """The export file for gift cards."""
  export: ExportFile

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

input GiftCardFilterInput {
  code: String
  createdByEmail: String
  currency: String
  currentBalance: PriceRangeInput
  initialBalance: PriceRangeInput
  isActive: Boolean
  metadata: [MetadataFilter!]
  products: [ID!]
  tags: [String!]
  used: Boolean
  usedBy: [ID!]
}

"""
Event sent when gift card metadata is updated.

Added in Saleor 3.8.
"""
type GiftCardMetadataUpdated implements Event {
  """The gift card the event relates to."""
  giftCard: GiftCard

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Resend a gift card.

Added in Saleor 3.1. 

Requires one of the following permissions: MANAGE_GIFT_CARD.

Triggers the following webhook events:
- NOTIFY_USER (async): A notification for gift card resend.
"""
type GiftCardResend {
  errors: [GiftCardError!]!

  """Gift card which has been sent."""
  giftCard: GiftCard
}

input GiftCardResendInput {
  """Slug of a channel from which the email should be sent."""
  channel: String!

  """Email to which gift card should be send."""
  email: String

  """ID of a gift card to resend."""
  id: ID!
}

"""
Event sent when gift card is e-mailed.

Added in Saleor 3.13.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type GiftCardSent implements Event {
  """Slug of a channel for which this gift card email was sent."""
  channel: String

  """The gift card the event relates to."""
  giftCard: GiftCard

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """E-mail address to which gift card was sent."""
  sentToEmail: String

  """Saleor version that triggered the event."""
  version: String
}

"""Gift card related settings from site settings."""
type GiftCardSettings {
  """The gift card expiry period settings."""
  expiryPeriod: TimePeriod

  """The gift card expiry type settings."""
  expiryType: GiftCardSettingsExpiryTypeEnum!
}

type GiftCardSettingsError {
  """The error code."""
  code: GiftCardSettingsErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum GiftCardSettingsErrorCode {
  GRAPHQL_ERROR
  INVALID
  REQUIRED
}

enum GiftCardSettingsExpiryTypeEnum {
  EXPIRY_PERIOD
  NEVER_EXPIRE
}

"""
Update gift card settings. 

Requires one of the following permissions: MANAGE_GIFT_CARD.
"""
type GiftCardSettingsUpdate {
  errors: [GiftCardSettingsError!]!

  """Gift card settings."""
  giftCardSettings: GiftCardSettings
}

input GiftCardSettingsUpdateInput {
  """Defines gift card expiry period."""
  expiryPeriod: TimePeriodInputType

  """Defines gift card default expiry settings."""
  expiryType: GiftCardSettingsExpiryTypeEnum
}

enum GiftCardSortField {
  """
  Sort gift cards by created at.
  
  Added in Saleor 3.8.
  """
  CREATED_AT

  """Sort gift cards by current balance."""
  CURRENT_BALANCE

  """Sort gift cards by product."""
  PRODUCT

  """Sort gift cards by used by."""
  USED_BY
}

input GiftCardSortingInput {
  """Specifies the direction in which to sort gift cards."""
  direction: OrderDirection!

  """Sort gift cards by the selected field."""
  field: GiftCardSortField!
}

"""
Event sent when gift card status has changed.

Added in Saleor 3.2.
"""
type GiftCardStatusChanged implements Event {
  """The gift card the event relates to."""
  giftCard: GiftCard

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
The gift card tag.

Added in Saleor 3.1.
"""
type GiftCardTag implements Node {
  """ID of the tag associated with a gift card."""
  id: ID!

  """Name of the tag associated with a gift card."""
  name: String!
}

type GiftCardTagCountableConnection {
  edges: [GiftCardTagCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type GiftCardTagCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: GiftCardTag!
}

input GiftCardTagFilterInput {
  search: String
}

"""
Update a gift card. 

Requires one of the following permissions: MANAGE_GIFT_CARD.

Triggers the following webhook events:
- GIFT_CARD_UPDATED (async): A gift card was updated.
"""
type GiftCardUpdate {
  errors: [GiftCardError!]!
  giftCard: GiftCard
  giftCardErrors: [GiftCardError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input GiftCardUpdateInput {
  """
  The gift card tags to add.
  
  Added in Saleor 3.1.
  """
  addTags: [String!]

  """
  The gift card balance amount.
  
  Added in Saleor 3.1.
  """
  balanceAmount: PositiveDecimal

  """
  End date of the gift card in ISO 8601 format. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use `expiryDate` from `expirySettings` instead.
  """
  endDate: Date

  """
  The gift card expiry date.
  
  Added in Saleor 3.1.
  """
  expiryDate: Date

  """
  The gift card tags to remove.
  
  Added in Saleor 3.1.
  """
  removeTags: [String!]

  """
  Start date of the gift card in ISO 8601 format. 
  
  DEPRECATED: this field will be removed in Saleor 4.0.
  """
  startDate: Date
}

"""
Event sent when gift card is updated.

Added in Saleor 3.2.
"""
type GiftCardUpdated implements Event {
  """The gift card the event relates to."""
  giftCard: GiftCard

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Define the filtering options for foreign key fields.

Added in Saleor 3.14.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
input GlobalIDFilterInput {
  """The value equal to."""
  eq: ID

  """The value included in."""
  oneOf: [ID!]
}

"""Represents permission group data."""
type Group implements Node {
  """
  List of channels the group has access to.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  accessibleChannels: [Channel!]

  """The ID of the group."""
  id: ID!

  """The name of the group."""
  name: String!

  """List of group permissions"""
  permissions: [Permission!]

  """
  Determine if the group have restricted access to channels.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  restrictedAccessToChannels: Boolean!

  """
  True, if the currently authenticated user has rights to manage a group.
  """
  userCanManage: Boolean!

  """
  List of group users
  
  Requires one of the following permissions: MANAGE_STAFF.
  """
  users: [User!]
}

type GroupCountableConnection {
  edges: [GroupCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type GroupCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: Group!
}

"""Thumbnail formats for icon images."""
enum IconThumbnailFormatEnum {
  ORIGINAL
  WEBP
}

"""Represents an image."""
type Image {
  """Alt text for an image."""
  alt: String

  """The URL of the image."""
  url: String!
}

input IntRangeInput {
  """Value greater than or equal to."""
  gte: Int

  """Value less than or equal to."""
  lte: Int
}

"""Represents an Invoice."""
type Invoice implements Job & Node & ObjectWithMetadata {
  """Date and time at which invoice was created."""
  createdAt: DateTime!

  """URL to view an invoice."""
  externalUrl: String @deprecated(reason: "This field will be removed in Saleor 4.0. Use `url` field.This field will be removed in 4.0")

  """The ID of the object."""
  id: ID!

  """Message associated with an invoice."""
  message: String

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """Invoice number."""
  number: String

  """
  Order related to the invoice.
  
  Added in Saleor 3.10.
  """
  order: Order

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """Job status."""
  status: JobStatusEnum!

  """Date and time at which invoice was updated."""
  updatedAt: DateTime!

  """
  URL to view/download an invoice. This can be an internal URL if the Invoicing Plugin was used or an external URL if it has been provided.
  """
  url: String
}

"""
Creates a ready to send invoice. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type InvoiceCreate {
  errors: [InvoiceError!]!
  invoice: Invoice
  invoiceErrors: [InvoiceError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input InvoiceCreateInput {
  """
  Fields required to update the invoice metadata.
  
  Added in Saleor 3.14.
  """
  metadata: [MetadataInput!]

  """Invoice number."""
  number: String!

  """
  Fields required to update the invoice private metadata.
  
  Added in Saleor 3.14.
  """
  privateMetadata: [MetadataInput!]

  """URL of an invoice to download."""
  url: String!
}

"""
Deletes an invoice. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type InvoiceDelete {
  errors: [InvoiceError!]!
  invoice: Invoice
  invoiceErrors: [InvoiceError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when invoice is deleted.

Added in Saleor 3.2.
"""
type InvoiceDeleted implements Event {
  """The invoice the event relates to."""
  invoice: Invoice

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """
  Order related to the invoice.
  
  Added in Saleor 3.10.
  """
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

type InvoiceError {
  """The error code."""
  code: InvoiceErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum InvoiceErrorCode {
  EMAIL_NOT_SET
  INVALID_STATUS
  NOT_FOUND
  NOT_READY
  NO_INVOICE_PLUGIN
  NUMBER_NOT_SET
  REQUIRED
  URL_NOT_SET
}

"""
Request an invoice for the order using plugin. 

Requires one of the following permissions: MANAGE_ORDERS.

Triggers the following webhook events:
- INVOICE_REQUESTED (async): An invoice was requested.
"""
type InvoiceRequest {
  errors: [InvoiceError!]!
  invoice: Invoice
  invoiceErrors: [InvoiceError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """Order related to an invoice."""
  order: Order
}

"""
Requests deletion of an invoice. 

Requires one of the following permissions: MANAGE_ORDERS.

Triggers the following webhook events:
- INVOICE_DELETED (async): An invoice was requested to delete.
"""
type InvoiceRequestDelete {
  errors: [InvoiceError!]!
  invoice: Invoice
  invoiceErrors: [InvoiceError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when invoice is requested.

Added in Saleor 3.2.
"""
type InvoiceRequested implements Event {
  """The invoice the event relates to."""
  invoice: Invoice

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """
  Order related to the invoice.
  
  Added in Saleor 3.10.
  """
  order: Order!

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Send an invoice notification to the customer. 

Requires one of the following permissions: MANAGE_ORDERS.

Triggers the following webhook events:
- INVOICE_SENT (async): A notification for invoice send
- NOTIFY_USER (async): A notification for invoice send
"""
type InvoiceSendNotification {
  errors: [InvoiceError!]!
  invoice: Invoice
  invoiceErrors: [InvoiceError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when invoice is sent.

Added in Saleor 3.2.
"""
type InvoiceSent implements Event {
  """The invoice the event relates to."""
  invoice: Invoice

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """
  Order related to the invoice.
  
  Added in Saleor 3.10.
  """
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Updates an invoice. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type InvoiceUpdate {
  errors: [InvoiceError!]!
  invoice: Invoice
  invoiceErrors: [InvoiceError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

union IssuingPrincipal = App | User

scalar JSON

scalar JSONString

interface Job {
  """Created date time of job in ISO 8601 format."""
  createdAt: DateTime!

  """Job message."""
  message: String

  """Job status."""
  status: JobStatusEnum!

  """Date time of job last update in ISO 8601 format."""
  updatedAt: DateTime!
}

enum JobStatusEnum {
  DELETED
  FAILED
  PENDING
  SUCCESS
}

enum LanguageCodeEnum {
  AF
  AF_NA
  AF_ZA
  AGQ
  AGQ_CM
  AK
  AK_GH
  AM
  AM_ET
  AR
  AR_AE
  AR_BH
  AR_DJ
  AR_DZ
  AR_EG
  AR_EH
  AR_ER
  AR_IL
  AR_IQ
  AR_JO
  AR_KM
  AR_KW
  AR_LB
  AR_LY
  AR_MA
  AR_MR
  AR_OM
  AR_PS
  AR_QA
  AR_SA
  AR_SD
  AR_SO
  AR_SS
  AR_SY
  AR_TD
  AR_TN
  AR_YE
  AS
  ASA
  ASA_TZ
  AST
  AST_ES
  AS_IN
  AZ
  AZ_CYRL
  AZ_CYRL_AZ
  AZ_LATN
  AZ_LATN_AZ
  BAS
  BAS_CM
  BE
  BEM
  BEM_ZM
  BEZ
  BEZ_TZ
  BE_BY
  BG
  BG_BG
  BM
  BM_ML
  BN
  BN_BD
  BN_IN
  BO
  BO_CN
  BO_IN
  BR
  BRX
  BRX_IN
  BR_FR
  BS
  BS_CYRL
  BS_CYRL_BA
  BS_LATN
  BS_LATN_BA
  CA
  CA_AD
  CA_ES
  CA_ES_VALENCIA
  CA_FR
  CA_IT
  CCP
  CCP_BD
  CCP_IN
  CE
  CEB
  CEB_PH
  CE_RU
  CGG
  CGG_UG
  CHR
  CHR_US
  CKB
  CKB_IQ
  CKB_IR
  CS
  CS_CZ
  CU
  CU_RU
  CY
  CY_GB
  DA
  DAV
  DAV_KE
  DA_DK
  DA_GL
  DE
  DE_AT
  DE_BE
  DE_CH
  DE_DE
  DE_IT
  DE_LI
  DE_LU
  DJE
  DJE_NE
  DSB
  DSB_DE
  DUA
  DUA_CM
  DYO
  DYO_SN
  DZ
  DZ_BT
  EBU
  EBU_KE
  EE
  EE_GH
  EE_TG
  EL
  EL_CY
  EL_GR
  EN
  EN_AE
  EN_AG
  EN_AI
  EN_AS
  EN_AT
  EN_AU
  EN_BB
  EN_BE
  EN_BI
  EN_BM
  EN_BS
  EN_BW
  EN_BZ
  EN_CA
  EN_CC
  EN_CH
  EN_CK
  EN_CM
  EN_CX
  EN_CY
  EN_DE
  EN_DG
  EN_DK
  EN_DM
  EN_ER
  EN_FI
  EN_FJ
  EN_FK
  EN_FM
  EN_GB
  EN_GD
  EN_GG
  EN_GH
  EN_GI
  EN_GM
  EN_GU
  EN_GY
  EN_HK
  EN_IE
  EN_IL
  EN_IM
  EN_IN
  EN_IO
  EN_JE
  EN_JM
  EN_KE
  EN_KI
  EN_KN
  EN_KY
  EN_LC
  EN_LR
  EN_LS
  EN_MG
  EN_MH
  EN_MO
  EN_MP
  EN_MS
  EN_MT
  EN_MU
  EN_MW
  EN_MY
  EN_NA
  EN_NF
  EN_NG
  EN_NL
  EN_NR
  EN_NU
  EN_NZ
  EN_PG
  EN_PH
  EN_PK
  EN_PN
  EN_PR
  EN_PW
  EN_RW
  EN_SB
  EN_SC
  EN_SD
  EN_SE
  EN_SG
  EN_SH
  EN_SI
  EN_SL
  EN_SS
  EN_SX
  EN_SZ
  EN_TC
  EN_TK
  EN_TO
  EN_TT
  EN_TV
  EN_TZ
  EN_UG
  EN_UM
  EN_US
  EN_VC
  EN_VG
  EN_VI
  EN_VU
  EN_WS
  EN_ZA
  EN_ZM
  EN_ZW
  EO
  ES
  ES_AR
  ES_BO
  ES_BR
  ES_BZ
  ES_CL
  ES_CO
  ES_CR
  ES_CU
  ES_DO
  ES_EA
  ES_EC
  ES_ES
  ES_GQ
  ES_GT
  ES_HN
  ES_IC
  ES_MX
  ES_NI
  ES_PA
  ES_PE
  ES_PH
  ES_PR
  ES_PY
  ES_SV
  ES_US
  ES_UY
  ES_VE
  ET
  ET_EE
  EU
  EU_ES
  EWO
  EWO_CM
  FA
  FA_AF
  FA_IR
  FF
  FF_ADLM
  FF_ADLM_BF
  FF_ADLM_CM
  FF_ADLM_GH
  FF_ADLM_GM
  FF_ADLM_GN
  FF_ADLM_GW
  FF_ADLM_LR
  FF_ADLM_MR
  FF_ADLM_NE
  FF_ADLM_NG
  FF_ADLM_SL
  FF_ADLM_SN
  FF_LATN
  FF_LATN_BF
  FF_LATN_CM
  FF_LATN_GH
  FF_LATN_GM
  FF_LATN_GN
  FF_LATN_GW
  FF_LATN_LR
  FF_LATN_MR
  FF_LATN_NE
  FF_LATN_NG
  FF_LATN_SL
  FF_LATN_SN
  FI
  FIL
  FIL_PH
  FI_FI
  FO
  FO_DK
  FO_FO
  FR
  FR_BE
  FR_BF
  FR_BI
  FR_BJ
  FR_BL
  FR_CA
  FR_CD
  FR_CF
  FR_CG
  FR_CH
  FR_CI
  FR_CM
  FR_DJ
  FR_DZ
  FR_FR
  FR_GA
  FR_GF
  FR_GN
  FR_GP
  FR_GQ
  FR_HT
  FR_KM
  FR_LU
  FR_MA
  FR_MC
  FR_MF
  FR_MG
  FR_ML
  FR_MQ
  FR_MR
  FR_MU
  FR_NC
  FR_NE
  FR_PF
  FR_PM
  FR_RE
  FR_RW
  FR_SC
  FR_SN
  FR_SY
  FR_TD
  FR_TG
  FR_TN
  FR_VU
  FR_WF
  FR_YT
  FUR
  FUR_IT
  FY
  FY_NL
  GA
  GA_GB
  GA_IE
  GD
  GD_GB
  GL
  GL_ES
  GSW
  GSW_CH
  GSW_FR
  GSW_LI
  GU
  GUZ
  GUZ_KE
  GU_IN
  GV
  GV_IM
  HA
  HAW
  HAW_US
  HA_GH
  HA_NE
  HA_NG
  HE
  HE_IL
  HI
  HI_IN
  HR
  HR_BA
  HR_HR
  HSB
  HSB_DE
  HU
  HU_HU
  HY
  HY_AM
  IA
  ID
  ID_ID
  IG
  IG_NG
  II
  II_CN
  IS
  IS_IS
  IT
  IT_CH
  IT_IT
  IT_SM
  IT_VA
  JA
  JA_JP
  JGO
  JGO_CM
  JMC
  JMC_TZ
  JV
  JV_ID
  KA
  KAB
  KAB_DZ
  KAM
  KAM_KE
  KA_GE
  KDE
  KDE_TZ
  KEA
  KEA_CV
  KHQ
  KHQ_ML
  KI
  KI_KE
  KK
  KKJ
  KKJ_CM
  KK_KZ
  KL
  KLN
  KLN_KE
  KL_GL
  KM
  KM_KH
  KN
  KN_IN
  KO
  KOK
  KOK_IN
  KO_KP
  KO_KR
  KS
  KSB
  KSB_TZ
  KSF
  KSF_CM
  KSH
  KSH_DE
  KS_ARAB
  KS_ARAB_IN
  KU
  KU_TR
  KW
  KW_GB
  KY
  KY_KG
  LAG
  LAG_TZ
  LB
  LB_LU
  LG
  LG_UG
  LKT
  LKT_US
  LN
  LN_AO
  LN_CD
  LN_CF
  LN_CG
  LO
  LO_LA
  LRC
  LRC_IQ
  LRC_IR
  LT
  LT_LT
  LU
  LUO
  LUO_KE
  LUY
  LUY_KE
  LU_CD
  LV
  LV_LV
  MAI
  MAI_IN
  MAS
  MAS_KE
  MAS_TZ
  MER
  MER_KE
  MFE
  MFE_MU
  MG
  MGH
  MGH_MZ
  MGO
  MGO_CM
  MG_MG
  MI
  MI_NZ
  MK
  MK_MK
  ML
  ML_IN
  MN
  MNI
  MNI_BENG
  MNI_BENG_IN
  MN_MN
  MR
  MR_IN
  MS
  MS_BN
  MS_ID
  MS_MY
  MS_SG
  MT
  MT_MT
  MUA
  MUA_CM
  MY
  MY_MM
  MZN
  MZN_IR
  NAQ
  NAQ_NA
  NB
  NB_NO
  NB_SJ
  ND
  NDS
  NDS_DE
  NDS_NL
  ND_ZW
  NE
  NE_IN
  NE_NP
  NL
  NL_AW
  NL_BE
  NL_BQ
  NL_CW
  NL_NL
  NL_SR
  NL_SX
  NMG
  NMG_CM
  NN
  NNH
  NNH_CM
  NN_NO
  NUS
  NUS_SS
  NYN
  NYN_UG
  OM
  OM_ET
  OM_KE
  OR
  OR_IN
  OS
  OS_GE
  OS_RU
  PA
  PA_ARAB
  PA_ARAB_PK
  PA_GURU
  PA_GURU_IN
  PCM
  PCM_NG
  PL
  PL_PL
  PRG
  PS
  PS_AF
  PS_PK
  PT
  PT_AO
  PT_BR
  PT_CH
  PT_CV
  PT_GQ
  PT_GW
  PT_LU
  PT_MO
  PT_MZ
  PT_PT
  PT_ST
  PT_TL
  QU
  QU_BO
  QU_EC
  QU_PE
  RM
  RM_CH
  RN
  RN_BI
  RO
  ROF
  ROF_TZ
  RO_MD
  RO_RO
  RU
  RU_BY
  RU_KG
  RU_KZ
  RU_MD
  RU_RU
  RU_UA
  RW
  RWK
  RWK_TZ
  RW_RW
  SAH
  SAH_RU
  SAQ
  SAQ_KE
  SAT
  SAT_OLCK
  SAT_OLCK_IN
  SBP
  SBP_TZ
  SD
  SD_ARAB
  SD_ARAB_PK
  SD_DEVA
  SD_DEVA_IN
  SE
  SEH
  SEH_MZ
  SES
  SES_ML
  SE_FI
  SE_NO
  SE_SE
  SG
  SG_CF
  SHI
  SHI_LATN
  SHI_LATN_MA
  SHI_TFNG
  SHI_TFNG_MA
  SI
  SI_LK
  SK
  SK_SK
  SL
  SL_SI
  SMN
  SMN_FI
  SN
  SN_ZW
  SO
  SO_DJ
  SO_ET
  SO_KE
  SO_SO
  SQ
  SQ_AL
  SQ_MK
  SQ_XK
  SR
  SR_CYRL
  SR_CYRL_BA
  SR_CYRL_ME
  SR_CYRL_RS
  SR_CYRL_XK
  SR_LATN
  SR_LATN_BA
  SR_LATN_ME
  SR_LATN_RS
  SR_LATN_XK
  SU
  SU_LATN
  SU_LATN_ID
  SV
  SV_AX
  SV_FI
  SV_SE
  SW
  SW_CD
  SW_KE
  SW_TZ
  SW_UG
  TA
  TA_IN
  TA_LK
  TA_MY
  TA_SG
  TE
  TEO
  TEO_KE
  TEO_UG
  TE_IN
  TG
  TG_TJ
  TH
  TH_TH
  TI
  TI_ER
  TI_ET
  TK
  TK_TM
  TO
  TO_TO
  TR
  TR_CY
  TR_TR
  TT
  TT_RU
  TWQ
  TWQ_NE
  TZM
  TZM_MA
  UG
  UG_CN
  UK
  UK_UA
  UR
  UR_IN
  UR_PK
  UZ
  UZ_ARAB
  UZ_ARAB_AF
  UZ_CYRL
  UZ_CYRL_UZ
  UZ_LATN
  UZ_LATN_UZ
  VAI
  VAI_LATN
  VAI_LATN_LR
  VAI_VAII
  VAI_VAII_LR
  VI
  VI_VN
  VO
  VUN
  VUN_TZ
  WAE
  WAE_CH
  WO
  WO_SN
  XH
  XH_ZA
  XOG
  XOG_UG
  YAV
  YAV_CM
  YI
  YO
  YO_BJ
  YO_NG
  YUE
  YUE_HANS
  YUE_HANS_CN
  YUE_HANT
  YUE_HANT_HK
  ZGH
  ZGH_MA
  ZH
  ZH_HANS
  ZH_HANS_CN
  ZH_HANS_HK
  ZH_HANS_MO
  ZH_HANS_SG
  ZH_HANT
  ZH_HANT_HK
  ZH_HANT_MO
  ZH_HANT_TW
  ZU
  ZU_ZA
}

type LanguageDisplay {
  """ISO 639 representation of the language name."""
  code: LanguageCodeEnum!

  """Full name of the language."""
  language: String!
}

"""Store the current and allowed usage."""
type LimitInfo {
  """Defines the allowed maximum resource usage, null means unlimited."""
  allowedUsage: Limits!

  """Defines the current resource usage."""
  currentUsage: Limits!
}

type Limits {
  """Defines the number of channels."""
  channels: Int

  """Defines the number of order."""
  orders: Int

  """Defines the number of product variants."""
  productVariants: Int

  """Defines the number of staff users."""
  staffUsers: Int

  """Defines the number of warehouses."""
  warehouses: Int
}

"""
List payment methods stored for the user by payment gateway.

Added in Saleor 3.15.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type ListStoredPaymentMethods implements Event {
  """
  Channel in context which was used to fetch the list of payment methods.
  """
  channel: Channel!

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The user for which the app should return a list of payment methods."""
  user: User!

  """Saleor version that triggered the event."""
  version: String
}

"""The manifest definition."""
type Manifest {
  """Description of the app displayed in the dashboard."""
  about: String

  """App website rendered in the dashboard."""
  appUrl: String

  """
  The audience that will be included in all JWT tokens for the app.
  
  Added in Saleor 3.8.
  """
  audience: String

  """
  The App's author name.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  author: String

  """
  App's brand data.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  brand: AppManifestBrand

  """URL to iframe with the configuration for the app."""
  configurationUrl: String @deprecated(reason: "This field will be removed in Saleor 4.0. Use `appUrl` instead.")

  """Description of the data privacy defined for this app."""
  dataPrivacy: String @deprecated(reason: "This field will be removed in Saleor 4.0. Use `dataPrivacyUrl` instead.")

  """URL to the full privacy policy."""
  dataPrivacyUrl: String

  """
  List of extensions that will be mounted in Saleor's dashboard. For details, please [see the extension section.](https://docs.saleor.io/docs/3.x/developer/extending/apps/extending-dashboard-with-apps#key-concepts)
  """
  extensions: [AppManifestExtension!]!

  """External URL to the app homepage."""
  homepageUrl: String

  """The identifier of the manifest for the app."""
  identifier: String!

  """The name of the manifest for the app ."""
  name: String!

  """The array permissions required for the app."""
  permissions: [Permission!]

  """
  Determines the app's required Saleor version as semver range.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  requiredSaleorVersion: AppManifestRequiredSaleorVersion

  """External URL to the page where app users can find support."""
  supportUrl: String

  """
  Endpoint used during process of app installation, [see installing an app.](https://docs.saleor.io/docs/3.x/developer/extending/apps/installing-apps#installing-an-app)
  """
  tokenTargetUrl: String

  """The version of the manifest for the app."""
  version: String!

  """
  List of the app's webhooks.
  
  Added in Saleor 3.5.
  """
  webhooks: [AppManifestWebhook!]!
}

"""Metadata for the Margin class."""
type Margin {
  """The starting value of the margin."""
  start: Int

  """The ending value of the margin."""
  stop: Int
}

"""
Determine the mark as paid strategy for the channel.

    TRANSACTION_FLOW - new orders marked as paid will receive a
    `TransactionItem` object, that will cover the `order.total`.

    PAYMENT_FLOW - new orders marked as paid will receive a
    `Payment` object, that will cover the `order.total`.
"""
enum MarkAsPaidStrategyEnum {
  PAYMENT_FLOW
  TRANSACTION_FLOW
}

enum MeasurementUnitsEnum {
  ACRE_FT
  ACRE_IN
  CM
  CUBIC_CENTIMETER
  CUBIC_DECIMETER
  CUBIC_FOOT
  CUBIC_INCH
  CUBIC_METER
  CUBIC_MILLIMETER
  CUBIC_YARD
  DM
  FL_OZ
  FT
  G
  INCH
  KG
  KM
  LB
  LITER
  M
  MM
  OZ
  PINT
  QT
  SQ_CM
  SQ_DM
  SQ_FT
  SQ_INCH
  SQ_KM
  SQ_M
  SQ_MM
  SQ_YD
  TONNE
  YD
}

input MeasurementUnitsEnumFilterInput {
  """The value equal to."""
  eq: MeasurementUnitsEnum

  """The value included in."""
  oneOf: [MeasurementUnitsEnum!]
}

enum MediaChoicesSortField {
  """Sort media by ID."""
  ID
}

input MediaInput {
  """Alt text for a product media."""
  alt: String

  """Represents an image file in a multipart request."""
  image: Upload

  """Represents an URL to an external media."""
  mediaUrl: String
}

input MediaSortingInput {
  """Specifies the direction in which to sort media."""
  direction: OrderDirection!

  """Sort media by the selected field."""
  field: MediaChoicesSortField!
}

"""
Represents a single menu - an object that is used to help navigate through the store.
"""
type Menu implements Node & ObjectWithMetadata {
  """The ID of the menu."""
  id: ID!

  """Menu items associated with this menu."""
  items: [MenuItem!]

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """The name of the menu."""
  name: String!

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """Slug of the menu."""
  slug: String!
}

"""
Deletes menus. 

Requires one of the following permissions: MANAGE_MENUS.

Triggers the following webhook events:
- MENU_DELETED (async): A menu was deleted.
"""
type MenuBulkDelete {
  """Returns how many objects were affected."""
  count: Int!
  errors: [MenuError!]!
  menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

type MenuCountableConnection {
  edges: [MenuCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type MenuCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: Menu!
}

"""
Creates a new Menu. 

Requires one of the following permissions: MANAGE_MENUS.

Triggers the following webhook events:
- MENU_CREATED (async): A menu was created.
"""
type MenuCreate {
  errors: [MenuError!]!
  menu: Menu
  menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input MenuCreateInput {
  """List of menu items."""
  items: [MenuItemInput!]

  """Name of the menu."""
  name: String!

  """Slug of the menu. Will be generated if not provided."""
  slug: String
}

"""
Event sent when new menu is created.

Added in Saleor 3.4.
"""
type MenuCreated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The menu the event relates to."""
  menu(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): Menu

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Deletes a menu. 

Requires one of the following permissions: MANAGE_MENUS.

Triggers the following webhook events:
- MENU_DELETED (async): A menu was deleted.
"""
type MenuDelete {
  errors: [MenuError!]!
  menu: Menu
  menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when menu is deleted.

Added in Saleor 3.4.
"""
type MenuDeleted implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The menu the event relates to."""
  menu(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): Menu

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

type MenuError {
  """The error code."""
  code: MenuErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum MenuErrorCode {
  CANNOT_ASSIGN_NODE
  GRAPHQL_ERROR
  INVALID
  INVALID_MENU_ITEM
  NOT_FOUND
  NO_MENU_ITEM_PROVIDED
  REQUIRED
  TOO_MANY_MENU_ITEMS
  UNIQUE
}

input MenuFilterInput {
  metadata: [MetadataFilter!]
  search: String
  slug: [String!]
  slugs: [String!]
}

input MenuInput {
  """Name of the menu."""
  name: String

  """Slug of the menu."""
  slug: String
}

"""
Represents a single item of the related menu. Can store categories, collection or pages.
"""
type MenuItem implements Node & ObjectWithMetadata {
  """Category associated with the menu item."""
  category: Category

  """Represents the child items of the current menu item."""
  children: [MenuItem!]

  """
  A collection associated with this menu item. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS.
  """
  collection: Collection

  """The ID of the menu item."""
  id: ID!

  """Indicates the position of the menu item within the menu structure."""
  level: Int!

  """Represents the menu to which the menu item belongs."""
  menu: Menu!

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """The name of the menu item."""
  name: String!

  """
  A page associated with this menu item. Requires one of the following permissions to include unpublished items: MANAGE_PAGES.
  """
  page: Page

  """ID of parent menu item. If empty, menu will be top level menu."""
  parent: MenuItem

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """Returns translated menu item fields for the given language code."""
  translation(
    """A language code to return the translation for menu item."""
    languageCode: LanguageCodeEnum!
  ): MenuItemTranslation

  """URL to the menu item."""
  url: String
}

"""
Deletes menu items. 

Requires one of the following permissions: MANAGE_MENUS.

Triggers the following webhook events:
- MENU_ITEM_DELETED (async): A menu item was deleted.
"""
type MenuItemBulkDelete {
  """Returns how many objects were affected."""
  count: Int!
  errors: [MenuError!]!
  menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

type MenuItemCountableConnection {
  edges: [MenuItemCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type MenuItemCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: MenuItem!
}

"""
Creates a new menu item. 

Requires one of the following permissions: MANAGE_MENUS.

Triggers the following webhook events:
- MENU_ITEM_CREATED (async): A menu item was created.
"""
type MenuItemCreate {
  errors: [MenuError!]!
  menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  menuItem: MenuItem
}

input MenuItemCreateInput {
  """Category to which item points."""
  category: ID

  """Collection to which item points."""
  collection: ID

  """Menu to which item belongs."""
  menu: ID!

  """Name of the menu item."""
  name: String!

  """Page to which item points."""
  page: ID

  """ID of the parent menu. If empty, menu will be top level menu."""
  parent: ID

  """URL of the pointed item."""
  url: String
}

"""
Event sent when new menu item is created.

Added in Saleor 3.4.
"""
type MenuItemCreated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The menu item the event relates to."""
  menuItem(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): MenuItem

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Deletes a menu item. 

Requires one of the following permissions: MANAGE_MENUS.

Triggers the following webhook events:
- MENU_ITEM_DELETED (async): A menu item was deleted.
"""
type MenuItemDelete {
  errors: [MenuError!]!
  menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  menuItem: MenuItem
}

"""
Event sent when menu item is deleted.

Added in Saleor 3.4.
"""
type MenuItemDeleted implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The menu item the event relates to."""
  menuItem(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): MenuItem

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

input MenuItemFilterInput {
  metadata: [MetadataFilter!]
  search: String
}

input MenuItemInput {
  """Category to which item points."""
  category: ID

  """Collection to which item points."""
  collection: ID

  """Name of the menu item."""
  name: String

  """Page to which item points."""
  page: ID

  """URL of the pointed item."""
  url: String
}

"""
Moves items of menus. 

Requires one of the following permissions: MANAGE_MENUS.

Triggers the following webhook events:
- MENU_ITEM_UPDATED (async): Optionally triggered when sort order or parent changed for menu item.
"""
type MenuItemMove {
  errors: [MenuError!]!

  """Assigned menu to move within."""
  menu: Menu
  menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input MenuItemMoveInput {
  """The menu item ID to move."""
  itemId: ID!

  """ID of the parent menu. If empty, menu will be top level menu."""
  parentId: ID

  """
  The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged.
  """
  sortOrder: Int
}

input MenuItemSortingInput {
  """Specifies the direction in which to sort menu items."""
  direction: OrderDirection!

  """Sort menu items by the selected field."""
  field: MenuItemsSortField!
}

"""
Represents menu item's original translatable fields and related translations.
"""
type MenuItemTranslatableContent implements Node {
  """The ID of the menu item translatable content."""
  id: ID!

  """
  Represents a single item of the related menu. Can store categories, collection or pages.
  """
  menuItem: MenuItem @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.")

  """
  The ID of the menu item to translate.
  
  Added in Saleor 3.14.
  """
  menuItemId: ID!

  """Name of the menu item to translate."""
  name: String!

  """Returns translated menu item fields for the given language code."""
  translation(
    """A language code to return the translation for menu item."""
    languageCode: LanguageCodeEnum!
  ): MenuItemTranslation
}

"""
Creates/updates translations for a menu item. 

Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
type MenuItemTranslate {
  errors: [TranslationError!]!
  menuItem: MenuItem
  translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""Represents menu item translations."""
type MenuItemTranslation implements Node {
  """The ID of the menu item translation."""
  id: ID!

  """Translation language."""
  language: LanguageDisplay!

  """Translated menu item name."""
  name: String!

  """
  Represents the menu item fields to translate.
  
  Added in Saleor 3.14.
  """
  translatableContent: MenuItemTranslatableContent
}

"""
Updates a menu item. 

Requires one of the following permissions: MANAGE_MENUS.

Triggers the following webhook events:
- MENU_ITEM_UPDATED (async): A menu item was updated.
"""
type MenuItemUpdate {
  errors: [MenuError!]!
  menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  menuItem: MenuItem
}

"""
Event sent when menu item is updated.

Added in Saleor 3.4.
"""
type MenuItemUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The menu item the event relates to."""
  menuItem(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): MenuItem

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

enum MenuItemsSortField {
  """Sort menu items by name."""
  NAME
}

enum MenuSortField {
  """Sort menus by items count."""
  ITEMS_COUNT

  """Sort menus by name."""
  NAME
}

input MenuSortingInput {
  """Specifies the direction in which to sort menus."""
  direction: OrderDirection!

  """Sort menus by the selected field."""
  field: MenuSortField!
}

"""
Updates a menu. 

Requires one of the following permissions: MANAGE_MENUS.

Triggers the following webhook events:
- MENU_UPDATED (async): A menu was updated.
"""
type MenuUpdate {
  errors: [MenuError!]!
  menu: Menu
  menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when menu is updated.

Added in Saleor 3.4.
"""
type MenuUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The menu the event relates to."""
  menu(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): Menu

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Metadata is a map of key-value pairs, both keys and values are `String`.

Example:
```
{
    "key1": "value1",
    "key2": "value2"
}
```
"""
scalar Metadata

type MetadataError {
  """The error code."""
  code: MetadataErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum MetadataErrorCode {
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  NOT_UPDATED
  REQUIRED
}

input MetadataFilter {
  """Key of a metadata item."""
  key: String!

  """Value of a metadata item."""
  value: String
}

input MetadataInput {
  """Key of a metadata item."""
  key: String!

  """Value of a metadata item."""
  value: String!
}

type MetadataItem {
  """Key of a metadata item."""
  key: String!

  """Value of a metadata item."""
  value: String!
}

"""
The `Minute` scalar type represents number of minutes by integer value.
"""
scalar Minute

"""Represents amount of money in specific currency."""
type Money {
  """Amount of money."""
  amount: Float!

  """Currency code."""
  currency: String!
}

input MoneyInput {
  """Amount of money."""
  amount: PositiveDecimal!

  """Currency code."""
  currency: String!
}

"""Represents a range of amounts of money."""
type MoneyRange {
  """Lower bound of a price range."""
  start: Money

  """Upper bound of a price range."""
  stop: Money
}

input MoveProductInput {
  """The ID of the product to move."""
  productId: ID!

  """
  The relative sorting position of the product (from -inf to +inf) starting from the first given product's actual position.1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged.
  """
  sortOrder: Int
}

type Mutation {
  """
  Create a new address for the customer.
  
  Requires one of following set of permissions: AUTHENTICATED_USER or AUTHENTICATED_APP + IMPERSONATE_USER.
  
  Triggers the following webhook events:
  - CUSTOMER_UPDATED (async): A customer account was updated.
  - ADDRESS_CREATED (async): An address was created.
  """
  accountAddressCreate(
    """
    ID of customer the application is impersonating. The field can be used and is required by apps only. Requires IMPERSONATE_USER and AUTHENTICATED_APP permission.
    
    Added in Saleor 3.19.
    """
    customerId: ID

    """Fields required to create address."""
    input: AddressInput!

    """
    A type of address. If provided, the new address will be automatically assigned as the customer's default address of that type.
    """
    type: AddressTypeEnum
  ): AccountAddressCreate

  """
  Delete an address of the logged-in user. Requires one of the following permissions: MANAGE_USERS, IS_OWNER.
  
  Triggers the following webhook events:
  - ADDRESS_DELETED (async): An address was deleted.
  """
  accountAddressDelete(
    """ID of the address to delete."""
    id: ID!
  ): AccountAddressDelete

  """
  Updates an address of the logged-in user. Requires one of the following permissions: MANAGE_USERS, IS_OWNER.
  
  Triggers the following webhook events:
  - ADDRESS_UPDATED (async): An address was updated.
  """
  accountAddressUpdate(
    """ID of the address to update."""
    id: ID!

    """Fields required to update the address."""
    input: AddressInput!
  ): AccountAddressUpdate

  """
  Remove user account. 
  
  Requires one of the following permissions: AUTHENTICATED_USER.
  
  Triggers the following webhook events:
  - ACCOUNT_DELETED (async): Account was deleted.
  """
  accountDelete(
    """
    A one-time token required to remove account. Sent by email using AccountRequestDeletion mutation.
    """
    token: String!
  ): AccountDelete

  """
  Register a new user.
  
  Triggers the following webhook events:
  - CUSTOMER_CREATED (async): A new customer account was created.
  - NOTIFY_USER (async): A notification for account confirmation.
  - ACCOUNT_CONFIRMATION_REQUESTED (async): An user confirmation was requested. This event is always sent regardless of settings.
  """
  accountRegister(
    """Fields required to create a user."""
    input: AccountRegisterInput!
  ): AccountRegister

  """
  Sends an email with the account removal link for the logged-in user. 
  
  Requires one of the following permissions: AUTHENTICATED_USER.
  
  Triggers the following webhook events:
  - NOTIFY_USER (async): A notification for account delete request.
  - ACCOUNT_DELETE_REQUESTED (async): An account delete requested.
  """
  accountRequestDeletion(
    """
    Slug of a channel which will be used to notify users. Optional when only one channel exists.
    """
    channel: String

    """
    URL of a view where users should be redirected to delete their account. URL in RFC 1808 format.
    """
    redirectUrl: String!
  ): AccountRequestDeletion

  """
  Sets a default address for the authenticated user. 
  
  Requires one of the following permissions: AUTHENTICATED_USER.
  
  Triggers the following webhook events:
  - CUSTOMER_UPDATED (async): A customer's address was updated.
  """
  accountSetDefaultAddress(
    """ID of the address to set as default."""
    id: ID!

    """The type of address."""
    type: AddressTypeEnum!
  ): AccountSetDefaultAddress

  """
  Updates the account of the logged-in user.
  
  Requires one of following set of permissions: AUTHENTICATED_USER or AUTHENTICATED_APP + IMPERSONATE_USER.
  
  Triggers the following webhook events:
  - CUSTOMER_UPDATED (async): A customer account was updated.
  - CUSTOMER_METADATA_UPDATED (async): Optionally called when customer's metadata was updated.
  """
  accountUpdate(
    """
    ID of customer the application is impersonating. The field can be used and is required by apps only. Requires IMPERSONATE_USER and AUTHENTICATED_APP permission.
    
    Added in Saleor 3.19.
    """
    customerId: ID

    """Fields required to update the account of the logged-in user."""
    input: AccountInput!
  ): AccountUpdate

  """
  Creates user address. 
  
  Requires one of the following permissions: MANAGE_USERS.
  
  Triggers the following webhook events:
  - ADDRESS_CREATED (async): A new address was created.
  """
  addressCreate(
    """Fields required to create address."""
    input: AddressInput!

    """ID of a user to create address for."""
    userId: ID!
  ): AddressCreate

  """
  Deletes an address. 
  
  Requires one of the following permissions: MANAGE_USERS.
  
  Triggers the following webhook events:
  - ADDRESS_DELETED (async): An address was deleted.
  """
  addressDelete(
    """ID of the address to delete."""
    id: ID!
  ): AddressDelete

  """
  Sets a default address for the given user. 
  
  Requires one of the following permissions: MANAGE_USERS.
  
  Triggers the following webhook events:
  - CUSTOMER_UPDATED (async): A customer was updated.
  """
  addressSetDefault(
    """ID of the address."""
    addressId: ID!

    """The type of address."""
    type: AddressTypeEnum!

    """ID of the user to change the address for."""
    userId: ID!
  ): AddressSetDefault

  """
  Updates an address. 
  
  Requires one of the following permissions: MANAGE_USERS.
  
  Triggers the following webhook events:
  - ADDRESS_UPDATED (async): An address was updated.
  """
  addressUpdate(
    """ID of the address to update."""
    id: ID!

    """Fields required to update the address."""
    input: AddressInput!
  ): AddressUpdate

  """
  Activate the app. 
  
  Requires one of the following permissions: MANAGE_APPS.
  
  Triggers the following webhook events:
  - APP_STATUS_CHANGED (async): An app was activated.
  """
  appActivate(
    """ID of app to activate."""
    id: ID!
  ): AppActivate

  """
  Creates a new app. Requires the following permissions: AUTHENTICATED_STAFF_USER and MANAGE_APPS.
  
  Triggers the following webhook events:
  - APP_INSTALLED (async): An app was installed.
  """
  appCreate(
    """Fields required to create a new app."""
    input: AppInput!
  ): AppCreate

  """
  Deactivate the app. 
  
  Requires one of the following permissions: MANAGE_APPS.
  
  Triggers the following webhook events:
  - APP_STATUS_CHANGED (async): An app was deactivated.
  """
  appDeactivate(
    """ID of app to deactivate."""
    id: ID!
  ): AppDeactivate

  """
  Deletes an app. 
  
  Requires one of the following permissions: MANAGE_APPS.
  
  Triggers the following webhook events:
  - APP_DELETED (async): An app was deleted.
  """
  appDelete(
    """ID of an app to delete."""
    id: ID!
  ): AppDelete

  """
  Delete failed installation. 
  
  Requires one of the following permissions: MANAGE_APPS.
  """
  appDeleteFailedInstallation(
    """ID of failed installation to delete."""
    id: ID!
  ): AppDeleteFailedInstallation

  """
  Fetch and validate manifest. 
  
  Requires one of the following permissions: MANAGE_APPS.
  """
  appFetchManifest(
    """URL to app's manifest in JSON format."""
    manifestUrl: String!
  ): AppFetchManifest

  """
  Install new app by using app manifest. Requires the following permissions: AUTHENTICATED_STAFF_USER and MANAGE_APPS.
  """
  appInstall(
    """Fields required to install a new app."""
    input: AppInstallInput!
  ): AppInstall

  """
  Retry failed installation of new app. 
  
  Requires one of the following permissions: MANAGE_APPS.
  
  Triggers the following webhook events:
  - APP_INSTALLED (async): An app was installed.
  """
  appRetryInstall(
    """Determine if app will be set active or not."""
    activateAfterInstallation: Boolean = true

    """ID of failed installation."""
    id: ID!
  ): AppRetryInstall

  """
  Creates a new token. 
  
  Requires one of the following permissions: MANAGE_APPS.
  """
  appTokenCreate(
    """Fields required to create a new auth token."""
    input: AppTokenInput!
  ): AppTokenCreate

  """
  Deletes an authentication token assigned to app. 
  
  Requires one of the following permissions: MANAGE_APPS.
  """
  appTokenDelete(
    """ID of an auth token to delete."""
    id: ID!
  ): AppTokenDelete

  """Verify provided app token."""
  appTokenVerify(
    """App token to verify."""
    token: String!
  ): AppTokenVerify

  """
  Updates an existing app. 
  
  Requires one of the following permissions: MANAGE_APPS.
  
  Triggers the following webhook events:
  - APP_UPDATED (async): An app was updated.
  """
  appUpdate(
    """ID of an app to update."""
    id: ID!

    """Fields required to update an existing app."""
    input: AppInput!
  ): AppUpdate

  """
  Assigns storefront's navigation menus. 
  
  Requires one of the following permissions: MANAGE_MENUS, MANAGE_SETTINGS.
  """
  assignNavigation(
    """ID of the menu."""
    menu: ID

    """Type of the navigation bar to assign the menu to."""
    navigationType: NavigationType!
  ): AssignNavigation

  """
  Add shipping zone to given warehouse. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  assignWarehouseShippingZone(
    """ID of a warehouse to update."""
    id: ID!

    """List of shipping zone IDs."""
    shippingZoneIds: [ID!]!
  ): WarehouseShippingZoneAssign

  """
  Creates attributes.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  
  Triggers the following webhook events:
  - ATTRIBUTE_CREATED (async): An attribute was created.
  """
  attributeBulkCreate(
    """Input list of attributes to create."""
    attributes: [AttributeCreateInput!]!

    """Policies of error handling. DEFAULT: REJECT_EVERYTHING"""
    errorPolicy: ErrorPolicyEnum
  ): AttributeBulkCreate

  """
  Deletes attributes. 
  
  Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
  
  Triggers the following webhook events:
  - ATTRIBUTE_DELETED (async): An attribute was deleted.
  """
  attributeBulkDelete(
    """List of attribute IDs to delete."""
    ids: [ID!]!
  ): AttributeBulkDelete

  """
  Creates/updates translations for attributes.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: MANAGE_TRANSLATIONS.
  """
  attributeBulkTranslate(
    """Policies of error handling. DEFAULT: REJECT_EVERYTHING"""
    errorPolicy: ErrorPolicyEnum

    """List of attributes translations."""
    translations: [AttributeBulkTranslateInput!]!
  ): AttributeBulkTranslate

  """
  Updates attributes.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  
  Triggers the following webhook events:
  - ATTRIBUTE_UPDATED (async): An attribute was updated. Optionally called when new attribute value was created or deleted.
  - ATTRIBUTE_VALUE_CREATED (async): Called optionally when an attribute value was created.
  - ATTRIBUTE_VALUE_DELETED (async): Called optionally when an attribute value was deleted.
  """
  attributeBulkUpdate(
    """Input list of attributes to update."""
    attributes: [AttributeBulkUpdateInput!]!

    """Policies of error handling. DEFAULT: REJECT_EVERYTHING"""
    errorPolicy: ErrorPolicyEnum
  ): AttributeBulkUpdate

  """
  Creates an attribute.
  
  Triggers the following webhook events:
  - ATTRIBUTE_CREATED (async): An attribute was created.
  """
  attributeCreate(
    """Fields required to create an attribute."""
    input: AttributeCreateInput!
  ): AttributeCreate

  """
  Deletes an attribute. 
  
  Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
  
  Triggers the following webhook events:
  - ATTRIBUTE_DELETED (async): An attribute was deleted.
  """
  attributeDelete(
    """
    External ID of an attribute to delete. 
    
    Added in Saleor 3.10.
    """
    externalReference: String

    """ID of an attribute to delete."""
    id: ID
  ): AttributeDelete

  """
  Reorder the values of an attribute. 
  
  Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
  
  Triggers the following webhook events:
  - ATTRIBUTE_VALUE_UPDATED (async): An attribute value was updated.
  - ATTRIBUTE_UPDATED (async): An attribute was updated.
  """
  attributeReorderValues(
    """ID of an attribute."""
    attributeId: ID!

    """The list of reordering operations for given attribute values."""
    moves: [ReorderInput!]!
  ): AttributeReorderValues

  """
  Creates/updates translations for an attribute. 
  
  Requires one of the following permissions: MANAGE_TRANSLATIONS.
  """
  attributeTranslate(
    """Attribute ID or AttributeTranslatableContent ID."""
    id: ID!

    """Fields required to update attribute translations."""
    input: NameTranslationInput!

    """Translation language code."""
    languageCode: LanguageCodeEnum!
  ): AttributeTranslate

  """
  Updates attribute. 
  
  Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
  
  Triggers the following webhook events:
  - ATTRIBUTE_UPDATED (async): An attribute was updated.
  """
  attributeUpdate(
    """
    External ID of an attribute to update. 
    
    Added in Saleor 3.10.
    """
    externalReference: String

    """ID of an attribute to update."""
    id: ID

    """Fields required to update an attribute."""
    input: AttributeUpdateInput!
  ): AttributeUpdate

  """
  Deletes values of attributes. 
  
  Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
  
  Triggers the following webhook events:
  - ATTRIBUTE_VALUE_DELETED (async): An attribute value was deleted.
  - ATTRIBUTE_UPDATED (async): An attribute was updated.
  """
  attributeValueBulkDelete(
    """List of attribute value IDs to delete."""
    ids: [ID!]!
  ): AttributeValueBulkDelete

  """
  Creates/updates translations for attributes values.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: MANAGE_TRANSLATIONS.
  """
  attributeValueBulkTranslate(
    """Policies of error handling. DEFAULT: REJECT_EVERYTHING"""
    errorPolicy: ErrorPolicyEnum

    """List of attribute values translations."""
    translations: [AttributeValueBulkTranslateInput!]!
  ): AttributeValueBulkTranslate

  """
  Creates a value for an attribute. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  
  Triggers the following webhook events:
  - ATTRIBUTE_VALUE_CREATED (async): An attribute value was created.
  - ATTRIBUTE_UPDATED (async): An attribute was updated.
  """
  attributeValueCreate(
    """Attribute to which value will be assigned."""
    attribute: ID!

    """Fields required to create an AttributeValue."""
    input: AttributeValueCreateInput!
  ): AttributeValueCreate

  """
  Deletes a value of an attribute. 
  
  Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
  
  Triggers the following webhook events:
  - ATTRIBUTE_VALUE_DELETED (async): An attribute value was deleted.
  - ATTRIBUTE_UPDATED (async): An attribute was updated.
  """
  attributeValueDelete(
    """
    External ID of a value to delete. 
    
    Added in Saleor 3.10.
    """
    externalReference: String

    """ID of a value to delete."""
    id: ID
  ): AttributeValueDelete

  """
  Creates/updates translations for an attribute value. 
  
  Requires one of the following permissions: MANAGE_TRANSLATIONS.
  """
  attributeValueTranslate(
    """AttributeValue ID or AttributeValueTranslatableContent ID."""
    id: ID!

    """Fields required to update attribute value translations."""
    input: AttributeValueTranslationInput!

    """Translation language code."""
    languageCode: LanguageCodeEnum!
  ): AttributeValueTranslate

  """
  Updates value of an attribute. 
  
  Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
  
  Triggers the following webhook events:
  - ATTRIBUTE_VALUE_UPDATED (async): An attribute value was updated.
  - ATTRIBUTE_UPDATED (async): An attribute was updated.
  """
  attributeValueUpdate(
    """
    External ID of an AttributeValue to update. 
    
    Added in Saleor 3.10.
    """
    externalReference: String

    """ID of an AttributeValue to update."""
    id: ID

    """Fields required to update an AttributeValue."""
    input: AttributeValueUpdateInput!
  ): AttributeValueUpdate

  """
  Deletes categories. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  categoryBulkDelete(
    """List of category IDs to delete."""
    ids: [ID!]!
  ): CategoryBulkDelete

  """
  Creates a new category. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  categoryCreate(
    """Fields required to create a category."""
    input: CategoryInput!

    """
    ID of the parent category. If empty, category will be top level category.
    """
    parent: ID
  ): CategoryCreate

  """
  Deletes a category. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  categoryDelete(
    """ID of a category to delete."""
    id: ID!
  ): CategoryDelete

  """
  Creates/updates translations for a category. 
  
  Requires one of the following permissions: MANAGE_TRANSLATIONS.
  """
  categoryTranslate(
    """Category ID or CategoryTranslatableContent ID."""
    id: ID!

    """Fields required to update category translations."""
    input: TranslationInput!

    """Translation language code."""
    languageCode: LanguageCodeEnum!
  ): CategoryTranslate

  """
  Updates a category. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  categoryUpdate(
    """ID of a category to update."""
    id: ID!

    """Fields required to update a category."""
    input: CategoryInput!
  ): CategoryUpdate

  """
  Activate a channel. 
  
  Requires one of the following permissions: MANAGE_CHANNELS.
  
  Triggers the following webhook events:
  - CHANNEL_STATUS_CHANGED (async): A channel was activated.
  """
  channelActivate(
    """ID of the channel to activate."""
    id: ID!
  ): ChannelActivate

  """
  Creates new channel. 
  
  Requires one of the following permissions: MANAGE_CHANNELS.
  
  Triggers the following webhook events:
  - CHANNEL_CREATED (async): A channel was created.
  """
  channelCreate(
    """Fields required to create channel."""
    input: ChannelCreateInput!
  ): ChannelCreate

  """
  Deactivate a channel. 
  
  Requires one of the following permissions: MANAGE_CHANNELS.
  
  Triggers the following webhook events:
  - CHANNEL_STATUS_CHANGED (async): A channel was deactivated.
  """
  channelDeactivate(
    """ID of the channel to deactivate."""
    id: ID!
  ): ChannelDeactivate

  """
  Delete a channel. Orders associated with the deleted channel will be moved to the target channel. Checkouts, product availability, and pricing will be removed. 
  
  Requires one of the following permissions: MANAGE_CHANNELS.
  
  Triggers the following webhook events:
  - CHANNEL_DELETED (async): A channel was deleted.
  """
  channelDelete(
    """ID of a channel to delete."""
    id: ID!

    """Fields required to delete a channel."""
    input: ChannelDeleteInput
  ): ChannelDelete

  """
  Reorder the warehouses of a channel.
  
  Added in Saleor 3.7. 
  
  Requires one of the following permissions: MANAGE_CHANNELS.
  """
  channelReorderWarehouses(
    """ID of a channel."""
    channelId: ID!

    """The list of reordering operations for the given channel warehouses."""
    moves: [ReorderInput!]!
  ): ChannelReorderWarehouses

  """
  Update a channel.
  
  Requires one of the following permissions: MANAGE_CHANNELS.
  Requires one of the following permissions when updating only `orderSettings` field: `MANAGE_CHANNELS`, `MANAGE_ORDERS`.
  Requires one of the following permissions when updating only `checkoutSettings` field: `MANAGE_CHANNELS`, `MANAGE_CHECKOUTS`.
  Requires one of the following permissions when updating only `paymentSettings` field: `MANAGE_CHANNELS`, `HANDLE_PAYMENTS`.
  
  Triggers the following webhook events:
  - CHANNEL_UPDATED (async): A channel was updated.
  - CHANNEL_METADATA_UPDATED (async): Optionally triggered when public or private metadata is updated.
  """
  channelUpdate(
    """ID of a channel to update."""
    id: ID!

    """Fields required to update a channel."""
    input: ChannelUpdateInput!
  ): ChannelUpdate

  """
  Adds a gift card or a voucher to a checkout.
  
  Triggers the following webhook events:
  - CHECKOUT_UPDATED (async): A checkout was updated.
  """
  checkoutAddPromoCode(
    """
    The ID of the checkout.
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    checkoutId: ID

    """
    The checkout's ID.
    
    Added in Saleor 3.4.
    """
    id: ID

    """Gift card code or voucher code."""
    promoCode: String!

    """
    Checkout token.
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    token: UUID
  ): CheckoutAddPromoCode

  """
  Update billing address in the existing checkout.
  
  Triggers the following webhook events:
  - CHECKOUT_UPDATED (async): A checkout was updated.
  """
  checkoutBillingAddressUpdate(
    """The billing address of the checkout."""
    billingAddress: AddressInput!

    """
    The ID of the checkout. 
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    checkoutId: ID

    """
    The checkout's ID.
    
    Added in Saleor 3.4.
    """
    id: ID

    """
    Checkout token.
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    token: UUID

    """
    The rules for changing validation for received billing address data.
    
    Added in Saleor 3.5.
    """
    validationRules: CheckoutAddressValidationRules
  ): CheckoutBillingAddressUpdate

  """
  Completes the checkout. As a result a new order is created. The mutation allows to create the unpaid order when setting `orderSettings.allowUnpaidOrders` for given `Channel` is set to `true`. When `orderSettings.allowUnpaidOrders` is set to `false`, checkout can be completed only when attached `Payment`/`TransactionItem`s fully cover the checkout's total. When processing the checkout with `Payment`, in case of required additional confirmation step like 3D secure, the `confirmationNeeded` flag will be set to True and no order will be created until payment is confirmed with second call of this mutation.
  
  Triggers the following webhook events:
  - SHIPPING_LIST_METHODS_FOR_CHECKOUT (sync): Optionally triggered when cached external shipping methods are invalid.
  - CHECKOUT_FILTER_SHIPPING_METHODS (sync): Optionally triggered when cached filtered shipping methods are invalid.
  - CHECKOUT_CALCULATE_TAXES (sync): Optionally triggered when checkout prices are expired.
  - ORDER_CREATED (async): Triggered when order is created.
  - NOTIFY_USER (async): A notification for order placement.
  - NOTIFY_USER (async): A staff notification for order placement.
  - ORDER_UPDATED (async): Triggered when order received the update after placement.
  - ORDER_PAID (async): Triggered when newly created order is paid.
  - ORDER_FULLY_PAID (async): Triggered when newly created order is fully paid.
  - ORDER_CONFIRMED (async): Optionally triggered when newly created order are automatically marked as confirmed.
  """
  checkoutComplete(
    """
    The ID of the checkout. 
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    checkoutId: ID

    """
    The checkout's ID.
    
    Added in Saleor 3.4.
    """
    id: ID

    """
    Fields required to update the checkout metadata.
    
    Added in Saleor 3.8.
    """
    metadata: [MetadataInput!]

    """Client-side generated data required to finalize the payment."""
    paymentData: JSONString

    """
    URL of a view where users should be redirected to see the order details. URL in RFC 1808 format.
    """
    redirectUrl: String

    """
    Determines whether to store the payment source for future usage. 
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use checkoutPaymentCreate for this action.
    """
    storeSource: Boolean = false

    """
    Checkout token.
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    token: UUID
  ): CheckoutComplete

  """
  Create a new checkout.
  
  `skipValidation` field requires HANDLE_CHECKOUTS and AUTHENTICATED_APP permissions.
  
  Triggers the following webhook events:
  - CHECKOUT_CREATED (async): A checkout was created.
  """
  checkoutCreate(
    """Fields required to create checkout."""
    input: CheckoutCreateInput!
  ): CheckoutCreate

  """
  Create new checkout from existing order.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  checkoutCreateFromOrder(
    """ID of a order that will be used to create the checkout."""
    id: ID!
  ): CheckoutCreateFromOrder

  """
  Sets the customer as the owner of the checkout. 
  
  Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_USER.
  
  Triggers the following webhook events:
  - CHECKOUT_UPDATED (async): A checkout was updated.
  """
  checkoutCustomerAttach(
    """
    The ID of the checkout. 
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    checkoutId: ID

    """
    ID of customer to attach to checkout. Requires IMPERSONATE_USER permission when customerId is different than the logged-in user.
    """
    customerId: ID

    """
    The checkout's ID.
    
    Added in Saleor 3.4.
    """
    id: ID

    """
    Checkout token.
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    token: UUID
  ): CheckoutCustomerAttach

  """
  Removes the user assigned as the owner of the checkout. 
  
  Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_USER.
  
  Triggers the following webhook events:
  - CHECKOUT_UPDATED (async): A checkout was updated.
  """
  checkoutCustomerDetach(
    """
    The ID of the checkout. 
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    checkoutId: ID

    """
    The checkout's ID.
    
    Added in Saleor 3.4.
    """
    id: ID

    """
    Checkout token.
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    token: UUID
  ): CheckoutCustomerDetach

  """
  Updates the delivery method (shipping method or pick up point) of the checkout. Updates the checkout shipping_address for click and collect delivery for a warehouse address. 
  
  Added in Saleor 3.1.
  
  Triggers the following webhook events:
  - SHIPPING_LIST_METHODS_FOR_CHECKOUT (sync): Triggered when updating the checkout delivery method with the external one.
  - CHECKOUT_UPDATED (async): A checkout was updated.
  """
  checkoutDeliveryMethodUpdate(
    """Delivery Method ID (`Warehouse` ID or `ShippingMethod` ID)."""
    deliveryMethodId: ID

    """
    The checkout's ID.
    
    Added in Saleor 3.4.
    """
    id: ID

    """
    Checkout token.
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    token: UUID
  ): CheckoutDeliveryMethodUpdate

  """
  Updates email address in the existing checkout object.
  
  Triggers the following webhook events:
  - CHECKOUT_UPDATED (async): A checkout was updated.
  """
  checkoutEmailUpdate(
    """
    The ID of the checkout. 
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    checkoutId: ID

    """email."""
    email: String!

    """
    The checkout's ID.
    
    Added in Saleor 3.4.
    """
    id: ID

    """
    Checkout token.
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    token: UUID
  ): CheckoutEmailUpdate

  """
  Update language code in the existing checkout.
  
  Triggers the following webhook events:
  - CHECKOUT_UPDATED (async): A checkout was updated.
  """
  checkoutLanguageCodeUpdate(
    """
    The ID of the checkout. 
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    checkoutId: ID

    """
    The checkout's ID.
    
    Added in Saleor 3.4.
    """
    id: ID

    """New language code."""
    languageCode: LanguageCodeEnum!

    """
    Checkout token.
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    token: UUID
  ): CheckoutLanguageCodeUpdate

  """
  Deletes a CheckoutLine.
  
  Triggers the following webhook events:
  - CHECKOUT_UPDATED (async): A checkout was updated.
  """
  checkoutLineDelete(
    """
    The ID of the checkout. 
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    checkoutId: ID

    """
    The checkout's ID.
    
    Added in Saleor 3.4.
    """
    id: ID

    """ID of the checkout line to delete."""
    lineId: ID

    """
    Checkout token.
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    token: UUID
  ): CheckoutLineDelete @deprecated(reason: "This field will be removed in Saleor 4.0. Use `checkoutLinesDelete` instead.")

  """
  Adds a checkout line to the existing checkout.If line was already in checkout, its quantity will be increased.
  
  Triggers the following webhook events:
  - CHECKOUT_UPDATED (async): A checkout was updated.
  """
  checkoutLinesAdd(
    """
    The ID of the checkout. 
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    checkoutId: ID

    """
    The checkout's ID.
    
    Added in Saleor 3.4.
    """
    id: ID

    """
    A list of checkout lines, each containing information about an item in the checkout.
    """
    lines: [CheckoutLineInput!]!

    """
    Checkout token.
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    token: UUID
  ): CheckoutLinesAdd

  """
  Deletes checkout lines.
  
  Triggers the following webhook events:
  - CHECKOUT_UPDATED (async): A checkout was updated.
  """
  checkoutLinesDelete(
    """
    The checkout's ID.
    
    Added in Saleor 3.4.
    """
    id: ID

    """A list of checkout lines."""
    linesIds: [ID!]!

    """
    Checkout token.
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    token: UUID
  ): CheckoutLinesDelete

  """
  Updates checkout line in the existing checkout.
  
  Triggers the following webhook events:
  - CHECKOUT_UPDATED (async): A checkout was updated.
  """
  checkoutLinesUpdate(
    """
    The ID of the checkout. 
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    checkoutId: ID

    """
    The checkout's ID.
    
    Added in Saleor 3.4.
    """
    id: ID

    """
    A list of checkout lines, each containing information about an item in the checkout.
    """
    lines: [CheckoutLineUpdateInput!]!

    """
    Checkout token.
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    token: UUID
  ): CheckoutLinesUpdate

  """Create a new payment for given checkout."""
  checkoutPaymentCreate(
    """
    The ID of the checkout. 
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    checkoutId: ID

    """
    The checkout's ID.
    
    Added in Saleor 3.4.
    """
    id: ID

    """Data required to create a new payment."""
    input: PaymentInput!

    """
    Checkout token.
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    token: UUID
  ): CheckoutPaymentCreate

  """
  Remove a gift card or a voucher from a checkout.
  
  Triggers the following webhook events:
  - CHECKOUT_UPDATED (async): A checkout was updated.
  """
  checkoutRemovePromoCode(
    """
    The ID of the checkout. 
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    checkoutId: ID

    """
    The checkout's ID.
    
    Added in Saleor 3.4.
    """
    id: ID

    """Gift card code or voucher code."""
    promoCode: String

    """Gift card or voucher ID."""
    promoCodeId: ID

    """
    Checkout token.
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    token: UUID
  ): CheckoutRemovePromoCode

  """
  Update shipping address in the existing checkout.
  
  Triggers the following webhook events:
  - CHECKOUT_UPDATED (async): A checkout was updated.
  """
  checkoutShippingAddressUpdate(
    """
    The ID of the checkout. 
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    checkoutId: ID

    """
    The checkout's ID.
    
    Added in Saleor 3.4.
    """
    id: ID

    """The mailing address to where the checkout will be shipped."""
    shippingAddress: AddressInput!

    """
    Checkout token.
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    token: UUID

    """
    The rules for changing validation for received shipping address data.
    
    Added in Saleor 3.5.
    """
    validationRules: CheckoutAddressValidationRules
  ): CheckoutShippingAddressUpdate

  """
  Updates the shipping method of the checkout.
  
  Triggers the following webhook events:
  - SHIPPING_LIST_METHODS_FOR_CHECKOUT (sync): Triggered when updating the checkout shipping method with the external one.
  - CHECKOUT_UPDATED (async): A checkout was updated.
  """
  checkoutShippingMethodUpdate(
    """
    The ID of the checkout. 
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    checkoutId: ID

    """
    The checkout's ID.
    
    Added in Saleor 3.4.
    """
    id: ID

    """Shipping method."""
    shippingMethodId: ID

    """
    Checkout token.
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    token: UUID
  ): CheckoutShippingMethodUpdate @deprecated(reason: "This field will be removed in Saleor 4.0. Use `checkoutDeliveryMethodUpdate` instead.")

  """
  Adds products to a collection. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  collectionAddProducts(
    """ID of a collection."""
    collectionId: ID!

    """List of product IDs."""
    products: [ID!]!
  ): CollectionAddProducts

  """
  Deletes collections. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  collectionBulkDelete(
    """List of collection IDs to delete."""
    ids: [ID!]!
  ): CollectionBulkDelete

  """
  Manage collection's availability in channels. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  collectionChannelListingUpdate(
    """ID of a collection to update."""
    id: ID!

    """Fields required to create or update collection channel listings."""
    input: CollectionChannelListingUpdateInput!
  ): CollectionChannelListingUpdate

  """
  Creates a new collection. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  collectionCreate(
    """Fields required to create a collection."""
    input: CollectionCreateInput!
  ): CollectionCreate

  """
  Deletes a collection. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  collectionDelete(
    """ID of a collection to delete."""
    id: ID!
  ): CollectionDelete

  """
  Remove products from a collection. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  collectionRemoveProducts(
    """ID of a collection."""
    collectionId: ID!

    """List of product IDs."""
    products: [ID!]!
  ): CollectionRemoveProducts

  """
  Reorder the products of a collection. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  collectionReorderProducts(
    """ID of a collection."""
    collectionId: ID!

    """The collection products position operations."""
    moves: [MoveProductInput!]!
  ): CollectionReorderProducts

  """
  Creates/updates translations for a collection. 
  
  Requires one of the following permissions: MANAGE_TRANSLATIONS.
  """
  collectionTranslate(
    """Collection ID or CollectionTranslatableContent ID."""
    id: ID!

    """Fields required to update collection translations."""
    input: TranslationInput!

    """Translation language code."""
    languageCode: LanguageCodeEnum!
  ): CollectionTranslate

  """
  Updates a collection. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  collectionUpdate(
    """ID of a collection to update."""
    id: ID!

    """Fields required to update a collection."""
    input: CollectionInput!
  ): CollectionUpdate

  """
  Confirm user account with token sent by email during registration.
  
  Triggers the following webhook events:
  - ACCOUNT_CONFIRMED (async): Account was confirmed.
  """
  confirmAccount(
    """E-mail of the user performing account confirmation."""
    email: String!

    """A one-time token required to confirm the account."""
    token: String!
  ): ConfirmAccount

  """
  Confirm the email change of the logged-in user. 
  
  Requires one of the following permissions: AUTHENTICATED_USER.
  
  Triggers the following webhook events:
  - CUSTOMER_UPDATED (async): A customer account was updated.
  - NOTIFY_USER (async): A notification that account email change was confirmed.
  - ACCOUNT_EMAIL_CHANGED (async): An account email was changed.
  """
  confirmEmailChange(
    """
    Slug of a channel which will be used to notify users. Optional when only one channel exists.
    """
    channel: String

    """A one-time token required to change the email."""
    token: String!
  ): ConfirmEmailChange

  """
  Creates new warehouse. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  createWarehouse(
    """Fields required to create warehouse."""
    input: WarehouseCreateInput!
  ): WarehouseCreate

  """
  Deletes customers. 
  
  Requires one of the following permissions: MANAGE_USERS.
  
  Triggers the following webhook events:
  - CUSTOMER_DELETED (async): A customer account was deleted.
  """
  customerBulkDelete(
    """List of user IDs to delete."""
    ids: [ID!]!
  ): CustomerBulkDelete

  """
  Updates customers.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: MANAGE_USERS.
  
  Triggers the following webhook events:
  - CUSTOMER_UPDATED (async): A customer account was updated.
  - CUSTOMER_METADATA_UPDATED (async): Optionally called when customer's metadata was updated.
  """
  customerBulkUpdate(
    """Input list of customers to update."""
    customers: [CustomerBulkUpdateInput!]!

    """Policies of error handling. DEFAULT: REJECT_EVERYTHING"""
    errorPolicy: ErrorPolicyEnum
  ): CustomerBulkUpdate

  """
  Creates a new customer. 
  
  Requires one of the following permissions: MANAGE_USERS.
  
  Triggers the following webhook events:
  - CUSTOMER_CREATED (async): A new customer account was created.
  - CUSTOMER_METADATA_UPDATED (async): Optionally called when customer's metadata was updated.
  - NOTIFY_USER (async): A notification for setting the password.
  - ACCOUNT_SET_PASSWORD_REQUESTED (async): Setting a new password for the account is requested.
  """
  customerCreate(
    """Fields required to create a customer."""
    input: UserCreateInput!
  ): CustomerCreate

  """
  Deletes a customer. 
  
  Requires one of the following permissions: MANAGE_USERS.
  
  Triggers the following webhook events:
  - CUSTOMER_DELETED (async): A customer account was deleted.
  """
  customerDelete(
    """
    External ID of a customer to update. 
    
    Added in Saleor 3.10.
    """
    externalReference: String

    """ID of a customer to delete."""
    id: ID
  ): CustomerDelete

  """
  Updates an existing customer. 
  
  Requires one of the following permissions: MANAGE_USERS.
  
  Triggers the following webhook events:
  - CUSTOMER_UPDATED (async): A new customer account was updated.
  - CUSTOMER_METADATA_UPDATED (async): Optionally called when customer's metadata was updated.
  """
  customerUpdate(
    """
    External ID of a customer to update. 
    
    Added in Saleor 3.10.
    """
    externalReference: String

    """ID of a customer to update."""
    id: ID

    """Fields required to update a customer."""
    input: CustomerInput!
  ): CustomerUpdate

  """
  Delete metadata of an object. To use it, you need to have access to the modified object.
  """
  deleteMetadata(
    """ID or token (for Order and Checkout) of an object to update."""
    id: ID!

    """Metadata keys to delete."""
    keys: [String!]!
  ): DeleteMetadata

  """
  Delete object's private metadata. To use it, you need to be an authenticated staff user or an app and have access to the modified object.
  """
  deletePrivateMetadata(
    """ID or token (for Order and Checkout) of an object to update."""
    id: ID!

    """Metadata keys to delete."""
    keys: [String!]!
  ): DeletePrivateMetadata

  """
  Deletes selected warehouse. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  deleteWarehouse(
    """ID of a warehouse to delete."""
    id: ID!
  ): WarehouseDelete

  """
  Create new digital content. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  digitalContentCreate(
    """Fields required to create a digital content."""
    input: DigitalContentUploadInput!

    """ID of a product variant to upload digital content."""
    variantId: ID!
  ): DigitalContentCreate

  """
  Remove digital content assigned to given variant. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  digitalContentDelete(
    """ID of a product variant with digital content to remove."""
    variantId: ID!
  ): DigitalContentDelete

  """
  Update digital content. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  digitalContentUpdate(
    """Fields required to update a digital content."""
    input: DigitalContentInput!

    """ID of a product variant with digital content to update."""
    variantId: ID!
  ): DigitalContentUpdate

  """
  Generate new URL to digital content. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  digitalContentUrlCreate(
    """Fields required to create a new url."""
    input: DigitalContentUrlCreateInput!
  ): DigitalContentUrlCreate

  """
  Deletes draft orders. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  draftOrderBulkDelete(
    """List of draft order IDs to delete."""
    ids: [ID!]!
  ): DraftOrderBulkDelete

  """
  Completes creating an order. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  draftOrderComplete(
    """ID of the order that will be completed."""
    id: ID!
  ): DraftOrderComplete

  """
  Creates a new draft order. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  draftOrderCreate(
    """Fields required to create an order."""
    input: DraftOrderCreateInput!
  ): DraftOrderCreate

  """
  Deletes a draft order. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  draftOrderDelete(
    """
    External ID of a product to delete. 
    
    Added in Saleor 3.10.
    """
    externalReference: String

    """ID of a product to delete."""
    id: ID
  ): DraftOrderDelete

  """
  Deletes order lines. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  draftOrderLinesBulkDelete(
    """List of order lines IDs to delete."""
    ids: [ID!]!
  ): DraftOrderLinesBulkDelete @deprecated(reason: "This field will be removed in Saleor 4.0.")

  """
  Updates a draft order. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  draftOrderUpdate(
    """
    External ID of a draft order to update. 
    
    Added in Saleor 3.10.
    """
    externalReference: String

    """ID of a draft order to update."""
    id: ID

    """Fields required to update an order."""
    input: DraftOrderInput!
  ): DraftOrderUpdate

  """
  Retries event delivery. 
  
  Requires one of the following permissions: MANAGE_APPS.
  """
  eventDeliveryRetry(
    """ID of the event delivery to retry."""
    id: ID!
  ): EventDeliveryRetry

  """
  Export gift cards to csv file.
  
  Added in Saleor 3.1. 
  
  Requires one of the following permissions: MANAGE_GIFT_CARD.
  
  Triggers the following webhook events:
  - NOTIFY_USER (async): A notification for the exported file.
  - GIFT_CARD_EXPORT_COMPLETED (async): A notification for the exported file.
  """
  exportGiftCards(
    """Fields required to export gift cards data."""
    input: ExportGiftCardsInput!
  ): ExportGiftCards

  """
  Export products to csv file. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  
  Triggers the following webhook events:
  - NOTIFY_USER (async): A notification for the exported file.
  - PRODUCT_EXPORT_COMPLETED (async): A notification for the exported file.
  """
  exportProducts(
    """Fields required to export product data."""
    input: ExportProductsInput!
  ): ExportProducts

  """
  Export voucher codes to csv/xlsx file.
  
  Added in Saleor 3.18.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - VOUCHER_CODE_EXPORT_COMPLETED (async): A notification for the exported file.
  """
  exportVoucherCodes(
    """Fields required to export voucher codes."""
    input: ExportVoucherCodesInput!
  ): ExportVoucherCodes

  """Prepare external authentication URL for user by custom plugin."""
  externalAuthenticationUrl(
    """The data required by plugin to create external authentication url."""
    input: JSONString!

    """The ID of the authentication plugin."""
    pluginId: String!
  ): ExternalAuthenticationUrl

  """Logout user by custom plugin."""
  externalLogout(
    """The data required by plugin to proceed the logout process."""
    input: JSONString!

    """The ID of the authentication plugin."""
    pluginId: String!
  ): ExternalLogout

  """
  Trigger sending a notification with the notify plugin method. Serializes nodes provided as ids parameter and includes this data in the notification payload.
  
  Added in Saleor 3.1.
  """
  externalNotificationTrigger(
    """
    Channel slug. Saleor will send a notification within a provided channel. Please, make sure that necessary plugins are active.
    """
    channel: String!

    """Input for External Notification Trigger."""
    input: ExternalNotificationTriggerInput!

    """The ID of notification plugin."""
    pluginId: String
  ): ExternalNotificationTrigger @deprecated(reason: "\\n\\nDEPRECATED: this mutation will be removed in Saleor 4.0.")

  """Obtain external access tokens for user by custom plugin."""
  externalObtainAccessTokens(
    """The data required by plugin to create authentication data."""
    input: JSONString!

    """The ID of the authentication plugin."""
    pluginId: String!
  ): ExternalObtainAccessTokens

  """Refresh user's access by custom plugin."""
  externalRefresh(
    """The data required by plugin to proceed the refresh process."""
    input: JSONString!

    """The ID of the authentication plugin."""
    pluginId: String!
  ): ExternalRefresh

  """Verify external authentication data by plugin."""
  externalVerify(
    """The data required by plugin to proceed the verification."""
    input: JSONString!

    """The ID of the authentication plugin."""
    pluginId: String!
  ): ExternalVerify

  """
  Upload a file. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec 
  
  Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER.
  """
  fileUpload(
    """Represents a file in a multipart request."""
    file: Upload!
  ): FileUpload

  """
  Activate a gift card. 
  
  Requires one of the following permissions: MANAGE_GIFT_CARD.
  
  Triggers the following webhook events:
  - GIFT_CARD_STATUS_CHANGED (async): A gift card was activated.
  """
  giftCardActivate(
    """ID of a gift card to activate."""
    id: ID!
  ): GiftCardActivate

  """
  Adds note to the gift card.
  
  Added in Saleor 3.1. 
  
  Requires one of the following permissions: MANAGE_GIFT_CARD.
  
  Triggers the following webhook events:
  - GIFT_CARD_UPDATED (async): A gift card was updated.
  """
  giftCardAddNote(
    """ID of the gift card to add a note for."""
    id: ID!

    """Fields required to create a note for the gift card."""
    input: GiftCardAddNoteInput!
  ): GiftCardAddNote

  """
  Activate gift cards.
  
  Added in Saleor 3.1. 
  
  Requires one of the following permissions: MANAGE_GIFT_CARD.
  
  Triggers the following webhook events:
  - GIFT_CARD_STATUS_CHANGED (async): A gift card was activated.
  """
  giftCardBulkActivate(
    """List of gift card IDs to activate."""
    ids: [ID!]!
  ): GiftCardBulkActivate

  """
  Create gift cards.
  
  Added in Saleor 3.1. 
  
  Requires one of the following permissions: MANAGE_GIFT_CARD.
  
  Triggers the following webhook events:
  - GIFT_CARD_CREATED (async): A gift card was created.
  - NOTIFY_USER (async): A notification for created gift card.
  """
  giftCardBulkCreate(
    """Fields required to create gift cards."""
    input: GiftCardBulkCreateInput!
  ): GiftCardBulkCreate

  """
  Deactivate gift cards.
  
  Added in Saleor 3.1. 
  
  Requires one of the following permissions: MANAGE_GIFT_CARD.
  
  Triggers the following webhook events:
  - GIFT_CARD_STATUS_CHANGED (async): A gift card was deactivated.
  """
  giftCardBulkDeactivate(
    """List of gift card IDs to deactivate."""
    ids: [ID!]!
  ): GiftCardBulkDeactivate

  """
  Delete gift cards.
  
  Added in Saleor 3.1. 
  
  Requires one of the following permissions: MANAGE_GIFT_CARD.
  
  Triggers the following webhook events:
  - GIFT_CARD_DELETED (async): A gift card was deleted.
  """
  giftCardBulkDelete(
    """List of gift card IDs to delete."""
    ids: [ID!]!
  ): GiftCardBulkDelete

  """
  Creates a new gift card. 
  
  Requires one of the following permissions: MANAGE_GIFT_CARD.
  
  Triggers the following webhook events:
  - GIFT_CARD_CREATED (async): A gift card was created.
  - NOTIFY_USER (async): A notification for created gift card.
  """
  giftCardCreate(
    """Fields required to create a gift card."""
    input: GiftCardCreateInput!
  ): GiftCardCreate

  """
  Deactivate a gift card. 
  
  Requires one of the following permissions: MANAGE_GIFT_CARD.
  
  Triggers the following webhook events:
  - GIFT_CARD_STATUS_CHANGED (async): A gift card was deactivated.
  """
  giftCardDeactivate(
    """ID of a gift card to deactivate."""
    id: ID!
  ): GiftCardDeactivate

  """
  Delete gift card.
  
  Added in Saleor 3.1. 
  
  Requires one of the following permissions: MANAGE_GIFT_CARD.
  
  Triggers the following webhook events:
  - GIFT_CARD_DELETED (async): A gift card was deleted.
  """
  giftCardDelete(
    """ID of the gift card to delete."""
    id: ID!
  ): GiftCardDelete

  """
  Resend a gift card.
  
  Added in Saleor 3.1. 
  
  Requires one of the following permissions: MANAGE_GIFT_CARD.
  
  Triggers the following webhook events:
  - NOTIFY_USER (async): A notification for gift card resend.
  """
  giftCardResend(
    """Fields required to resend a gift card."""
    input: GiftCardResendInput!
  ): GiftCardResend

  """
  Update gift card settings. 
  
  Requires one of the following permissions: MANAGE_GIFT_CARD.
  """
  giftCardSettingsUpdate(
    """Fields required to update gift card settings."""
    input: GiftCardSettingsUpdateInput!
  ): GiftCardSettingsUpdate

  """
  Update a gift card. 
  
  Requires one of the following permissions: MANAGE_GIFT_CARD.
  
  Triggers the following webhook events:
  - GIFT_CARD_UPDATED (async): A gift card was updated.
  """
  giftCardUpdate(
    """ID of a gift card to update."""
    id: ID!

    """Fields required to update a gift card."""
    input: GiftCardUpdateInput!
  ): GiftCardUpdate

  """
  Creates a ready to send invoice. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  invoiceCreate(
    """Fields required when creating an invoice."""
    input: InvoiceCreateInput!

    """ID of the order related to invoice."""
    orderId: ID!
  ): InvoiceCreate

  """
  Deletes an invoice. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  invoiceDelete(
    """ID of an invoice to delete."""
    id: ID!
  ): InvoiceDelete

  """
  Request an invoice for the order using plugin. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  
  Triggers the following webhook events:
  - INVOICE_REQUESTED (async): An invoice was requested.
  """
  invoiceRequest(
    """Invoice number, if not provided it will be generated."""
    number: String

    """ID of the order related to invoice."""
    orderId: ID!
  ): InvoiceRequest

  """
  Requests deletion of an invoice. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  
  Triggers the following webhook events:
  - INVOICE_DELETED (async): An invoice was requested to delete.
  """
  invoiceRequestDelete(
    """ID of an invoice to request the deletion."""
    id: ID!
  ): InvoiceRequestDelete

  """
  Send an invoice notification to the customer. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  
  Triggers the following webhook events:
  - INVOICE_SENT (async): A notification for invoice send
  - NOTIFY_USER (async): A notification for invoice send
  """
  invoiceSendNotification(
    """ID of an invoice to be sent."""
    id: ID!
  ): InvoiceSendNotification

  """
  Updates an invoice. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  invoiceUpdate(
    """ID of an invoice to update."""
    id: ID!

    """Fields to use when updating an invoice."""
    input: UpdateInvoiceInput!
  ): InvoiceUpdate

  """
  Deletes menus. 
  
  Requires one of the following permissions: MANAGE_MENUS.
  
  Triggers the following webhook events:
  - MENU_DELETED (async): A menu was deleted.
  """
  menuBulkDelete(
    """List of menu IDs to delete."""
    ids: [ID!]!
  ): MenuBulkDelete

  """
  Creates a new Menu. 
  
  Requires one of the following permissions: MANAGE_MENUS.
  
  Triggers the following webhook events:
  - MENU_CREATED (async): A menu was created.
  """
  menuCreate(
    """Fields required to create a menu."""
    input: MenuCreateInput!
  ): MenuCreate

  """
  Deletes a menu. 
  
  Requires one of the following permissions: MANAGE_MENUS.
  
  Triggers the following webhook events:
  - MENU_DELETED (async): A menu was deleted.
  """
  menuDelete(
    """ID of a menu to delete."""
    id: ID!
  ): MenuDelete

  """
  Deletes menu items. 
  
  Requires one of the following permissions: MANAGE_MENUS.
  
  Triggers the following webhook events:
  - MENU_ITEM_DELETED (async): A menu item was deleted.
  """
  menuItemBulkDelete(
    """List of menu item IDs to delete."""
    ids: [ID!]!
  ): MenuItemBulkDelete

  """
  Creates a new menu item. 
  
  Requires one of the following permissions: MANAGE_MENUS.
  
  Triggers the following webhook events:
  - MENU_ITEM_CREATED (async): A menu item was created.
  """
  menuItemCreate(
    """
    Fields required to update a menu item. Only one of `url`, `category`, `page`, `collection` is allowed per item.
    """
    input: MenuItemCreateInput!
  ): MenuItemCreate

  """
  Deletes a menu item. 
  
  Requires one of the following permissions: MANAGE_MENUS.
  
  Triggers the following webhook events:
  - MENU_ITEM_DELETED (async): A menu item was deleted.
  """
  menuItemDelete(
    """ID of a menu item to delete."""
    id: ID!
  ): MenuItemDelete

  """
  Moves items of menus. 
  
  Requires one of the following permissions: MANAGE_MENUS.
  
  Triggers the following webhook events:
  - MENU_ITEM_UPDATED (async): Optionally triggered when sort order or parent changed for menu item.
  """
  menuItemMove(
    """ID of the menu."""
    menu: ID!

    """The menu position data."""
    moves: [MenuItemMoveInput!]!
  ): MenuItemMove

  """
  Creates/updates translations for a menu item. 
  
  Requires one of the following permissions: MANAGE_TRANSLATIONS.
  """
  menuItemTranslate(
    """MenuItem ID or MenuItemTranslatableContent ID."""
    id: ID!

    """Fields required to update menu item translations."""
    input: NameTranslationInput!

    """Translation language code."""
    languageCode: LanguageCodeEnum!
  ): MenuItemTranslate

  """
  Updates a menu item. 
  
  Requires one of the following permissions: MANAGE_MENUS.
  
  Triggers the following webhook events:
  - MENU_ITEM_UPDATED (async): A menu item was updated.
  """
  menuItemUpdate(
    """ID of a menu item to update."""
    id: ID!

    """
    Fields required to update a menu item. Only one of `url`, `category`, `page`, `collection` is allowed per item.
    """
    input: MenuItemInput!
  ): MenuItemUpdate

  """
  Updates a menu. 
  
  Requires one of the following permissions: MANAGE_MENUS.
  
  Triggers the following webhook events:
  - MENU_UPDATED (async): A menu was updated.
  """
  menuUpdate(
    """ID of a menu to update."""
    id: ID!

    """Fields required to update a menu."""
    input: MenuInput!
  ): MenuUpdate

  """
  Adds note to the order.
  
  DEPRECATED: this mutation will be removed in Saleor 4.0. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderAddNote(
    """Fields required to create a note for the order."""
    input: OrderAddNoteInput!

    """ID of the order to add a note for."""
    order: ID!
  ): OrderAddNote @deprecated(reason: "This field will be removed in Saleor 4.0. Use `orderNoteAdd` instead.")

  """
  Cancels orders. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderBulkCancel(
    """List of orders IDs to cancel."""
    ids: [ID!]!
  ): OrderBulkCancel

  """
  Creates multiple orders.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: MANAGE_ORDERS_IMPORT.
  """
  orderBulkCreate(
    """Policies of error handling. DEFAULT: REJECT_EVERYTHING"""
    errorPolicy: ErrorPolicyEnum

    """Input list of orders to create. Orders limit: 50."""
    orders: [OrderBulkCreateInput!]!

    """
    Determine how stock should be updated, while processing the order. DEFAULT: UPDATE - Only do update, if there is enough stocks.
    """
    stockUpdatePolicy: StockUpdatePolicyEnum
  ): OrderBulkCreate

  """
  Cancel an order. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderCancel(
    """ID of the order to cancel."""
    id: ID!
  ): OrderCancel

  """
  Capture an order. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderCapture(
    """Amount of money to capture."""
    amount: PositiveDecimal!

    """ID of the order to capture."""
    id: ID!
  ): OrderCapture

  """
  Confirms an unconfirmed order by changing status to unfulfilled. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderConfirm(
    """ID of an order to confirm."""
    id: ID!
  ): OrderConfirm

  """
  Create new order from existing checkout. Requires the following permissions: AUTHENTICATED_APP and HANDLE_CHECKOUTS.
  
  Added in Saleor 3.2.
  
  Triggers the following webhook events:
  - SHIPPING_LIST_METHODS_FOR_CHECKOUT (sync): Optionally triggered when cached external shipping methods are invalid.
  - CHECKOUT_FILTER_SHIPPING_METHODS (sync): Optionally triggered when cached filtered shipping methods are invalid.
  - CHECKOUT_CALCULATE_TAXES (sync): Optionally triggered when checkout prices are expired.
  - ORDER_CREATED (async): Triggered when order is created.
  - NOTIFY_USER (async): A notification for order placement.
  - NOTIFY_USER (async): A staff notification for order placement.
  - ORDER_UPDATED (async): Triggered when order received the update after placement.
  - ORDER_PAID (async): Triggered when newly created order is paid.
  - ORDER_FULLY_PAID (async): Triggered when newly created order is fully paid.
  - ORDER_CONFIRMED (async): Optionally triggered when newly created order are automatically marked as confirmed.
  """
  orderCreateFromCheckout(
    """ID of a checkout that will be converted to an order."""
    id: ID!

    """
    Fields required to update the checkout metadata.
    
    Added in Saleor 3.8.
    """
    metadata: [MetadataInput!]

    """
    Fields required to update the checkout private metadata.
    
    Added in Saleor 3.8.
    """
    privateMetadata: [MetadataInput!]

    """
    Determines if checkout should be removed after creating an order. Default true.
    """
    removeCheckout: Boolean = true
  ): OrderCreateFromCheckout

  """
  Adds discount to the order. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderDiscountAdd(
    """Fields required to create a discount for the order."""
    input: OrderDiscountCommonInput!

    """ID of an order to discount."""
    orderId: ID!
  ): OrderDiscountAdd

  """
  Remove discount from the order. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderDiscountDelete(
    """ID of a discount to remove."""
    discountId: ID!
  ): OrderDiscountDelete

  """
  Update discount for the order. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderDiscountUpdate(
    """ID of a discount to update."""
    discountId: ID!

    """Fields required to update a discount for the order."""
    input: OrderDiscountCommonInput!
  ): OrderDiscountUpdate

  """
  Creates new fulfillments for an order. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  
  Triggers the following webhook events:
  - FULFILLMENT_CREATED (async): A new fulfillment is created.
  - ORDER_FULFILLED (async): Order is fulfilled.
  - FULFILLMENT_TRACKING_NUMBER_UPDATED (async): Sent when fulfillment tracking number is updated.
  - FULFILLMENT_APPROVED (async): A fulfillment is approved.
  """
  orderFulfill(
    """Fields required to create a fulfillment."""
    input: OrderFulfillInput!

    """ID of the order to be fulfilled."""
    order: ID
  ): OrderFulfill

  """
  Approve existing fulfillment.
  
  Added in Saleor 3.1. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  
  Triggers the following webhook events:
  - FULFILLMENT_APPROVED (async): Fulfillment is approved.
  """
  orderFulfillmentApprove(
    """True if stock could be exceeded."""
    allowStockToBeExceeded: Boolean = false

    """ID of a fulfillment to approve."""
    id: ID!

    """True if confirmation email should be send."""
    notifyCustomer: Boolean!
  ): FulfillmentApprove

  """
  Cancels existing fulfillment and optionally restocks items. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderFulfillmentCancel(
    """ID of a fulfillment to cancel."""
    id: ID!

    """Fields required to cancel a fulfillment."""
    input: FulfillmentCancelInput
  ): FulfillmentCancel

  """
  Refund products. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderFulfillmentRefundProducts(
    """Fields required to create an refund fulfillment."""
    input: OrderRefundProductsInput!

    """ID of the order to be refunded."""
    order: ID!
  ): FulfillmentRefundProducts

  """
  Return products. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderFulfillmentReturnProducts(
    """Fields required to return products."""
    input: OrderReturnProductsInput!

    """ID of the order to be returned."""
    order: ID!
  ): FulfillmentReturnProducts

  """
  Updates a fulfillment for an order. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  
  Triggers the following webhook events:
  - FULFILLMENT_TRACKING_NUMBER_UPDATED (async): Fulfillment tracking number is updated.
  """
  orderFulfillmentUpdateTracking(
    """ID of a fulfillment to update."""
    id: ID!

    """Fields required to update a fulfillment."""
    input: FulfillmentUpdateTrackingInput!
  ): FulfillmentUpdateTracking

  """
  Adds granted refund to the order.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderGrantRefundCreate(
    """ID of the order."""
    id: ID!

    """Fields required to create a granted refund for the order."""
    input: OrderGrantRefundCreateInput!
  ): OrderGrantRefundCreate

  """
  Updates granted refund.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderGrantRefundUpdate(
    """ID of the granted refund."""
    id: ID!

    """Fields required to update a granted refund."""
    input: OrderGrantRefundUpdateInput!
  ): OrderGrantRefundUpdate

  """
  Deletes an order line from an order. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderLineDelete(
    """ID of the order line to delete."""
    id: ID!
  ): OrderLineDelete

  """
  Remove discount applied to the order line. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderLineDiscountRemove(
    """ID of a order line to remove its discount"""
    orderLineId: ID!
  ): OrderLineDiscountRemove

  """
  Update discount for the order line. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderLineDiscountUpdate(
    """Fields required to update price for the order line."""
    input: OrderDiscountCommonInput!

    """ID of a order line to update price"""
    orderLineId: ID!
  ): OrderLineDiscountUpdate

  """
  Updates an order line of an order. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderLineUpdate(
    """ID of the order line to update."""
    id: ID!

    """Fields required to update an order line."""
    input: OrderLineInput!
  ): OrderLineUpdate

  """
  Create order lines for an order. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderLinesCreate(
    """ID of the order to add the lines to."""
    id: ID!

    """Fields required to add order lines."""
    input: [OrderLineCreateInput!]!
  ): OrderLinesCreate

  """
  Mark order as manually paid. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderMarkAsPaid(
    """ID of the order to mark paid."""
    id: ID!

    """The external transaction reference."""
    transactionReference: String
  ): OrderMarkAsPaid

  """
  Adds note to the order.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderNoteAdd(
    """Fields required to create a note for the order."""
    input: OrderNoteInput!

    """ID of the order to add a note for."""
    order: ID!
  ): OrderNoteAdd

  """
  Updates note of an order.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderNoteUpdate(
    """Fields required to create a note for the order."""
    input: OrderNoteInput!

    """ID of the note."""
    note: ID!
  ): OrderNoteUpdate

  """
  Refund an order. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderRefund(
    """Amount of money to refund."""
    amount: PositiveDecimal!

    """ID of the order to refund."""
    id: ID!
  ): OrderRefund

  """
  Update shop order settings across all channels. Returns `orderSettings` for the first `channel` in alphabetical order.  
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderSettingsUpdate(
    """Fields required to update shop order settings."""
    input: OrderSettingsUpdateInput!
  ): OrderSettingsUpdate @deprecated(reason: "\\n\\nDEPRECATED: this mutation will be removed in Saleor 4.0. Use `channelUpdate` mutation instead.")

  """
  Updates an order. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderUpdate(
    """
    External ID of an order to update. 
    
    Added in Saleor 3.10.
    """
    externalReference: String

    """ID of an order to update."""
    id: ID

    """Fields required to update an order."""
    input: OrderUpdateInput!
  ): OrderUpdate

  """
  Updates a shipping method of the order. Requires shipping method ID to update, when null is passed then currently assigned shipping method is removed. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderUpdateShipping(
    """Fields required to change shipping method of the order."""
    input: OrderUpdateShippingInput!

    """ID of the order to update a shipping method."""
    order: ID!
  ): OrderUpdateShipping

  """
  Void an order. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderVoid(
    """ID of the order to void."""
    id: ID!
  ): OrderVoid

  """
  Assign attributes to a given page type. 
  
  Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
  """
  pageAttributeAssign(
    """The IDs of the attributes to assign."""
    attributeIds: [ID!]!

    """ID of the page type to assign the attributes into."""
    pageTypeId: ID!
  ): PageAttributeAssign

  """
  Unassign attributes from a given page type. 
  
  Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
  """
  pageAttributeUnassign(
    """The IDs of the attributes to unassign."""
    attributeIds: [ID!]!

    """ID of the page type from which the attributes should be unassign."""
    pageTypeId: ID!
  ): PageAttributeUnassign

  """
  Deletes pages. 
  
  Requires one of the following permissions: MANAGE_PAGES.
  """
  pageBulkDelete(
    """List of page IDs to delete."""
    ids: [ID!]!
  ): PageBulkDelete

  """
  Publish pages. 
  
  Requires one of the following permissions: MANAGE_PAGES.
  """
  pageBulkPublish(
    """List of page IDs to (un)publish."""
    ids: [ID!]!

    """Determine if pages will be published or not."""
    isPublished: Boolean!
  ): PageBulkPublish

  """
  Creates a new page. 
  
  Requires one of the following permissions: MANAGE_PAGES.
  """
  pageCreate(
    """Fields required to create a page."""
    input: PageCreateInput!
  ): PageCreate

  """
  Deletes a page. 
  
  Requires one of the following permissions: MANAGE_PAGES.
  """
  pageDelete(
    """ID of a page to delete."""
    id: ID!
  ): PageDelete

  """
  Reorder page attribute values. 
  
  Requires one of the following permissions: MANAGE_PAGES.
  """
  pageReorderAttributeValues(
    """ID of an attribute."""
    attributeId: ID!

    """The list of reordering operations for given attribute values."""
    moves: [ReorderInput!]!

    """ID of a page."""
    pageId: ID!
  ): PageReorderAttributeValues

  """
  Creates/updates translations for a page. 
  
  Requires one of the following permissions: MANAGE_TRANSLATIONS.
  """
  pageTranslate(
    """Page ID or PageTranslatableContent ID."""
    id: ID!

    """Fields required to update page translations."""
    input: PageTranslationInput!

    """Translation language code."""
    languageCode: LanguageCodeEnum!
  ): PageTranslate

  """
  Delete page types. 
  
  Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
  """
  pageTypeBulkDelete(
    """List of page type IDs to delete"""
    ids: [ID!]!
  ): PageTypeBulkDelete

  """
  Create a new page type. 
  
  Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
  """
  pageTypeCreate(
    """Fields required to create page type."""
    input: PageTypeCreateInput!
  ): PageTypeCreate

  """
  Delete a page type. 
  
  Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
  """
  pageTypeDelete(
    """ID of the page type to delete."""
    id: ID!
  ): PageTypeDelete

  """
  Reorder the attributes of a page type. 
  
  Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
  """
  pageTypeReorderAttributes(
    """The list of attribute reordering operations."""
    moves: [ReorderInput!]!

    """ID of a page type."""
    pageTypeId: ID!
  ): PageTypeReorderAttributes

  """
  Update page type. 
  
  Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
  """
  pageTypeUpdate(
    """ID of the page type to update."""
    id: ID

    """Fields required to update page type."""
    input: PageTypeUpdateInput!
  ): PageTypeUpdate

  """
  Updates an existing page. 
  
  Requires one of the following permissions: MANAGE_PAGES.
  """
  pageUpdate(
    """ID of a page to update."""
    id: ID!

    """Fields required to update a page."""
    input: PageInput!
  ): PageUpdate

  """
  Change the password of the logged in user. 
  
  Requires one of the following permissions: AUTHENTICATED_USER.
  """
  passwordChange(
    """New user password."""
    newPassword: String!

    """Current user password."""
    oldPassword: String
  ): PasswordChange

  """
  Captures the authorized payment amount. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  paymentCapture(
    """Transaction amount."""
    amount: PositiveDecimal

    """Payment ID."""
    paymentId: ID!
  ): PaymentCapture

  """Check payment balance."""
  paymentCheckBalance(
    """Fields required to check payment balance."""
    input: PaymentCheckBalanceInput!
  ): PaymentCheckBalance

  """
  Initializes a payment gateway session. It triggers the webhook `PAYMENT_GATEWAY_INITIALIZE_SESSION`, to the requested `paymentGateways`. If `paymentGateways` is not provided, the webhook will be send to all subscribed payment gateways. There is a limit of 100 transaction items per checkout / order.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  paymentGatewayInitialize(
    """
    The amount requested for initializing the payment gateway. If not provided, the difference between checkout.total - transactions that are already processed will be send.
    """
    amount: PositiveDecimal

    """The ID of the checkout or order."""
    id: ID!

    """List of payment gateways to initialize."""
    paymentGateways: [PaymentGatewayToInitialize!]
  ): PaymentGatewayInitialize

  """
  Initializes payment gateway for tokenizing payment method session.
  
  Added in Saleor 3.16.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: AUTHENTICATED_USER.
  
  Triggers the following webhook events:
  - PAYMENT_GATEWAY_INITIALIZE_TOKENIZATION_SESSION (sync): The customer requested to initialize payment gateway for tokenization.
  """
  paymentGatewayInitializeTokenization(
    """Slug of a channel related to tokenization request."""
    channel: String!

    """The data that will be passed to the payment gateway."""
    data: JSON

    """The identifier of the payment gateway app to initialize tokenization."""
    id: String!
  ): PaymentGatewayInitializeTokenization

  """Initializes payment process when it is required by gateway."""
  paymentInitialize(
    """Slug of a channel for which the data should be returned."""
    channel: String

    """A gateway name used to initialize the payment."""
    gateway: String!

    """Client-side generated data required to initialize the payment."""
    paymentData: JSONString
  ): PaymentInitialize

  """
  Tokenize payment method.
  
  Added in Saleor 3.16.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: AUTHENTICATED_USER.
  
  Triggers the following webhook events:
  - PAYMENT_METHOD_INITIALIZE_TOKENIZATION_SESSION (sync): The customer requested to tokenize payment method.
  """
  paymentMethodInitializeTokenization(
    """Slug of a channel related to tokenization request."""
    channel: String!

    """The data that will be passed to the payment gateway."""
    data: JSON

    """
    The identifier of the payment gateway app to initialize payment method tokenization.
    """
    id: String!

    """The payment flow that the tokenized payment method should support."""
    paymentFlowToSupport: TokenizedPaymentFlowEnum!
  ): PaymentMethodInitializeTokenization

  """
  Tokenize payment method.
  
  Added in Saleor 3.16.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: AUTHENTICATED_USER.
  
  Triggers the following webhook events:
  - PAYMENT_METHOD_PROCESS_TOKENIZATION_SESSION (sync): The customer continues payment method tokenization.
  """
  paymentMethodProcessTokenization(
    """Slug of a channel related to tokenization request."""
    channel: String!

    """The data that will be passed to the payment gateway."""
    data: JSON

    """
    The identifier of the payment gateway app to process payment method tokenization.
    """
    id: String!
  ): PaymentMethodProcessTokenization

  """
  Refunds the captured payment amount. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  paymentRefund(
    """Transaction amount."""
    amount: PositiveDecimal

    """Payment ID."""
    paymentId: ID!
  ): PaymentRefund

  """
  Voids the authorized payment. 
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  paymentVoid(
    """Payment ID."""
    paymentId: ID!
  ): PaymentVoid

  """
  Create new permission group. Apps are not allowed to perform this mutation. 
  
  Requires one of the following permissions: MANAGE_STAFF.
  
  Triggers the following webhook events:
  - PERMISSION_GROUP_CREATED (async)
  """
  permissionGroupCreate(
    """Input fields to create permission group."""
    input: PermissionGroupCreateInput!
  ): PermissionGroupCreate

  """
  Delete permission group. Apps are not allowed to perform this mutation. 
  
  Requires one of the following permissions: MANAGE_STAFF.
  
  Triggers the following webhook events:
  - PERMISSION_GROUP_DELETED (async)
  """
  permissionGroupDelete(
    """ID of the group to delete."""
    id: ID!
  ): PermissionGroupDelete

  """
  Update permission group. Apps are not allowed to perform this mutation. 
  
  Requires one of the following permissions: MANAGE_STAFF.
  
  Triggers the following webhook events:
  - PERMISSION_GROUP_UPDATED (async)
  """
  permissionGroupUpdate(
    """ID of the group to update."""
    id: ID!

    """Input fields to create permission group."""
    input: PermissionGroupUpdateInput!
  ): PermissionGroupUpdate

  """
  Update plugin configuration. 
  
  Requires one of the following permissions: MANAGE_PLUGINS.
  """
  pluginUpdate(
    """ID of a channel for which the data should be modified."""
    channelId: ID

    """ID of plugin to update."""
    id: ID!

    """Fields required to update a plugin configuration."""
    input: PluginUpdateInput!
  ): PluginUpdate

  """
  Assign attributes to a given product type. 
  
  Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
  """
  productAttributeAssign(
    """The operations to perform."""
    operations: [ProductAttributeAssignInput!]!

    """ID of the product type to assign the attributes into."""
    productTypeId: ID!
  ): ProductAttributeAssign

  """
  Update attributes assigned to product variant for given product type.
  
  Added in Saleor 3.1. 
  
  Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
  """
  productAttributeAssignmentUpdate(
    """The operations to perform."""
    operations: [ProductAttributeAssignmentUpdateInput!]!

    """ID of the product type to assign the attributes into."""
    productTypeId: ID!
  ): ProductAttributeAssignmentUpdate

  """
  Un-assign attributes from a given product type. 
  
  Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
  """
  productAttributeUnassign(
    """The IDs of the attributes to unassign."""
    attributeIds: [ID!]!

    """ID of the product type from which the attributes should be unassigned."""
    productTypeId: ID!
  ): ProductAttributeUnassign

  """
  Creates products.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productBulkCreate(
    """Policies of error handling. DEFAULT: REJECT_EVERYTHING"""
    errorPolicy: ErrorPolicyEnum

    """Input list of products to create."""
    products: [ProductBulkCreateInput!]!
  ): ProductBulkCreate

  """
  Deletes products. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productBulkDelete(
    """List of product IDs to delete."""
    ids: [ID!]!
  ): ProductBulkDelete

  """
  Creates/updates translations for products.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: MANAGE_TRANSLATIONS.
  
  Triggers the following webhook events:
  - TRANSLATION_CREATED (async): Called when a translation was created.
  - TRANSLATION_UPDATED (async): Called when a translation was updated.
  """
  productBulkTranslate(
    """Policies of error handling. DEFAULT: REJECT_EVERYTHING"""
    errorPolicy: ErrorPolicyEnum

    """List of product translations."""
    translations: [ProductBulkTranslateInput!]!
  ): ProductBulkTranslate

  """
  Manage product's availability in channels. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productChannelListingUpdate(
    """ID of a product to update."""
    id: ID!

    """Fields required to create or update product channel listings."""
    input: ProductChannelListingUpdateInput!
  ): ProductChannelListingUpdate

  """
  Creates a new product. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productCreate(
    """Fields required to create a product."""
    input: ProductCreateInput!
  ): ProductCreate

  """
  Deletes a product. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productDelete(
    """
    External ID of a product to delete. 
    
    Added in Saleor 3.10.
    """
    externalReference: String

    """ID of a product to delete."""
    id: ID
  ): ProductDelete

  """
  Deletes product media. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productMediaBulkDelete(
    """List of product media IDs to delete."""
    ids: [ID!]!
  ): ProductMediaBulkDelete

  """
  Create a media object (image or video URL) associated with product. For image, this mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productMediaCreate(
    """Fields required to create a product media."""
    input: ProductMediaCreateInput!
  ): ProductMediaCreate

  """
  Deletes a product media. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productMediaDelete(
    """ID of a product media to delete."""
    id: ID!
  ): ProductMediaDelete

  """
  Changes ordering of the product media. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productMediaReorder(
    """IDs of a product media in the desired order."""
    mediaIds: [ID!]!

    """ID of product that media order will be altered."""
    productId: ID!
  ): ProductMediaReorder

  """
  Updates a product media. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productMediaUpdate(
    """ID of a product media to update."""
    id: ID!

    """Fields required to update a product media."""
    input: ProductMediaUpdateInput!
  ): ProductMediaUpdate

  """
  Reorder product attribute values. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productReorderAttributeValues(
    """ID of an attribute."""
    attributeId: ID!

    """The list of reordering operations for given attribute values."""
    moves: [ReorderInput!]!

    """ID of a product."""
    productId: ID!
  ): ProductReorderAttributeValues

  """
  Creates/updates translations for a product. 
  
  Requires one of the following permissions: MANAGE_TRANSLATIONS.
  """
  productTranslate(
    """Product ID or ProductTranslatableContent ID."""
    id: ID!

    """Fields required to update product translations."""
    input: TranslationInput!

    """Translation language code."""
    languageCode: LanguageCodeEnum!
  ): ProductTranslate

  """
  Deletes product types. 
  
  Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
  """
  productTypeBulkDelete(
    """List of product type IDs to delete."""
    ids: [ID!]!
  ): ProductTypeBulkDelete

  """
  Creates a new product type. 
  
  Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
  """
  productTypeCreate(
    """Fields required to create a product type."""
    input: ProductTypeInput!
  ): ProductTypeCreate

  """
  Deletes a product type. 
  
  Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
  """
  productTypeDelete(
    """ID of a product type to delete."""
    id: ID!
  ): ProductTypeDelete

  """
  Reorder the attributes of a product type. 
  
  Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
  """
  productTypeReorderAttributes(
    """The list of attribute reordering operations."""
    moves: [ReorderInput!]!

    """ID of a product type."""
    productTypeId: ID!

    """The attribute type to reorder."""
    type: ProductAttributeType!
  ): ProductTypeReorderAttributes

  """
  Updates an existing product type. 
  
  Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
  """
  productTypeUpdate(
    """ID of a product type to update."""
    id: ID!

    """Fields required to update a product type."""
    input: ProductTypeInput!
  ): ProductTypeUpdate

  """
  Updates an existing product. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productUpdate(
    """
    External ID of a product to update. 
    
    Added in Saleor 3.10.
    """
    externalReference: String

    """ID of a product to update."""
    id: ID

    """Fields required to update a product."""
    input: ProductInput!
  ): ProductUpdate

  """
  Creates product variants for a given product. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productVariantBulkCreate(
    """
    Policies of error handling. DEFAULT: REJECT_EVERYTHING
    
    Added in Saleor 3.11.
    
    Note: this API is currently in Feature Preview and can be subject to changes at later point.
    """
    errorPolicy: ErrorPolicyEnum

    """ID of the product to create the variants for."""
    product: ID!

    """Input list of product variants to create."""
    variants: [ProductVariantBulkCreateInput!]!
  ): ProductVariantBulkCreate

  """
  Deletes product variants. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productVariantBulkDelete(
    """List of product variant IDs to delete."""
    ids: [ID!]

    """
    List of product variant SKUs to delete.
    
    Added in Saleor 3.8.
    """
    skus: [String!]
  ): ProductVariantBulkDelete

  """
  Creates/updates translations for products variants.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: MANAGE_TRANSLATIONS.
  
  Triggers the following webhook events:
  - TRANSLATION_CREATED (async): A translation was created.
  - TRANSLATION_UPDATED (async): A translation was updated.
  """
  productVariantBulkTranslate(
    """Policies of error handling. DEFAULT: REJECT_EVERYTHING"""
    errorPolicy: ErrorPolicyEnum

    """List of products variants translations."""
    translations: [ProductVariantBulkTranslateInput!]!
  ): ProductVariantBulkTranslate

  """
  Update multiple product variants.
  
  Added in Saleor 3.11.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productVariantBulkUpdate(
    """Policies of error handling. DEFAULT: REJECT_EVERYTHING"""
    errorPolicy: ErrorPolicyEnum

    """ID of the product to update the variants for."""
    product: ID!

    """Input list of product variants to update."""
    variants: [ProductVariantBulkUpdateInput!]!
  ): ProductVariantBulkUpdate

  """
  Manage product variant prices in channels. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productVariantChannelListingUpdate(
    """ID of a product variant to update."""
    id: ID

    """
    List of fields required to create or upgrade product variant channel listings.
    """
    input: [ProductVariantChannelListingAddInput!]!

    """
    SKU of a product variant to update.
    
    Added in Saleor 3.8.
    """
    sku: String
  ): ProductVariantChannelListingUpdate

  """
  Creates a new variant for a product. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productVariantCreate(
    """Fields required to create a product variant."""
    input: ProductVariantCreateInput!
  ): ProductVariantCreate

  """
  Deletes a product variant. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productVariantDelete(
    """
    External ID of a product variant to update. 
    
    Added in Saleor 3.10.
    """
    externalReference: String

    """ID of a product variant to delete."""
    id: ID

    """
    SKU of a product variant to delete.
    
    Added in Saleor 3.8.
    """
    sku: String
  ): ProductVariantDelete

  """
  Deactivates product variant preorder. It changes all preorder allocation into regular allocation.
  
  Added in Saleor 3.1. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productVariantPreorderDeactivate(
    """ID of a variant which preorder should be deactivated."""
    id: ID!
  ): ProductVariantPreorderDeactivate

  """
  Reorder the variants of a product. Mutation updates updated_at on product and triggers PRODUCT_UPDATED webhook. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productVariantReorder(
    """The list of variant reordering operations."""
    moves: [ReorderInput!]!

    """Id of product that variants order will be altered."""
    productId: ID!
  ): ProductVariantReorder

  """
  Reorder product variant attribute values. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productVariantReorderAttributeValues(
    """ID of an attribute."""
    attributeId: ID!

    """The list of reordering operations for given attribute values."""
    moves: [ReorderInput!]!

    """ID of a product variant."""
    variantId: ID!
  ): ProductVariantReorderAttributeValues

  """
  Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productVariantSetDefault(
    """Id of a product that will have the default variant set."""
    productId: ID!

    """Id of a variant that will be set as default."""
    variantId: ID!
  ): ProductVariantSetDefault

  """
  Creates stocks for product variant. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productVariantStocksCreate(
    """Input list of stocks to create."""
    stocks: [StockInput!]!

    """ID of a product variant for which stocks will be created."""
    variantId: ID!
  ): ProductVariantStocksCreate

  """
  Delete stocks from product variant. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productVariantStocksDelete(
    """SKU of product variant for which stocks will be deleted."""
    sku: String

    """ID of product variant for which stocks will be deleted."""
    variantId: ID

    """Input list of warehouse IDs."""
    warehouseIds: [ID!]
  ): ProductVariantStocksDelete

  """
  Update stocks for product variant. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productVariantStocksUpdate(
    """SKU of product variant for which stocks will be updated."""
    sku: String

    """Input list of stocks to create or update."""
    stocks: [StockInput!]!

    """ID of a product variant for which stocks will be updated."""
    variantId: ID
  ): ProductVariantStocksUpdate

  """
  Creates/updates translations for a product variant. 
  
  Requires one of the following permissions: MANAGE_TRANSLATIONS.
  """
  productVariantTranslate(
    """ProductVariant ID or ProductVariantTranslatableContent ID."""
    id: ID!

    """Fields required to update product variant translations."""
    input: NameTranslationInput!

    """Translation language code."""
    languageCode: LanguageCodeEnum!
  ): ProductVariantTranslate

  """
  Updates an existing variant for product. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  productVariantUpdate(
    """
    External ID of a product variant to update. 
    
    Added in Saleor 3.10.
    """
    externalReference: String

    """ID of a product to update."""
    id: ID

    """Fields required to update a product variant."""
    input: ProductVariantInput!

    """
    SKU of a product variant to update.
    
    Added in Saleor 3.8.
    """
    sku: String
  ): ProductVariantUpdate

  """
  Deletes promotions.
  
  Added in Saleor 3.17.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - PROMOTION_DELETED (async): A promotion was deleted.
  """
  promotionBulkDelete(
    """List of promotion IDs to delete."""
    ids: [ID!]!
  ): PromotionBulkDelete

  """
  Creates a new promotion.
  
  Added in Saleor 3.17.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - PROMOTION_CREATED (async): A promotion was created.
  - PROMOTION_STARTED (async): Optionally called if promotion was started.
  """
  promotionCreate(
    """Fields requires to create a promotion."""
    input: PromotionCreateInput!
  ): PromotionCreate

  """
  Deletes a promotion.
  
  Added in Saleor 3.17.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - PROMOTION_DELETED (async): A promotion was deleted.
  """
  promotionDelete(
    """The ID of the promotion to remove."""
    id: ID!
  ): PromotionDelete

  """
  Creates a new promotion rule.
  
  Added in Saleor 3.17.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - PROMOTION_RULE_CREATED (async): A promotion rule was created.
  """
  promotionRuleCreate(
    """Fields required to create a promotion rule."""
    input: PromotionRuleCreateInput!
  ): PromotionRuleCreate

  """
  Deletes a promotion rule.
  
  Added in Saleor 3.17.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - PROMOTION_RULE_DELETED (async): A promotion rule was deleted.
  """
  promotionRuleDelete(
    """The ID of the promotion to remove."""
    id: ID!
  ): PromotionRuleDelete

  """
  Creates/updates translations for a promotion rule.
  
  Added in Saleor 3.17. 
  
  Requires one of the following permissions: MANAGE_TRANSLATIONS.
  """
  promotionRuleTranslate(
    """PromotionRule ID or PromotionRuleTranslatableContent ID."""
    id: ID!

    """Fields required to update promotion rule translations."""
    input: PromotionRuleTranslationInput!

    """Translation language code."""
    languageCode: LanguageCodeEnum!
  ): PromotionRuleTranslate

  """
  Updates an existing promotion rule.
  
  Added in Saleor 3.17.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - PROMOTION_RULE_UPDATED (async): A promotion rule was updated.
  """
  promotionRuleUpdate(
    """ID of the promotion rule to update."""
    id: ID!

    """Fields required to create a promotion rule."""
    input: PromotionRuleUpdateInput!
  ): PromotionRuleUpdate

  """
  Creates/updates translations for a promotion.
  
  Added in Saleor 3.17. 
  
  Requires one of the following permissions: MANAGE_TRANSLATIONS.
  """
  promotionTranslate(
    """Promotion ID or PromotionTranslatableContent ID."""
    id: ID!

    """Fields required to update promotion translations."""
    input: PromotionTranslationInput!

    """Translation language code."""
    languageCode: LanguageCodeEnum!
  ): PromotionTranslate

  """
  Updates an existing promotion.
  
  Added in Saleor 3.17.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - PROMOTION_UPDATED (async): A promotion was updated.
  - PROMOTION_STARTED (async): Optionally called if promotion was started.
  - PROMOTION_ENDED (async): Optionally called if promotion was ended.
  """
  promotionUpdate(
    """ID of the promotion to update."""
    id: ID!

    """Fields required to update a promotion."""
    input: PromotionUpdateInput!
  ): PromotionUpdate

  """
  Request email change of the logged in user. 
  
  Requires one of the following permissions: AUTHENTICATED_USER.
  
  Triggers the following webhook events:
  - NOTIFY_USER (async): A notification for account email change.
  - ACCOUNT_CHANGE_EMAIL_REQUESTED (async): An account email change was requested.
  """
  requestEmailChange(
    """
    Slug of a channel which will be used to notify users. Optional when only one channel exists.
    """
    channel: String

    """New user email."""
    newEmail: String!

    """User password."""
    password: String!

    """
    URL of a view where users should be redirected to update the email address. URL in RFC 1808 format.
    """
    redirectUrl: String!
  ): RequestEmailChange

  """
  Sends an email with the account password modification link.
  
  Triggers the following webhook events:
  - NOTIFY_USER (async): A notification for password reset.
  - ACCOUNT_SET_PASSWORD_REQUESTED (async): Setting a new password for the account is requested.
  - STAFF_SET_PASSWORD_REQUESTED (async): Setting a new password for the staff account is requested.
  """
  requestPasswordReset(
    """
    Slug of a channel which will be used for notify user. Optional when only one channel exists.
    """
    channel: String

    """Email of the user that will be used for password recovery."""
    email: String!

    """
    URL of a view where users should be redirected to reset the password. URL in RFC 1808 format.
    """
    redirectUrl: String!
  ): RequestPasswordReset

  """
  Deletes sales. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - SALE_DELETED (async): A sale was deleted.
  """
  saleBulkDelete(
    """List of sale IDs to delete."""
    ids: [ID!]!
  ): SaleBulkDelete

  """
  Adds products, categories, collections to a sale.
  
  DEPRECATED: this mutation will be removed in Saleor 4.0. Use `promotionRuleCreate` mutation instead. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - SALE_UPDATED (async): A sale was updated.
  """
  saleCataloguesAdd(
    """ID of a sale."""
    id: ID!

    """Fields required to modify catalogue IDs of sale."""
    input: CatalogueInput!
  ): SaleAddCatalogues

  """
  Removes products, categories, collections from a sale.
  
  DEPRECATED: this mutation will be removed in Saleor 4.0. Use `promotionRuleUpdate` or `promotionRuleDelete` mutations instead. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - SALE_UPDATED (async): A sale was updated.
  """
  saleCataloguesRemove(
    """ID of a sale."""
    id: ID!

    """Fields required to modify catalogue IDs of sale."""
    input: CatalogueInput!
  ): SaleRemoveCatalogues

  """
  Manage sale's availability in channels.
  
  DEPRECATED: this mutation will be removed in Saleor 4.0. Use `promotionRuleCreate` or `promotionRuleUpdate` mutations instead. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  """
  saleChannelListingUpdate(
    """ID of a sale to update."""
    id: ID!

    """Fields required to update sale channel listings."""
    input: SaleChannelListingInput!
  ): SaleChannelListingUpdate

  """
  Creates a new sale.
  
  DEPRECATED: this mutation will be removed in Saleor 4.0. Use `promotionCreate` mutation instead. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - SALE_CREATED (async): A sale was created.
  """
  saleCreate(
    """Fields required to create a sale."""
    input: SaleInput!
  ): SaleCreate

  """
  Deletes a sale.
  
  DEPRECATED: this mutation will be removed in Saleor 4.0. Use `promotionDelete` mutation instead. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - SALE_DELETED (async): A sale was deleted.
  """
  saleDelete(
    """ID of a sale to delete."""
    id: ID!
  ): SaleDelete

  """
  Creates/updates translations for a sale.
  
  DEPRECATED: this mutation will be removed in Saleor 4.0. Use `PromotionTranslate` mutation instead. 
  
  Requires one of the following permissions: MANAGE_TRANSLATIONS.
  """
  saleTranslate(
    """Sale ID or SaleTranslatableContent ID."""
    id: ID!

    """Fields required to update sale translations."""
    input: NameTranslationInput!

    """Translation language code."""
    languageCode: LanguageCodeEnum!
  ): SaleTranslate

  """
  Updates a sale.
  
  DEPRECATED: this mutation will be removed in Saleor 4.0. Use `promotionUpdate` mutation instead. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - SALE_UPDATED (async): A sale was updated.
  - SALE_TOGGLE (async): Optionally triggered when a sale is started or stopped.
  """
  saleUpdate(
    """ID of a sale to update."""
    id: ID!

    """Fields required to update a sale."""
    input: SaleInput!
  ): SaleUpdate

  """
  Sends a notification confirmation.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: AUTHENTICATED_USER.
  
  Triggers the following webhook events:
  - NOTIFY_USER (async): A notification for account confirmation.
  - ACCOUNT_CONFIRMATION_REQUESTED (async): An account confirmation was requested. This event is always sent regardless of settings.
  """
  sendConfirmationEmail(
    """Slug of a channel which will be used for notify user."""
    channel: String!

    """Base of frontend URL that will be needed to create confirmation URL."""
    redirectUrl: String!
  ): SendConfirmationEmail

  """
  Sets the user's password from the token sent by email using the RequestPasswordReset mutation.
  """
  setPassword(
    """Email of a user."""
    email: String!

    """Password of a user."""
    password: String!

    """A one-time token required to set the password."""
    token: String!
  ): SetPassword

  """
  Manage shipping method's availability in channels. 
  
  Requires one of the following permissions: MANAGE_SHIPPING.
  """
  shippingMethodChannelListingUpdate(
    """ID of a shipping method to update."""
    id: ID!

    """Fields required to update shipping method channel listings."""
    input: ShippingMethodChannelListingInput!
  ): ShippingMethodChannelListingUpdate

  """
  Deletes shipping prices. 
  
  Requires one of the following permissions: MANAGE_SHIPPING.
  """
  shippingPriceBulkDelete(
    """List of shipping price IDs to delete."""
    ids: [ID!]!
  ): ShippingPriceBulkDelete

  """
  Creates a new shipping price. 
  
  Requires one of the following permissions: MANAGE_SHIPPING.
  """
  shippingPriceCreate(
    """Fields required to create a shipping price."""
    input: ShippingPriceInput!
  ): ShippingPriceCreate

  """
  Deletes a shipping price. 
  
  Requires one of the following permissions: MANAGE_SHIPPING.
  """
  shippingPriceDelete(
    """ID of a shipping price to delete."""
    id: ID!
  ): ShippingPriceDelete

  """
  Exclude products from shipping price. 
  
  Requires one of the following permissions: MANAGE_SHIPPING.
  """
  shippingPriceExcludeProducts(
    """ID of a shipping price."""
    id: ID!

    """Exclude products input."""
    input: ShippingPriceExcludeProductsInput!
  ): ShippingPriceExcludeProducts

  """
  Remove product from excluded list for shipping price. 
  
  Requires one of the following permissions: MANAGE_SHIPPING.
  """
  shippingPriceRemoveProductFromExclude(
    """ID of a shipping price."""
    id: ID!

    """List of products which will be removed from excluded list."""
    products: [ID!]!
  ): ShippingPriceRemoveProductFromExclude

  """
  Creates/updates translations for a shipping method. 
  
  Requires one of the following permissions: MANAGE_TRANSLATIONS.
  """
  shippingPriceTranslate(
    """ShippingMethodType ID or ShippingMethodTranslatableContent ID."""
    id: ID!

    """Fields required to update shipping price translations."""
    input: ShippingPriceTranslationInput!

    """Translation language code."""
    languageCode: LanguageCodeEnum!
  ): ShippingPriceTranslate

  """
  Updates a new shipping price. 
  
  Requires one of the following permissions: MANAGE_SHIPPING.
  """
  shippingPriceUpdate(
    """ID of a shipping price to update."""
    id: ID!

    """Fields required to update a shipping price."""
    input: ShippingPriceInput!
  ): ShippingPriceUpdate

  """
  Deletes shipping zones. 
  
  Requires one of the following permissions: MANAGE_SHIPPING.
  """
  shippingZoneBulkDelete(
    """List of shipping zone IDs to delete."""
    ids: [ID!]!
  ): ShippingZoneBulkDelete

  """
  Creates a new shipping zone. 
  
  Requires one of the following permissions: MANAGE_SHIPPING.
  """
  shippingZoneCreate(
    """Fields required to create a shipping zone."""
    input: ShippingZoneCreateInput!
  ): ShippingZoneCreate

  """
  Deletes a shipping zone. 
  
  Requires one of the following permissions: MANAGE_SHIPPING.
  """
  shippingZoneDelete(
    """ID of a shipping zone to delete."""
    id: ID!
  ): ShippingZoneDelete

  """
  Updates a new shipping zone. 
  
  Requires one of the following permissions: MANAGE_SHIPPING.
  """
  shippingZoneUpdate(
    """ID of a shipping zone to update."""
    id: ID!

    """Fields required to update a shipping zone."""
    input: ShippingZoneUpdateInput!
  ): ShippingZoneUpdate

  """
  Update the shop's address. If the `null` value is passed, the currently selected address will be deleted. 
  
  Requires one of the following permissions: MANAGE_SETTINGS.
  """
  shopAddressUpdate(
    """Fields required to update shop address."""
    input: AddressInput
  ): ShopAddressUpdate

  """
  Updates site domain of the shop.
  
  DEPRECATED: this mutation will be removed in Saleor 4.0. Use `PUBLIC_URL` environment variable instead. 
  
  Requires one of the following permissions: MANAGE_SETTINGS.
  """
  shopDomainUpdate(
    """Fields required to update site."""
    input: SiteDomainInput
  ): ShopDomainUpdate @deprecated(reason: "\\n\\nDEPRECATED: this mutation will be removed in Saleor 4.0. Use `PUBLIC_URL` environment variable instead.")

  """
  Fetch tax rates. 
  
  Requires one of the following permissions: MANAGE_SETTINGS.
  """
  shopFetchTaxRates: ShopFetchTaxRates @deprecated(reason: "\\n\\nDEPRECATED: this mutation will be removed in Saleor 4.0.")

  """
  Creates/updates translations for shop settings. 
  
  Requires one of the following permissions: MANAGE_TRANSLATIONS.
  """
  shopSettingsTranslate(
    """Fields required to update shop settings translations."""
    input: ShopSettingsTranslationInput!

    """Translation language code."""
    languageCode: LanguageCodeEnum!
  ): ShopSettingsTranslate

  """
  Updates shop settings. 
  
  Requires one of the following permissions: MANAGE_SETTINGS.
  
  Triggers the following webhook events:
  - SHOP_METADATA_UPDATED (async): Optionally triggered when public or private metadata is updated.
  """
  shopSettingsUpdate(
    """Fields required to update shop settings."""
    input: ShopSettingsInput!
  ): ShopSettingsUpdate

  """
  Deletes staff users. Apps are not allowed to perform this mutation. 
  
  Requires one of the following permissions: MANAGE_STAFF.
  
  Triggers the following webhook events:
  - STAFF_DELETED (async): A staff account was deleted.
  """
  staffBulkDelete(
    """List of user IDs to delete."""
    ids: [ID!]!
  ): StaffBulkDelete

  """
  Creates a new staff user. Apps are not allowed to perform this mutation. 
  
  Requires one of the following permissions: MANAGE_STAFF.
  
  Triggers the following webhook events:
  - STAFF_CREATED (async): A new staff account was created.
  - NOTIFY_USER (async): A notification for setting the password.
  - STAFF_SET_PASSWORD_REQUESTED (async): Setting a new password for the staff account is requested.
  """
  staffCreate(
    """Fields required to create a staff user."""
    input: StaffCreateInput!
  ): StaffCreate

  """
  Deletes a staff user. Apps are not allowed to perform this mutation. 
  
  Requires one of the following permissions: MANAGE_STAFF.
  
  Triggers the following webhook events:
  - STAFF_DELETED (async): A staff account was deleted.
  """
  staffDelete(
    """ID of a staff user to delete."""
    id: ID!
  ): StaffDelete

  """
  Creates a new staff notification recipient. 
  
  Requires one of the following permissions: MANAGE_SETTINGS.
  """
  staffNotificationRecipientCreate(
    """Fields required to create a staff notification recipient."""
    input: StaffNotificationRecipientInput!
  ): StaffNotificationRecipientCreate

  """
  Delete staff notification recipient. 
  
  Requires one of the following permissions: MANAGE_SETTINGS.
  """
  staffNotificationRecipientDelete(
    """ID of a staff notification recipient to delete."""
    id: ID!
  ): StaffNotificationRecipientDelete

  """
  Updates a staff notification recipient. 
  
  Requires one of the following permissions: MANAGE_SETTINGS.
  """
  staffNotificationRecipientUpdate(
    """ID of a staff notification recipient to update."""
    id: ID!

    """Fields required to update a staff notification recipient."""
    input: StaffNotificationRecipientInput!
  ): StaffNotificationRecipientUpdate

  """
  Updates an existing staff user. Apps are not allowed to perform this mutation. 
  
  Requires one of the following permissions: MANAGE_STAFF.
  
  Triggers the following webhook events:
  - STAFF_UPDATED (async): A staff account was updated.
  """
  staffUpdate(
    """ID of a staff user to update."""
    id: ID!

    """Fields required to update a staff user."""
    input: StaffUpdateInput!
  ): StaffUpdate

  """
  Updates stocks for a given variant and warehouse. Variant and warehouse selectors have to be the same for all stock inputs. Is not allowed to use 'variantId' in one input and 'variantExternalReference' in another.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  
  Triggers the following webhook events:
  - PRODUCT_VARIANT_STOCK_UPDATED (async): A product variant stock details were updated.
  """
  stockBulkUpdate(
    """Policies of error handling. DEFAULT: REJECT_EVERYTHING"""
    errorPolicy: ErrorPolicyEnum

    """Input list of stocks to update."""
    stocks: [StockBulkUpdateInput!]!
  ): StockBulkUpdate

  """
  Request to delete a stored payment method on payment provider side.
  
  Added in Saleor 3.16.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: AUTHENTICATED_USER.
  
  Triggers the following webhook events:
  - STORED_PAYMENT_METHOD_DELETE_REQUESTED (sync): The customer requested to delete a payment method.
  """
  storedPaymentMethodRequestDelete(
    """Slug of a channel related to delete request."""
    channel: String!

    """The ID of the payment method."""
    id: ID!
  ): StoredPaymentMethodRequestDelete

  """
  Create a tax class.
  
  Added in Saleor 3.9. 
  
  Requires one of the following permissions: MANAGE_TAXES.
  """
  taxClassCreate(
    """Fields required to create a tax class."""
    input: TaxClassCreateInput!
  ): TaxClassCreate

  """
  Delete a tax class. After deleting the tax class any products, product types or shipping methods using it are updated to use the default tax class.
  
  Added in Saleor 3.9. 
  
  Requires one of the following permissions: MANAGE_TAXES.
  """
  taxClassDelete(
    """ID of a tax class to delete."""
    id: ID!
  ): TaxClassDelete

  """
  Update a tax class.
  
  Added in Saleor 3.9. 
  
  Requires one of the following permissions: MANAGE_TAXES.
  """
  taxClassUpdate(
    """ID of the tax class."""
    id: ID!

    """Fields required to update a tax class."""
    input: TaxClassUpdateInput!
  ): TaxClassUpdate

  """
  Update tax configuration for a channel.
  
  Added in Saleor 3.9. 
  
  Requires one of the following permissions: MANAGE_TAXES.
  """
  taxConfigurationUpdate(
    """ID of the tax configuration."""
    id: ID!

    """Fields required to update the tax configuration."""
    input: TaxConfigurationUpdateInput!
  ): TaxConfigurationUpdate

  """
  Remove all tax class rates for a specific country.
  
  Added in Saleor 3.9. 
  
  Requires one of the following permissions: MANAGE_TAXES.
  """
  taxCountryConfigurationDelete(
    """Country in which to update the tax class rates."""
    countryCode: CountryCode!
  ): TaxCountryConfigurationDelete

  """
  Update tax class rates for a specific country.
  
  Added in Saleor 3.9. 
  
  Requires one of the following permissions: MANAGE_TAXES.
  """
  taxCountryConfigurationUpdate(
    """Country in which to update the tax class rates."""
    countryCode: CountryCode!

    """
    List of tax rates per tax class to update. When `{taxClass: id, rate: null`} is passed, it deletes the rate object for given taxClass ID. When `{rate: Int}` is passed without a tax class, it updates the default tax class for this country.
    """
    updateTaxClassRates: [TaxClassRateInput!]!
  ): TaxCountryConfigurationUpdate

  """
  Exempt checkout or order from charging the taxes. When tax exemption is enabled, taxes won't be charged for the checkout or order. Taxes may still be calculated in cases when product prices are entered with the tax included and the net price needs to be known.
  
  Added in Saleor 3.8. 
  
  Requires one of the following permissions: MANAGE_TAXES.
  """
  taxExemptionManage(
    """ID of the Checkout or Order object."""
    id: ID!

    """Determines if a taxes should be exempt."""
    taxExemption: Boolean!
  ): TaxExemptionManage

  """Create JWT token."""
  tokenCreate(
    """
    The audience that will be included to JWT tokens with prefix `custom:`.
    
    Added in Saleor 3.8.
    """
    audience: String

    """Email of a user."""
    email: String!

    """Password of a user."""
    password: String!
  ): CreateToken

  """
  Refresh JWT token. Mutation tries to take refreshToken from the input. If it fails it will try to take `refreshToken` from the http-only cookie `refreshToken`. `csrfToken` is required when `refreshToken` is provided as a cookie.
  """
  tokenRefresh(
    """
    CSRF token required to refresh token. This argument is required when `refreshToken` is provided as a cookie.
    """
    csrfToken: String

    """Refresh token."""
    refreshToken: String
  ): RefreshToken

  """Verify JWT token."""
  tokenVerify(
    """JWT token to validate."""
    token: String!
  ): VerifyToken

  """
  Deactivate all JWT tokens of the currently authenticated user. 
  
  Requires one of the following permissions: AUTHENTICATED_USER.
  """
  tokensDeactivateAll: DeactivateAllUserTokens

  """
  Create transaction for checkout or order.
  
  Added in Saleor 3.4.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: HANDLE_PAYMENTS.
  """
  transactionCreate(
    """The ID of the checkout or order."""
    id: ID!

    """Input data required to create a new transaction object."""
    transaction: TransactionCreateInput!

    """Data that defines a transaction event."""
    transactionEvent: TransactionEventInput
  ): TransactionCreate

  """
  Report the event for the transaction.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  
  Requires the following permissions: OWNER and HANDLE_PAYMENTS for apps, HANDLE_PAYMENTS for staff users. Staff user cannot update a transaction that is owned by the app.
  
  Triggers the following webhook events:
  - TRANSACTION_ITEM_METADATA_UPDATED (async): Optionally called when transaction's metadata was updated.
  - CHECKOUT_FULLY_PAID (async): Optionally called when the checkout charge status changed to `FULL` or `OVERCHARGED`.
  - ORDER_UPDATED (async): Optionally called when the transaction is related to the order and the order was updated.
  """
  transactionEventReport(
    """
    The amount of the event to report. 
    
    Required for all `REQUEST`, `SUCCESS`, `ACTION_REQUIRED`, and `ADJUSTMENT` events. For other events, the amount will be calculated based on the previous events with the same pspReference. If not possible to calculate, the mutation will return an error.
    """
    amount: PositiveDecimal

    """List of all possible actions for the transaction"""
    availableActions: [TransactionActionEnum!]

    """
    The url that will allow to redirect user to payment provider page with event details.
    """
    externalUrl: String

    """The ID of the transaction. One of field id or token is required."""
    id: ID

    """
    The message related to the event. The maximum length is 512 characters; any text exceeding this limit will be truncated.
    """
    message: String

    """PSP Reference of the event to report."""
    pspReference: String!

    """
    The time of the event to report. If not provide, the current time will be used.
    """
    time: DateTime

    """
    The token of the transaction. One of field id or token is required.
    
    Added in Saleor 3.14.
    """
    token: UUID

    """
    Fields required to update the transaction metadata.
    
    Added in Saleor 3.17.
    """
    transactionMetadata: [MetadataInput!]

    """
    Fields required to update the transaction private metadata.
    
    Added in Saleor 3.17.
    """
    transactionPrivateMetadata: [MetadataInput!]

    """Current status of the event to report."""
    type: TransactionEventTypeEnum!
  ): TransactionEventReport

  """
  Initializes a transaction session. It triggers the webhook `TRANSACTION_INITIALIZE_SESSION`, to the requested `paymentGateways`. There is a limit of 100 transaction items per checkout / order.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  transactionInitialize(
    """
    The expected action called for the transaction. By default, the `channel.paymentSettings.defaultTransactionFlowStrategy` will be used.The field can be used only by app that has `HANDLE_PAYMENTS` permission.
    """
    action: TransactionFlowStrategyEnum

    """
    The amount requested for initializing the payment gateway. If not provided, the difference between checkout.total - transactions that are already processed will be send.
    """
    amount: PositiveDecimal

    """
    The customer's IP address. If not provided Saleor will try to determine the customer's IP address on its own. The customer's IP address will be passed to the payment app. The IP should be in ipv4 or ipv6 format. The field can be used only by an app that has `HANDLE_PAYMENTS` permission.
    
    Added in Saleor 3.16.
    """
    customerIpAddress: String

    """The ID of the checkout or order."""
    id: ID!

    """
    The idempotency key assigned to the action. It will be passed to the payment app to discover potential duplicate actions. If not provided, the default one will be generated. If empty string provided, INVALID error code will be raised.
    
    Added in Saleor 3.14.
    """
    idempotencyKey: String

    """Payment gateway used to initialize the transaction."""
    paymentGateway: PaymentGatewayToInitialize!
  ): TransactionInitialize

  """
  Processes a transaction session. It triggers the webhook `TRANSACTION_PROCESS_SESSION`, to the assigned `paymentGateways`. 
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  transactionProcess(
    """
    The customer's IP address. If not provided Saleor will try to determine the customer's IP address on its own. The customer's IP address will be passed to the payment app. The IP should be in ipv4 or ipv6 format. The field can be used only by an app that has `HANDLE_PAYMENTS` permission.
    
    Added in Saleor 3.16.
    """
    customerIpAddress: String

    """The data that will be passed to the payment gateway."""
    data: JSON

    """
    The ID of the transaction to process. One of field id or token is required.
    """
    id: ID

    """
    The token of the transaction to process. One of field id or token is required.
    
    Added in Saleor 3.14.
    """
    token: UUID
  ): TransactionProcess

  """
  Request an action for payment transaction.
  
  Added in Saleor 3.4.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: HANDLE_PAYMENTS.
  """
  transactionRequestAction(
    """Determines the action type."""
    actionType: TransactionActionEnum!

    """
    Transaction request amount. If empty for refund or capture, maximal possible amount will be used.
    """
    amount: PositiveDecimal

    """The ID of the transaction. One of field id or token is required."""
    id: ID

    """
    The token of the transaction. One of field id or token is required.
    
    Added in Saleor 3.14.
    """
    token: UUID
  ): TransactionRequestAction

  """
  Request a refund for payment transaction based on granted refund.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: HANDLE_PAYMENTS.
  """
  transactionRequestRefundForGrantedRefund(
    """The ID of the granted refund."""
    grantedRefundId: ID!

    """
    The ID of the transaction. One of field id or token is required, if `transactionItem` is not already assigned to the `orderGrantedRefund`. If `transactionItem` is already assigned to the grantedRefund the field will be ignored.
    """
    id: ID

    """
    The token of the transaction. One of field id or token is required, if `transactionItem` is not already assigned to the `orderGrantedRefund`. If `transactionItem` is already assigned to the grantedRefund the field will be ignored.
    """
    token: UUID
  ): TransactionRequestRefundForGrantedRefund

  """
  Update transaction.
  
  Added in Saleor 3.4.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  
  Requires the following permissions: OWNER and HANDLE_PAYMENTS for apps, HANDLE_PAYMENTS for staff users. Staff user cannot update a transaction that is owned by the app.
  """
  transactionUpdate(
    """The ID of the transaction. One of field id or token is required."""
    id: ID

    """
    The token of the transaction. One of field id or token is required.
    
    Added in Saleor 3.14.
    """
    token: UUID

    """Input data required to create a new transaction object."""
    transaction: TransactionUpdateInput

    """Data that defines a transaction transaction."""
    transactionEvent: TransactionEventInput
  ): TransactionUpdate

  """
  Remove shipping zone from given warehouse. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  unassignWarehouseShippingZone(
    """ID of a warehouse to update."""
    id: ID!

    """List of shipping zone IDs."""
    shippingZoneIds: [ID!]!
  ): WarehouseShippingZoneUnassign

  """
  Updates metadata of an object. To use it, you need to have access to the modified object.
  """
  updateMetadata(
    """ID or token (for Order and Checkout) of an object to update."""
    id: ID!

    """Fields required to update the object's metadata."""
    input: [MetadataInput!]!
  ): UpdateMetadata

  """
  Updates private metadata of an object. To use it, you need to be an authenticated staff user or an app and have access to the modified object.
  """
  updatePrivateMetadata(
    """ID or token (for Order and Checkout) of an object to update."""
    id: ID!

    """Fields required to update the object's metadata."""
    input: [MetadataInput!]!
  ): UpdatePrivateMetadata

  """
  Updates given warehouse. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  updateWarehouse(
    """
    External reference of a warehouse.
    
    Added in Saleor 3.16.
    """
    externalReference: String

    """ID of a warehouse to update."""
    id: ID

    """Fields required to update warehouse."""
    input: WarehouseUpdateInput!
  ): WarehouseUpdate

  """
  Deletes a user avatar. Only for staff members. 
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER.
  """
  userAvatarDelete: UserAvatarDelete

  """
  Create a user avatar. Only for staff members. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec 
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER.
  """
  userAvatarUpdate(
    """Represents an image file in a multipart request."""
    image: Upload!
  ): UserAvatarUpdate

  """
  Activate or deactivate users. 
  
  Requires one of the following permissions: MANAGE_USERS.
  """
  userBulkSetActive(
    """List of user IDs to activate/deactivate."""
    ids: [ID!]!

    """Determine if users will be set active or not."""
    isActive: Boolean!
  ): UserBulkSetActive

  """
  Assign an media to a product variant. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  variantMediaAssign(
    """ID of a product media to assign to a variant."""
    mediaId: ID!

    """ID of a product variant."""
    variantId: ID!
  ): VariantMediaAssign

  """
  Unassign an media from a product variant. 
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  variantMediaUnassign(
    """ID of a product media to unassign from a variant."""
    mediaId: ID!

    """ID of a product variant."""
    variantId: ID!
  ): VariantMediaUnassign

  """
  Deletes vouchers. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - VOUCHER_DELETED (async): A voucher was deleted.
  """
  voucherBulkDelete(
    """List of voucher IDs to delete."""
    ids: [ID!]!
  ): VoucherBulkDelete

  """
  Adds products, categories, collections to a voucher. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - VOUCHER_UPDATED (async): A voucher was updated.
  """
  voucherCataloguesAdd(
    """ID of a voucher."""
    id: ID!

    """Fields required to modify catalogue IDs of voucher."""
    input: CatalogueInput!
  ): VoucherAddCatalogues

  """
  Removes products, categories, collections from a voucher. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - VOUCHER_UPDATED (async): A voucher was updated.
  """
  voucherCataloguesRemove(
    """ID of a voucher."""
    id: ID!

    """Fields required to modify catalogue IDs of voucher."""
    input: CatalogueInput!
  ): VoucherRemoveCatalogues

  """
  Manage voucher's availability in channels. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - VOUCHER_UPDATED (async): A voucher was updated.
  """
  voucherChannelListingUpdate(
    """ID of a voucher to update."""
    id: ID!

    """Fields required to update voucher channel listings."""
    input: VoucherChannelListingInput!
  ): VoucherChannelListingUpdate

  """
  Deletes voucher codes.
  
  Added in Saleor 3.18. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - VOUCHER_CODES_DELETED (async): A voucher codes were deleted.
  """
  voucherCodeBulkDelete(
    """List of voucher codes IDs to delete."""
    ids: [ID!]!
  ): VoucherCodeBulkDelete

  """
  Creates a new voucher. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - VOUCHER_CREATED (async): A voucher was created.
  - VOUCHER_CODES_CREATED (async): A voucher codes were created.
  """
  voucherCreate(
    """Fields required to create a voucher."""
    input: VoucherInput!
  ): VoucherCreate

  """
  Deletes a voucher. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - VOUCHER_DELETED (async): A voucher was deleted.
  """
  voucherDelete(
    """ID of a voucher to delete."""
    id: ID!
  ): VoucherDelete

  """
  Creates/updates translations for a voucher. 
  
  Requires one of the following permissions: MANAGE_TRANSLATIONS.
  """
  voucherTranslate(
    """Voucher ID or VoucherTranslatableContent ID."""
    id: ID!

    """Fields required to update voucher translations."""
    input: NameTranslationInput!

    """Translation language code."""
    languageCode: LanguageCodeEnum!
  ): VoucherTranslate

  """
  Updates a voucher. 
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  
  Triggers the following webhook events:
  - VOUCHER_UPDATED (async): A voucher was updated.
  - VOUCHER_CODES_CREATED (async): A voucher code was created.
  """
  voucherUpdate(
    """ID of a voucher to update."""
    id: ID!

    """Fields required to update a voucher."""
    input: VoucherInput!
  ): VoucherUpdate

  """
  Creates a new webhook subscription. 
  
  Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP.
  """
  webhookCreate(
    """Fields required to create a webhook."""
    input: WebhookCreateInput!
  ): WebhookCreate

  """
  Delete a webhook. Before the deletion, the webhook is deactivated to pause any deliveries that are already scheduled. The deletion might fail if delivery is in progress. In such a case, the webhook is not deleted but remains deactivated. 
  
  Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP.
  """
  webhookDelete(
    """ID of a webhook to delete."""
    id: ID!
  ): WebhookDelete

  """
  Performs a dry run of a webhook event. Supports a single event (the first, if multiple provided in the `query`). Requires permission relevant to processed event.
  
  Added in Saleor 3.11.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER.
  """
  webhookDryRun(
    """The ID of an object to serialize."""
    objectId: ID!

    """The subscription query that defines the webhook event and its payload."""
    query: String!
  ): WebhookDryRun

  """
  Trigger a webhook event. Supports a single event (the first, if multiple provided in the `webhook.subscription_query`). Requires permission relevant to processed event. Successfully delivered webhook returns `delivery` with status='PENDING' and empty payload.
  
  Added in Saleor 3.11.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point. 
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER.
  """
  webhookTrigger(
    """The ID of an object to serialize."""
    objectId: ID!

    """The ID of the webhook."""
    webhookId: ID!
  ): WebhookTrigger

  """
  Updates a webhook subscription. 
  
  Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP.
  """
  webhookUpdate(
    """ID of a webhook to update."""
    id: ID!

    """Fields required to update a webhook."""
    input: WebhookUpdateInput!
  ): WebhookUpdate
}

input NameTranslationInput {
  name: String
}

enum NavigationType {
  """Main storefront navigation."""
  MAIN

  """Secondary storefront navigation."""
  SECONDARY
}

"""An object with an ID"""
interface Node {
  """The ID of the object."""
  id: ID!
}

interface ObjectWithMetadata {
  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  """
  metafields(keys: [String!]): Metadata

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  """
  privateMetafields(keys: [String!]): Metadata
}

"""Represents an order in the shop."""
type Order implements Node & ObjectWithMetadata {
  """
  List of actions that can be performed in the current state of an order.
  """
  actions: [OrderAction!]!

  """
  The authorize status of the order.
  
  Added in Saleor 3.4.
  """
  authorizeStatus: OrderAuthorizeStatusEnum!

  """
  Collection points that can be used for this order.
  
  Added in Saleor 3.1.
  """
  availableCollectionPoints: [Warehouse!]!

  """Shipping methods that can be used with this order."""
  availableShippingMethods: [ShippingMethod!] @deprecated(reason: "Use `shippingMethods`, this field will be removed in 4.0")

  """
  Billing address. The full data can be access for orders created in Saleor 3.2 and later, for other orders requires one of the following permissions: MANAGE_ORDERS, OWNER.
  """
  billingAddress: Address

  """
  Informs whether a draft order can be finalized(turned into a regular order).
  """
  canFinalize: Boolean!

  """Channel through which the order was placed."""
  channel: Channel!

  """
  The charge status of the order.
  
  Added in Saleor 3.4.
  """
  chargeStatus: OrderChargeStatusEnum!

  """
  ID of the checkout that the order was created from. 
  
  Added in Saleor 3.11.
  """
  checkoutId: ID

  """
  Name of the collection point where the order should be picked up by the customer.
  """
  collectionPointName: String

  """Date and time when the order was created."""
  created: DateTime!

  """Additional information provided by the customer about the order."""
  customerNote: String!

  """
  The delivery method selected for this order.
  
  Added in Saleor 3.1.
  """
  deliveryMethod: DeliveryMethod

  """Returns applied discount."""
  discount: Money @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `discounts` field instead.")

  """Discount name."""
  discountName: String @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `discounts` field instead.")

  """List of all discounts assigned to the order."""
  discounts: [OrderDiscount!]!

  """
  Determines whether displayed prices should include taxes.
  
  Added in Saleor 3.9.
  """
  displayGrossPrices: Boolean!

  """List of errors that occurred during order validation."""
  errors: [OrderError!]!

  """
  List of events associated with the order.
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  events: [OrderEvent!]!

  """
  External ID of this order. 
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """List of shipments for the order."""
  fulfillments: [Fulfillment!]!

  """List of user gift cards."""
  giftCards: [GiftCard!]!

  """
  List of granted refunds.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  grantedRefunds: [OrderGrantedRefund!]!

  """ID of the order."""
  id: ID!

  """
  List of order invoices. Can be fetched for orders created in Saleor 3.2 and later, for other orders requires one of the following permissions: MANAGE_ORDERS, OWNER.
  """
  invoices: [Invoice!]!

  """Informs if an order is fully paid."""
  isPaid: Boolean!

  """Returns True, if order requires shipping."""
  isShippingRequired: Boolean!
  languageCode: String! @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `languageCodeEnum` field to fetch the language code. ")

  """Order language code."""
  languageCodeEnum: LanguageCodeEnum!

  """List of order lines."""
  lines: [OrderLine!]!

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """User-friendly number of an order."""
  number: String!

  """The order origin."""
  origin: OrderOriginEnum!

  """The ID of the order that was the base for this order."""
  original: ID

  """Internal payment status."""
  paymentStatus: PaymentChargeStatusEnum!

  """User-friendly payment status."""
  paymentStatusDisplay: String!

  """List of payments for the order."""
  payments: [Payment!]!

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """URL to which user should be redirected after order is placed."""
  redirectUrl: String

  """
  Shipping address. The full data can be access for orders created in Saleor 3.2 and later, for other orders requires one of the following permissions: MANAGE_ORDERS, OWNER.
  """
  shippingAddress: Address

  """Shipping method for this order."""
  shippingMethod: ShippingMethod @deprecated(reason: "This field will be removed in Saleor 4.0. Use `deliveryMethod` instead.")

  """Method used for shipping."""
  shippingMethodName: String

  """Shipping methods related to this order."""
  shippingMethods: [ShippingMethod!]!

  """Total price of shipping."""
  shippingPrice: TaxedMoney!

  """
  Denormalized tax class assigned to the shipping method.
  
  Added in Saleor 3.9.
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.
  """
  shippingTaxClass: TaxClass

  """
  Denormalized public metadata of the shipping method's tax class.
  
  Added in Saleor 3.9.
  """
  shippingTaxClassMetadata: [MetadataItem!]!

  """
  Denormalized name of the tax class assigned to the shipping method.
  
  Added in Saleor 3.9.
  """
  shippingTaxClassName: String

  """
  Denormalized private metadata of the shipping method's tax class. Requires staff permissions to access.
  
  Added in Saleor 3.9.
  """
  shippingTaxClassPrivateMetadata: [MetadataItem!]!

  """The shipping tax rate value."""
  shippingTaxRate: Float!

  """Status of the order."""
  status: OrderStatus!

  """User-friendly order status."""
  statusDisplay: String!

  """The sum of line prices not including shipping."""
  subtotal: TaxedMoney!

  """
  Returns True if order has to be exempt from taxes.
  
  Added in Saleor 3.8.
  """
  taxExemption: Boolean!
  token: String! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `id` instead.")

  """Total amount of the order."""
  total: TaxedMoney!

  """
  Total amount of ongoing authorize requests for the order's transactions.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  totalAuthorizePending: Money!

  """Amount authorized for the order."""
  totalAuthorized: Money!

  """The difference between the paid and the order total amount."""
  totalBalance: Money!

  """
  Total amount of ongoing cancel requests for the order's transactions.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  totalCancelPending: Money!

  """
  Amount canceled for the order.
  
  Added in Saleor 3.13.
  """
  totalCanceled: Money!

  """Amount captured for the order."""
  totalCaptured: Money! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `totalCharged` instead.")

  """
  Total amount of ongoing charge requests for the order's transactions.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  totalChargePending: Money!

  """
  Amount charged for the order.
  
  Added in Saleor 3.13.
  """
  totalCharged: Money!

  """
  Total amount of granted refund.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  totalGrantedRefund: Money!

  """
  Total amount of ongoing refund requests for the order's transactions.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  totalRefundPending: Money!

  """
  Total refund amount for the order.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  totalRefunded: Money!

  """
  The difference amount between granted refund and the amounts that are pending and refunded.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  totalRemainingGrant: Money!

  """
  Google Analytics tracking client ID. This field will be removed in Saleor 4.0.
  """
  trackingClientId: String!

  """
  List of transactions for the order. Requires one of the following permissions: MANAGE_ORDERS, HANDLE_PAYMENTS.
  
  Added in Saleor 3.4.
  """
  transactions: [TransactionItem!]!

  """Translated discount name."""
  translatedDiscountName: String @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `discounts` field instead. ")

  """
  Undiscounted total price of shipping.
  
  Added in Saleor 3.19.
  """
  undiscountedShippingPrice: Money

  """Undiscounted total amount of the order."""
  undiscountedTotal: TaxedMoney!

  """Date and time when the order was created."""
  updatedAt: DateTime!

  """
  User who placed the order. This field is set only for orders placed by authenticated users. Can be fetched for orders created in Saleor 3.2 and later, for other orders requires one of the following permissions: MANAGE_USERS, MANAGE_ORDERS, HANDLE_PAYMENTS, OWNER.
  """
  user: User

  """
  Email address of the customer. The full data can be access for orders created in Saleor 3.2 and later, for other orders requires one of the following permissions: MANAGE_ORDERS, OWNER.
  """
  userEmail: String

  """Voucher linked to the order."""
  voucher: Voucher

  """
  Voucher code that was used for Order.
  
  Added in Saleor 3.18.
  """
  voucherCode: String

  """Weight of the order."""
  weight: Weight!
}

enum OrderAction {
  """Represents the capture action."""
  CAPTURE

  """Represents a mark-as-paid action."""
  MARK_AS_PAID

  """Represents a refund action."""
  REFUND

  """Represents a void action."""
  VOID
}

"""
Adds note to the order.

DEPRECATED: this mutation will be removed in Saleor 4.0. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderAddNote {
  errors: [OrderError!]!

  """Order note created."""
  event: OrderEvent

  """Order with the note added."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input OrderAddNoteInput {
  """
  Note message.
  
  DEPRECATED: this field will be removed in Saleor 4.0.
  """
  message: String!
}

"""
Determine a current authorize status for order.

    We treat the order as fully authorized when the sum of authorized and charged funds
    cover the `order.total`-`order.totalGrantedRefund`.
    We treat the order as partially authorized when the sum of authorized and charged
    funds covers only part of the `order.total`-`order.totalGrantedRefund`.
    We treat the order as not authorized when the sum of authorized and charged funds is
    0.

    NONE - the funds are not authorized
    PARTIAL - the funds that are authorized and charged don't cover fully the
    `order.total`-`order.totalGrantedRefund`
    FULL - the funds that are authorized and charged fully cover the
    `order.total`-`order.totalGrantedRefund`
"""
enum OrderAuthorizeStatusEnum {
  FULL
  NONE
  PARTIAL
}

"""
Cancels orders. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderBulkCancel {
  """Returns how many objects were affected."""
  count: Int!
  errors: [OrderError!]!
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Creates multiple orders.

Added in Saleor 3.14.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: MANAGE_ORDERS_IMPORT.
"""
type OrderBulkCreate {
  """Returns how many objects were created."""
  count: Int!
  errors: [OrderBulkCreateError!]!

  """List of the created orders."""
  results: [OrderBulkCreateResult!]!
}

input OrderBulkCreateDeliveryMethodInput {
  """The ID of the shipping method."""
  shippingMethodId: ID

  """The name of the shipping method."""
  shippingMethodName: String

  """The price of the shipping."""
  shippingPrice: TaxedMoneyInput

  """The ID of the tax class."""
  shippingTaxClassId: ID

  """Metadata of the tax class."""
  shippingTaxClassMetadata: [MetadataInput!]

  """The name of the tax class."""
  shippingTaxClassName: String

  """Private metadata of the tax class."""
  shippingTaxClassPrivateMetadata: [MetadataInput!]

  """Tax rate of the shipping."""
  shippingTaxRate: PositiveDecimal

  """The ID of the warehouse."""
  warehouseId: ID

  """The name of the warehouse."""
  warehouseName: String
}

type OrderBulkCreateError {
  """The error code."""
  code: OrderBulkCreateErrorCode

  """The error message."""
  message: String

  """
  Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  path: String
}

enum OrderBulkCreateErrorCode {
  BULK_LIMIT
  FUTURE_DATE
  GRAPHQL_ERROR
  INCORRECT_CURRENCY
  INSUFFICIENT_STOCK
  INVALID
  INVALID_QUANTITY
  METADATA_KEY_REQUIRED
  NEGATIVE_INDEX
  NON_EXISTING_STOCK
  NOTE_LENGTH
  NOT_FOUND
  NO_RELATED_ORDER_LINE
  ORDER_LINE_FULFILLMENT_LINE_MISMATCH
  PRICE_ERROR
  REQUIRED
  TOO_MANY_IDENTIFIERS
  UNIQUE
}

input OrderBulkCreateFulfillmentInput {
  """List of items informing how to fulfill the order."""
  lines: [OrderBulkCreateFulfillmentLineInput!]

  """Fulfillment's tracking code."""
  trackingCode: String
}

input OrderBulkCreateFulfillmentLineInput {
  """0-based index of order line, which the fulfillment line refers to."""
  orderLineIndex: Int!

  """The number of line items to be fulfilled from given warehouse."""
  quantity: Int!

  """The external ID of the product variant."""
  variantExternalReference: String

  """The ID of the product variant."""
  variantId: ID

  """The SKU of the product variant."""
  variantSku: String

  """ID of the warehouse from which the item will be fulfilled."""
  warehouse: ID!
}

input OrderBulkCreateInput {
  """Billing address of the customer."""
  billingAddress: AddressInput!

  """Slug of the channel associated with the order."""
  channel: String!

  """The date, when the order was inserted to Saleor database."""
  createdAt: DateTime!

  """Currency code."""
  currency: String!

  """Note about customer."""
  customerNote: String

  """The delivery method selected for this order."""
  deliveryMethod: OrderBulkCreateDeliveryMethodInput

  """List of discounts."""
  discounts: [OrderDiscountCommonInput!]

  """Determines whether displayed prices should include taxes."""
  displayGrossPrices: Boolean

  """External ID of the order."""
  externalReference: String

  """Fulfillments of the order."""
  fulfillments: [OrderBulkCreateFulfillmentInput!]

  """List of gift card codes associated with the order."""
  giftCards: [String!]

  """Invoices related to the order."""
  invoices: [OrderBulkCreateInvoiceInput!]

  """Order language code."""
  languageCode: LanguageCodeEnum!

  """List of order lines."""
  lines: [OrderBulkCreateOrderLineInput!]!

  """Metadata of the order."""
  metadata: [MetadataInput!]

  """Notes related to the order."""
  notes: [OrderBulkCreateNoteInput!]

  """Private metadata of the order."""
  privateMetadata: [MetadataInput!]

  """
  URL of a view, where users should be redirected to see the order details.
  """
  redirectUrl: String

  """Shipping address of the customer."""
  shippingAddress: AddressInput

  """Status of the order."""
  status: OrderStatus

  """Transactions related to the order."""
  transactions: [TransactionCreateInput!]

  """Customer associated with the order."""
  user: OrderBulkCreateUserInput!

  """
  Code of a voucher associated with the order.
  
  Added in Saleor 3.18.
  """
  voucherCode: String

  """Weight of the order in kg."""
  weight: WeightScalar
}

input OrderBulkCreateInvoiceInput {
  """The date, when the invoice was created."""
  createdAt: DateTime!

  """Metadata of the invoice."""
  metadata: [MetadataInput!]

  """Invoice number."""
  number: String

  """Private metadata of the invoice."""
  privateMetadata: [MetadataInput!]

  """URL of the invoice to download."""
  url: String
}

input OrderBulkCreateNoteInput {
  """The app ID associated with the message."""
  appId: ID

  """The date associated with the message."""
  date: DateTime

  """Note message. Max characters: 255."""
  message: String!

  """The user email associated with the message."""
  userEmail: ID

  """The user external ID associated with the message."""
  userExternalReference: ID

  """The user ID associated with the message."""
  userId: ID
}

input OrderBulkCreateOrderLineInput {
  """The date, when the order line was created."""
  createdAt: DateTime!

  """Gift card flag."""
  isGiftCard: Boolean!

  """Determines whether shipping of the order line items is required."""
  isShippingRequired: Boolean!

  """Metadata of the order line."""
  metadata: [MetadataInput!]

  """Private metadata of the order line."""
  privateMetadata: [MetadataInput!]

  """The name of the product."""
  productName: String

  """
  The SKU of the product.
  
  Added in Saleor 3.18.
  """
  productSku: String

  """Number of items in the order line"""
  quantity: Int!

  """The ID of the tax class."""
  taxClassId: ID

  """Metadata of the tax class."""
  taxClassMetadata: [MetadataInput!]

  """The name of the tax class."""
  taxClassName: String

  """Private metadata of the tax class."""
  taxClassPrivateMetadata: [MetadataInput!]

  """Tax rate of the order line."""
  taxRate: PositiveDecimal

  """Price of the order line."""
  totalPrice: TaxedMoneyInput!

  """Translation of the product name."""
  translatedProductName: String

  """Translation of the product variant name."""
  translatedVariantName: String

  """Price of the order line excluding applied discount."""
  undiscountedTotalPrice: TaxedMoneyInput!

  """
  Reason of the discount on order line.
  
  Added in Saleor 3.19.
  """
  unitDiscountReason: String

  """
  Type of the discount: fixed or percent
  
  Added in Saleor 3.19.
  """
  unitDiscountType: DiscountValueTypeEnum

  """
  Value of the discount. Can store fixed value or percent value
  
  Added in Saleor 3.19.
  """
  unitDiscountValue: PositiveDecimal

  """The external ID of the product variant."""
  variantExternalReference: String

  """The ID of the product variant."""
  variantId: ID

  """The name of the product variant."""
  variantName: String

  """The SKU of the product variant."""
  variantSku: String

  """The ID of the warehouse, where the line will be allocated."""
  warehouse: ID!
}

type OrderBulkCreateResult {
  """List of errors occurred on create attempt."""
  errors: [OrderBulkCreateError!]

  """Order data."""
  order: Order
}

input OrderBulkCreateUserInput {
  """Customer email associated with the order."""
  email: String

  """Customer external ID associated with the order."""
  externalReference: String

  """Customer ID associated with the order."""
  id: ID
}

"""
Event sent when orders are imported.

Added in Saleor 3.14.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type OrderBulkCreated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The orders the event relates to."""
  orders: [Order!]

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Cancel an order. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderCancel {
  errors: [OrderError!]!

  """Canceled order."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when order is canceled.

Added in Saleor 3.2.
"""
type OrderCancelled implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The order the event relates to."""
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Capture an order. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderCapture {
  errors: [OrderError!]!

  """Captured order."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Determine the current charge status for the order.

    An order is considered overcharged when the sum of the
    transactionItem's charge amounts exceeds the value of
    `order.total` - `order.totalGrantedRefund`.
    If the sum of the transactionItem's charge amounts equals
    `order.total` - `order.totalGrantedRefund`, we consider the order to be fully
    charged.
    If the sum of the transactionItem's charge amounts covers a part of the
    `order.total` - `order.totalGrantedRefund`, we treat the order as partially charged.

    NONE - the funds are not charged.
    PARTIAL - the funds that are charged don't cover the
    `order.total`-`order.totalGrantedRefund`
    FULL - the funds that are charged fully cover the
    `order.total`-`order.totalGrantedRefund`
    OVERCHARGED - the charged funds are bigger than the
    `order.total`-`order.totalGrantedRefund`
"""
enum OrderChargeStatusEnum {
  FULL
  NONE
  OVERCHARGED
  PARTIAL
}

"""
Confirms an unconfirmed order by changing status to unfulfilled. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderConfirm {
  errors: [OrderError!]!
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when order is confirmed.

Added in Saleor 3.2.
"""
type OrderConfirmed implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The order the event relates to."""
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

type OrderCountableConnection {
  edges: [OrderCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type OrderCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: Order!
}

"""
Create new order from existing checkout. Requires the following permissions: AUTHENTICATED_APP and HANDLE_CHECKOUTS.

Added in Saleor 3.2.

Triggers the following webhook events:
- SHIPPING_LIST_METHODS_FOR_CHECKOUT (sync): Optionally triggered when cached external shipping methods are invalid.
- CHECKOUT_FILTER_SHIPPING_METHODS (sync): Optionally triggered when cached filtered shipping methods are invalid.
- CHECKOUT_CALCULATE_TAXES (sync): Optionally triggered when checkout prices are expired.
- ORDER_CREATED (async): Triggered when order is created.
- NOTIFY_USER (async): A notification for order placement.
- NOTIFY_USER (async): A staff notification for order placement.
- ORDER_UPDATED (async): Triggered when order received the update after placement.
- ORDER_PAID (async): Triggered when newly created order is paid.
- ORDER_FULLY_PAID (async): Triggered when newly created order is fully paid.
- ORDER_CONFIRMED (async): Optionally triggered when newly created order are automatically marked as confirmed.
"""
type OrderCreateFromCheckout {
  errors: [OrderCreateFromCheckoutError!]!

  """Placed order."""
  order: Order
}

type OrderCreateFromCheckoutError {
  """The error code."""
  code: OrderCreateFromCheckoutErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """List of line Ids which cause the error."""
  lines: [ID!]

  """The error message."""
  message: String

  """List of variant IDs which causes the error."""
  variants: [ID!]
}

enum OrderCreateFromCheckoutErrorCode {
  BILLING_ADDRESS_NOT_SET
  CHANNEL_INACTIVE
  CHECKOUT_NOT_FOUND
  EMAIL_NOT_SET
  GIFT_CARD_NOT_APPLICABLE
  GRAPHQL_ERROR
  INSUFFICIENT_STOCK
  INVALID_SHIPPING_METHOD
  NO_LINES
  SHIPPING_ADDRESS_NOT_SET
  SHIPPING_METHOD_NOT_SET
  TAX_ERROR
  UNAVAILABLE_VARIANT_IN_CHANNEL
  VOUCHER_NOT_APPLICABLE
}

"""
Event sent when new order is created.

Added in Saleor 3.2.
"""
type OrderCreated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The order the event relates to."""
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

enum OrderDirection {
  """Specifies an ascending sort order."""
  ASC

  """Specifies a descending sort order."""
  DESC
}

"""Contains all details related to the applied discount to the order."""
type OrderDiscount implements Node {
  """Returns amount of discount."""
  amount: Money!

  """The ID of discount applied."""
  id: ID!

  """The name of applied discount."""
  name: String

  """
  Explanation for the applied discount.
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  reason: String

  """Translated name of the applied discount."""
  translatedName: String

  """The type of applied discount: Sale, Voucher or Manual."""
  type: OrderDiscountType!

  """Value of the discount. Can store fixed value or percent value"""
  value: PositiveDecimal!

  """Type of the discount: fixed or percent"""
  valueType: DiscountValueTypeEnum!
}

"""
Adds discount to the order. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderDiscountAdd {
  errors: [OrderError!]!

  """Order which has been discounted."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input OrderDiscountCommonInput {
  """Explanation for the applied discount."""
  reason: String

  """Value of the discount. Can store fixed value or percent value"""
  value: PositiveDecimal!

  """Type of the discount: fixed or percent"""
  valueType: DiscountValueTypeEnum!
}

"""
Remove discount from the order. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderDiscountDelete {
  errors: [OrderError!]!

  """Order which has removed discount."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

enum OrderDiscountType {
  MANUAL
  ORDER_PROMOTION
  PROMOTION
  SALE
  VOUCHER
}

"""
Update discount for the order. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderDiscountUpdate {
  errors: [OrderError!]!

  """Order which has been discounted."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input OrderDraftFilterInput {
  channels: [ID!]
  created: DateRangeInput
  customer: String
  metadata: [MetadataFilter!]
  search: String
}

type OrderError {
  """A type of address that causes the error."""
  addressType: AddressTypeEnum

  """The error code."""
  code: OrderErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String

  """List of order line IDs that cause the error."""
  orderLines: [ID!]

  """List of product variants that are associated with the error"""
  variants: [ID!]

  """Warehouse ID which causes the error."""
  warehouse: ID
}

enum OrderErrorCode {
  BILLING_ADDRESS_NOT_SET
  CANNOT_CANCEL_FULFILLMENT
  CANNOT_CANCEL_ORDER
  CANNOT_DELETE
  CANNOT_DISCOUNT
  CANNOT_FULFILL_UNPAID_ORDER
  CANNOT_REFUND
  CAPTURE_INACTIVE_PAYMENT
  CHANNEL_INACTIVE
  DUPLICATED_INPUT_ITEM
  FULFILL_ORDER_LINE
  GIFT_CARD_LINE
  GRAPHQL_ERROR
  INSUFFICIENT_STOCK
  INVALID
  INVALID_QUANTITY
  INVALID_VOUCHER
  INVALID_VOUCHER_CODE
  NON_EDITABLE_GIFT_LINE
  NON_REMOVABLE_GIFT_LINE
  NOT_AVAILABLE_IN_CHANNEL
  NOT_EDITABLE
  NOT_FOUND
  ORDER_NO_SHIPPING_ADDRESS
  PAYMENT_ERROR
  PAYMENT_MISSING
  PRODUCT_NOT_PUBLISHED
  PRODUCT_UNAVAILABLE_FOR_PURCHASE
  REQUIRED
  SHIPPING_METHOD_NOT_APPLICABLE
  SHIPPING_METHOD_REQUIRED
  TAX_ERROR
  TRANSACTION_ERROR
  UNIQUE
  VOID_INACTIVE_PAYMENT
  ZERO_QUANTITY
}

"""History log of the order."""
type OrderEvent implements Node {
  """Amount of money."""
  amount: Float

  """
  App that performed the action. Requires of of the following permissions: MANAGE_APPS, MANAGE_ORDERS, OWNER.
  """
  app: App

  """Composed ID of the Fulfillment."""
  composedId: String

  """Date when event happened at in ISO 8601 format."""
  date: DateTime

  """The discount applied to the order."""
  discount: OrderEventDiscountObject

  """Email of the customer."""
  email: String

  """Type of an email sent to the customer."""
  emailType: OrderEventsEmailsEnum

  """The lines fulfilled."""
  fulfilledItems: [FulfillmentLine!]

  """ID of the event associated with an order."""
  id: ID!

  """Number of an invoice related to the order."""
  invoiceNumber: String

  """The concerned lines."""
  lines: [OrderEventOrderLineObject!]

  """Content of the event."""
  message: String

  """User-friendly number of an order."""
  orderNumber: String

  """List of oversold lines names."""
  oversoldItems: [String!]

  """The payment gateway of the payment."""
  paymentGateway: String

  """The payment reference from the payment provider."""
  paymentId: String

  """Number of items."""
  quantity: Int

  """The reference of payment's transaction."""
  reference: String

  """
  The order event which is related to this event.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  related: OrderEvent

  """The order which is related to this order."""
  relatedOrder: Order

  """Define if shipping costs were included to the refund."""
  shippingCostsIncluded: Boolean

  """The transaction reference of captured payment."""
  transactionReference: String

  """Order event type."""
  type: OrderEventsEnum

  """User who performed the action."""
  user: User

  """The warehouse were items were restocked."""
  warehouse: Warehouse
}

type OrderEventCountableConnection {
  edges: [OrderEventCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type OrderEventCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: OrderEvent!
}

type OrderEventDiscountObject {
  """Returns amount of discount."""
  amount: Money

  """Returns amount of discount."""
  oldAmount: Money

  """Value of the discount. Can store fixed value or percent value."""
  oldValue: PositiveDecimal

  """Type of the discount: fixed or percent."""
  oldValueType: DiscountValueTypeEnum

  """Explanation for the applied discount."""
  reason: String

  """Value of the discount. Can store fixed value or percent value."""
  value: PositiveDecimal!

  """Type of the discount: fixed or percent."""
  valueType: DiscountValueTypeEnum!
}

type OrderEventOrderLineObject {
  """The discount applied to the order line."""
  discount: OrderEventDiscountObject

  """The variant name."""
  itemName: String

  """The order line."""
  orderLine: OrderLine

  """The variant quantity."""
  quantity: Int
}

enum OrderEventsEmailsEnum {
  CONFIRMED
  DIGITAL_LINKS
  FULFILLMENT_CONFIRMATION
  ORDER_CANCEL
  ORDER_CONFIRMATION
  ORDER_REFUND
  PAYMENT_CONFIRMATION
  SHIPPING_CONFIRMATION
  TRACKING_UPDATED
}

"""The different order event types."""
enum OrderEventsEnum {
  ADDED_PRODUCTS
  CANCELED
  CONFIRMED
  DRAFT_CREATED
  DRAFT_CREATED_FROM_REPLACE
  EMAIL_SENT
  EXPIRED
  EXTERNAL_SERVICE_NOTIFICATION
  FULFILLMENT_AWAITS_APPROVAL
  FULFILLMENT_CANCELED
  FULFILLMENT_FULFILLED_ITEMS
  FULFILLMENT_REFUNDED
  FULFILLMENT_REPLACED
  FULFILLMENT_RESTOCKED_ITEMS
  FULFILLMENT_RETURNED
  INVOICE_GENERATED
  INVOICE_REQUESTED
  INVOICE_SENT
  INVOICE_UPDATED
  NOTE_ADDED
  NOTE_UPDATED
  ORDER_DISCOUNT_ADDED
  ORDER_DISCOUNT_AUTOMATICALLY_UPDATED
  ORDER_DISCOUNT_DELETED
  ORDER_DISCOUNT_UPDATED
  ORDER_FULLY_PAID
  ORDER_LINE_DISCOUNT_REMOVED
  ORDER_LINE_DISCOUNT_UPDATED
  ORDER_LINE_PRODUCT_DELETED
  ORDER_LINE_VARIANT_DELETED
  ORDER_MARKED_AS_PAID
  ORDER_REPLACEMENT_CREATED
  OTHER
  OVERSOLD_ITEMS
  PAYMENT_AUTHORIZED
  PAYMENT_CAPTURED
  PAYMENT_FAILED
  PAYMENT_REFUNDED
  PAYMENT_VOIDED
  PLACED
  PLACED_AUTOMATICALLY_FROM_PAID_CHECKOUT
  PLACED_FROM_DRAFT
  REMOVED_PRODUCTS
  TRACKING_UPDATED
  TRANSACTION_CANCEL_REQUESTED
  TRANSACTION_CHARGE_REQUESTED
  TRANSACTION_EVENT
  TRANSACTION_MARK_AS_PAID_FAILED
  TRANSACTION_REFUND_REQUESTED
  UPDATED_ADDRESS
}

"""
Event sent when order becomes expired.

Added in Saleor 3.13.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type OrderExpired implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The order the event relates to."""
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

input OrderFilterInput {
  authorizeStatus: [OrderAuthorizeStatusEnum!]
  channels: [ID!]
  chargeStatus: [OrderChargeStatusEnum!]
  checkoutIds: [ID!]
  checkoutTokens: [UUID!]
  created: DateRangeInput
  customer: String
  giftCardBought: Boolean
  giftCardUsed: Boolean
  ids: [ID!]
  isClickAndCollect: Boolean
  isPreorder: Boolean
  metadata: [MetadataFilter!]
  numbers: [String!]
  paymentStatus: [PaymentChargeStatusEnum!]
  search: String
  status: [OrderStatusFilter!]
  updatedAt: DateTimeRangeInput
}

"""
Filter shipping methods for order.

Added in Saleor 3.6.
"""
type OrderFilterShippingMethods implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The order the event relates to."""
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """
  Shipping methods that can be used with this checkout.
  
  Added in Saleor 3.6.
  """
  shippingMethods: [ShippingMethod!]

  """Saleor version that triggered the event."""
  version: String
}

"""
Creates new fulfillments for an order. 

Requires one of the following permissions: MANAGE_ORDERS.

Triggers the following webhook events:
- FULFILLMENT_CREATED (async): A new fulfillment is created.
- ORDER_FULFILLED (async): Order is fulfilled.
- FULFILLMENT_TRACKING_NUMBER_UPDATED (async): Sent when fulfillment tracking number is updated.
- FULFILLMENT_APPROVED (async): A fulfillment is approved.
"""
type OrderFulfill {
  errors: [OrderError!]!

  """List of created fulfillments."""
  fulfillments: [Fulfillment!]

  """Fulfilled order."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input OrderFulfillInput {
  """If true, then allow proceed fulfillment when stock is exceeded."""
  allowStockToBeExceeded: Boolean = false

  """List of items informing how to fulfill the order."""
  lines: [OrderFulfillLineInput!]!

  """If true, send an email notification to the customer."""
  notifyCustomer: Boolean

  """
  Fulfillment tracking number.
  
  Added in Saleor 3.6.
  """
  trackingNumber: String
}

input OrderFulfillLineInput {
  """The ID of the order line."""
  orderLineId: ID

  """List of stock items to create."""
  stocks: [OrderFulfillStockInput!]!
}

input OrderFulfillStockInput {
  """The number of line items to be fulfilled from given warehouse."""
  quantity: Int!

  """ID of the warehouse from which the item will be fulfilled."""
  warehouse: ID!
}

"""
Event sent when order is fulfilled.

Added in Saleor 3.2.
"""
type OrderFulfilled implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The order the event relates to."""
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Event sent when order is fully paid.

Added in Saleor 3.2.
"""
type OrderFullyPaid implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The order the event relates to."""
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
The order is fully refunded.

Added in Saleor 3.14.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type OrderFullyRefunded implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The order the event relates to."""
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Adds granted refund to the order.

Added in Saleor 3.13.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderGrantRefundCreate {
  errors: [OrderGrantRefundCreateError!]!

  """Created granted refund."""
  grantedRefund: OrderGrantedRefund

  """Order which has assigned new grant refund."""
  order: Order
}

type OrderGrantRefundCreateError {
  """The error code."""
  code: OrderGrantRefundCreateErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """
  List of lines which cause the error.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  lines: [OrderGrantRefundCreateLineError!]

  """The error message."""
  message: String
}

enum OrderGrantRefundCreateErrorCode {
  AMOUNT_GREATER_THAN_AVAILABLE
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  REQUIRED
  SHIPPING_COSTS_ALREADY_GRANTED
}

input OrderGrantRefundCreateInput {
  """
  Amount of the granted refund. If not provided, the amount will be calculated automatically based on provided `lines` and `grantRefundForShipping`.
  """
  amount: Decimal

  """
  Determine if granted refund should include shipping costs.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  grantRefundForShipping: Boolean

  """
  Lines to assign to granted refund.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  lines: [OrderGrantRefundCreateLineInput!]

  """Reason of the granted refund."""
  reason: String

  """
  The ID of the transaction item related to the granted refund. If `amount` provided in the input, the transaction.chargedAmount needs to be equal or greater than provided `amount`.If `amount` is not provided in the input and calculated automatically by Saleor, the `min(calculatedAmount, transaction.chargedAmount)` will be used.Field will be required starting from Saleor 3.21.
  
  Added in Saleor 3.20.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  transactionId: ID
}

type OrderGrantRefundCreateLineError {
  """The error code."""
  code: OrderGrantRefundCreateLineErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The ID of the line related to the error."""
  lineId: ID!

  """The error message."""
  message: String
}

enum OrderGrantRefundCreateLineErrorCode {
  GRAPHQL_ERROR
  NOT_FOUND
  QUANTITY_GREATER_THAN_AVAILABLE
}

input OrderGrantRefundCreateLineInput {
  """The ID of the order line."""
  id: ID!

  """The quantity of line items to be marked to refund."""
  quantity: Int!

  """Reason of the granted refund for the line."""
  reason: String
}

"""
Updates granted refund.

Added in Saleor 3.13.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderGrantRefundUpdate {
  errors: [OrderGrantRefundUpdateError!]!

  """Created granted refund."""
  grantedRefund: OrderGrantedRefund

  """Order which has assigned updated grant refund."""
  order: Order
}

type OrderGrantRefundUpdateError {
  """
  List of lines to add which cause the error.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  addLines: [OrderGrantRefundUpdateLineError!]

  """The error code."""
  code: OrderGrantRefundUpdateErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String

  """
  List of lines to remove which cause the error.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  removeLines: [OrderGrantRefundUpdateLineError!]
}

enum OrderGrantRefundUpdateErrorCode {
  AMOUNT_GREATER_THAN_AVAILABLE
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  REQUIRED
  SHIPPING_COSTS_ALREADY_GRANTED
}

input OrderGrantRefundUpdateInput {
  """
  Lines to assign to granted refund.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  addLines: [OrderGrantRefundUpdateLineAddInput!]

  """
  Amount of the granted refund. if not provided and `addLines` or `removeLines` or `grantRefundForShipping` is provided, amount will be calculated automatically.
  """
  amount: Decimal

  """
  Determine if granted refund should include shipping costs.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  grantRefundForShipping: Boolean

  """Reason of the granted refund."""
  reason: String

  """
  Lines to remove from granted refund.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  removeLines: [ID!]

  """
  The ID of the transaction item related to the granted refund. If `amount` provided in the input, the transaction.chargedAmount needs to be equal or greater than provided `amount`.If `amount` is not provided in the input and calculated automatically by Saleor, the `min(calculatedAmount, transaction.chargedAmount)` will be used.Field will be required starting from Saleor 3.21.
  
  Added in Saleor 3.20.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  transactionId: ID
}

input OrderGrantRefundUpdateLineAddInput {
  """The ID of the order line."""
  id: ID!

  """The quantity of line items to be marked to refund."""
  quantity: Int!

  """Reason of the granted refund for the line."""
  reason: String
}

type OrderGrantRefundUpdateLineError {
  """The error code."""
  code: OrderGrantRefundUpdateLineErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The ID of the line related to the error."""
  lineId: ID!

  """The error message."""
  message: String
}

enum OrderGrantRefundUpdateLineErrorCode {
  GRAPHQL_ERROR
  NOT_FOUND
  QUANTITY_GREATER_THAN_AVAILABLE
}

"""
The details of granted refund.

Added in Saleor 3.13.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type OrderGrantedRefund {
  """Refund amount."""
  amount: Money!

  """App that performed the action."""
  app: App

  """Time of creation."""
  createdAt: DateTime!
  id: ID!

  """
  Lines assigned to the granted refund.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  lines: [OrderGrantedRefundLine!]

  """Reason of the refund."""
  reason: String

  """
  If true, the refunded amount includes the shipping price.If false, the refunded amount does not include the shipping price.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  shippingCostsIncluded: Boolean!

  """
  Status of the granted refund calculated based on transactionItem assigned to granted refund.
  
  Added in Saleor 3.20.
  """
  status: OrderGrantedRefundStatusEnum!

  """
  The transaction assigned to the granted refund.
  
  Added in Saleor 3.20.
  """
  transaction: TransactionItem

  """
  List of refund events associated with the granted refund.
  
  Added in Saleor 3.20.
  """
  transactionEvents: [TransactionEvent!]

  """Time of last update."""
  updatedAt: DateTime!

  """
  User who performed the action. Requires of of the following permissions: MANAGE_USERS, MANAGE_STAFF, OWNER.
  """
  user: User
}

"""
Represents granted refund line.

Added in Saleor 3.15.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type OrderGrantedRefundLine {
  id: ID!

  """Line of the order associated with this granted refund."""
  orderLine: OrderLine!

  """Number of items to refund."""
  quantity: Int!

  """Reason for refunding the line."""
  reason: String
}

"""
Represents the status of a granted refund.

    NONE - the refund on related transactionItem is not processed
    PENDING - the refund on related transactionItem is pending
    FULL - the refund on related transactionItem is fully processed
    FAIL - the refund on related transactionItem failed
"""
enum OrderGrantedRefundStatusEnum {
  FAILURE
  NONE
  PENDING
  SUCCESS
}

"""Represents order line of particular order."""
type OrderLine implements Node & ObjectWithMetadata {
  """
  List of allocations across warehouses.
  
  Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS.
  """
  allocations: [Allocation!]
  digitalContentUrl: DigitalContentUrl

  """ID of the order line."""
  id: ID!

  """
  Determine if the line is a gift.
  
  Added in Saleor 3.19.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  isGift: Boolean

  """
  Returns True, if the line unit price was overridden.
  
  Added in Saleor 3.14.
  """
  isPriceOverridden: Boolean

  """Whether the product variant requires shipping."""
  isShippingRequired: Boolean!

  """
  List of public metadata items. Can be accessed without permissions.
  
  Added in Saleor 3.5.
  """
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.5.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.5.
  """
  metafields(keys: [String!]): Metadata

  """
  List of private metadata items. Requires staff permissions to access.
  
  Added in Saleor 3.5.
  """
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.5.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.5.
  """
  privateMetafields(keys: [String!]): Metadata

  """Name of the product in order line."""
  productName: String!

  """SKU of the product variant."""
  productSku: String

  """The ID of the product variant."""
  productVariantId: String

  """Number of variant items ordered."""
  quantity: Int!

  """Number of variant items fulfilled."""
  quantityFulfilled: Int!

  """
  A quantity of items remaining to be fulfilled.
  
  Added in Saleor 3.1.
  """
  quantityToFulfill: Int!

  """
  Denormalized sale ID, set when order line is created for a product variant that is on sale.
  
  Added in Saleor 3.14.
  """
  saleId: ID

  """
  Denormalized tax class of the product in this order line.
  
  Added in Saleor 3.9.
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.
  """
  taxClass: TaxClass

  """
  Denormalized public metadata of the tax class.
  
  Added in Saleor 3.9.
  """
  taxClassMetadata: [MetadataItem!]!

  """
  Denormalized name of the tax class.
  
  Added in Saleor 3.9.
  """
  taxClassName: String

  """
  Denormalized private metadata of the tax class. Requires staff permissions to access.
  
  Added in Saleor 3.9.
  """
  taxClassPrivateMetadata: [MetadataItem!]!

  """Rate of tax applied on product variant."""
  taxRate: Float!
  thumbnail(
    """
    The format of the image. When not provided, format of the original image will be used.
    
    Added in Saleor 3.6.
    """
    format: ThumbnailFormatEnum = ORIGINAL

    """
    Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended).
    """
    size: Int
  ): Image

  """Price of the order line."""
  totalPrice: TaxedMoney!

  """Product name in the customer's language"""
  translatedProductName: String!

  """Variant name in the customer's language"""
  translatedVariantName: String!

  """Price of the order line without discounts."""
  undiscountedTotalPrice: TaxedMoney!

  """
  Price of the single item in the order line without any discount applied.
  """
  undiscountedUnitPrice: TaxedMoney!

  """
  Sum of the line-level discounts applied to the order line. Order-level discounts which affect the line are not visible in this field. For order-level discount portion (if any), please query `order.discounts` field.
  """
  unitDiscount: Money!

  """
  Reason for line-level discounts applied on the order line. Order-level discounts which affect the line are not visible in this field. For order-level discount reason (if any), please query `order.discounts` field.
  """
  unitDiscountReason: String

  """
  Type of the discount: `fixed` or `percent`. This field shouldn't be used when multiple discounts affect the line. There is a limitation, that after running `checkoutComplete` mutation the field is always set to `fixed`.
  """
  unitDiscountType: DiscountValueTypeEnum

  """
  Value of the discount. Can store fixed value or percent value. This field shouldn't be used when multiple discounts affect the line. There is a limitation, that after running `checkoutComplete` mutation the field always stores fixed value.
  """
  unitDiscountValue: PositiveDecimal!

  """
  Price of the single item in the order line with all the line-level discounts and order-level discount portions applied.
  """
  unitPrice: TaxedMoney!

  """
  A purchased product variant. Note: this field may be null if the variant has been removed from stock at all. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS.
  """
  variant: ProductVariant

  """Name of the variant of product in order line."""
  variantName: String!

  """
  Voucher code that was used for this order line.
  
  Added in Saleor 3.14.
  """
  voucherCode: String
}

input OrderLineCreateInput {
  """
  Flag that allow force splitting the same variant into multiple lines by skipping the matching logic. 
  
  Added in Saleor 3.6.
  """
  forceNewLine: Boolean = false

  """
  Custom price of the item.When the line with the same variant will be provided multiple times, the last price will be used.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  price: PositiveDecimal

  """Number of variant items ordered."""
  quantity: Int!

  """Product variant ID."""
  variantId: ID!
}

"""
Deletes an order line from an order. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderLineDelete {
  errors: [OrderError!]!

  """A related order."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """An order line that was deleted."""
  orderLine: OrderLine
}

"""
Remove discount applied to the order line. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderLineDiscountRemove {
  errors: [OrderError!]!

  """Order which is related to line which has removed discount."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """Order line which has removed discount."""
  orderLine: OrderLine
}

"""
Update discount for the order line. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderLineDiscountUpdate {
  errors: [OrderError!]!

  """Order which is related to the discounted line."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """Order line which has been discounted."""
  orderLine: OrderLine
}

input OrderLineInput {
  """Number of variant items ordered."""
  quantity: Int!
}

"""
Updates an order line of an order. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderLineUpdate {
  errors: [OrderError!]!

  """Related order."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  orderLine: OrderLine
}

"""
Create order lines for an order. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderLinesCreate {
  errors: [OrderError!]!

  """Related order."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """List of added order lines."""
  orderLines: [OrderLine!]
}

"""
Mark order as manually paid. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderMarkAsPaid {
  errors: [OrderError!]!

  """Order marked as paid."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when order metadata is updated.

Added in Saleor 3.8.
"""
type OrderMetadataUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The order the event relates to."""
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Adds note to the order.

Added in Saleor 3.15.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderNoteAdd {
  errors: [OrderNoteAddError!]!

  """Order note created."""
  event: OrderEvent

  """Order with the note added."""
  order: Order
}

type OrderNoteAddError {
  """The error code."""
  code: OrderNoteAddErrorCode

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum OrderNoteAddErrorCode {
  GRAPHQL_ERROR
  REQUIRED
}

input OrderNoteInput {
  """Note message."""
  message: String!
}

"""
Updates note of an order.

Added in Saleor 3.15.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderNoteUpdate {
  errors: [OrderNoteUpdateError!]!

  """Order note updated."""
  event: OrderEvent

  """Order with the note updated."""
  order: Order
}

type OrderNoteUpdateError {
  """The error code."""
  code: OrderNoteUpdateErrorCode

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum OrderNoteUpdateErrorCode {
  GRAPHQL_ERROR
  NOT_FOUND
  REQUIRED
}

union OrderOrCheckout = Checkout | Order

enum OrderOriginEnum {
  BULK_CREATE
  CHECKOUT
  DRAFT
  REISSUE
}

"""
Payment has been made. The order may be partially or fully paid.

Added in Saleor 3.14.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type OrderPaid implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The order the event relates to."""
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

input OrderPredicateInput {
  """List of conditions that must be met."""
  AND: [OrderPredicateInput!]

  """A list of conditions of which at least one must be met."""
  OR: [OrderPredicateInput!]

  """Defines the conditions related to checkout and order objects."""
  discountedObjectPredicate: DiscountedObjectWhereInput
}

"""
Refund an order. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderRefund {
  errors: [OrderError!]!

  """A refunded order."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input OrderRefundFulfillmentLineInput {
  """The ID of the fulfillment line to refund."""
  fulfillmentLineId: ID!

  """The number of items to be refunded."""
  quantity: Int!
}

input OrderRefundLineInput {
  """The ID of the order line to refund."""
  orderLineId: ID!

  """The number of items to be refunded."""
  quantity: Int!
}

input OrderRefundProductsInput {
  """The total amount of refund when the value is provided manually."""
  amountToRefund: PositiveDecimal

  """List of fulfilled lines to refund."""
  fulfillmentLines: [OrderRefundFulfillmentLineInput!]

  """
  If true, Saleor will refund shipping costs. If amountToRefund is providedincludeShippingCosts will be ignored.
  """
  includeShippingCosts: Boolean = false

  """List of unfulfilled lines to refund."""
  orderLines: [OrderRefundLineInput!]
}

"""
The order received a refund. The order may be partially or fully refunded.

Added in Saleor 3.14.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type OrderRefunded implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The order the event relates to."""
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

input OrderReturnFulfillmentLineInput {
  """The ID of the fulfillment line to return."""
  fulfillmentLineId: ID!

  """The number of items to be returned."""
  quantity: Int!

  """Determines, if the line should be added to replace order."""
  replace: Boolean = false
}

input OrderReturnLineInput {
  """The ID of the order line to return."""
  orderLineId: ID!

  """The number of items to be returned."""
  quantity: Int!

  """Determines, if the line should be added to replace order."""
  replace: Boolean = false
}

input OrderReturnProductsInput {
  """The total amount of refund when the value is provided manually."""
  amountToRefund: PositiveDecimal

  """List of fulfilled lines to return."""
  fulfillmentLines: [OrderReturnFulfillmentLineInput!]

  """
  If true, Saleor will refund shipping costs. If amountToRefund is providedincludeShippingCosts will be ignored.
  """
  includeShippingCosts: Boolean = false

  """List of unfulfilled lines to return."""
  orderLines: [OrderReturnLineInput!]

  """If true, Saleor will call refund action for all lines."""
  refund: Boolean = false
}

"""Represents the channel-specific order settings."""
type OrderSettings {
  """
  Determine if it is possible to place unpaid order by calling `checkoutComplete` mutation.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  allowUnpaidOrders: Boolean!

  """
  When disabled, all new orders from checkout will be marked as unconfirmed. When enabled orders from checkout will become unfulfilled immediately.
  """
  automaticallyConfirmAllNewOrders: Boolean!

  """
  When enabled, all non-shippable gift card orders will be fulfilled automatically.
  """
  automaticallyFulfillNonShippableGiftCard: Boolean!

  """
  The time in days after expired orders will be deleted.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  deleteExpiredOrdersAfter: Day!

  """
  Expiration time in minutes. Default null - means do not expire any orders.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  expireOrdersAfter: Minute

  """
  Determine if voucher applied on draft order should be count toward voucher usage.
  
  Added in Saleor 3.18.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  includeDraftOrderInVoucherUsage: Boolean!

  """
  Determine what strategy will be used to mark the order as paid. Based on the chosen option, the proper object will be created and attached to the order when it's manually marked as paid.
  `PAYMENT_FLOW` - [default option] creates the `Payment` object.
  `TRANSACTION_FLOW` - creates the `TransactionItem` object.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  markAsPaidStrategy: MarkAsPaidStrategyEnum!
}

type OrderSettingsError {
  """The error code."""
  code: OrderSettingsErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum OrderSettingsErrorCode {
  INVALID
}

input OrderSettingsInput {
  """
  Determine if it is possible to place unpaid order by calling `checkoutComplete` mutation.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  allowUnpaidOrders: Boolean

  """
  When disabled, all new orders from checkout will be marked as unconfirmed. When enabled orders from checkout will become unfulfilled immediately. By default set to True
  """
  automaticallyConfirmAllNewOrders: Boolean

  """
  When enabled, all non-shippable gift card orders will be fulfilled automatically. By default set to True.
  """
  automaticallyFulfillNonShippableGiftCard: Boolean

  """
  The time in days after expired orders will be deleted.Allowed range is from 1 to 120.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  deleteExpiredOrdersAfter: Day

  """
  Expiration time in minutes. Default null - means do not expire any orders. Enter 0 or null to disable.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  expireOrdersAfter: Minute

  """
  Specify whether a coupon applied to draft orders will count toward voucher usage.
  
  Warning:  when switching this setting from `false` to `true`, the vouchers will be disconnected from all draft orders.
  
  Added in Saleor 3.18.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  includeDraftOrderInVoucherUsage: Boolean

  """
  Determine what strategy will be used to mark the order as paid. Based on the chosen option, the proper object will be created and attached to the order when it's manually marked as paid.
  `PAYMENT_FLOW` - [default option] creates the `Payment` object.
  `TRANSACTION_FLOW` - creates the `TransactionItem` object.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  markAsPaidStrategy: MarkAsPaidStrategyEnum
}

"""
Update shop order settings across all channels. Returns `orderSettings` for the first `channel` in alphabetical order.  

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderSettingsUpdate {
  errors: [OrderSettingsError!]!

  """Order settings."""
  orderSettings: OrderSettings
  orderSettingsErrors: [OrderSettingsError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input OrderSettingsUpdateInput {
  """
  When disabled, all new orders from checkout will be marked as unconfirmed. When enabled orders from checkout will become unfulfilled immediately. By default set to True
  """
  automaticallyConfirmAllNewOrders: Boolean

  """
  When enabled, all non-shippable gift card orders will be fulfilled automatically. By default set to True.
  """
  automaticallyFulfillNonShippableGiftCard: Boolean
}

enum OrderSortField {
  """
  Sort orders by creation date. 
  
  DEPRECATED: this field will be removed in Saleor 4.0.
  """
  CREATED_AT

  """
  Sort orders by creation date. 
  
  DEPRECATED: this field will be removed in Saleor 4.0.
  """
  CREATION_DATE

  """Sort orders by customer."""
  CUSTOMER

  """Sort orders by fulfillment status."""
  FULFILLMENT_STATUS

  """Sort orders by last modified at."""
  LAST_MODIFIED_AT

  """Sort orders by number."""
  NUMBER

  """Sort orders by payment."""
  PAYMENT

  """
  Sort orders by rank. Note: This option is available only with the `search` filter.
  """
  RANK
}

input OrderSortingInput {
  """Specifies the direction in which to sort orders."""
  direction: OrderDirection!

  """Sort orders by the selected field."""
  field: OrderSortField!
}

enum OrderStatus {
  CANCELED
  DRAFT
  EXPIRED
  FULFILLED
  PARTIALLY_FULFILLED
  PARTIALLY_RETURNED
  RETURNED
  UNCONFIRMED
  UNFULFILLED
}

enum OrderStatusFilter {
  CANCELED
  FULFILLED
  PARTIALLY_FULFILLED
  READY_TO_CAPTURE
  READY_TO_FULFILL
  UNCONFIRMED
  UNFULFILLED
}

"""
Updates an order. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderUpdate {
  errors: [OrderError!]!
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input OrderUpdateInput {
  """Billing address of the customer."""
  billingAddress: AddressInput

  """
  External ID of this order.
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """Shipping address of the customer."""
  shippingAddress: AddressInput

  """Email address of the customer."""
  userEmail: String
}

"""
Updates a shipping method of the order. Requires shipping method ID to update, when null is passed then currently assigned shipping method is removed. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderUpdateShipping {
  errors: [OrderError!]!

  """Order with updated shipping method."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input OrderUpdateShippingInput {
  """
  ID of the selected shipping method, pass null to remove currently assigned shipping method.
  """
  shippingMethod: ID
}

"""
Event sent when order is updated.

Added in Saleor 3.2.
"""
type OrderUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The order the event relates to."""
  order: Order

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Void an order. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type OrderVoid {
  errors: [OrderError!]!

  """A voided order."""
  order: Order
  orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
A static page that can be manually added by a shop operator through the dashboard.
"""
type Page implements Node & ObjectWithMetadata {
  """List of attributes assigned to this product."""
  attributes: [SelectedAttribute!]!

  """
  Content of the page.
  
  Rich text format. For reference see https://editorjs.io/
  """
  content: JSONString

  """
  Content of the page.
  
  Rich text format. For reference see https://editorjs.io/
  """
  contentJson: JSONString! @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `content` field instead.")

  """Date and time at which page was created."""
  created: DateTime!

  """ID of the page."""
  id: ID!

  """Determines if the page is published."""
  isPublished: Boolean!

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """Determines the type of page"""
  pageType: PageType!

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata
  publicationDate: Date @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `publishedAt` field to fetch the publication date.")

  """
  The page publication date.
  
  Added in Saleor 3.3.
  """
  publishedAt: DateTime

  """Description of the page for SEO."""
  seoDescription: String

  """Title of the page for SEO."""
  seoTitle: String

  """Slug of the page."""
  slug: String!

  """Title of the page."""
  title: String!

  """Returns translated page fields for the given language code."""
  translation(
    """A language code to return the translation for page."""
    languageCode: LanguageCodeEnum!
  ): PageTranslation
}

"""
Assign attributes to a given page type. 

Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
"""
type PageAttributeAssign {
  errors: [PageError!]!
  pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """The updated page type."""
  pageType: PageType
}

"""
Unassign attributes from a given page type. 

Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
"""
type PageAttributeUnassign {
  errors: [PageError!]!
  pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """The updated page type."""
  pageType: PageType
}

"""
Deletes pages. 

Requires one of the following permissions: MANAGE_PAGES.
"""
type PageBulkDelete {
  """Returns how many objects were affected."""
  count: Int!
  errors: [PageError!]!
  pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Publish pages. 

Requires one of the following permissions: MANAGE_PAGES.
"""
type PageBulkPublish {
  """Returns how many objects were affected."""
  count: Int!
  errors: [PageError!]!
  pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

type PageCountableConnection {
  edges: [PageCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type PageCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: Page!
}

"""
Creates a new page. 

Requires one of the following permissions: MANAGE_PAGES.
"""
type PageCreate {
  errors: [PageError!]!
  page: Page
  pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input PageCreateInput {
  """List of attributes."""
  attributes: [AttributeValueInput!]

  """
  Page content.
  
  Rich text format. For reference see https://editorjs.io/
  """
  content: JSONString

  """Determines if page is visible in the storefront."""
  isPublished: Boolean

  """ID of the page type that page belongs to."""
  pageType: ID!

  """
  Publication date. ISO 8601 standard. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use `publishedAt` field instead.
  """
  publicationDate: String

  """
  Publication date time. ISO 8601 standard.
  
  Added in Saleor 3.3.
  """
  publishedAt: DateTime

  """Search engine optimization fields."""
  seo: SeoInput

  """Page internal name."""
  slug: String

  """Page title."""
  title: String
}

"""
Event sent when new page is created.

Added in Saleor 3.2.
"""
type PageCreated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The page the event relates to."""
  page: Page

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Deletes a page. 

Requires one of the following permissions: MANAGE_PAGES.
"""
type PageDelete {
  errors: [PageError!]!
  page: Page
  pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when page is deleted.

Added in Saleor 3.2.
"""
type PageDeleted implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The page the event relates to."""
  page: Page

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

type PageError {
  """List of attributes IDs which causes the error."""
  attributes: [ID!]

  """The error code."""
  code: PageErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String

  """List of attribute values IDs which causes the error."""
  values: [ID!]
}

enum PageErrorCode {
  ATTRIBUTE_ALREADY_ASSIGNED
  DUPLICATED_INPUT_ITEM
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  REQUIRED
  UNIQUE
}

input PageFilterInput {
  ids: [ID!]
  metadata: [MetadataFilter!]
  pageTypes: [ID!]
  search: String
  slugs: [String!]
}

"""
The Relay compliant `PageInfo` type, containing data necessary to paginate this connection.
"""
type PageInfo {
  """When paginating forwards, the cursor to continue."""
  endCursor: String

  """When paginating forwards, are there more items?"""
  hasNextPage: Boolean!

  """When paginating backwards, are there more items?"""
  hasPreviousPage: Boolean!

  """When paginating backwards, the cursor to continue."""
  startCursor: String
}

input PageInput {
  """List of attributes."""
  attributes: [AttributeValueInput!]

  """
  Page content.
  
  Rich text format. For reference see https://editorjs.io/
  """
  content: JSONString

  """Determines if page is visible in the storefront."""
  isPublished: Boolean

  """
  Publication date. ISO 8601 standard. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use `publishedAt` field instead.
  """
  publicationDate: String

  """
  Publication date time. ISO 8601 standard.
  
  Added in Saleor 3.3.
  """
  publishedAt: DateTime

  """Search engine optimization fields."""
  seo: SeoInput

  """Page internal name."""
  slug: String

  """Page title."""
  title: String
}

"""
Reorder page attribute values. 

Requires one of the following permissions: MANAGE_PAGES.
"""
type PageReorderAttributeValues {
  errors: [PageError!]!

  """Page from which attribute values are reordered."""
  page: Page
  pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

enum PageSortField {
  """
  Sort pages by creation date.
  
  DEPRECATED: this field will be removed in Saleor 4.0.
  """
  CREATED_AT

  """
  Sort pages by creation date.
  
  DEPRECATED: this field will be removed in Saleor 4.0.
  """
  CREATION_DATE

  """
  Sort pages by publication date.
  
  DEPRECATED: this field will be removed in Saleor 4.0.
  """
  PUBLICATION_DATE

  """
  Sort pages by publication date.
  
  DEPRECATED: this field will be removed in Saleor 4.0.
  """
  PUBLISHED_AT

  """Sort pages by slug."""
  SLUG

  """Sort pages by title."""
  TITLE

  """Sort pages by visibility."""
  VISIBILITY
}

input PageSortingInput {
  """Specifies the direction in which to sort pages."""
  direction: OrderDirection!

  """Sort pages by the selected field."""
  field: PageSortField!
}

"""
Represents page's original translatable fields and related translations.
"""
type PageTranslatableContent implements Node {
  """List of page content attribute values that can be translated."""
  attributeValues: [AttributeValueTranslatableContent!]!

  """
  Content of the page to translate.
  
  Rich text format. For reference see https://editorjs.io/
  """
  content: JSONString

  """
  Content of the page.
  
  Rich text format. For reference see https://editorjs.io/
  """
  contentJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `content` field instead.")

  """The ID of the page translatable content."""
  id: ID!

  """
  A static page that can be manually added by a shop operator through the dashboard.
  """
  page: Page @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.")

  """
  The ID of the page to translate.
  
  Added in Saleor 3.14.
  """
  pageId: ID!

  """SEO description to translate."""
  seoDescription: String

  """SEO title to translate."""
  seoTitle: String

  """Page title to translate."""
  title: String!

  """Returns translated page fields for the given language code."""
  translation(
    """A language code to return the translation for page."""
    languageCode: LanguageCodeEnum!
  ): PageTranslation
}

"""
Creates/updates translations for a page. 

Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
type PageTranslate {
  errors: [TranslationError!]!
  page: PageTranslatableContent
  translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""Represents page translations."""
type PageTranslation implements Node {
  """
  Translated content of the page.
  
  Rich text format. For reference see https://editorjs.io/
  """
  content: JSONString

  """
  Translated description of the page.
  
  Rich text format. For reference see https://editorjs.io/
  """
  contentJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `content` field instead.")

  """The ID of the page translation."""
  id: ID!

  """Translation language."""
  language: LanguageDisplay!

  """Translated SEO description."""
  seoDescription: String

  """Translated SEO title."""
  seoTitle: String

  """Translated page title."""
  title: String

  """
  Represents the page fields to translate.
  
  Added in Saleor 3.14.
  """
  translatableContent: PageTranslatableContent
}

input PageTranslationInput {
  """
  Translated page content.
  
  Rich text format. For reference see https://editorjs.io/
  """
  content: JSONString
  seoDescription: String
  seoTitle: String
  title: String
}

"""
Represents a type of page. It defines what attributes are available to pages of this type.
"""
type PageType implements Node & ObjectWithMetadata {
  """Page attributes of that page type."""
  attributes: [Attribute!]

  """
  Attributes that can be assigned to the page type.
  
  Requires one of the following permissions: MANAGE_PAGES, MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
  """
  availableAttributes(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String
    filter: AttributeFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
    where: AttributeWhereInput
  ): AttributeCountableConnection

  """
  Whether page type has pages assigned.
  
  Requires one of the following permissions: MANAGE_PAGES, MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
  """
  hasPages: Boolean

  """ID of the page type."""
  id: ID!

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """Name of the page type."""
  name: String!

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """Slug of the page type."""
  slug: String!
}

"""
Delete page types. 

Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
"""
type PageTypeBulkDelete {
  """Returns how many objects were affected."""
  count: Int!
  errors: [PageError!]!
  pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

type PageTypeCountableConnection {
  edges: [PageTypeCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type PageTypeCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: PageType!
}

"""
Create a new page type. 

Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
"""
type PageTypeCreate {
  errors: [PageError!]!
  pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  pageType: PageType
}

input PageTypeCreateInput {
  """List of attribute IDs to be assigned to the page type."""
  addAttributes: [ID!]

  """Name of the page type."""
  name: String

  """Page type slug."""
  slug: String
}

"""
Event sent when new page type is created.

Added in Saleor 3.5.
"""
type PageTypeCreated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The page type the event relates to."""
  pageType: PageType

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Delete a page type. 

Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
"""
type PageTypeDelete {
  errors: [PageError!]!
  pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  pageType: PageType
}

"""
Event sent when page type is deleted.

Added in Saleor 3.5.
"""
type PageTypeDeleted implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The page type the event relates to."""
  pageType: PageType

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

input PageTypeFilterInput {
  search: String
  slugs: [String!]
}

"""
Reorder the attributes of a page type. 

Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
"""
type PageTypeReorderAttributes {
  errors: [PageError!]!
  pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """Page type from which attributes are reordered."""
  pageType: PageType
}

enum PageTypeSortField {
  """Sort page types by name."""
  NAME

  """Sort page types by slug."""
  SLUG
}

input PageTypeSortingInput {
  """Specifies the direction in which to sort page types."""
  direction: OrderDirection!

  """Sort page types by the selected field."""
  field: PageTypeSortField!
}

"""
Update page type. 

Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
"""
type PageTypeUpdate {
  errors: [PageError!]!
  pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  pageType: PageType
}

input PageTypeUpdateInput {
  """List of attribute IDs to be assigned to the page type."""
  addAttributes: [ID!]

  """Name of the page type."""
  name: String

  """List of attribute IDs to be assigned to the page type."""
  removeAttributes: [ID!]

  """Page type slug."""
  slug: String
}

"""
Event sent when page type is updated.

Added in Saleor 3.5.
"""
type PageTypeUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The page type the event relates to."""
  pageType: PageType

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Updates an existing page. 

Requires one of the following permissions: MANAGE_PAGES.
"""
type PageUpdate {
  errors: [PageError!]!
  page: Page
  pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when page is updated.

Added in Saleor 3.2.
"""
type PageUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The page the event relates to."""
  page: Page

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Change the password of the logged in user. 

Requires one of the following permissions: AUTHENTICATED_USER.
"""
type PasswordChange {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AccountError!]!

  """A user instance with a new password."""
  user: User
}

"""Represents a payment of a given type."""
type Payment implements Node & ObjectWithMetadata {
  """
  List of actions that can be performed in the current state of a payment.
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  actions: [OrderAction!]!

  """
  Maximum amount of money that can be captured.
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  availableCaptureAmount: Money

  """
  Maximum amount of money that can be refunded.
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  availableRefundAmount: Money

  """Total amount captured for this payment."""
  capturedAmount: Money

  """Internal payment status."""
  chargeStatus: PaymentChargeStatusEnum!

  """Checkout associated with a payment."""
  checkout: Checkout

  """Date and time at which payment was created."""
  created: DateTime!

  """The details of the card used for this payment."""
  creditCard: CreditCard

  """
  IP address of the user who created the payment.
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  customerIpAddress: String

  """Payment gateway used for payment."""
  gateway: String!

  """ID of the payment."""
  id: ID!

  """Determines if the payment is active or not."""
  isActive: Boolean!

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """Date and time at which payment was modified."""
  modified: DateTime!

  """Order associated with a payment."""
  order: Order

  """
  Informs whether this is a partial payment.
  
  Added in Saleor 3.14.
  """
  partial: Boolean!

  """Type of method used for payment."""
  paymentMethodType: String!

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """
  PSP reference of the payment.
  
  Added in Saleor 3.14.
  """
  pspReference: String

  """Unique token associated with a payment."""
  token: String!

  """Total amount of the payment."""
  total: Money

  """
  List of all transactions within this payment.
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  transactions: [Transaction!]
}

"""
Authorize payment.

Added in Saleor 3.6.
"""
type PaymentAuthorize implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """Look up a payment."""
  payment: Payment

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Captures the authorized payment amount. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type PaymentCapture {
  errors: [PaymentError!]!

  """Updated payment."""
  payment: Payment
  paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Capture payment.

Added in Saleor 3.6.
"""
type PaymentCaptureEvent implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """Look up a payment."""
  payment: Payment

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

enum PaymentChargeStatusEnum {
  CANCELLED
  FULLY_CHARGED
  FULLY_REFUNDED
  NOT_CHARGED
  PARTIALLY_CHARGED
  PARTIALLY_REFUNDED
  PENDING
  REFUSED
}

"""Check payment balance."""
type PaymentCheckBalance {
  """Response from the gateway."""
  data: JSONString
  errors: [PaymentError!]!
  paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input PaymentCheckBalanceInput {
  """Information about card."""
  card: CardInput!

  """Slug of a channel for which the data should be returned."""
  channel: String!

  """An ID of a payment gateway to check."""
  gatewayId: String!

  """Payment method name."""
  method: String!
}

"""
Confirm payment.

Added in Saleor 3.6.
"""
type PaymentConfirmEvent implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """Look up a payment."""
  payment: Payment

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

type PaymentCountableConnection {
  edges: [PaymentCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type PaymentCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: Payment!
}

type PaymentError {
  """The error code."""
  code: PaymentErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String

  """List of variant IDs which causes the error."""
  variants: [ID!]
}

enum PaymentErrorCode {
  BALANCE_CHECK_ERROR
  BILLING_ADDRESS_NOT_SET
  CHANNEL_INACTIVE
  CHECKOUT_COMPLETION_IN_PROGRESS
  CHECKOUT_EMAIL_NOT_SET
  GRAPHQL_ERROR
  INVALID
  INVALID_SHIPPING_METHOD
  NOT_FOUND
  NOT_SUPPORTED_GATEWAY
  NO_CHECKOUT_LINES
  PARTIAL_PAYMENT_NOT_ALLOWED
  PAYMENT_ERROR
  REQUIRED
  SHIPPING_ADDRESS_NOT_SET
  SHIPPING_METHOD_NOT_SET
  UNAVAILABLE_VARIANT_IN_CHANNEL
  UNIQUE
}

input PaymentFilterInput {
  checkouts: [ID!]

  """
  Filter by ids. 
  
  Added in Saleor 3.8.
  """
  ids: [ID!]
}

"""
Available payment gateway backend with configuration necessary to setup client.
"""
type PaymentGateway {
  """Payment gateway client configuration."""
  config: [GatewayConfigLine!]!

  """Payment gateway supported currencies."""
  currencies: [String!]!

  """Payment gateway ID."""
  id: ID!

  """Payment gateway name."""
  name: String!
}

type PaymentGatewayConfig {
  """The JSON data required to initialize the payment gateway."""
  data: JSON
  errors: [PaymentGatewayConfigError!]

  """The app identifier."""
  id: String!
}

type PaymentGatewayConfigError {
  """The error code."""
  code: PaymentGatewayConfigErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum PaymentGatewayConfigErrorCode {
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
}

"""
Initializes a payment gateway session. It triggers the webhook `PAYMENT_GATEWAY_INITIALIZE_SESSION`, to the requested `paymentGateways`. If `paymentGateways` is not provided, the webhook will be send to all subscribed payment gateways. There is a limit of 100 transaction items per checkout / order.

Added in Saleor 3.13.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type PaymentGatewayInitialize {
  errors: [PaymentGatewayInitializeError!]!

  """List of payment gateway configurations."""
  gatewayConfigs: [PaymentGatewayConfig!]
}

type PaymentGatewayInitializeError {
  """The error code."""
  code: PaymentGatewayInitializeErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum PaymentGatewayInitializeErrorCode {
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
}

"""
Event sent when user wants to initialize the payment gateway.

Added in Saleor 3.13.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type PaymentGatewayInitializeSession implements Event {
  """Amount requested for initializing the payment gateway."""
  amount: PositiveDecimal

  """Payment gateway data in JSON format, received from storefront."""
  data: JSON

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Checkout or order"""
  sourceObject: OrderOrCheckout!

  """Saleor version that triggered the event."""
  version: String
}

"""
Initializes payment gateway for tokenizing payment method session.

Added in Saleor 3.16.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: AUTHENTICATED_USER.

Triggers the following webhook events:
- PAYMENT_GATEWAY_INITIALIZE_TOKENIZATION_SESSION (sync): The customer requested to initialize payment gateway for tokenization.
"""
type PaymentGatewayInitializeTokenization {
  """A data returned by payment app."""
  data: JSON
  errors: [PaymentGatewayInitializeTokenizationError!]!

  """A status of the payment gateway initialization."""
  result: PaymentGatewayInitializeTokenizationResult!
}

type PaymentGatewayInitializeTokenizationError {
  """The error code."""
  code: PaymentGatewayInitializeTokenizationErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum PaymentGatewayInitializeTokenizationErrorCode {
  CHANNEL_INACTIVE
  GATEWAY_ERROR
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
}

"""
Result of initialize payment gateway for tokenization of payment method.

    The result of initialize payment gateway for tokenization of payment method.
    SUCCESSFULLY_INITIALIZED - The payment gateway was successfully initialized.
    FAILED_TO_INITIALIZE - The payment gateway was not initialized.
    FAILED_TO_DELIVER - The request to initialize payment gateway was not delivered.
"""
enum PaymentGatewayInitializeTokenizationResult {
  FAILED_TO_DELIVER
  FAILED_TO_INITIALIZE
  SUCCESSFULLY_INITIALIZED
}

"""
Event sent to initialize a new session in payment gateway to store the payment method. 

Added in Saleor 3.16.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type PaymentGatewayInitializeTokenizationSession implements Event {
  """Channel related to the requested action."""
  channel: Channel!

  """Payment gateway data in JSON format, received from storefront."""
  data: JSON

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The user related to the requested action."""
  user: User!

  """Saleor version that triggered the event."""
  version: String
}

input PaymentGatewayToInitialize {
  """The data that will be passed to the payment gateway."""
  data: JSON

  """The identifier of the payment gateway app to initialize."""
  id: String!
}

"""Initializes payment process when it is required by gateway."""
type PaymentInitialize {
  errors: [PaymentError!]!

  """Payment that was initialized."""
  initializedPayment: PaymentInitialized
  paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Server-side data generated by a payment gateway. Optional step when the payment provider requires an additional action to initialize payment session.
"""
type PaymentInitialized {
  """Initialized data by gateway."""
  data: JSONString

  """ID of a payment gateway."""
  gateway: String!

  """Payment gateway name."""
  name: String!
}

input PaymentInput {
  """
  Total amount of the transaction, including all taxes and discounts. If no amount is provided, the checkout total will be used.
  """
  amount: PositiveDecimal

  """A gateway to use with that payment."""
  gateway: String!

  """
  User public metadata.
  
  Added in Saleor 3.1.
  """
  metadata: [MetadataInput!]

  """
  URL of a storefront view where user should be redirected after requiring additional actions. Payment with additional actions will not be finished if this field is not provided.
  """
  returnUrl: String

  """
  Payment store type.
  
  Added in Saleor 3.1.
  """
  storePaymentMethod: StorePaymentMethodEnum = NONE

  """
  Client-side generated payment token, representing customer's billing data in a secure manner.
  """
  token: String
}

"""
List payment gateways.

Added in Saleor 3.6.
"""
type PaymentListGateways implements Event {
  """The checkout the event relates to."""
  checkout: Checkout

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Tokenize payment method.

Added in Saleor 3.16.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: AUTHENTICATED_USER.

Triggers the following webhook events:
- PAYMENT_METHOD_INITIALIZE_TOKENIZATION_SESSION (sync): The customer requested to tokenize payment method.
"""
type PaymentMethodInitializeTokenization {
  """A data returned by the payment app."""
  data: JSON
  errors: [PaymentMethodInitializeTokenizationError!]!

  """The identifier of the payment method."""
  id: String

  """A status of the payment method tokenization."""
  result: PaymentMethodTokenizationResult!
}

type PaymentMethodInitializeTokenizationError {
  """The error code."""
  code: PaymentMethodInitializeTokenizationErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum PaymentMethodInitializeTokenizationErrorCode {
  CHANNEL_INACTIVE
  GATEWAY_ERROR
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
}

"""
Event sent when user requests a tokenization of payment method.

Added in Saleor 3.16.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type PaymentMethodInitializeTokenizationSession implements Event {
  """Channel related to the requested action."""
  channel: Channel!

  """Payment gateway data in JSON format, received from storefront."""
  data: JSON

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The payment flow that the tokenized payment method should support."""
  paymentFlowToSupport: TokenizedPaymentFlowEnum!

  """The application receiving the webhook."""
  recipient: App

  """The user related to the requested action."""
  user: User!

  """Saleor version that triggered the event."""
  version: String
}

"""
Tokenize payment method.

Added in Saleor 3.16.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: AUTHENTICATED_USER.

Triggers the following webhook events:
- PAYMENT_METHOD_PROCESS_TOKENIZATION_SESSION (sync): The customer continues payment method tokenization.
"""
type PaymentMethodProcessTokenization {
  """A data returned by the payment app."""
  data: JSON
  errors: [PaymentMethodProcessTokenizationError!]!

  """The identifier of the payment method."""
  id: String

  """A status of the payment method tokenization."""
  result: PaymentMethodTokenizationResult!
}

type PaymentMethodProcessTokenizationError {
  """The error code."""
  code: PaymentMethodProcessTokenizationErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum PaymentMethodProcessTokenizationErrorCode {
  CHANNEL_INACTIVE
  GATEWAY_ERROR
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
}

"""
Event sent when user continues a tokenization of payment method.

Added in Saleor 3.16.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type PaymentMethodProcessTokenizationSession implements Event {
  """Channel related to the requested action."""
  channel: Channel!

  """Payment gateway data in JSON format, received from storefront."""
  data: JSON

  """
  The ID returned by app from `PAYMENT_METHOD_INITIALIZE_TOKENIZATION_SESSION` webhook.
  """
  id: String!

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The user related to the requested action."""
  user: User!

  """Saleor version that triggered the event."""
  version: String
}

type PaymentMethodRequestDeleteError {
  """The error code."""
  code: StoredPaymentMethodRequestDeleteErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

"""
Result of tokenization of payment method.

    SUCCESSFULLY_TOKENIZED - The payment method was successfully tokenized.
    ADDITIONAL_ACTION_REQUIRED - The additional action is required to tokenize payment
    method.
    PENDING - The payment method is pending tokenization.
    FAILED_TO_TOKENIZE - The payment method was not tokenized.
    FAILED_TO_DELIVER - The request to tokenize payment method was not delivered.
"""
enum PaymentMethodTokenizationResult {
  ADDITIONAL_ACTION_REQUIRED
  FAILED_TO_DELIVER
  FAILED_TO_TOKENIZE
  PENDING
  SUCCESSFULLY_TOKENIZED
}

"""
Process payment.

Added in Saleor 3.6.
"""
type PaymentProcessEvent implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """Look up a payment."""
  payment: Payment

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Refunds the captured payment amount. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type PaymentRefund {
  errors: [PaymentError!]!

  """Updated payment."""
  payment: Payment
  paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Refund payment.

Added in Saleor 3.6.
"""
type PaymentRefundEvent implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """Look up a payment."""
  payment: Payment

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""Represents the channel-specific payment settings."""
type PaymentSettings {
  """
  Determine the transaction flow strategy to be used. Include the selected option in the payload sent to the payment app, as a requested action for the transaction.
  
  Added in Saleor 3.16.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  defaultTransactionFlowStrategy: TransactionFlowStrategyEnum!
}

input PaymentSettingsInput {
  """
  Determine the transaction flow strategy to be used. Include the selected option in the payload sent to the payment app, as a requested action for the transaction.
  
  Added in Saleor 3.16.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  defaultTransactionFlowStrategy: TransactionFlowStrategyEnum
}

"""
Represents a payment source stored for user in payment gateway, such as credit card.
"""
type PaymentSource {
  """Stored credit card details if available."""
  creditCardInfo: CreditCard

  """Payment gateway name."""
  gateway: String!

  """
  List of public metadata items.
  
  Added in Saleor 3.1.
  
  Can be accessed without permissions.
  """
  metadata: [MetadataItem!]!

  """ID of stored payment method."""
  paymentMethodId: String
}

"""
Voids the authorized payment. 

Requires one of the following permissions: MANAGE_ORDERS.
"""
type PaymentVoid {
  errors: [PaymentError!]!

  """Updated payment."""
  payment: Payment
  paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Void payment.

Added in Saleor 3.6.
"""
type PaymentVoidEvent implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """Look up a payment."""
  payment: Payment

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""Represents a permission object in a friendly form."""
type Permission {
  """Internal code for permission."""
  code: PermissionEnum!

  """Describe action(s) allowed to do by permission."""
  name: String!
}

enum PermissionEnum {
  HANDLE_CHECKOUTS
  HANDLE_PAYMENTS
  HANDLE_TAXES
  IMPERSONATE_USER
  MANAGE_APPS
  MANAGE_CHANNELS
  MANAGE_CHECKOUTS
  MANAGE_DISCOUNTS
  MANAGE_GIFT_CARD
  MANAGE_MENUS
  MANAGE_OBSERVABILITY
  MANAGE_ORDERS
  MANAGE_ORDERS_IMPORT
  MANAGE_PAGES
  MANAGE_PAGE_TYPES_AND_ATTRIBUTES
  MANAGE_PLUGINS
  MANAGE_PRODUCTS
  MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES
  MANAGE_SETTINGS
  MANAGE_SHIPPING
  MANAGE_STAFF
  MANAGE_TAXES
  MANAGE_TRANSLATIONS
  MANAGE_USERS
}

"""
Create new permission group. Apps are not allowed to perform this mutation. 

Requires one of the following permissions: MANAGE_STAFF.

Triggers the following webhook events:
- PERMISSION_GROUP_CREATED (async)
"""
type PermissionGroupCreate {
  errors: [PermissionGroupError!]!
  group: Group
  permissionGroupErrors: [PermissionGroupError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input PermissionGroupCreateInput {
  """
  List of channels to assign to this group.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  addChannels: [ID!]

  """List of permission code names to assign to this group."""
  addPermissions: [PermissionEnum!]

  """List of users to assign to this group."""
  addUsers: [ID!]

  """Group name."""
  name: String!

  """
  Determine if the group has restricted access to channels.  DEFAULT: False
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  restrictedAccessToChannels: Boolean = false
}

"""
Event sent when new permission group is created.

Added in Saleor 3.6.
"""
type PermissionGroupCreated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The permission group the event relates to."""
  permissionGroup: Group

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Delete permission group. Apps are not allowed to perform this mutation. 

Requires one of the following permissions: MANAGE_STAFF.

Triggers the following webhook events:
- PERMISSION_GROUP_DELETED (async)
"""
type PermissionGroupDelete {
  errors: [PermissionGroupError!]!
  group: Group
  permissionGroupErrors: [PermissionGroupError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when permission group is deleted.

Added in Saleor 3.6.
"""
type PermissionGroupDeleted implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The permission group the event relates to."""
  permissionGroup: Group

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

type PermissionGroupError {
  """List of channels IDs which causes the error."""
  channels: [ID!]

  """The error code."""
  code: PermissionGroupErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String

  """List of permissions which causes the error."""
  permissions: [PermissionEnum!]

  """List of user IDs which causes the error."""
  users: [ID!]
}

enum PermissionGroupErrorCode {
  ASSIGN_NON_STAFF_MEMBER
  CANNOT_REMOVE_FROM_LAST_GROUP
  DUPLICATED_INPUT_ITEM
  LEFT_NOT_MANAGEABLE_PERMISSION
  OUT_OF_SCOPE_CHANNEL
  OUT_OF_SCOPE_PERMISSION
  OUT_OF_SCOPE_USER
  REQUIRED
  UNIQUE
}

input PermissionGroupFilterInput {
  ids: [ID!]
  search: String
}

"""Sorting options for permission groups."""
enum PermissionGroupSortField {
  """Sort permission group accounts by name."""
  NAME
}

input PermissionGroupSortingInput {
  """Specifies the direction in which to sort permission group."""
  direction: OrderDirection!

  """Sort permission group by the selected field."""
  field: PermissionGroupSortField!
}

"""
Update permission group. Apps are not allowed to perform this mutation. 

Requires one of the following permissions: MANAGE_STAFF.

Triggers the following webhook events:
- PERMISSION_GROUP_UPDATED (async)
"""
type PermissionGroupUpdate {
  errors: [PermissionGroupError!]!
  group: Group
  permissionGroupErrors: [PermissionGroupError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input PermissionGroupUpdateInput {
  """
  List of channels to assign to this group.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  addChannels: [ID!]

  """List of permission code names to assign to this group."""
  addPermissions: [PermissionEnum!]

  """List of users to assign to this group."""
  addUsers: [ID!]

  """Group name."""
  name: String

  """
  List of channels to unassign from this group.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  removeChannels: [ID!]

  """List of permission code names to unassign from this group."""
  removePermissions: [PermissionEnum!]

  """List of users to unassign from this group."""
  removeUsers: [ID!]

  """
  Determine if the group has restricted access to channels.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  restrictedAccessToChannels: Boolean
}

"""
Event sent when permission group is updated.

Added in Saleor 3.6.
"""
type PermissionGroupUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The permission group the event relates to."""
  permissionGroup: Group

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""Plugin."""
type Plugin {
  """Channel-specific plugin configuration."""
  channelConfigurations: [PluginConfiguration!]!

  """Description of the plugin."""
  description: String!

  """Global configuration of the plugin (not channel-specific)."""
  globalConfiguration: PluginConfiguration

  """Identifier of the plugin."""
  id: ID!

  """Name of the plugin."""
  name: String!
}

"""Stores information about a configuration of plugin."""
type PluginConfiguration {
  """Determines if plugin is active or not."""
  active: Boolean!

  """The channel to which the plugin configuration is assigned to."""
  channel: Channel

  """Configuration of the plugin."""
  configuration: [ConfigurationItem!]
}

enum PluginConfigurationType {
  GLOBAL
  PER_CHANNEL
}

type PluginCountableConnection {
  edges: [PluginCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type PluginCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: Plugin!
}

type PluginError {
  """The error code."""
  code: PluginErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum PluginErrorCode {
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  PLUGIN_MISCONFIGURED
  REQUIRED
  UNIQUE
}

input PluginFilterInput {
  search: String
  statusInChannels: PluginStatusInChannelsInput
  type: PluginConfigurationType
}

enum PluginSortField {
  IS_ACTIVE
  NAME
}

input PluginSortingInput {
  """Specifies the direction in which to sort plugins."""
  direction: OrderDirection!

  """Sort plugins by the selected field."""
  field: PluginSortField!
}

input PluginStatusInChannelsInput {
  active: Boolean!
  channels: [ID!]!
}

"""
Update plugin configuration. 

Requires one of the following permissions: MANAGE_PLUGINS.
"""
type PluginUpdate {
  errors: [PluginError!]!
  plugin: Plugin
  pluginsErrors: [PluginError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input PluginUpdateInput {
  """Indicates whether the plugin should be enabled."""
  active: Boolean

  """Configuration of the plugin."""
  configuration: [ConfigurationItemInput!]
}

"""
Nonnegative Decimal scalar implementation.

Should be used in places where value must be nonnegative (0 or greater).
"""
scalar PositiveDecimal

enum PostalCodeRuleInclusionTypeEnum {
  EXCLUDE
  INCLUDE
}

"""Represents preorder settings for product variant."""
type PreorderData {
  """Preorder end date."""
  endDate: DateTime

  """
  Total number of sold product variant during preorder.
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  globalSoldUnits: Int!

  """
  The global preorder threshold for product variant.
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  globalThreshold: Int
}

input PreorderSettingsInput {
  """The end date for preorder."""
  endDate: DateTime

  """The global threshold for preorder variant."""
  globalThreshold: Int
}

"""Represents preorder variant data for channel."""
type PreorderThreshold {
  """Preorder threshold for product variant in this channel."""
  quantity: Int

  """Number of sold product variant in this channel."""
  soldUnits: Int!
}

input PriceInput {
  """Amount of money."""
  amount: PositiveDecimal!

  """Currency code."""
  currency: String!
}

input PriceRangeInput {
  """Price greater than or equal to."""
  gte: Float

  """Price less than or equal to."""
  lte: Float
}

"""Represents an individual item for sale in the storefront."""
type Product implements Node & ObjectWithMetadata {
  """
  Get a single attribute attached to product by attribute slug.
  
  Added in Saleor 3.9.
  """
  attribute(
    """Slug of the attribute"""
    slug: String!
  ): SelectedAttribute

  """List of attributes assigned to this product."""
  attributes: [SelectedAttribute!]!

  """Date when product is available for purchase."""
  availableForPurchase: Date @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `availableForPurchaseAt` field to fetch the available for purchase date.")

  """Date when product is available for purchase."""
  availableForPurchaseAt: DateTime
  category: Category

  """
  Channel given to retrieve this product. Also used by federation gateway to resolve this object in a federated query.
  """
  channel: String

  """
  List of availability in channels for the product.
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  channelListings: [ProductChannelListing!]
  chargeTaxes: Boolean! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` field to determine whether tax collection is enabled.")

  """
  List of collections for the product. Requires the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS.
  """
  collections: [Collection!]

  """The date and time when the product was created."""
  created: DateTime!

  """Default variant of the product."""
  defaultVariant: ProductVariant

  """
  Description of the product.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """
  Description of the product.
  
  Rich text format. For reference see https://editorjs.io/
  """
  descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.")

  """
  External ID of this product. 
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """The ID of the product."""
  id: ID!

  """Get a single product image by ID."""
  imageById(
    """ID of a product image."""
    id: ID
  ): ProductImage @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `mediaById` field instead.")

  """List of images for the product."""
  images: [ProductImage!] @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `media` field instead.")

  """
  Whether the product is in stock, set as available for purchase in the given channel, and published.
  """
  isAvailable(
    """
    Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration.
    """
    address: AddressInput
  ): Boolean

  """
  Refers to a state that can be set by admins to control whether a product is available for purchase in storefronts. This does not guarantee the availability of stock. When set to `False`, this product is still visible to customers, but it cannot be purchased.
  """
  isAvailableForPurchase: Boolean

  """List of media for the product."""
  media(
    """
    Sort media. 
    
    Added in Saleor 3.9.
    """
    sortBy: MediaSortingInput
  ): [ProductMedia!]

  """Get a single product media by ID."""
  mediaById(
    """ID of a product media."""
    id: ID
  ): ProductMedia

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """SEO description of the product."""
  name: String!

  """
  Lists the storefront product's pricing, the current price and discounts, only meant for displaying.
  """
  pricing(
    """
    Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration.
    """
    address: AddressInput
  ): ProductPricingInfo

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """Type of the product."""
  productType: ProductType!

  """Rating of the product."""
  rating: Float

  """SEO description of the product."""
  seoDescription: String

  """SEO title of the product."""
  seoTitle: String

  """Slug of the product."""
  slug: String!

  """
  Tax class assigned to this product type. All products of this product type use this tax class, unless it's overridden in the `Product` type.
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.
  """
  taxClass: TaxClass

  """A type of tax. Assigned by enabled tax gateway"""
  taxType: TaxType @deprecated(reason: "This field will be removed in Saleor 4.0. Use `taxClass` field instead.")

  """Thumbnail of the product."""
  thumbnail(
    """
    The format of the image. When not provided, format of the original image will be used.
    
    Added in Saleor 3.6.
    """
    format: ThumbnailFormatEnum = ORIGINAL

    """
    Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended).
    """
    size: Int
  ): Image

  """Returns translated product fields for the given language code."""
  translation(
    """A language code to return the translation for product."""
    languageCode: LanguageCodeEnum!
  ): ProductTranslation

  """The date and time when the product was last updated."""
  updatedAt: DateTime!

  """
  Get a single variant by SKU or ID. 
  
  Added in Saleor 3.9.
  """
  variant(
    """ID of the variant."""
    id: ID

    """SKU of the variant."""
    sku: String
  ): ProductVariant @deprecated(reason: "This field will be removed in Saleor 4.0. Use top-level `variant` query.")

  """
  List of variants for the product. Requires the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS.
  """
  variants: [ProductVariant!]

  """Weight of the product."""
  weight: Weight
}

"""
Assign attributes to a given product type. 

Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
"""
type ProductAttributeAssign {
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """The updated product type."""
  productType: ProductType
}

input ProductAttributeAssignInput {
  """The ID of the attribute to assign."""
  id: ID!

  """The attribute type to be assigned as."""
  type: ProductAttributeType!

  """
  Whether attribute is allowed in variant selection. Allowed types are: ['dropdown', 'boolean', 'swatch', 'numeric'].
  
  Added in Saleor 3.1.
  """
  variantSelection: Boolean
}

"""
Update attributes assigned to product variant for given product type.

Added in Saleor 3.1. 

Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
"""
type ProductAttributeAssignmentUpdate {
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """The updated product type."""
  productType: ProductType
}

input ProductAttributeAssignmentUpdateInput {
  """The ID of the attribute to assign."""
  id: ID!

  """
  Whether attribute is allowed in variant selection. Allowed types are: ['dropdown', 'boolean', 'swatch', 'numeric'].
  
  Added in Saleor 3.1.
  """
  variantSelection: Boolean!
}

enum ProductAttributeType {
  PRODUCT
  VARIANT
}

"""
Un-assign attributes from a given product type. 

Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
"""
type ProductAttributeUnassign {
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """The updated product type."""
  productType: ProductType
}

"""
Creates products.

Added in Saleor 3.13.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductBulkCreate {
  """Returns how many objects were created."""
  count: Int!
  errors: [ProductBulkCreateError!]!

  """List of the created products."""
  results: [ProductBulkResult!]!
}

type ProductBulkCreateError {
  """List of attributes IDs which causes the error."""
  attributes: [ID!]

  """List of channel IDs which causes the error."""
  channels: [ID!]

  """The error code."""
  code: ProductBulkCreateErrorCode!

  """The error message."""
  message: String

  """
  Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  path: String

  """List of attribute values IDs which causes the error."""
  values: [ID!]

  """List of warehouse IDs which causes the error."""
  warehouses: [ID!]
}

enum ProductBulkCreateErrorCode {
  ATTRIBUTE_ALREADY_ASSIGNED
  ATTRIBUTE_CANNOT_BE_ASSIGNED
  ATTRIBUTE_VARIANTS_DISABLED
  BLANK
  DUPLICATED_INPUT_ITEM
  GRAPHQL_ERROR
  INVALID
  INVALID_PRICE
  MAX_LENGTH
  NOT_FOUND
  PRODUCT_NOT_ASSIGNED_TO_CHANNEL
  PRODUCT_WITHOUT_CATEGORY
  REQUIRED
  UNIQUE
  UNSUPPORTED_MEDIA_PROVIDER
}

input ProductBulkCreateInput {
  """List of attributes."""
  attributes: [AttributeValueInput!]

  """ID of the product's category."""
  category: ID

  """List of channels in which the product is available."""
  channelListings: [ProductChannelListingCreateInput!]

  """
  Determine if taxes are being charged for the product. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` to configure whether tax collection is enabled.
  """
  chargeTaxes: Boolean

  """List of IDs of collections that the product belongs to."""
  collections: [ID!]

  """
  Product description.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """External ID of this product."""
  externalReference: String

  """List of media inputs associated with the product."""
  media: [MediaInput!]

  """Fields required to update the product metadata."""
  metadata: [MetadataInput!]

  """Product name."""
  name: String

  """Fields required to update the product private metadata."""
  privateMetadata: [MetadataInput!]

  """ID of the type that product belongs to."""
  productType: ID!

  """Defines the product rating value."""
  rating: Float

  """Search engine optimization fields."""
  seo: SeoInput

  """Product slug."""
  slug: String

  """
  ID of a tax class to assign to this product. If not provided, product will use the tax class which is assigned to the product type.
  """
  taxClass: ID

  """
  Tax rate for enabled tax gateway. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use tax classes to control the tax calculation for a product. If taxCode is provided, Saleor will try to find a tax class with given code (codes are stored in metadata) and assign it. If no tax class is found, it would be created and assigned.
  """
  taxCode: String

  """Input list of product variants to create."""
  variants: [ProductVariantBulkCreateInput!]

  """Weight of the Product."""
  weight: WeightScalar
}

"""
Deletes products. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductBulkDelete {
  """Returns how many objects were affected."""
  count: Int!
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

type ProductBulkResult {
  """List of errors occurred on create attempt."""
  errors: [ProductBulkCreateError!]

  """Product data."""
  product: Product
}

"""
Creates/updates translations for products.

Added in Saleor 3.15.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: MANAGE_TRANSLATIONS.

Triggers the following webhook events:
- TRANSLATION_CREATED (async): Called when a translation was created.
- TRANSLATION_UPDATED (async): Called when a translation was updated.
"""
type ProductBulkTranslate {
  """Returns how many translations were created/updated."""
  count: Int!
  errors: [ProductBulkTranslateError!]!

  """List of the translations."""
  results: [ProductBulkTranslateResult!]!
}

type ProductBulkTranslateError {
  """The error code."""
  code: ProductTranslateErrorCode!

  """The error message."""
  message: String

  """
  Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  path: String
}

input ProductBulkTranslateInput {
  """External reference of an product."""
  externalReference: String

  """Product ID."""
  id: ID

  """Translation language code."""
  languageCode: LanguageCodeEnum!

  """Translation fields."""
  translationFields: TranslationInput!
}

type ProductBulkTranslateResult {
  """List of errors occurred on translation attempt."""
  errors: [ProductBulkTranslateError!]

  """Product translation data."""
  translation: ProductTranslation
}

"""Represents product channel listing."""
type ProductChannelListing implements Node {
  availableForPurchase: Date @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `availableForPurchaseAt` field to fetch the available for purchase date.")

  """
  The product available for purchase date time.
  
  Added in Saleor 3.3.
  """
  availableForPurchaseAt: DateTime

  """The channel in which the product is listed."""
  channel: Channel!

  """The price of the cheapest variant (including discounts)."""
  discountedPrice: Money

  """The ID of the product channel listing."""
  id: ID!

  """
  Refers to a state that can be set by admins to control whether a product is available for purchase in storefronts in this channel. This does not guarantee the availability of stock. When set to `False`, this product is still visible to customers, but it cannot be purchased.
  """
  isAvailableForPurchase: Boolean

  """Indicates if the product is published in the channel."""
  isPublished: Boolean!

  """
  Range of margin percentage value.
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  margin: Margin

  """
  Lists the storefront product's pricing, the current price and discounts, only meant for displaying.
  """
  pricing(
    """
    Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration.
    """
    address: AddressInput
  ): ProductPricingInfo
  publicationDate: Date @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `publishedAt` field to fetch the publication date.")

  """
  The product publication date time.
  
  Added in Saleor 3.3.
  """
  publishedAt: DateTime

  """
  Purchase cost of product.
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  purchaseCost: MoneyRange

  """Indicates product visibility in the channel listings."""
  visibleInListings: Boolean!
}

input ProductChannelListingAddInput {
  """List of variants to which the channel should be assigned."""
  addVariants: [ID!]

  """
  A start date time from which a product will be available for purchase. When not set and `isAvailable` is set to True, the current day is assumed.
  
  Added in Saleor 3.3.
  """
  availableForPurchaseAt: DateTime

  """
  A start date from which a product will be available for purchase. When not set and isAvailable is set to True, the current day is assumed. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use `availableForPurchaseAt` field instead.
  """
  availableForPurchaseDate: Date

  """ID of a channel."""
  channelId: ID!

  """
  Determines if product should be available for purchase in this channel. This does not guarantee the availability of stock. When set to `False`, this product is still visible to customers, but it cannot be purchased.
  """
  isAvailableForPurchase: Boolean

  """Determines if object is visible to customers."""
  isPublished: Boolean

  """
  Publication date. ISO 8601 standard. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use `publishedAt` field instead.
  """
  publicationDate: Date

  """
  Publication date time. ISO 8601 standard.
  
  Added in Saleor 3.3.
  """
  publishedAt: DateTime

  """List of variants from which the channel should be unassigned."""
  removeVariants: [ID!]

  """
  Determines if product is visible in product listings (doesn't apply to product collections).
  """
  visibleInListings: Boolean
}

input ProductChannelListingCreateInput {
  """
  A start date time from which a product will be available for purchase. When not set and `isAvailable` is set to True, the current day is assumed.
  """
  availableForPurchaseAt: DateTime

  """ID of a channel."""
  channelId: ID!

  """
  Determines if product should be available for purchase in this channel. This does not guarantee the availability of stock. When set to `False`, this product is still visible to customers, but it cannot be purchased.
  """
  isAvailableForPurchase: Boolean

  """Determines if object is visible to customers."""
  isPublished: Boolean

  """Publication date time. ISO 8601 standard."""
  publishedAt: DateTime

  """
  Determines if product is visible in product listings (doesn't apply to product collections).
  """
  visibleInListings: Boolean
}

type ProductChannelListingError {
  """List of attributes IDs which causes the error."""
  attributes: [ID!]

  """List of channels IDs which causes the error."""
  channels: [ID!]

  """The error code."""
  code: ProductErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String

  """List of attribute values IDs which causes the error."""
  values: [ID!]

  """List of variants IDs which causes the error."""
  variants: [ID!]
}

"""
Manage product's availability in channels. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductChannelListingUpdate {
  errors: [ProductChannelListingError!]!

  """An updated product instance."""
  product: Product
  productChannelListingErrors: [ProductChannelListingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input ProductChannelListingUpdateInput {
  """List of channels from which the product should be unassigned."""
  removeChannels: [ID!]

  """List of channels to which the product should be assigned or updated."""
  updateChannels: [ProductChannelListingAddInput!]
}

type ProductCountableConnection {
  edges: [ProductCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type ProductCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: Product!
}

"""
Creates a new product. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductCreate {
  errors: [ProductError!]!
  product: Product
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input ProductCreateInput {
  """List of attributes."""
  attributes: [AttributeValueInput!]

  """ID of the product's category."""
  category: ID

  """
  Determine if taxes are being charged for the product. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` to configure whether tax collection is enabled.
  """
  chargeTaxes: Boolean

  """List of IDs of collections that the product belongs to."""
  collections: [ID!]

  """
  Product description.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """
  External ID of this product.
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """
  Fields required to update the product metadata.
  
  Added in Saleor 3.8.
  """
  metadata: [MetadataInput!]

  """Product name."""
  name: String

  """
  Fields required to update the product private metadata.
  
  Added in Saleor 3.8.
  """
  privateMetadata: [MetadataInput!]

  """ID of the type that product belongs to."""
  productType: ID!

  """Defines the product rating value."""
  rating: Float

  """Search engine optimization fields."""
  seo: SeoInput

  """Product slug."""
  slug: String

  """
  ID of a tax class to assign to this product. If not provided, product will use the tax class which is assigned to the product type.
  """
  taxClass: ID

  """
  Tax rate for enabled tax gateway. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use tax classes to control the tax calculation for a product. If taxCode is provided, Saleor will try to find a tax class with given code (codes are stored in metadata) and assign it. If no tax class is found, it would be created and assigned.
  """
  taxCode: String

  """Weight of the Product."""
  weight: WeightScalar
}

"""
Event sent when new product is created.

Added in Saleor 3.2.
"""
type ProductCreated implements Event {
  """The category of the product."""
  category: Category

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The product the event relates to."""
  product(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): Product

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Deletes a product. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductDelete {
  errors: [ProductError!]!
  product: Product
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when product is deleted.

Added in Saleor 3.2.
"""
type ProductDeleted implements Event {
  """The category of the product."""
  category: Category

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The product the event relates to."""
  product(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): Product

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

type ProductError {
  """List of attributes IDs which causes the error."""
  attributes: [ID!]

  """The error code."""
  code: ProductErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String

  """List of attribute values IDs which causes the error."""
  values: [ID!]
}

enum ProductErrorCode {
  ALREADY_EXISTS
  ATTRIBUTE_ALREADY_ASSIGNED
  ATTRIBUTE_CANNOT_BE_ASSIGNED
  ATTRIBUTE_VARIANTS_DISABLED
  CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT
  DUPLICATED_INPUT_ITEM
  GRAPHQL_ERROR
  INVALID
  INVALID_PRICE
  MEDIA_ALREADY_ASSIGNED
  NOT_FOUND
  NOT_PRODUCTS_IMAGE
  NOT_PRODUCTS_VARIANT
  PREORDER_VARIANT_CANNOT_BE_DEACTIVATED
  PRODUCT_NOT_ASSIGNED_TO_CHANNEL
  PRODUCT_WITHOUT_CATEGORY
  REQUIRED
  UNIQUE
  UNSUPPORTED_MEDIA_PROVIDER
  VARIANT_NO_DIGITAL_CONTENT
}

"""
Event sent when product export is completed.

Added in Saleor 3.16.
"""
type ProductExportCompleted implements Event {
  """The export file for products."""
  export: ExportFile

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

enum ProductFieldEnum {
  CATEGORY
  CHARGE_TAXES
  COLLECTIONS
  DESCRIPTION
  NAME
  PRODUCT_MEDIA
  PRODUCT_TYPE
  PRODUCT_WEIGHT
  VARIANT_ID
  VARIANT_MEDIA
  VARIANT_SKU
  VARIANT_WEIGHT
}

input ProductFilterInput {
  attributes: [AttributeInput!]

  """
  Filter by the date of availability for purchase. 
  
  Added in Saleor 3.8.
  """
  availableFrom: DateTime
  categories: [ID!]

  """
  Specifies the channel by which the data should be filtered. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead.
  """
  channel: String
  collections: [ID!]

  """Filter on whether product is a gift card or not."""
  giftCard: Boolean
  hasCategory: Boolean
  hasPreorderedVariants: Boolean
  ids: [ID!]

  """
  Filter by availability for purchase. 
  
  Added in Saleor 3.8.
  """
  isAvailable: Boolean
  isPublished: Boolean

  """
  Filter by visibility in product listings. 
  
  Added in Saleor 3.8.
  """
  isVisibleInListing: Boolean
  metadata: [MetadataFilter!]

  """Filter by the lowest variant price after discounts."""
  minimalPrice: PriceRangeInput
  price: PriceRangeInput
  productTypes: [ID!]

  """
  Filter by the publication date. 
  
  Added in Saleor 3.8.
  """
  publishedFrom: DateTime
  search: String
  slugs: [String!]

  """Filter by variants having specific stock status."""
  stockAvailability: StockAvailability
  stocks: ProductStockFilterInput

  """Filter by when was the most recent update."""
  updatedAt: DateTimeRangeInput
}

"""Represents a product image."""
type ProductImage {
  """The alt text of the image."""
  alt: String

  """The ID of the image."""
  id: ID!

  """
  The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged.
  """
  sortOrder: Int

  """The URL of the image."""
  url(
    """
    The format of the image. When not provided, format of the original image will be used.
    
    Added in Saleor 3.6.
    """
    format: ThumbnailFormatEnum = ORIGINAL

    """
    Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended).
    """
    size: Int
  ): String!
}

input ProductInput {
  """List of attributes."""
  attributes: [AttributeValueInput!]

  """ID of the product's category."""
  category: ID

  """
  Determine if taxes are being charged for the product. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` to configure whether tax collection is enabled.
  """
  chargeTaxes: Boolean

  """List of IDs of collections that the product belongs to."""
  collections: [ID!]

  """
  Product description.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """
  External ID of this product.
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """
  Fields required to update the product metadata.
  
  Added in Saleor 3.8.
  """
  metadata: [MetadataInput!]

  """Product name."""
  name: String

  """
  Fields required to update the product private metadata.
  
  Added in Saleor 3.8.
  """
  privateMetadata: [MetadataInput!]

  """Defines the product rating value."""
  rating: Float

  """Search engine optimization fields."""
  seo: SeoInput

  """Product slug."""
  slug: String

  """
  ID of a tax class to assign to this product. If not provided, product will use the tax class which is assigned to the product type.
  """
  taxClass: ID

  """
  Tax rate for enabled tax gateway. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use tax classes to control the tax calculation for a product. If taxCode is provided, Saleor will try to find a tax class with given code (codes are stored in metadata) and assign it. If no tax class is found, it would be created and assigned.
  """
  taxCode: String

  """Weight of the Product."""
  weight: WeightScalar
}

"""Represents a product media."""
type ProductMedia implements Node & ObjectWithMetadata {
  """The alt text of the media."""
  alt: String!

  """The unique ID of the product media."""
  id: ID!

  """
  List of public metadata items. Can be accessed without permissions.
  
  Added in Saleor 3.12.
  """
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.12.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.12.
  """
  metafields(keys: [String!]): Metadata

  """The oEmbed data of the media."""
  oembedData: JSONString!

  """
  List of private metadata items. Requires staff permissions to access.
  
  Added in Saleor 3.12.
  """
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.12.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.12.
  """
  privateMetafields(keys: [String!]): Metadata

  """
  Product id the media refers to.
  
  Added in Saleor 3.12.
  """
  productId: ID

  """The sort order of the media."""
  sortOrder: Int

  """The type of the media."""
  type: ProductMediaType!

  """The URL of the media."""
  url(
    """
    The format of the image. When not provided, format of the original image will be used.
    
    Added in Saleor 3.6.
    """
    format: ThumbnailFormatEnum = ORIGINAL

    """
    Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended).
    """
    size: Int
  ): String!
}

"""
Deletes product media. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductMediaBulkDelete {
  """Returns how many objects were affected."""
  count: Int!
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Create a media object (image or video URL) associated with product. For image, this mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductMediaCreate {
  errors: [ProductError!]!
  media: ProductMedia
  product: Product
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input ProductMediaCreateInput {
  """Alt text for a product media."""
  alt: String

  """Represents an image file in a multipart request."""
  image: Upload

  """Represents an URL to an external media."""
  mediaUrl: String

  """ID of an product."""
  product: ID!
}

"""
Event sent when new product media is created.

Added in Saleor 3.12.
"""
type ProductMediaCreated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The product media the event relates to."""
  productMedia: ProductMedia

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Deletes a product media. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductMediaDelete {
  errors: [ProductError!]!
  media: ProductMedia
  product: Product
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when product media is deleted.

Added in Saleor 3.12.
"""
type ProductMediaDeleted implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The product media the event relates to."""
  productMedia: ProductMedia

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Changes ordering of the product media. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductMediaReorder {
  errors: [ProductError!]!
  media: [ProductMedia!]
  product: Product
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

enum ProductMediaType {
  IMAGE
  VIDEO
}

"""
Updates a product media. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductMediaUpdate {
  errors: [ProductError!]!
  media: ProductMedia
  product: Product
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input ProductMediaUpdateInput {
  """Alt text for a product media."""
  alt: String
}

"""
Event sent when product media is updated.

Added in Saleor 3.12.
"""
type ProductMediaUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The product media the event relates to."""
  productMedia: ProductMedia

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Event sent when product metadata is updated.

Added in Saleor 3.8.
"""
type ProductMetadataUpdated implements Event {
  """The category of the product."""
  category: Category

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The product the event relates to."""
  product(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): Product

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

input ProductOrder {
  """
  Sort product by the selected attribute's values.
  Note: this doesn't take translations into account yet.
  """
  attributeId: ID

  """
  Specifies the channel in which to sort the data.
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead.
  """
  channel: String

  """Specifies the direction in which to sort products."""
  direction: OrderDirection!

  """Sort products by the selected field."""
  field: ProductOrderField
}

enum ProductOrderField {
  """
  Sort products by collection. Note: This option is available only for the `Collection.products` query.
  
  This option requires a channel filter to work as the values can vary between channels.
  """
  COLLECTION

  """
  Sort products by creation date.
  
  Added in Saleor 3.8.
  """
  CREATED_AT

  """Sort products by update date."""
  DATE

  """Sort products by update date."""
  LAST_MODIFIED

  """Sort products by update date."""
  LAST_MODIFIED_AT

  """
  Sort products by a minimal price of a product's variant.
  
  This option requires a channel filter to work as the values can vary between channels.
  """
  MINIMAL_PRICE

  """Sort products by name."""
  NAME

  """
  Sort products by price.
  
  This option requires a channel filter to work as the values can vary between channels.
  """
  PRICE

  """
  Sort products by publication date.
  
  This option requires a channel filter to work as the values can vary between channels.
  """
  PUBLICATION_DATE

  """
  Sort products by publication status.
  
  This option requires a channel filter to work as the values can vary between channels.
  """
  PUBLISHED

  """
  Sort products by publication date.
  
  This option requires a channel filter to work as the values can vary between channels.
  """
  PUBLISHED_AT

  """
  Sort products by rank. Note: This option is available only with the `search` filter.
  """
  RANK

  """Sort products by rating."""
  RATING

  """Sort products by type."""
  TYPE
}

"""Represents availability of a product in the storefront."""
type ProductPricingInfo {
  """The discount amount if in sale (null otherwise)."""
  discount: TaxedMoney

  """The discount amount in the local currency."""
  discountLocalCurrency: TaxedMoney @deprecated(reason: "This field will be removed in Saleor 4.0. Always returns `null`.")

  """
  Determines whether displayed prices should include taxes.
  
  Added in Saleor 3.9.
  """
  displayGrossPrices: Boolean!

  """Whether it is in sale or not."""
  onSale: Boolean

  """The discounted price range of the product variants."""
  priceRange: TaxedMoneyRange

  """
  The discounted price range of the product variants in the local currency.
  """
  priceRangeLocalCurrency: TaxedMoneyRange @deprecated(reason: "This field will be removed in Saleor 4.0. Always returns `null`.")

  """The undiscounted price range of the product variants."""
  priceRangeUndiscounted: TaxedMoneyRange
}

"""
Reorder product attribute values. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductReorderAttributeValues {
  errors: [ProductError!]!

  """Product from which attribute values are reordered."""
  product: Product
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input ProductStockFilterInput {
  quantity: IntRangeInput
  warehouseIds: [ID!]
}

"""
Represents product's original translatable fields and related translations.
"""
type ProductTranslatableContent implements Node {
  """List of product attribute values that can be translated."""
  attributeValues: [AttributeValueTranslatableContent!]!

  """
  Product's description to translate.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """
  Description of the product.
  
  Rich text format. For reference see https://editorjs.io/
  """
  descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.")

  """The ID of the product translatable content."""
  id: ID!

  """Product's name to translate."""
  name: String!

  """Represents an individual item for sale in the storefront."""
  product: Product @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.")

  """
  The ID of the product to translate.
  
  Added in Saleor 3.14.
  """
  productId: ID!

  """SEO description to translate."""
  seoDescription: String

  """SEO title to translate."""
  seoTitle: String

  """Returns translated product fields for the given language code."""
  translation(
    """A language code to return the translation for product."""
    languageCode: LanguageCodeEnum!
  ): ProductTranslation
}

"""
Creates/updates translations for a product. 

Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
type ProductTranslate {
  errors: [TranslationError!]!
  product: Product
  translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

enum ProductTranslateErrorCode {
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  REQUIRED
}

"""Represents product translations."""
type ProductTranslation implements Node {
  """
  Translated description of the product.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """
  Translated description of the product.
  
  Rich text format. For reference see https://editorjs.io/
  """
  descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.")

  """The ID of the product translation."""
  id: ID!

  """Translation language."""
  language: LanguageDisplay!

  """Translated product name."""
  name: String

  """Translated SEO description."""
  seoDescription: String

  """Translated SEO title."""
  seoTitle: String

  """
  Represents the product fields to translate.
  
  Added in Saleor 3.14.
  """
  translatableContent: ProductTranslatableContent
}

"""
Represents a type of product. It defines what attributes are available to products of this type.
"""
type ProductType implements Node & ObjectWithMetadata {
  """
  Variant attributes of that product type with attached variant selection.
  
  Added in Saleor 3.1.
  """
  assignedVariantAttributes(
    """Define scope of returned attributes."""
    variantSelection: VariantAttributeScope
  ): [AssignedVariantAttribute!]

  """
  List of attributes which can be assigned to this product type.
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  availableAttributes(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String
    filter: AttributeFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
    where: AttributeWhereInput
  ): AttributeCountableConnection

  """Whether the product type has variants."""
  hasVariants: Boolean!

  """The ID of the product type."""
  id: ID!

  """Whether the product type is digital."""
  isDigital: Boolean!

  """Whether shipping is required for this product type."""
  isShippingRequired: Boolean!

  """The product type kind."""
  kind: ProductTypeKindEnum!

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """Name of the product type."""
  name: String!

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """Product attributes of that product type."""
  productAttributes: [Attribute!]

  """List of products of this type."""
  products(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Slug of a channel for which the data should be returned."""
    channel: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): ProductCountableConnection @deprecated(reason: "This field will be removed in Saleor 4.0. Use the top-level `products` query with the `productTypes` filter.")

  """Slug of the product type."""
  slug: String!

  """
  Tax class assigned to this product type. All products of this product type use this tax class, unless it's overridden in the `Product` type.
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.
  """
  taxClass: TaxClass

  """A type of tax. Assigned by enabled tax gateway"""
  taxType: TaxType @deprecated(reason: "This field will be removed in Saleor 4.0. Use `taxClass` field instead.")

  """Variant attributes of that product type."""
  variantAttributes(
    """Define scope of returned attributes."""
    variantSelection: VariantAttributeScope
  ): [Attribute!] @deprecated(reason: "This field will be removed in Saleor 4.0. Use `assignedVariantAttributes` instead.")

  """Weight of the product type."""
  weight: Weight
}

"""
Deletes product types. 

Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
"""
type ProductTypeBulkDelete {
  """Returns how many objects were affected."""
  count: Int!
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

enum ProductTypeConfigurable {
  CONFIGURABLE
  SIMPLE
}

type ProductTypeCountableConnection {
  edges: [ProductTypeCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type ProductTypeCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: ProductType!
}

"""
Creates a new product type. 

Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
"""
type ProductTypeCreate {
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  productType: ProductType
}

"""
Deletes a product type. 

Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
"""
type ProductTypeDelete {
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  productType: ProductType
}

enum ProductTypeEnum {
  DIGITAL
  SHIPPABLE
}

input ProductTypeFilterInput {
  configurable: ProductTypeConfigurable
  ids: [ID!]
  kind: ProductTypeKindEnum
  metadata: [MetadataFilter!]
  productType: ProductTypeEnum
  search: String
  slugs: [String!]
}

input ProductTypeInput {
  """
  Determines if product of this type has multiple variants. This option mainly simplifies product management in the dashboard. There is always at least one variant created under the hood.
  """
  hasVariants: Boolean

  """Determines if products are digital."""
  isDigital: Boolean

  """Determines if shipping is required for products of this variant."""
  isShippingRequired: Boolean

  """The product type kind."""
  kind: ProductTypeKindEnum

  """Name of the product type."""
  name: String

  """List of attributes shared among all product variants."""
  productAttributes: [ID!]

  """Product type slug."""
  slug: String

  """
  ID of a tax class to assign to this product type. All products of this product type would use this tax class, unless it's overridden in the `Product` type.
  """
  taxClass: ID

  """
  Tax rate for enabled tax gateway. 
  
  DEPRECATED: this field will be removed in Saleor 4.0.. Use tax classes to control the tax calculation for a product type. If taxCode is provided, Saleor will try to find a tax class with given code (codes are stored in metadata) and assign it. If no tax class is found, it would be created and assigned.
  """
  taxCode: String

  """
  List of attributes used to distinguish between different variants of a product.
  """
  variantAttributes: [ID!]

  """Weight of the ProductType items."""
  weight: WeightScalar
}

enum ProductTypeKindEnum {
  GIFT_CARD
  NORMAL
}

"""
Reorder the attributes of a product type. 

Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
"""
type ProductTypeReorderAttributes {
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """Product type from which attributes are reordered."""
  productType: ProductType
}

enum ProductTypeSortField {
  """Sort products by type."""
  DIGITAL

  """Sort products by name."""
  NAME

  """Sort products by shipping."""
  SHIPPING_REQUIRED
}

input ProductTypeSortingInput {
  """Specifies the direction in which to sort product types."""
  direction: OrderDirection!

  """Sort product types by the selected field."""
  field: ProductTypeSortField!
}

"""
Updates an existing product type. 

Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
"""
type ProductTypeUpdate {
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  productType: ProductType
}

"""
Updates an existing product. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductUpdate {
  errors: [ProductError!]!
  product: Product
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when product is updated.

Added in Saleor 3.2.
"""
type ProductUpdated implements Event {
  """The category of the product."""
  category: Category

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The product the event relates to."""
  product(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): Product

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""Represents a version of a product such as different size or color."""
type ProductVariant implements Node & ObjectWithMetadata {
  """List of attributes assigned to this variant."""
  attributes(
    """Define scope of returned attributes."""
    variantSelection: VariantAttributeScope
  ): [SelectedAttribute!]!

  """
  Channel given to retrieve this product variant. Also used by federation gateway to resolve this object in a federated query.
  """
  channel: String

  """
  List of price information in channels for the product.
  
  Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER.
  """
  channelListings: [ProductVariantChannelListing!]

  """The date and time when the product variant was created."""
  created: DateTime!

  """
  Digital content for the product variant.
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  digitalContent: DigitalContent

  """
  External ID of this product. 
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """The ID of the product variant."""
  id: ID!

  """List of images for the product variant."""
  images: [ProductImage!] @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `media` field instead.")

  """Gross margin percentage value."""
  margin: Int

  """List of media for the product variant."""
  media: [ProductMedia!]

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """The name of the product variant."""
  name: String!

  """
  Preorder data for product variant.
  
  Added in Saleor 3.1.
  """
  preorder: PreorderData

  """
  Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.
  """
  pricing(
    """
    Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration.
    """
    address: AddressInput
  ): VariantPricingInfo

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """The product to which the variant belongs."""
  product: Product!

  """
  Quantity of a product available for sale in one checkout. Field value will be `null` when no `limitQuantityPerCheckout` in global settings has been set, and `productVariant` stocks are not tracked.
  """
  quantityAvailable(
    """
    Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration.
    """
    address: AddressInput

    """
    Two-letter ISO 3166-1 country code. When provided, the exact quantity from a warehouse operating in shipping zones that contain this country will be returned. Otherwise, it will return the maximum quantity from all shipping zones. 
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `address` argument instead.
    """
    countryCode: CountryCode
  ): Int

  """The maximum quantity of this variant that a customer can purchase."""
  quantityLimitPerCustomer: Int

  """
  Total quantity ordered.
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  quantityOrdered: Int

  """
  Total revenue generated by a variant in given period of time. Note: this field should be queried using `reportProductSales` query as it uses optimizations suitable for such calculations.
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  revenue(period: ReportingPeriod): TaxedMoney

  """The SKU (stock keeping unit) of the product variant."""
  sku: String

  """
  Stocks for the product variant.
  
  Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS.
  """
  stocks(
    """
    Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration.
    """
    address: AddressInput

    """
    Two-letter ISO 3166-1 country code. 
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `address` argument instead.
    """
    countryCode: CountryCode
  ): [Stock!]

  """
  Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. If the field is not provided, `Shop.trackInventoryByDefault` will be used.
  """
  trackInventory: Boolean!

  """Returns translated product variant fields for the given language code."""
  translation(
    """A language code to return the translation for product variant."""
    languageCode: LanguageCodeEnum!
  ): ProductVariantTranslation

  """The date and time when the product variant was last updated."""
  updatedAt: DateTime!

  """The weight of the product variant."""
  weight: Weight
}

"""
Event sent when product variant is back in stock.

Added in Saleor 3.2.
"""
type ProductVariantBackInStock implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The product variant the event relates to."""
  productVariant(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): ProductVariant

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String

  """Look up a warehouse."""
  warehouse: Warehouse
}

"""
Creates product variants for a given product. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductVariantBulkCreate {
  bulkProductErrors: [BulkProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """Returns how many objects were created."""
  count: Int!
  errors: [BulkProductError!]!

  """List of the created variants.This field will be removed in Saleor 4.0."""
  productVariants: [ProductVariant!]!

  """
  List of the created variants.
  
  Added in Saleor 3.11.
  """
  results: [ProductVariantBulkResult!]!
}

input ProductVariantBulkCreateInput {
  """List of attributes specific to this variant."""
  attributes: [BulkAttributeValueInput!]!

  """List of prices assigned to channels."""
  channelListings: [ProductVariantChannelListingAddInput!]

  """
  External ID of this product variant.
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """
  Fields required to update the product variant metadata.
  
  Added in Saleor 3.8.
  """
  metadata: [MetadataInput!]

  """Variant name."""
  name: String

  """
  Determines if variant is in preorder.
  
  Added in Saleor 3.1.
  """
  preorder: PreorderSettingsInput

  """
  Fields required to update the product variant private metadata.
  
  Added in Saleor 3.8.
  """
  privateMetadata: [MetadataInput!]

  """
  Determines maximum quantity of `ProductVariant`,that can be bought in a single checkout.
  
  Added in Saleor 3.1.
  """
  quantityLimitPerCustomer: Int

  """Stock keeping unit."""
  sku: String

  """Stocks of a product available for sale."""
  stocks: [StockInput!]

  """
  Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. If the field is not provided, `Shop.trackInventoryByDefault` will be used.
  """
  trackInventory: Boolean

  """Weight of the Product Variant."""
  weight: WeightScalar
}

"""
Deletes product variants. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductVariantBulkDelete {
  """Returns how many objects were affected."""
  count: Int!
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

type ProductVariantBulkError {
  """List of attributes IDs which causes the error."""
  attributes: [ID!]

  """List of channel listings IDs which causes the error."""
  channelListings: [ID!]

  """
  List of channel IDs which causes the error.
  
  Added in Saleor 3.12.
  """
  channels: [ID!]

  """The error code."""
  code: ProductVariantBulkErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String

  """
  Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  
  Added in Saleor 3.14.
  """
  path: String

  """
  List of stocks IDs which causes the error.
  
  Added in Saleor 3.12.
  """
  stocks: [ID!]

  """List of attribute values IDs which causes the error."""
  values: [ID!]

  """List of warehouse IDs which causes the error."""
  warehouses: [ID!]
}

enum ProductVariantBulkErrorCode {
  ATTRIBUTE_ALREADY_ASSIGNED
  ATTRIBUTE_CANNOT_BE_ASSIGNED
  ATTRIBUTE_VARIANTS_DISABLED
  DUPLICATED_INPUT_ITEM
  GRAPHQL_ERROR
  INVALID
  INVALID_PRICE
  NOT_FOUND
  NOT_PRODUCTS_VARIANT
  PRODUCT_NOT_ASSIGNED_TO_CHANNEL
  REQUIRED
  STOCK_ALREADY_EXISTS
  UNIQUE
}

type ProductVariantBulkResult {
  """List of errors occurred on create attempt."""
  errors: [ProductVariantBulkError!]

  """Product variant data."""
  productVariant: ProductVariant
}

"""
Creates/updates translations for products variants.

Added in Saleor 3.15.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: MANAGE_TRANSLATIONS.

Triggers the following webhook events:
- TRANSLATION_CREATED (async): A translation was created.
- TRANSLATION_UPDATED (async): A translation was updated.
"""
type ProductVariantBulkTranslate {
  """Returns how many translations were created/updated."""
  count: Int!
  errors: [ProductVariantBulkTranslateError!]!

  """List of the translations."""
  results: [ProductVariantBulkTranslateResult!]!
}

type ProductVariantBulkTranslateError {
  """The error code."""
  code: ProductVariantTranslateErrorCode!

  """The error message."""
  message: String

  """
  Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  path: String
}

input ProductVariantBulkTranslateInput {
  """External reference of a product variant."""
  externalReference: String

  """Product variant ID."""
  id: ID

  """Translation language code."""
  languageCode: LanguageCodeEnum!

  """Translation fields."""
  translationFields: NameTranslationInput!
}

type ProductVariantBulkTranslateResult {
  """List of errors occurred on translation attempt."""
  errors: [ProductVariantBulkTranslateError!]

  """Product variant translation data."""
  translation: ProductVariantTranslation
}

"""
Update multiple product variants.

Added in Saleor 3.11.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductVariantBulkUpdate {
  """Returns how many objects were updated."""
  count: Int!
  errors: [ProductVariantBulkError!]!

  """List of the updated variants."""
  results: [ProductVariantBulkResult!]!
}

"""
Input fields to update product variants.

Added in Saleor 3.11.
"""
input ProductVariantBulkUpdateInput {
  """List of attributes specific to this variant."""
  attributes: [BulkAttributeValueInput!]

  """
  Channel listings input.
  
  Added in Saleor 3.12.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  channelListings: ProductVariantChannelListingUpdateInput

  """
  External ID of this product variant.
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """ID of the product variant to update."""
  id: ID!

  """
  Fields required to update the product variant metadata.
  
  Added in Saleor 3.8.
  """
  metadata: [MetadataInput!]

  """Variant name."""
  name: String

  """
  Determines if variant is in preorder.
  
  Added in Saleor 3.1.
  """
  preorder: PreorderSettingsInput

  """
  Fields required to update the product variant private metadata.
  
  Added in Saleor 3.8.
  """
  privateMetadata: [MetadataInput!]

  """
  Determines maximum quantity of `ProductVariant`,that can be bought in a single checkout.
  
  Added in Saleor 3.1.
  """
  quantityLimitPerCustomer: Int

  """Stock keeping unit."""
  sku: String

  """
  Stocks input.
  
  Added in Saleor 3.12.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  stocks: ProductVariantStocksUpdateInput

  """
  Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. If the field is not provided, `Shop.trackInventoryByDefault` will be used.
  """
  trackInventory: Boolean

  """Weight of the Product Variant."""
  weight: WeightScalar
}

"""Represents product variant channel listing."""
type ProductVariantChannelListing implements Node {
  """The channel to which the variant listing belongs."""
  channel: Channel!

  """Cost price of the variant."""
  costPrice: Money

  """The ID of the variant channel listing."""
  id: ID!

  """
  Gross margin percentage value.
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  margin: Int

  """
  Preorder variant data.
  
  Added in Saleor 3.1.
  """
  preorderThreshold: PreorderThreshold

  """The price of the variant."""
  price: Money
}

input ProductVariantChannelListingAddInput {
  """ID of a channel."""
  channelId: ID!

  """Cost price of the variant in channel."""
  costPrice: PositiveDecimal

  """
  The threshold for preorder variant in channel.
  
  Added in Saleor 3.1.
  """
  preorderThreshold: Int

  """Price of the particular variant in channel."""
  price: PositiveDecimal!
}

"""
Manage product variant prices in channels. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductVariantChannelListingUpdate {
  errors: [ProductChannelListingError!]!
  productChannelListingErrors: [ProductChannelListingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """An updated product variant instance."""
  variant: ProductVariant
}

input ProductVariantChannelListingUpdateInput {
  """List of channels to create variant channel listings."""
  create: [ProductVariantChannelListingAddInput!]

  """List of channel listings to remove."""
  remove: [ID!]

  """List of channel listings to update."""
  update: [ChannelListingUpdateInput!]
}

type ProductVariantCountableConnection {
  edges: [ProductVariantCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type ProductVariantCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: ProductVariant!
}

"""
Creates a new variant for a product. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductVariantCreate {
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  productVariant: ProductVariant
}

input ProductVariantCreateInput {
  """List of attributes specific to this variant."""
  attributes: [AttributeValueInput!]!

  """
  External ID of this product variant.
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """
  Fields required to update the product variant metadata.
  
  Added in Saleor 3.8.
  """
  metadata: [MetadataInput!]

  """Variant name."""
  name: String

  """
  Determines if variant is in preorder.
  
  Added in Saleor 3.1.
  """
  preorder: PreorderSettingsInput

  """
  Fields required to update the product variant private metadata.
  
  Added in Saleor 3.8.
  """
  privateMetadata: [MetadataInput!]

  """Product ID of which type is the variant."""
  product: ID!

  """
  Determines maximum quantity of `ProductVariant`,that can be bought in a single checkout.
  
  Added in Saleor 3.1.
  """
  quantityLimitPerCustomer: Int

  """Stock keeping unit."""
  sku: String

  """Stocks of a product available for sale."""
  stocks: [StockInput!]

  """
  Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. If the field is not provided, `Shop.trackInventoryByDefault` will be used.
  """
  trackInventory: Boolean

  """Weight of the Product Variant."""
  weight: WeightScalar
}

"""
Event sent when new product variant is created.

Added in Saleor 3.2.
"""
type ProductVariantCreated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The product variant the event relates to."""
  productVariant(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): ProductVariant

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Deletes a product variant. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductVariantDelete {
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  productVariant: ProductVariant
}

"""
Event sent when product variant is deleted.

Added in Saleor 3.2.
"""
type ProductVariantDeleted implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The product variant the event relates to."""
  productVariant(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): ProductVariant

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

input ProductVariantFilterInput {
  isPreorder: Boolean
  metadata: [MetadataFilter!]
  search: String
  sku: [String!]
  updatedAt: DateTimeRangeInput
}

input ProductVariantInput {
  """List of attributes specific to this variant."""
  attributes: [AttributeValueInput!]

  """
  External ID of this product variant.
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """
  Fields required to update the product variant metadata.
  
  Added in Saleor 3.8.
  """
  metadata: [MetadataInput!]

  """Variant name."""
  name: String

  """
  Determines if variant is in preorder.
  
  Added in Saleor 3.1.
  """
  preorder: PreorderSettingsInput

  """
  Fields required to update the product variant private metadata.
  
  Added in Saleor 3.8.
  """
  privateMetadata: [MetadataInput!]

  """
  Determines maximum quantity of `ProductVariant`,that can be bought in a single checkout.
  
  Added in Saleor 3.1.
  """
  quantityLimitPerCustomer: Int

  """Stock keeping unit."""
  sku: String

  """
  Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. If the field is not provided, `Shop.trackInventoryByDefault` will be used.
  """
  trackInventory: Boolean

  """Weight of the Product Variant."""
  weight: WeightScalar
}

"""
Event sent when product variant metadata is updated.

Added in Saleor 3.8.
"""
type ProductVariantMetadataUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The product variant the event relates to."""
  productVariant(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): ProductVariant

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Event sent when product variant is out of stock.

Added in Saleor 3.2.
"""
type ProductVariantOutOfStock implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The product variant the event relates to."""
  productVariant(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): ProductVariant

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String

  """Look up a warehouse."""
  warehouse: Warehouse
}

"""
Deactivates product variant preorder. It changes all preorder allocation into regular allocation.

Added in Saleor 3.1. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductVariantPreorderDeactivate {
  errors: [ProductError!]!

  """Product variant with ended preorder."""
  productVariant: ProductVariant
}

"""
Reorder the variants of a product. Mutation updates updated_at on product and triggers PRODUCT_UPDATED webhook. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductVariantReorder {
  errors: [ProductError!]!
  product: Product
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Reorder product variant attribute values. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductVariantReorderAttributeValues {
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """Product variant from which attribute values are reordered."""
  productVariant: ProductVariant
}

"""
Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductVariantSetDefault {
  errors: [ProductError!]!
  product: Product
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

enum ProductVariantSortField {
  """Sort products variants by last modified at."""
  LAST_MODIFIED_AT
}

input ProductVariantSortingInput {
  """Specifies the direction in which to sort productVariants."""
  direction: OrderDirection!

  """Sort productVariants by the selected field."""
  field: ProductVariantSortField!
}

"""
Event sent when product variant stock is updated.

Added in Saleor 3.11.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type ProductVariantStockUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The product variant the event relates to."""
  productVariant(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): ProductVariant

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String

  """Look up a warehouse."""
  warehouse: Warehouse
}

"""
Creates stocks for product variant. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductVariantStocksCreate {
  bulkStockErrors: [BulkStockError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [BulkStockError!]!

  """Updated product variant."""
  productVariant: ProductVariant
}

"""
Delete stocks from product variant. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductVariantStocksDelete {
  errors: [StockError!]!

  """Updated product variant."""
  productVariant: ProductVariant
  stockErrors: [StockError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Update stocks for product variant. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductVariantStocksUpdate {
  bulkStockErrors: [BulkStockError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [BulkStockError!]!

  """Updated product variant."""
  productVariant: ProductVariant
}

input ProductVariantStocksUpdateInput {
  """List of warehouses to create stocks."""
  create: [StockInput!]

  """List of stocks to remove."""
  remove: [ID!]

  """List of stocks to update."""
  update: [StockUpdateInput!]
}

"""
Represents product variant's original translatable fields and related translations.
"""
type ProductVariantTranslatableContent implements Node {
  """List of product variant attribute values that can be translated."""
  attributeValues: [AttributeValueTranslatableContent!]!

  """The ID of the product variant translatable content."""
  id: ID!

  """Name of the product variant to translate."""
  name: String!

  """Represents a version of a product such as different size or color."""
  productVariant: ProductVariant @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.")

  """
  The ID of the product variant to translate.
  
  Added in Saleor 3.14.
  """
  productVariantId: ID!

  """Returns translated product variant fields for the given language code."""
  translation(
    """A language code to return the translation for product variant."""
    languageCode: LanguageCodeEnum!
  ): ProductVariantTranslation
}

"""
Creates/updates translations for a product variant. 

Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
type ProductVariantTranslate {
  errors: [TranslationError!]!
  productVariant: ProductVariant
  translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

enum ProductVariantTranslateErrorCode {
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  REQUIRED
}

"""Represents product variant translations."""
type ProductVariantTranslation implements Node {
  """The ID of the product variant translation."""
  id: ID!

  """Translation language."""
  language: LanguageDisplay!

  """Translated product variant name."""
  name: String!

  """
  Represents the product variant fields to translate.
  
  Added in Saleor 3.14.
  """
  translatableContent: ProductVariantTranslatableContent
}

"""
Updates an existing variant for product. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type ProductVariantUpdate {
  errors: [ProductError!]!
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  productVariant: ProductVariant
}

"""
Event sent when product variant is updated.

Added in Saleor 3.2.
"""
type ProductVariantUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The product variant the event relates to."""
  productVariant(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): ProductVariant

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

input ProductVariantWhereInput {
  """List of conditions that must be met."""
  AND: [ProductVariantWhereInput!]

  """A list of conditions of which at least one must be met."""
  OR: [ProductVariantWhereInput!]
  ids: [ID!]
  metadata: [MetadataFilter!]
}

input ProductWhereInput {
  """List of conditions that must be met."""
  AND: [ProductWhereInput!]

  """A list of conditions of which at least one must be met."""
  OR: [ProductWhereInput!]

  """Filter by attributes associated with the product."""
  attributes: [AttributeInput!]

  """Filter by the date of availability for purchase."""
  availableFrom: DateTime

  """Filter by product category."""
  category: GlobalIDFilterInput

  """Filter by collection."""
  collection: GlobalIDFilterInput

  """Filter on whether product is a gift card or not."""
  giftCard: Boolean

  """Filter by product with category assigned."""
  hasCategory: Boolean

  """Filter by product with preordered variants."""
  hasPreorderedVariants: Boolean
  ids: [ID!]

  """Filter by availability for purchase."""
  isAvailable: Boolean

  """Filter by public visibility."""
  isPublished: Boolean

  """Filter by visibility on the channel."""
  isVisibleInListing: Boolean
  metadata: [MetadataFilter!]

  """Filter by the lowest variant price after discounts."""
  minimalPrice: DecimalFilterInput

  """Filter by product name."""
  name: StringFilterInput

  """Filter by product variant price."""
  price: DecimalFilterInput

  """Filter by product type."""
  productType: GlobalIDFilterInput

  """Filter by the publication date."""
  publishedFrom: DateTime

  """Filter by product slug."""
  slug: StringFilterInput

  """Filter by variants having specific stock status."""
  stockAvailability: StockAvailability

  """Filter by stock of the product variant."""
  stocks: ProductStockFilterInput

  """Filter by when was the most recent update."""
  updatedAt: DateTimeFilterInput
}

"""
Represents the promotion that allow creating discounts based on given conditions, and is visible to all the customers.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type Promotion implements Node & ObjectWithMetadata {
  """Date time of promotion creation."""
  createdAt: DateTime!

  """Description of the promotion."""
  description: JSON

  """End date of the promotion."""
  endDate: DateTime

  """The list of events associated with the promotion."""
  events: [PromotionEvent!]
  id: ID!

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """Name of the promotion."""
  name: String!

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """The list of promotion rules."""
  rules: [PromotionRule!]

  """Start date of the promotion."""
  startDate: DateTime!

  """Returns translated promotion fields for the given language code."""
  translation(
    """A language code to return the translation for promotion."""
    languageCode: LanguageCodeEnum!
  ): PromotionTranslation

  """
  The type of the promotion. Implicate if the discount is applied on catalogue or order level.
  
  Added in Saleor 3.19.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  type: PromotionTypeEnum

  """Date time of last update of promotion."""
  updatedAt: DateTime!
}

"""
Deletes promotions.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- PROMOTION_DELETED (async): A promotion was deleted.
"""
type PromotionBulkDelete {
  """Returns how many objects were affected."""
  count: Int!
  errors: [DiscountError!]!
}

type PromotionCountableConnection {
  edges: [PromotionCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type PromotionCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: Promotion!
}

"""
Creates a new promotion.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- PROMOTION_CREATED (async): A promotion was created.
- PROMOTION_STARTED (async): Optionally called if promotion was started.
"""
type PromotionCreate {
  errors: [PromotionCreateError!]!
  promotion: Promotion
}

type PromotionCreateError {
  """The error code."""
  code: PromotionCreateErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """Limit of gifts assigned to promotion rule."""
  giftsLimit: Int

  """Number of gifts defined for this promotion rule exceeding the limit."""
  giftsLimitExceedBy: Int

  """Index of an input list item that caused the error."""
  index: Int

  """The error message."""
  message: String

  """Limit of rules with orderPredicate defined."""
  rulesLimit: Int

  """Number of rules with orderPredicate defined exceeding the limit."""
  rulesLimitExceedBy: Int
}

enum PromotionCreateErrorCode {
  GIFTS_NUMBER_LIMIT
  GRAPHQL_ERROR
  INVALID
  INVALID_GIFT_TYPE
  INVALID_PRECISION
  MISSING_CHANNELS
  MULTIPLE_CURRENCIES_NOT_ALLOWED
  NOT_FOUND
  REQUIRED
  RULES_NUMBER_LIMIT
}

input PromotionCreateInput {
  """Promotion description."""
  description: JSON

  """The end date of the promotion in ISO 8601 format."""
  endDate: DateTime

  """Promotion name."""
  name: String!

  """List of promotion rules."""
  rules: [PromotionRuleInput!]

  """The start date of the promotion in ISO 8601 format."""
  startDate: DateTime

  """
  Defines the promotion type. Implicate the required promotion rules predicate type and whether the promotion rules will give the catalogue or order discount. 
  
  Added in Saleor 3.19.
  """
  type: PromotionTypeEnum!
}

"""
Event sent when new promotion is created.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type PromotionCreated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The promotion the event relates to."""
  promotion: Promotion

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
History log of the promotion created event.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type PromotionCreatedEvent implements Node & PromotionEventInterface {
  """
  User or App that created the promotion event. 
  
  Requires one of the following permissions: MANAGE_STAFF, MANAGE_APPS, OWNER.
  """
  createdBy: UserOrApp

  """Date when event happened."""
  date: DateTime!
  id: ID!

  """Promotion event type."""
  type: PromotionEventsEnum!
}

"""
Deletes a promotion.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- PROMOTION_DELETED (async): A promotion was deleted.
"""
type PromotionDelete {
  errors: [PromotionDeleteError!]!
  promotion: Promotion
}

type PromotionDeleteError {
  """The error code."""
  code: PromotionDeleteErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum PromotionDeleteErrorCode {
  GRAPHQL_ERROR
  NOT_FOUND
}

"""
Event sent when promotion is deleted.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type PromotionDeleted implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The promotion the event relates to."""
  promotion: Promotion

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
The event informs about the end of the promotion.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type PromotionEnded implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The promotion the event relates to."""
  promotion: Promotion

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
History log of the promotion ended event.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type PromotionEndedEvent implements Node & PromotionEventInterface {
  """
  User or App that created the promotion event. 
  
  Requires one of the following permissions: MANAGE_STAFF, MANAGE_APPS, OWNER.
  """
  createdBy: UserOrApp

  """Date when event happened."""
  date: DateTime!
  id: ID!

  """Promotion event type."""
  type: PromotionEventsEnum!
}

union PromotionEvent = PromotionCreatedEvent | PromotionEndedEvent | PromotionRuleCreatedEvent | PromotionRuleDeletedEvent | PromotionRuleUpdatedEvent | PromotionStartedEvent | PromotionUpdatedEvent

interface PromotionEventInterface {
  """
  User or App that created the promotion event. 
  
  Requires one of the following permissions: MANAGE_STAFF, MANAGE_APPS, OWNER.
  """
  createdBy: UserOrApp

  """Date when event happened."""
  date: DateTime!
  id: ID!

  """Promotion event type."""
  type: PromotionEventsEnum!
}

enum PromotionEventsEnum {
  PROMOTION_CREATED
  PROMOTION_ENDED
  PROMOTION_STARTED
  PROMOTION_UPDATED
  RULE_CREATED
  RULE_DELETED
  RULE_UPDATED
}

"""
Represents the promotion rule that specifies the conditions that must be met to apply the promotion discount.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type PromotionRule implements Node {
  """The catalogue predicate that must be met to apply the rule reward."""
  cataloguePredicate: JSON

  """
  List of channels where the rule applies.
  
  Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER.
  """
  channels: [Channel!]

  """Description of the promotion rule."""
  description: JSON

  """
  Product variant IDs available as a gift to choose.
  
  Added in Saleor 3.19.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  giftIds: [ID!]

  """
  Defines the maximum number of gifts to choose from the gifts list.
  
  Added in Saleor 3.19.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  giftsLimit: Int
  id: ID!

  """Name of the promotion rule."""
  name: String

  """
  The checkout/order predicate that must be met to apply the rule reward.
  
  Added in Saleor 3.19.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  orderPredicate: JSON

  """
  The type of the predicate that must be met to apply the reward.
  
  Added in Saleor 3.19.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  predicateType: PromotionTypeEnum

  """Promotion to which the rule belongs."""
  promotion: Promotion

  """
  The reward type of the promotion rule.
  
  Added in Saleor 3.19.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  rewardType: RewardTypeEnum

  """
  The reward value of the promotion rule. Defines the discount value applied when the rule conditions are met.
  
  Added in Saleor 3.19.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  rewardValue: PositiveDecimal

  """The type of reward value of the promotion rule."""
  rewardValueType: RewardValueTypeEnum

  """Returns translated promotion rule fields for the given language code."""
  translation(
    """A language code to return the translation for promotion rule."""
    languageCode: LanguageCodeEnum!
  ): PromotionRuleTranslation
}

"""
Creates a new promotion rule.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- PROMOTION_RULE_CREATED (async): A promotion rule was created.
"""
type PromotionRuleCreate {
  errors: [PromotionRuleCreateError!]!
  promotionRule: PromotionRule
}

type PromotionRuleCreateError {
  """The error code."""
  code: PromotionRuleCreateErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """Limit of gifts assigned to promotion rule."""
  giftsLimit: Int

  """Number of gifts defined for this promotion rule exceeding the limit."""
  giftsLimitExceedBy: Int

  """The error message."""
  message: String

  """Limit of rules with orderPredicate defined."""
  rulesLimit: Int

  """Number of rules with orderPredicate defined exceeding the limit."""
  rulesLimitExceedBy: Int
}

enum PromotionRuleCreateErrorCode {
  GIFTS_NUMBER_LIMIT
  GRAPHQL_ERROR
  INVALID
  INVALID_GIFT_TYPE
  INVALID_PRECISION
  MISSING_CHANNELS
  MULTIPLE_CURRENCIES_NOT_ALLOWED
  NOT_FOUND
  REQUIRED
  RULES_NUMBER_LIMIT
}

input PromotionRuleCreateInput {
  """
  Defines the conditions on the catalogue level that must be met for the reward to be applied.
  """
  cataloguePredicate: CataloguePredicateInput

  """List of channel ids to which the rule should apply to."""
  channels: [ID!]

  """Promotion rule description."""
  description: JSON

  """
  Product variant IDs available as a gift to choose.
  
  Added in Saleor 3.19.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  gifts: [ID!]

  """Promotion rule name."""
  name: String

  """
  Defines the conditions on the checkout/draft order level that must be met for the reward to be applied.
  
  Added in Saleor 3.19.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  orderPredicate: OrderPredicateInput

  """The ID of the promotion that rule belongs to."""
  promotion: ID!

  """
  Defines the reward type of the promotion rule.
  
  Added in Saleor 3.19.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  rewardType: RewardTypeEnum

  """
  Defines the discount value. Required when catalogue predicate is provided.
  """
  rewardValue: PositiveDecimal

  """
  Defines the promotion rule reward value type. Must be provided together with reward value.
  """
  rewardValueType: RewardValueTypeEnum
}

"""
Event sent when new promotion rule is created.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type PromotionRuleCreated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The promotion rule the event relates to."""
  promotionRule: PromotionRule

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
History log of the promotion rule created event.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type PromotionRuleCreatedEvent implements Node & PromotionEventInterface & PromotionRuleEventInterface {
  """
  User or App that created the promotion event. 
  
  Requires one of the following permissions: MANAGE_STAFF, MANAGE_APPS, OWNER.
  """
  createdBy: UserOrApp

  """Date when event happened."""
  date: DateTime!
  id: ID!

  """The rule ID associated with the promotion event."""
  ruleId: String

  """Promotion event type."""
  type: PromotionEventsEnum!
}

"""
Deletes a promotion rule.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- PROMOTION_RULE_DELETED (async): A promotion rule was deleted.
"""
type PromotionRuleDelete {
  errors: [PromotionRuleDeleteError!]!
  promotionRule: PromotionRule
}

type PromotionRuleDeleteError {
  """The error code."""
  code: PromotionRuleDeleteErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum PromotionRuleDeleteErrorCode {
  GRAPHQL_ERROR
  NOT_FOUND
}

"""
Event sent when new promotion rule is deleted.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type PromotionRuleDeleted implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The promotion rule the event relates to."""
  promotionRule: PromotionRule

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
History log of the promotion rule created event.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type PromotionRuleDeletedEvent implements Node & PromotionEventInterface & PromotionRuleEventInterface {
  """
  User or App that created the promotion event. 
  
  Requires one of the following permissions: MANAGE_STAFF, MANAGE_APPS, OWNER.
  """
  createdBy: UserOrApp

  """Date when event happened."""
  date: DateTime!
  id: ID!

  """The rule ID associated with the promotion event."""
  ruleId: String

  """Promotion event type."""
  type: PromotionEventsEnum!
}

"""
History log of the promotion event related to rule.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
interface PromotionRuleEventInterface {
  """The rule ID associated with the promotion event."""
  ruleId: String
}

input PromotionRuleInput {
  """
  Defines the conditions on the catalogue level that must be met for the reward to be applied.
  """
  cataloguePredicate: CataloguePredicateInput

  """List of channel ids to which the rule should apply to."""
  channels: [ID!]

  """Promotion rule description."""
  description: JSON

  """
  Product variant IDs available as a gift to choose.
  
  Added in Saleor 3.19.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  gifts: [ID!]

  """Promotion rule name."""
  name: String

  """
  Defines the conditions on the checkout/draft order level that must be met for the reward to be applied.
  
  Added in Saleor 3.19.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  orderPredicate: OrderPredicateInput

  """
  Defines the reward type of the promotion rule.
  
  Added in Saleor 3.19.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  rewardType: RewardTypeEnum

  """
  Defines the discount value. Required when catalogue predicate is provided.
  """
  rewardValue: PositiveDecimal

  """
  Defines the promotion rule reward value type. Must be provided together with reward value.
  """
  rewardValueType: RewardValueTypeEnum
}

"""
Represents promotion rule's original translatable fields and related translations.

Added in Saleor 3.17.
"""
type PromotionRuleTranslatableContent implements Node {
  """
  Description of the promotion rule.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """ID of the promotion rule translatable content."""
  id: ID!

  """Name of the promotion rule."""
  name: String

  """
  ID of the promotion rule to translate.
  
  Added in Saleor 3.14.
  """
  promotionRuleId: ID!

  """Returns translated promotion rule fields for the given language code."""
  translation(
    """A language code to return the translation for promotion rule."""
    languageCode: LanguageCodeEnum!
  ): PromotionRuleTranslation
}

"""
Creates/updates translations for a promotion rule.

Added in Saleor 3.17. 

Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
type PromotionRuleTranslate {
  errors: [TranslationError!]!
  promotionRule: PromotionRule
}

"""
Represents promotion rule translations.

Added in Saleor 3.17.
"""
type PromotionRuleTranslation implements Node {
  """
  Translated description of the promotion rule.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """ID of the promotion rule translation."""
  id: ID!

  """Translation language."""
  language: LanguageDisplay!

  """Translated name of the promotion rule."""
  name: String

  """
  Represents the promotion rule fields to translate.
  
  Added in Saleor 3.14.
  """
  translatableContent: PromotionRuleTranslatableContent
}

input PromotionRuleTranslationInput {
  """
  Translated promotion description.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSON
  name: String
}

"""
Updates an existing promotion rule.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- PROMOTION_RULE_UPDATED (async): A promotion rule was updated.
"""
type PromotionRuleUpdate {
  errors: [PromotionRuleUpdateError!]!
  promotionRule: PromotionRule
}

type PromotionRuleUpdateError {
  """List of channel IDs which causes the error."""
  channels: [ID!]

  """The error code."""
  code: PromotionRuleUpdateErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """Limit of gifts assigned to promotion rule."""
  giftsLimit: Int

  """Number of gifts defined for this promotion rule exceeding the limit."""
  giftsLimitExceedBy: Int

  """The error message."""
  message: String
}

enum PromotionRuleUpdateErrorCode {
  DUPLICATED_INPUT_ITEM
  GIFTS_NUMBER_LIMIT
  GRAPHQL_ERROR
  INVALID
  INVALID_GIFT_TYPE
  INVALID_PRECISION
  MISSING_CHANNELS
  MULTIPLE_CURRENCIES_NOT_ALLOWED
  NOT_FOUND
  REQUIRED
}

input PromotionRuleUpdateInput {
  """List of channel ids to add."""
  addChannels: [ID!]

  """
  List of variant IDs available as a gift to add.
  
  Added in Saleor 3.19.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  addGifts: [ID!]

  """
  Defines the conditions on the catalogue level that must be met for the reward to be applied.
  """
  cataloguePredicate: CataloguePredicateInput

  """Promotion rule description."""
  description: JSON

  """Promotion rule name."""
  name: String

  """
  Defines the conditions on the checkout/draft order level that must be met for the reward to be applied.
  
  Added in Saleor 3.19.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  orderPredicate: OrderPredicateInput

  """List of channel ids to remove."""
  removeChannels: [ID!]

  """
  List of variant IDs available as a gift to remove.
  
  Added in Saleor 3.19.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  removeGifts: [ID!]

  """
  Defines the reward type of the promotion rule.
  
  Added in Saleor 3.19.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  rewardType: RewardTypeEnum

  """
  Defines the discount value. Required when catalogue predicate is provided.
  """
  rewardValue: PositiveDecimal

  """
  Defines the promotion rule reward value type. Must be provided together with reward value.
  """
  rewardValueType: RewardValueTypeEnum
}

"""
Event sent when new promotion rule is updated.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type PromotionRuleUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The promotion rule the event relates to."""
  promotionRule: PromotionRule

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
History log of the promotion rule created event.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type PromotionRuleUpdatedEvent implements Node & PromotionEventInterface & PromotionRuleEventInterface {
  """
  User or App that created the promotion event. 
  
  Requires one of the following permissions: MANAGE_STAFF, MANAGE_APPS, OWNER.
  """
  createdBy: UserOrApp

  """Date when event happened."""
  date: DateTime!
  id: ID!

  """The rule ID associated with the promotion event."""
  ruleId: String

  """Promotion event type."""
  type: PromotionEventsEnum!
}

enum PromotionSortField {
  """Sort promotions by created at."""
  CREATED_AT

  """Sort promotions by end date."""
  END_DATE

  """Sort promotions by name."""
  NAME

  """Sort promotions by start date."""
  START_DATE
}

input PromotionSortingInput {
  """Specifies the direction in which to sort promotions."""
  direction: OrderDirection!

  """Sort promotions by the selected field."""
  field: PromotionSortField!
}

"""
The event informs about the start of the promotion.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type PromotionStarted implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The promotion the event relates to."""
  promotion: Promotion

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
History log of the promotion started event.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type PromotionStartedEvent implements Node & PromotionEventInterface {
  """
  User or App that created the promotion event. 
  
  Requires one of the following permissions: MANAGE_STAFF, MANAGE_APPS, OWNER.
  """
  createdBy: UserOrApp

  """Date when event happened."""
  date: DateTime!
  id: ID!

  """Promotion event type."""
  type: PromotionEventsEnum!
}

"""
Represents promotion's original translatable fields and related translations.

Added in Saleor 3.17.
"""
type PromotionTranslatableContent implements Node {
  """
  Description of the promotion.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """ID of the promotion translatable content."""
  id: ID!

  """Name of the promotion."""
  name: String!

  """ID of the promotion to translate."""
  promotionId: ID!

  """Returns translated promotion fields for the given language code."""
  translation(
    """A language code to return the translation for promotion."""
    languageCode: LanguageCodeEnum!
  ): PromotionTranslation
}

"""
Creates/updates translations for a promotion.

Added in Saleor 3.17. 

Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
type PromotionTranslate {
  errors: [TranslationError!]!
  promotion: Promotion
}

"""
Represents promotion translations.

Added in Saleor 3.17.
"""
type PromotionTranslation implements Node {
  """
  Translated description of the promotion.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """ID of the promotion translation."""
  id: ID!

  """Translation language."""
  language: LanguageDisplay!

  """Translated name of the promotion."""
  name: String

  """
  Represents the promotion fields to translate.
  
  Added in Saleor 3.14.
  """
  translatableContent: PromotionTranslatableContent
}

input PromotionTranslationInput {
  """
  Translated promotion description.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSON
  name: String
}

enum PromotionTypeEnum {
  CATALOGUE
  ORDER
}

input PromotionTypeEnumFilterInput {
  """The value equal to."""
  eq: PromotionTypeEnum

  """The value included in."""
  oneOf: [PromotionTypeEnum!]
}

"""
Updates an existing promotion.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- PROMOTION_UPDATED (async): A promotion was updated.
- PROMOTION_STARTED (async): Optionally called if promotion was started.
- PROMOTION_ENDED (async): Optionally called if promotion was ended.
"""
type PromotionUpdate {
  errors: [PromotionUpdateError!]!
  promotion: Promotion
}

type PromotionUpdateError {
  """The error code."""
  code: PromotionUpdateErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum PromotionUpdateErrorCode {
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  REQUIRED
}

input PromotionUpdateInput {
  """Promotion description."""
  description: JSON

  """The end date of the promotion in ISO 8601 format."""
  endDate: DateTime

  """Promotion name."""
  name: String

  """The start date of the promotion in ISO 8601 format."""
  startDate: DateTime
}

"""
Event sent when promotion is updated.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type PromotionUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The promotion the event relates to."""
  promotion: Promotion

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
History log of the promotion updated event.

Added in Saleor 3.17.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type PromotionUpdatedEvent implements Node & PromotionEventInterface {
  """
  User or App that created the promotion event. 
  
  Requires one of the following permissions: MANAGE_STAFF, MANAGE_APPS, OWNER.
  """
  createdBy: UserOrApp

  """Date when event happened."""
  date: DateTime!
  id: ID!

  """Promotion event type."""
  type: PromotionEventsEnum!
}

input PromotionWhereInput {
  """List of conditions that must be met."""
  AND: [PromotionWhereInput!]

  """A list of conditions of which at least one must be met."""
  OR: [PromotionWhereInput!]

  """Filter promotions by end date."""
  endDate: DateTimeFilterInput
  ids: [ID!]
  isOldSale: Boolean
  metadata: [MetadataFilter!]

  """Filter by promotion name."""
  name: StringFilterInput

  """Filter promotions by start date."""
  startDate: DateTimeFilterInput
  type: PromotionTypeEnumFilterInput
}

input PublishableChannelListingInput {
  """ID of a channel."""
  channelId: ID!

  """Determines if object is visible to customers."""
  isPublished: Boolean

  """
  Publication date. ISO 8601 standard. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use `publishedAt` field instead.
  """
  publicationDate: Date

  """
  Publication date time. ISO 8601 standard.
  
  Added in Saleor 3.3.
  """
  publishedAt: DateTime
}

type Query {
  _entities(representations: [_Any]): [_Entity]
  _service: _Service

  """
  Look up an address by ID.
  
  Requires one of the following permissions: MANAGE_USERS, OWNER.
  """
  address(
    """ID of an address."""
    id: ID!
  ): Address

  """Returns address validation rules."""
  addressValidationRules(
    """City or a town name."""
    city: String

    """Sublocality like a district."""
    cityArea: String

    """Designation of a region, province or state."""
    countryArea: String

    """Two-letter ISO 3166-1 country code."""
    countryCode: CountryCode!
  ): AddressValidationData

  """
  Look up an app by ID. If ID is not provided, return the currently authenticated app.
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER AUTHENTICATED_APP. The authenticated app has access to its resources. Fetching different apps requires MANAGE_APPS permission.
  """
  app(
    """ID of the app."""
    id: ID
  ): App

  """
  Look up an app extension by ID.
  
  Added in Saleor 3.1.
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.
  """
  appExtension(
    """ID of the app extension."""
    id: ID!
  ): AppExtension

  """
  List of all extensions.
  
  Added in Saleor 3.1.
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.
  """
  appExtensions(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Filtering options for apps extensions."""
    filter: AppExtensionFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): AppExtensionCountableConnection

  """
  List of the apps.
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER, MANAGE_APPS.
  """
  apps(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Filtering options for apps."""
    filter: AppFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Sort apps."""
    sortBy: AppSortingInput
  ): AppCountableConnection

  """
  List of all apps installations
  
  Requires one of the following permissions: MANAGE_APPS.
  """
  appsInstallations: [AppInstallation!]!

  """Look up an attribute by ID, slug or external reference."""
  attribute(
    """
    External ID of the attribute. 
    
    Added in Saleor 3.10.
    """
    externalReference: String

    """ID of the attribute."""
    id: ID

    """Slug of the attribute."""
    slug: String
  ): Attribute

  """List of the shop's attributes."""
  attributes(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Slug of a channel for which the data should be returned."""
    channel: String

    """Filtering options for attributes."""
    filter: AttributeFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """
    Search attributes.
    
    Added in Saleor 3.11.
    
    Note: this API is currently in Feature Preview and can be subject to changes at later point.
    """
    search: String

    """Sorting options for attributes."""
    sortBy: AttributeSortingInput

    """
    Filtering options for attributes.
    
    Added in Saleor 3.11.
    """
    where: AttributeWhereInput
  ): AttributeCountableConnection

  """List of the shop's categories."""
  categories(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Filtering options for categories."""
    filter: CategoryFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Filter categories by the nesting level in the category tree."""
    level: Int

    """Sort categories."""
    sortBy: CategorySortingInput

    """
    Where filtering options.
    
    Added in Saleor 3.14.
    
    Note: this API is currently in Feature Preview and can be subject to changes at later point.
    """
    where: CategoryWhereInput
  ): CategoryCountableConnection

  """Look up a category by ID or slug."""
  category(
    """ID of the category."""
    id: ID

    """Slug of the category"""
    slug: String
  ): Category

  """Look up a channel by ID or slug."""
  channel(
    """ID of the channel."""
    id: ID

    """
    Slug of the channel.
    
    Added in Saleor 3.6.
    """
    slug: String
  ): Channel

  """
  List of all channels.
  
  Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER.
  """
  channels: [Channel!]

  """
  Look up a checkout by id.
  
  Requires one of the following permissions to query a checkout, if a checkout is in inactive channel: MANAGE_CHECKOUTS, IMPERSONATE_USER, HANDLE_PAYMENTS.
  """
  checkout(
    """
    The checkout's ID.
    
    Added in Saleor 3.4.
    """
    id: ID

    """
    The checkout's token.
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
    """
    token: UUID
  ): Checkout

  """
  List of checkout lines.
  
  Requires one of the following permissions: MANAGE_CHECKOUTS.
  """
  checkoutLines(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): CheckoutLineCountableConnection

  """
  List of checkouts.
  
  Requires one of the following permissions: MANAGE_CHECKOUTS, HANDLE_PAYMENTS.
  """
  checkouts(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Slug of a channel for which the data should be returned."""
    channel: String

    """
    Filtering options for checkouts.
    
    Added in Saleor 3.1.
    """
    filter: CheckoutFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """
    Sort checkouts.
    
    Added in Saleor 3.1.
    """
    sortBy: CheckoutSortingInput
  ): CheckoutCountableConnection

  """
  Look up a collection by ID. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS.
  """
  collection(
    """Slug of a channel for which the data should be returned."""
    channel: String

    """ID of the collection."""
    id: ID

    """Slug of the category"""
    slug: String
  ): Collection

  """
  List of the shop's collections. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS.
  """
  collections(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Slug of a channel for which the data should be returned."""
    channel: String

    """Filtering options for collections."""
    filter: CollectionFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Sort collections."""
    sortBy: CollectionSortingInput

    """
    Where filtering options.
    
    Added in Saleor 3.14.
    
    Note: this API is currently in Feature Preview and can be subject to changes at later point.
    """
    where: CollectionWhereInput
  ): CollectionCountableConnection

  """
  List of the shop's customers. This list includes all users who registered through the accountRegister mutation. Additionally, staff users who have placed an order using their account will also appear in this list.
  
  Requires one of the following permissions: MANAGE_ORDERS, MANAGE_USERS.
  """
  customers(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Filtering options for customers."""
    filter: CustomerFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Sort customers."""
    sortBy: UserSortingInput
  ): UserCountableConnection

  """
  Look up digital content by ID.
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  digitalContent(
    """ID of the digital content."""
    id: ID!
  ): DigitalContent

  """
  List of digital content.
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  digitalContents(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): DigitalContentCountableConnection

  """
  List of draft orders.
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  draftOrders(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Filtering options for draft orders."""
    filter: OrderDraftFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Sort draft orders."""
    sortBy: OrderSortingInput
  ): OrderCountableConnection

  """
  Look up a export file by ID.
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  exportFile(
    """ID of the export file job."""
    id: ID!
  ): ExportFile

  """
  List of export files.
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  exportFiles(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Filtering options for export files."""
    filter: ExportFileFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Sort export files."""
    sortBy: ExportFileSortingInput
  ): ExportFileCountableConnection

  """
  Look up a gift card by ID.
  
  Requires one of the following permissions: MANAGE_GIFT_CARD.
  """
  giftCard(
    """ID of the gift card."""
    id: ID!
  ): GiftCard

  """
  List of gift card currencies.
  
  Added in Saleor 3.1.
  
  Requires one of the following permissions: MANAGE_GIFT_CARD.
  """
  giftCardCurrencies: [String!]!

  """
  Gift card related settings from site settings.
  
  Requires one of the following permissions: MANAGE_GIFT_CARD.
  """
  giftCardSettings: GiftCardSettings!

  """
  List of gift card tags.
  
  Added in Saleor 3.1.
  
  Requires one of the following permissions: MANAGE_GIFT_CARD.
  """
  giftCardTags(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Filtering options for gift card tags."""
    filter: GiftCardTagFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): GiftCardTagCountableConnection

  """
  List of gift cards.
  
  Requires one of the following permissions: MANAGE_GIFT_CARD.
  """
  giftCards(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Filtering options for gift cards.
    
    Added in Saleor 3.1.
    """
    filter: GiftCardFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """
    Search gift cards by email and name of user, who created or used the gift card, and by code.
    
    Added in Saleor 3.15.
    
    Note: this API is currently in Feature Preview and can be subject to changes at later point.
    """
    search: String

    """
    Sort gift cards.
    
    Added in Saleor 3.1.
    """
    sortBy: GiftCardSortingInput
  ): GiftCardCountableConnection

  """
  List of activity events to display on homepage (at the moment it only contains order-events).
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  homepageEvents(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): OrderEventCountableConnection @deprecated(reason: "This field will be removed in Saleor 4.0.")

  """Return the currently authenticated user."""
  me: User

  """Look up a navigation menu by ID or name."""
  menu(
    """Slug of a channel for which the data should be returned."""
    channel: String

    """ID of the menu."""
    id: ID

    """The menu's name."""
    name: String

    """The menu's slug."""
    slug: String
  ): Menu

  """Look up a menu item by ID."""
  menuItem(
    """Slug of a channel for which the data should be returned."""
    channel: String

    """ID of the menu item."""
    id: ID!
  ): MenuItem

  """List of the storefronts's menu items."""
  menuItems(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Slug of a channel for which the data should be returned."""
    channel: String

    """Filtering options for menu items."""
    filter: MenuItemFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Sort menus items."""
    sortBy: MenuItemSortingInput
  ): MenuItemCountableConnection

  """List of the storefront's menus."""
  menus(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Slug of a channel for which the data should be returned."""
    channel: String

    """
    Filtering options for menus. 
    
    `slug`: This field will be removed in Saleor 4.0. Use `slugs` instead.
    """
    filter: MenuFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Sort menus."""
    sortBy: MenuSortingInput
  ): MenuCountableConnection

  """Look up an order by ID or external reference."""
  order(
    """
    External ID of an order. 
    
    Added in Saleor 3.10..
    
    Requires one of the following permissions: MANAGE_ORDERS.
    """
    externalReference: String

    """ID of an order."""
    id: ID
  ): Order

  """Look up an order by token."""
  orderByToken(
    """The order's token."""
    token: UUID!
  ): Order @deprecated(reason: "This field will be removed in Saleor 4.0.")

  """
  Order related settings from site settings. Returns `orderSettings` for the first `channel` in alphabetical order.
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orderSettings: OrderSettings @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `channel` query to fetch the `orderSettings` field instead.")

  """
  List of orders.
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  orders(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Slug of a channel for which the data should be returned."""
    channel: String

    """Filtering options for orders."""
    filter: OrderFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Sort orders."""
    sortBy: OrderSortingInput
  ): OrderCountableConnection

  """
  Return the total sales amount from a specific period.
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  ordersTotal(
    """Slug of a channel for which the data should be returned."""
    channel: String

    """A period of time."""
    period: ReportingPeriod
  ): TaxedMoney @deprecated(reason: "This field will be removed in Saleor 4.0.")

  """Look up a page by ID or slug."""
  page(
    """ID of the page."""
    id: ID

    """The slug of the page."""
    slug: String
  ): Page

  """Look up a page type by ID."""
  pageType(
    """ID of the page type."""
    id: ID!
  ): PageType

  """List of the page types."""
  pageTypes(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Filtering options for page types."""
    filter: PageTypeFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Sort page types."""
    sortBy: PageTypeSortingInput
  ): PageTypeCountableConnection

  """List of the shop's pages."""
  pages(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Filtering options for pages."""
    filter: PageFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Sort pages."""
    sortBy: PageSortingInput
  ): PageCountableConnection

  """
  Look up a payment by ID.
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  payment(
    """ID of the payment."""
    id: ID!
  ): Payment

  """
  List of payments.
  
  Requires one of the following permissions: MANAGE_ORDERS.
  """
  payments(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Filtering options for payments."""
    filter: PaymentFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): PaymentCountableConnection

  """
  Look up permission group by ID.
  
  Requires one of the following permissions: MANAGE_STAFF.
  """
  permissionGroup(
    """ID of the group."""
    id: ID!
  ): Group

  """
  List of permission groups.
  
  Requires one of the following permissions: MANAGE_STAFF.
  """
  permissionGroups(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Filtering options for permission groups."""
    filter: PermissionGroupFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Sort permission groups."""
    sortBy: PermissionGroupSortingInput
  ): GroupCountableConnection

  """
  Look up a plugin by ID.
  
  Requires one of the following permissions: MANAGE_PLUGINS.
  """
  plugin(
    """ID of the plugin."""
    id: ID!
  ): Plugin

  """
  List of plugins.
  
  Requires one of the following permissions: MANAGE_PLUGINS.
  """
  plugins(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Filtering options for plugins."""
    filter: PluginFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Sort plugins."""
    sortBy: PluginSortingInput
  ): PluginCountableConnection

  """
  Look up a product by ID. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS.
  """
  product(
    """Slug of a channel for which the data should be returned."""
    channel: String

    """
    External ID of the product. 
    
    Added in Saleor 3.10.
    """
    externalReference: String

    """ID of the product."""
    id: ID

    """Slug of the product."""
    slug: String
  ): Product

  """Look up a product type by ID."""
  productType(
    """ID of the product type."""
    id: ID!
  ): ProductType

  """List of the shop's product types."""
  productTypes(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Filtering options for product types."""
    filter: ProductTypeFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Sort product types."""
    sortBy: ProductTypeSortingInput
  ): ProductTypeCountableConnection

  """
  Look up a product variant by ID or SKU. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS.
  """
  productVariant(
    """Slug of a channel for which the data should be returned."""
    channel: String

    """
    External ID of the product. 
    
    Added in Saleor 3.10.
    """
    externalReference: String

    """ID of the product variant."""
    id: ID

    """SKU of the product variant."""
    sku: String
  ): ProductVariant

  """
  List of product variants. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS.
  """
  productVariants(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Slug of a channel for which the data should be returned."""
    channel: String

    """Filtering options for product variant."""
    filter: ProductVariantFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """Filter product variants by given IDs."""
    ids: [ID!]

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Sort products variants."""
    sortBy: ProductVariantSortingInput

    """
    Where filtering options.
    
    Added in Saleor 3.14.
    
    Note: this API is currently in Feature Preview and can be subject to changes at later point.
    """
    where: ProductVariantWhereInput
  ): ProductVariantCountableConnection

  """
  List of the shop's products. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS.
  """
  products(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Slug of a channel for which the data should be returned."""
    channel: String

    """Filtering options for products."""
    filter: ProductFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """
    Search products.
    
    Added in Saleor 3.14.
    """
    search: String

    """Sort products."""
    sortBy: ProductOrder

    """
    Where filtering options.
    
    Added in Saleor 3.14.
    
    Note: this API is currently in Feature Preview and can be subject to changes at later point.
    """
    where: ProductWhereInput
  ): ProductCountableConnection

  """
  Look up a promotion by ID.
  
  Added in Saleor 3.17.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  """
  promotion(
    """ID of the promotion."""
    id: ID!
  ): Promotion

  """
  List of the promotions.
  
  Added in Saleor 3.17.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  """
  promotions(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Sort promotions."""
    sortBy: PromotionSortingInput

    """Where filtering options."""
    where: PromotionWhereInput
  ): PromotionCountableConnection

  """
  List of top selling products.
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  reportProductSales(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Slug of a channel for which the data should be returned."""
    channel: String!

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Span of time."""
    period: ReportingPeriod!
  ): ProductVariantCountableConnection @deprecated(reason: "This field will be removed in Saleor 4.0.")

  """
  Look up a sale by ID.
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  """
  sale(
    """Slug of a channel for which the data should be returned."""
    channel: String

    """ID of the sale."""
    id: ID!
  ): Sale @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `promotion` query instead.")

  """
  List of the shop's sales.
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  """
  sales(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Slug of a channel for which the data should be returned."""
    channel: String

    """Filtering options for sales."""
    filter: SaleFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """
    Search sales by name, value or type. 
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `filter.search` input instead.
    """
    query: String

    """Sort sales."""
    sortBy: SaleSortingInput
  ): SaleCountableConnection @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `promotions` query instead.")

  """
  Look up a shipping zone by ID.
  
  Requires one of the following permissions: MANAGE_SHIPPING.
  """
  shippingZone(
    """Slug of a channel for which the data should be returned."""
    channel: String

    """ID of the shipping zone."""
    id: ID!
  ): ShippingZone

  """
  List of the shop's shipping zones.
  
  Requires one of the following permissions: MANAGE_SHIPPING.
  """
  shippingZones(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Slug of a channel for which the data should be returned."""
    channel: String

    """Filtering options for shipping zones."""
    filter: ShippingZoneFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): ShippingZoneCountableConnection

  """Return information about the shop."""
  shop: Shop!

  """
  List of the shop's staff users.
  
  Requires one of the following permissions: MANAGE_STAFF.
  """
  staffUsers(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Filtering options for staff users."""
    filter: StaffUserInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Sort staff users."""
    sortBy: UserSortingInput
  ): UserCountableConnection

  """
  Look up a stock by ID
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  stock(
    """ID of a stock"""
    id: ID!
  ): Stock

  """
  List of stocks.
  
  Requires one of the following permissions: MANAGE_PRODUCTS.
  """
  stocks(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String
    filter: StockFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): StockCountableConnection

  """
  Look up a tax class.
  
  Added in Saleor 3.9.
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.
  """
  taxClass(
    """ID of a tax class."""
    id: ID!
  ): TaxClass

  """
  List of tax classes.
  
  Added in Saleor 3.9.
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.
  """
  taxClasses(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Filtering options for tax classes."""
    filter: TaxClassFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Sort tax classes."""
    sortBy: TaxClassSortingInput
  ): TaxClassCountableConnection

  """
  Look up a tax configuration.
  
  Added in Saleor 3.9.
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.
  """
  taxConfiguration(
    """ID of a tax configuration."""
    id: ID!
  ): TaxConfiguration

  """
  List of tax configurations.
  
  Added in Saleor 3.9.
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.
  """
  taxConfigurations(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Filtering options for tax configurations."""
    filter: TaxConfigurationFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): TaxConfigurationCountableConnection

  """
  Tax class rates grouped by country.
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.
  """
  taxCountryConfiguration(
    """Country for which to return tax class rates."""
    countryCode: CountryCode!
  ): TaxCountryConfiguration

  """
  \n\nRequires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.
  """
  taxCountryConfigurations: [TaxCountryConfiguration!]

  """List of all tax rates available from tax gateway."""
  taxTypes: [TaxType!] @deprecated(reason: "This field will be removed in Saleor 4.0. Use `taxClasses` field instead.")

  """
  Look up a transaction by ID.
  
  Added in Saleor 3.6.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  
  Requires one of the following permissions: HANDLE_PAYMENTS.
  """
  transaction(
    """
    ID of a transaction. Either it or token is required to fetch the transaction data.
    """
    id: ID

    """
    Token of a transaction. Either it or ID is required to fetch the transaction data.
    """
    token: UUID
  ): TransactionItem

  """
  Lookup a translatable item by ID.
  
  Requires one of the following permissions: MANAGE_TRANSLATIONS.
  """
  translation(
    """ID of the object to retrieve."""
    id: ID!

    """Kind of the object to retrieve."""
    kind: TranslatableKinds!
  ): TranslatableItem

  """
  Returns a list of all translatable items of a given kind.
  
  Requires one of the following permissions: MANAGE_TRANSLATIONS.
  """
  translations(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """Kind of objects to retrieve."""
    kind: TranslatableKinds!

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): TranslatableItemConnection

  """
  Look up a user by ID or email address.
  
  Requires one of the following permissions: MANAGE_STAFF, MANAGE_USERS, MANAGE_ORDERS.
  """
  user(
    """Email address of the user."""
    email: String

    """
    External ID of the user. 
    
    Added in Saleor 3.10.
    """
    externalReference: String

    """ID of the user."""
    id: ID
  ): User

  """
  Look up a voucher by ID.
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  """
  voucher(
    """Slug of a channel for which the data should be returned."""
    channel: String

    """ID of the voucher."""
    id: ID!
  ): Voucher

  """
  List of the shop's vouchers.
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  """
  vouchers(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Slug of a channel for which the data should be returned."""
    channel: String

    """Filtering options for vouchers."""
    filter: VoucherFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """
    Search vouchers by name or code. 
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `filter.search` input instead.
    """
    query: String

    """Sort voucher."""
    sortBy: VoucherSortingInput
  ): VoucherCountableConnection

  """
  Look up a warehouse by ID.
  
  Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS, MANAGE_SHIPPING.
  """
  warehouse(
    """
    External ID of a warehouse. 
    
    Added in Saleor 3.10.
    """
    externalReference: String

    """ID of a warehouse."""
    id: ID
  ): Warehouse

  """
  List of warehouses.
  
  Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS, MANAGE_SHIPPING.
  """
  warehouses(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String
    filter: WarehouseFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
    sortBy: WarehouseSortingInput
  ): WarehouseCountableConnection

  """
  Look up a webhook by ID. Requires one of the following permissions: MANAGE_APPS, OWNER.
  """
  webhook(
    """ID of the webhook."""
    id: ID!
  ): Webhook

  """
  List of all available webhook events.
  
  Requires one of the following permissions: MANAGE_APPS.
  """
  webhookEvents: [WebhookEvent!] @deprecated(reason: "This field will be removed in Saleor 4.0. Use `WebhookEventTypeAsyncEnum` and `WebhookEventTypeSyncEnum` to get available event types.")

  """
  Retrieve a sample payload for a given webhook event based on real data. It can be useful for some integrations where sample payload is required.
  """
  webhookSamplePayload(
    """Name of the requested event type."""
    eventType: WebhookSampleEventTypeEnum!
  ): JSONString
}

"""Represents a reduced VAT rate for a particular type of goods."""
type ReducedRate {
  """Reduced VAT rate in percent."""
  rate: Float!

  """A type of goods."""
  rateType: String!
}

"""
Refresh JWT token. Mutation tries to take refreshToken from the input. If it fails it will try to take `refreshToken` from the http-only cookie `refreshToken`. `csrfToken` is required when `refreshToken` is provided as a cookie.
"""
type RefreshToken {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AccountError!]!

  """JWT token, required to authenticate."""
  token: String

  """A user instance."""
  user: User
}

input ReorderInput {
  """The ID of the item to move."""
  id: ID!

  """
  The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged.
  """
  sortOrder: Int
}

enum ReportingPeriod {
  THIS_MONTH
  TODAY
}

"""
Request email change of the logged in user. 

Requires one of the following permissions: AUTHENTICATED_USER.

Triggers the following webhook events:
- NOTIFY_USER (async): A notification for account email change.
- ACCOUNT_CHANGE_EMAIL_REQUESTED (async): An account email change was requested.
"""
type RequestEmailChange {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AccountError!]!

  """A user instance."""
  user: User
}

"""
Sends an email with the account password modification link.

Triggers the following webhook events:
- NOTIFY_USER (async): A notification for password reset.
- ACCOUNT_SET_PASSWORD_REQUESTED (async): Setting a new password for the account is requested.
- STAFF_SET_PASSWORD_REQUESTED (async): Setting a new password for the staff account is requested.
"""
type RequestPasswordReset {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AccountError!]!
}

enum RewardTypeEnum {
  GIFT
  SUBTOTAL_DISCOUNT
}

enum RewardValueTypeEnum {
  FIXED
  PERCENTAGE
}

"""
Sales allow creating discounts for categories, collections or products and are visible to all the customers.

DEPRECATED: this type will be removed in Saleor 4.0. Use `Promotion` type instead.
"""
type Sale implements Node & ObjectWithMetadata {
  """List of categories this sale applies to."""
  categories(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): CategoryCountableConnection

  """
  List of channels available for the sale.
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  """
  channelListings: [SaleChannelListing!]

  """
  List of collections this sale applies to.
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  """
  collections(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): CollectionCountableConnection

  """The date and time when the sale was created."""
  created: DateTime!

  """Currency code for sale."""
  currency: String

  """Sale value."""
  discountValue: Float

  """The end date and time of the sale."""
  endDate: DateTime

  """The ID of the sale."""
  id: ID!

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """The name of the sale."""
  name: String!

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """
  List of products this sale applies to.
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  """
  products(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): ProductCountableConnection

  """The start date and time of the sale."""
  startDate: DateTime!

  """Returns translated sale fields for the given language code."""
  translation(
    """A language code to return the translation for sale."""
    languageCode: LanguageCodeEnum!
  ): SaleTranslation

  """Type of the sale, fixed or percentage."""
  type: SaleType!

  """The date and time when the sale was updated."""
  updatedAt: DateTime!

  """
  List of product variants this sale applies to.
  
  Added in Saleor 3.1.
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  """
  variants(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): ProductVariantCountableConnection
}

"""
Adds products, categories, collections to a sale.

DEPRECATED: this mutation will be removed in Saleor 4.0. Use `promotionRuleCreate` mutation instead. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- SALE_UPDATED (async): A sale was updated.
"""
type SaleAddCatalogues {
  discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [DiscountError!]!

  """Sale of which catalogue IDs will be modified."""
  sale: Sale
}

"""
Deletes sales. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- SALE_DELETED (async): A sale was deleted.
"""
type SaleBulkDelete {
  """Returns how many objects were affected."""
  count: Int!
  discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [DiscountError!]!
}

"""
Represents sale channel listing.

DEPRECATED: this type will be removed in Saleor 4.0. Use `PromotionRule` type instead.
"""
type SaleChannelListing implements Node {
  """The channel in which the sale is available."""
  channel: Channel!

  """The currency in which the discount value is specified."""
  currency: String!

  """The value of the discount applied to the sale in the channel."""
  discountValue: Float!

  """The ID of the channel listing."""
  id: ID!
}

input SaleChannelListingAddInput {
  """ID of a channel."""
  channelId: ID!

  """The value of the discount."""
  discountValue: PositiveDecimal!
}

input SaleChannelListingInput {
  """List of channels to which the sale should be assigned."""
  addChannels: [SaleChannelListingAddInput!]

  """List of channels from which the sale should be unassigned."""
  removeChannels: [ID!]
}

"""
Manage sale's availability in channels.

DEPRECATED: this mutation will be removed in Saleor 4.0. Use `promotionRuleCreate` or `promotionRuleUpdate` mutations instead. 

Requires one of the following permissions: MANAGE_DISCOUNTS.
"""
type SaleChannelListingUpdate {
  discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [DiscountError!]!

  """An updated sale instance."""
  sale: Sale
}

type SaleCountableConnection {
  edges: [SaleCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type SaleCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: Sale!
}

"""
Creates a new sale.

DEPRECATED: this mutation will be removed in Saleor 4.0. Use `promotionCreate` mutation instead. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- SALE_CREATED (async): A sale was created.
"""
type SaleCreate {
  discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [DiscountError!]!
  sale: Sale
}

"""
Event sent when new sale is created.

Added in Saleor 3.2.

DEPRECATED: this event will be removed in Saleor 4.0. Use `PromotionCreated` event instead.
"""
type SaleCreated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The sale the event relates to."""
  sale(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): Sale

  """Saleor version that triggered the event."""
  version: String
}

"""
Deletes a sale.

DEPRECATED: this mutation will be removed in Saleor 4.0. Use `promotionDelete` mutation instead. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- SALE_DELETED (async): A sale was deleted.
"""
type SaleDelete {
  discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [DiscountError!]!
  sale: Sale
}

"""
Event sent when sale is deleted.

Added in Saleor 3.2.

DEPRECATED: this event will be removed in Saleor 4.0. Use `PromotionDeleted` event instead.
"""
type SaleDeleted implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The sale the event relates to."""
  sale(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): Sale

  """Saleor version that triggered the event."""
  version: String
}

input SaleFilterInput {
  metadata: [MetadataFilter!]
  saleType: DiscountValueTypeEnum
  search: String
  started: DateTimeRangeInput
  status: [DiscountStatusEnum!]
  updatedAt: DateTimeRangeInput
}

input SaleInput {
  """Categories related to the discount."""
  categories: [ID!]

  """Collections related to the discount."""
  collections: [ID!]

  """End date of the voucher in ISO 8601 format."""
  endDate: DateTime

  """Voucher name."""
  name: String

  """Products related to the discount."""
  products: [ID!]

  """Start date of the voucher in ISO 8601 format."""
  startDate: DateTime

  """Fixed or percentage."""
  type: DiscountValueTypeEnum

  """Value of the voucher."""
  value: PositiveDecimal
  variants: [ID!]
}

"""
Removes products, categories, collections from a sale.

DEPRECATED: this mutation will be removed in Saleor 4.0. Use `promotionRuleUpdate` or `promotionRuleDelete` mutations instead. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- SALE_UPDATED (async): A sale was updated.
"""
type SaleRemoveCatalogues {
  discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [DiscountError!]!

  """Sale of which catalogue IDs will be modified."""
  sale: Sale
}

enum SaleSortField {
  """Sort sales by created at."""
  CREATED_AT

  """Sort sales by end date."""
  END_DATE

  """Sort sales by last modified at."""
  LAST_MODIFIED_AT

  """Sort sales by name."""
  NAME

  """Sort sales by start date."""
  START_DATE

  """Sort sales by type."""
  TYPE

  """
  Sort sales by value.
  
  This option requires a channel filter to work as the values can vary between channels.
  """
  VALUE
}

input SaleSortingInput {
  """
  Specifies the channel in which to sort the data.
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead.
  """
  channel: String

  """Specifies the direction in which to sort sales."""
  direction: OrderDirection!

  """Sort sales by the selected field."""
  field: SaleSortField!
}

"""
The event informs about the start or end of the sale.

Added in Saleor 3.5.

DEPRECATED: this event will be removed in Saleor 4.0. Use `PromotionStarted` and `PromotionEnded` events instead.
"""
type SaleToggle implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """
  The sale the event relates to.
  
  Added in Saleor 3.5.
  """
  sale(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): Sale

  """Saleor version that triggered the event."""
  version: String
}

"""
Represents sale's original translatable fields and related translations.

DEPRECATED: this type will be removed in Saleor 4.0. Use `PromotionTranslatableContent` instead.
"""
type SaleTranslatableContent implements Node {
  """The ID of the sale translatable content."""
  id: ID!

  """Name of the sale to translate."""
  name: String!

  """
  Sales allow creating discounts for categories, collections or products and are visible to all the customers.
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  """
  sale: Sale @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.")

  """
  The ID of the sale to translate.
  
  Added in Saleor 3.14.
  """
  saleId: ID!

  """Returns translated sale fields for the given language code."""
  translation(
    """A language code to return the translation for sale."""
    languageCode: LanguageCodeEnum!
  ): SaleTranslation
}

"""
Creates/updates translations for a sale.

DEPRECATED: this mutation will be removed in Saleor 4.0. Use `PromotionTranslate` mutation instead. 

Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
type SaleTranslate {
  errors: [TranslationError!]!
  sale: Sale
  translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Represents sale translations.

DEPRECATED: this type will be removed in Saleor 4.0. Use `PromotionTranslation` instead.
"""
type SaleTranslation implements Node {
  """The ID of the sale translation."""
  id: ID!

  """Translation language."""
  language: LanguageDisplay!

  """Translated name of sale."""
  name: String

  """
  Represents the sale fields to translate.
  
  Added in Saleor 3.14.
  """
  translatableContent: SaleTranslatableContent
}

enum SaleType {
  FIXED
  PERCENTAGE
}

"""
Updates a sale.

DEPRECATED: this mutation will be removed in Saleor 4.0. Use `promotionUpdate` mutation instead. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- SALE_UPDATED (async): A sale was updated.
- SALE_TOGGLE (async): Optionally triggered when a sale is started or stopped.
"""
type SaleUpdate {
  discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [DiscountError!]!
  sale: Sale
}

"""
Event sent when sale is updated.

Added in Saleor 3.2.

DEPRECATED: this event will be removed in Saleor 4.0. Use `PromotionUpdated` event instead.
"""
type SaleUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The sale the event relates to."""
  sale(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): Sale

  """Saleor version that triggered the event."""
  version: String
}

"""Represents a custom attribute."""
type SelectedAttribute {
  """Name of an attribute displayed in the interface."""
  attribute: Attribute!

  """Values of an attribute."""
  values: [AttributeValue!]!
}

"""
Sends a notification confirmation.

Added in Saleor 3.15.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: AUTHENTICATED_USER.

Triggers the following webhook events:
- NOTIFY_USER (async): A notification for account confirmation.
- ACCOUNT_CONFIRMATION_REQUESTED (async): An account confirmation was requested. This event is always sent regardless of settings.
"""
type SendConfirmationEmail {
  errors: [SendConfirmationEmailError!]!
}

type SendConfirmationEmailError {
  """The error code."""
  code: SendConfirmationEmailErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum SendConfirmationEmailErrorCode {
  ACCOUNT_CONFIRMED
  CONFIRMATION_ALREADY_REQUESTED
  INVALID
  MISSING_CHANNEL_SLUG
}

input SeoInput {
  """SEO description."""
  description: String

  """SEO title."""
  title: String
}

"""
Sets the user's password from the token sent by email using the RequestPasswordReset mutation.
"""
type SetPassword {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """CSRF token required to re-generate access token."""
  csrfToken: String
  errors: [AccountError!]!

  """JWT refresh token, required to re-generate access token."""
  refreshToken: String

  """JWT token, required to authenticate."""
  token: String

  """A user instance."""
  user: User
}

type ShippingError {
  """List of channels IDs which causes the error."""
  channels: [ID!]

  """The error code."""
  code: ShippingErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String

  """List of warehouse IDs which causes the error."""
  warehouses: [ID!]
}

enum ShippingErrorCode {
  ALREADY_EXISTS
  DUPLICATED_INPUT_ITEM
  GRAPHQL_ERROR
  INVALID
  MAX_LESS_THAN_MIN
  NOT_FOUND
  REQUIRED
  UNIQUE
}

"""
List shipping methods for checkout.

Added in Saleor 3.6.
"""
type ShippingListMethodsForCheckout implements Event {
  """The checkout the event relates to."""
  checkout: Checkout

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """
  Shipping methods that can be used with this checkout.
  
  Added in Saleor 3.6.
  """
  shippingMethods: [ShippingMethod!]

  """Saleor version that triggered the event."""
  version: String
}

"""
Shipping methods that can be used as means of shipping for orders and checkouts.
"""
type ShippingMethod implements Node & ObjectWithMetadata {
  """Describes if this shipping method is active and can be selected."""
  active: Boolean!

  """
  Shipping method description.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """Unique ID of ShippingMethod available for Order."""
  id: ID!

  """Maximum delivery days for this shipping method."""
  maximumDeliveryDays: Int

  """Maximum order price for this shipping method."""
  maximumOrderPrice: Money

  """Maximum order weight for this shipping method."""
  maximumOrderWeight: Weight @deprecated(reason: "This field will be removed in Saleor 4.0.")

  """Message connected to this shipping method."""
  message: String

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  """
  metafields(keys: [String!]): Metadata

  """Minimum delivery days for this shipping method."""
  minimumDeliveryDays: Int

  """Minimal order price for this shipping method."""
  minimumOrderPrice: Money

  """Minimum order weight for this shipping method."""
  minimumOrderWeight: Weight @deprecated(reason: "This field will be removed in Saleor 4.0.")

  """Shipping method name."""
  name: String!

  """The price of selected shipping method."""
  price: Money!

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  """
  privateMetafields(keys: [String!]): Metadata

  """Returns translated shipping method fields for the given language code."""
  translation(
    """A language code to return the translation for shipping method."""
    languageCode: LanguageCodeEnum!
  ): ShippingMethodTranslation

  """Type of the shipping method."""
  type: ShippingMethodTypeEnum @deprecated(reason: "This field will be removed in Saleor 4.0.")
}

"""Represents shipping method channel listing."""
type ShippingMethodChannelListing implements Node {
  """The channel associated with the shipping method channel listing."""
  channel: Channel!

  """The ID of shipping method channel listing."""
  id: ID!

  """Maximum order price."""
  maximumOrderPrice: Money

  """Minimum order price."""
  minimumOrderPrice: Money

  """Price of the shipping method in the associated channel."""
  price: Money
}

input ShippingMethodChannelListingAddInput {
  """ID of a channel."""
  channelId: ID!

  """Maximum order price to use this shipping method."""
  maximumOrderPrice: PositiveDecimal

  """Minimum order price to use this shipping method."""
  minimumOrderPrice: PositiveDecimal

  """Shipping price of the shipping method in this channel."""
  price: PositiveDecimal
}

input ShippingMethodChannelListingInput {
  """List of channels to which the shipping method should be assigned."""
  addChannels: [ShippingMethodChannelListingAddInput!]

  """List of channels from which the shipping method should be unassigned."""
  removeChannels: [ID!]
}

"""
Manage shipping method's availability in channels. 

Requires one of the following permissions: MANAGE_SHIPPING.
"""
type ShippingMethodChannelListingUpdate {
  errors: [ShippingError!]!
  shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """An updated shipping method instance."""
  shippingMethod: ShippingMethodType
}

"""Represents shipping method postal code rule."""
type ShippingMethodPostalCodeRule implements Node {
  """End address range."""
  end: String

  """The ID of the object."""
  id: ID!

  """Inclusion type of the postal code rule."""
  inclusionType: PostalCodeRuleInclusionTypeEnum

  """Start address range."""
  start: String
}

"""
Represents shipping method's original translatable fields and related translations.
"""
type ShippingMethodTranslatableContent implements Node {
  """
  Shipping method description to translate.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """The ID of the shipping method translatable content."""
  id: ID!

  """Shipping method name to translate."""
  name: String!

  """
  Shipping method are the methods you'll use to get customer's orders  to them. They are directly exposed to the customers.
  
  Requires one of the following permissions: MANAGE_SHIPPING.
  """
  shippingMethod: ShippingMethodType @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.")

  """
  The ID of the shipping method to translate.
  
  Added in Saleor 3.14.
  """
  shippingMethodId: ID!

  """Returns translated shipping method fields for the given language code."""
  translation(
    """A language code to return the translation for shipping method."""
    languageCode: LanguageCodeEnum!
  ): ShippingMethodTranslation
}

"""Represents shipping method translations."""
type ShippingMethodTranslation implements Node {
  """
  Translated description of the shipping method.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """The ID of the shipping method translation."""
  id: ID!

  """Translation language."""
  language: LanguageDisplay!

  """Translated shipping method name."""
  name: String

  """
  Represents the shipping method fields to translate.
  
  Added in Saleor 3.14.
  """
  translatableContent: ShippingMethodTranslatableContent
}

"""
Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers.
"""
type ShippingMethodType implements Node & ObjectWithMetadata {
  """
  List of channels available for the method.
  
  Requires one of the following permissions: MANAGE_SHIPPING.
  """
  channelListings: [ShippingMethodChannelListing!]

  """
  Shipping method description.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString

  """
  List of excluded products for the shipping method.
  
  Requires one of the following permissions: MANAGE_SHIPPING.
  """
  excludedProducts(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): ProductCountableConnection

  """Shipping method ID."""
  id: ID!

  """Maximum number of days for delivery."""
  maximumDeliveryDays: Int

  """The price of the cheapest variant (including discounts)."""
  maximumOrderPrice: Money

  """Maximum order weight to use this shipping method."""
  maximumOrderWeight: Weight

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """Minimal number of days for delivery."""
  minimumDeliveryDays: Int

  """The price of the cheapest variant (including discounts)."""
  minimumOrderPrice: Money

  """Minimum order weight to use this shipping method."""
  minimumOrderWeight: Weight

  """Shipping method name."""
  name: String!

  """
  Postal code ranges rule of exclusion or inclusion of the shipping method.
  """
  postalCodeRules: [ShippingMethodPostalCodeRule!]

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """
  Tax class assigned to this shipping method.
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.
  """
  taxClass: TaxClass

  """Returns translated shipping method fields for the given language code."""
  translation(
    """A language code to return the translation for shipping method."""
    languageCode: LanguageCodeEnum!
  ): ShippingMethodTranslation

  """Type of the shipping method."""
  type: ShippingMethodTypeEnum
}

enum ShippingMethodTypeEnum {
  PRICE
  WEIGHT
}

"""
List of shipping methods available for the country.

Added in Saleor 3.6.
"""
type ShippingMethodsPerCountry {
  """The country code."""
  countryCode: CountryCode!

  """List of available shipping methods."""
  shippingMethods: [ShippingMethod!]
}

input ShippingPostalCodeRulesCreateInputRange {
  """End range of the postal code."""
  end: String

  """Start range of the postal code."""
  start: String!
}

"""
Deletes shipping prices. 

Requires one of the following permissions: MANAGE_SHIPPING.
"""
type ShippingPriceBulkDelete {
  """Returns how many objects were affected."""
  count: Int!
  errors: [ShippingError!]!
  shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Creates a new shipping price. 

Requires one of the following permissions: MANAGE_SHIPPING.
"""
type ShippingPriceCreate {
  errors: [ShippingError!]!
  shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  shippingMethod: ShippingMethodType

  """A shipping zone to which the shipping method belongs."""
  shippingZone: ShippingZone
}

"""
Event sent when new shipping price is created.

Added in Saleor 3.2.
"""
type ShippingPriceCreated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The shipping method the event relates to."""
  shippingMethod(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): ShippingMethodType

  """The shipping zone the shipping method belongs to."""
  shippingZone(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): ShippingZone

  """Saleor version that triggered the event."""
  version: String
}

"""
Deletes a shipping price. 

Requires one of the following permissions: MANAGE_SHIPPING.
"""
type ShippingPriceDelete {
  errors: [ShippingError!]!
  shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """A shipping method to delete."""
  shippingMethod: ShippingMethodType

  """A shipping zone to which the shipping method belongs."""
  shippingZone: ShippingZone
}

"""
Event sent when shipping price is deleted.

Added in Saleor 3.2.
"""
type ShippingPriceDeleted implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The shipping method the event relates to."""
  shippingMethod(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): ShippingMethodType

  """The shipping zone the shipping method belongs to."""
  shippingZone(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): ShippingZone

  """Saleor version that triggered the event."""
  version: String
}

"""
Exclude products from shipping price. 

Requires one of the following permissions: MANAGE_SHIPPING.
"""
type ShippingPriceExcludeProducts {
  errors: [ShippingError!]!
  shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """A shipping method with new list of excluded products."""
  shippingMethod: ShippingMethodType
}

input ShippingPriceExcludeProductsInput {
  """List of products which will be excluded."""
  products: [ID!]!
}

input ShippingPriceInput {
  """Postal code rules to add."""
  addPostalCodeRules: [ShippingPostalCodeRulesCreateInputRange!]

  """Postal code rules to delete."""
  deletePostalCodeRules: [ID!]

  """Shipping method description."""
  description: JSONString

  """Inclusion type for currently assigned postal code rules."""
  inclusionType: PostalCodeRuleInclusionTypeEnum

  """Maximum number of days for delivery."""
  maximumDeliveryDays: Int

  """Maximum order weight to use this shipping method."""
  maximumOrderWeight: WeightScalar

  """Minimal number of days for delivery."""
  minimumDeliveryDays: Int

  """Minimum order weight to use this shipping method."""
  minimumOrderWeight: WeightScalar

  """Name of the shipping method."""
  name: String

  """Shipping zone this method belongs to."""
  shippingZone: ID

  """
  ID of a tax class to assign to this shipping method. If not provided, the default tax class will be used.
  """
  taxClass: ID

  """Shipping type: price or weight based."""
  type: ShippingMethodTypeEnum
}

"""
Remove product from excluded list for shipping price. 

Requires one of the following permissions: MANAGE_SHIPPING.
"""
type ShippingPriceRemoveProductFromExclude {
  errors: [ShippingError!]!
  shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """A shipping method with new list of excluded products."""
  shippingMethod: ShippingMethodType
}

"""
Creates/updates translations for a shipping method. 

Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
type ShippingPriceTranslate {
  errors: [TranslationError!]!
  shippingMethod: ShippingMethodType
  translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input ShippingPriceTranslationInput {
  """
  Translated shipping method description.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString
  name: String
}

"""
Updates a new shipping price. 

Requires one of the following permissions: MANAGE_SHIPPING.
"""
type ShippingPriceUpdate {
  errors: [ShippingError!]!
  shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  shippingMethod: ShippingMethodType

  """A shipping zone to which the shipping method belongs."""
  shippingZone: ShippingZone
}

"""
Event sent when shipping price is updated.

Added in Saleor 3.2.
"""
type ShippingPriceUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The shipping method the event relates to."""
  shippingMethod(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): ShippingMethodType

  """The shipping zone the shipping method belongs to."""
  shippingZone(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): ShippingZone

  """Saleor version that triggered the event."""
  version: String
}

"""
Represents a shipping zone in the shop. Zones are the concept used only for grouping shipping methods in the dashboard, and are never exposed to the customers directly.
"""
type ShippingZone implements Node & ObjectWithMetadata {
  """List of channels for shipping zone."""
  channels: [Channel!]!

  """List of countries available for the method."""
  countries: [CountryDisplay!]!

  """Indicates if the shipping zone is default one."""
  default: Boolean!

  """Description of a shipping zone."""
  description: String

  """The ID of shipping zone."""
  id: ID!

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """Shipping zone name."""
  name: String!

  """Lowest and highest prices for the shipping."""
  priceRange: MoneyRange

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """
  List of shipping methods available for orders shipped to countries within this shipping zone.
  """
  shippingMethods: [ShippingMethodType!]

  """List of warehouses for shipping zone."""
  warehouses: [Warehouse!]!
}

"""
Deletes shipping zones. 

Requires one of the following permissions: MANAGE_SHIPPING.
"""
type ShippingZoneBulkDelete {
  """Returns how many objects were affected."""
  count: Int!
  errors: [ShippingError!]!
  shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

type ShippingZoneCountableConnection {
  edges: [ShippingZoneCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type ShippingZoneCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: ShippingZone!
}

"""
Creates a new shipping zone. 

Requires one of the following permissions: MANAGE_SHIPPING.
"""
type ShippingZoneCreate {
  errors: [ShippingError!]!
  shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  shippingZone: ShippingZone
}

input ShippingZoneCreateInput {
  """List of channels to assign to the shipping zone."""
  addChannels: [ID!]

  """List of warehouses to assign to a shipping zone"""
  addWarehouses: [ID!]

  """List of countries in this shipping zone."""
  countries: [String!]

  """
  Default shipping zone will be used for countries not covered by other zones.
  """
  default: Boolean

  """Description of the shipping zone."""
  description: String

  """Shipping zone's name. Visible only to the staff."""
  name: String
}

"""
Event sent when new shipping zone is created.

Added in Saleor 3.2.
"""
type ShippingZoneCreated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The shipping zone the event relates to."""
  shippingZone(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): ShippingZone

  """Saleor version that triggered the event."""
  version: String
}

"""
Deletes a shipping zone. 

Requires one of the following permissions: MANAGE_SHIPPING.
"""
type ShippingZoneDelete {
  errors: [ShippingError!]!
  shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  shippingZone: ShippingZone
}

"""
Event sent when shipping zone is deleted.

Added in Saleor 3.2.
"""
type ShippingZoneDeleted implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The shipping zone the event relates to."""
  shippingZone(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): ShippingZone

  """Saleor version that triggered the event."""
  version: String
}

input ShippingZoneFilterInput {
  channels: [ID!]
  search: String
}

"""
Event sent when shipping zone metadata is updated.

Added in Saleor 3.8.
"""
type ShippingZoneMetadataUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The shipping zone the event relates to."""
  shippingZone(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): ShippingZone

  """Saleor version that triggered the event."""
  version: String
}

"""
Updates a new shipping zone. 

Requires one of the following permissions: MANAGE_SHIPPING.
"""
type ShippingZoneUpdate {
  errors: [ShippingError!]!
  shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  shippingZone: ShippingZone
}

input ShippingZoneUpdateInput {
  """List of channels to assign to the shipping zone."""
  addChannels: [ID!]

  """List of warehouses to assign to a shipping zone"""
  addWarehouses: [ID!]

  """List of countries in this shipping zone."""
  countries: [String!]

  """
  Default shipping zone will be used for countries not covered by other zones.
  """
  default: Boolean

  """Description of the shipping zone."""
  description: String

  """Shipping zone's name. Visible only to the staff."""
  name: String

  """List of channels to unassign from the shipping zone."""
  removeChannels: [ID!]

  """List of warehouses to unassign from a shipping zone"""
  removeWarehouses: [ID!]
}

"""
Event sent when shipping zone is updated.

Added in Saleor 3.2.
"""
type ShippingZoneUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The shipping zone the event relates to."""
  shippingZone(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): ShippingZone

  """Saleor version that triggered the event."""
  version: String
}

"""
Represents a shop resource containing general shop data and configuration.
"""
type Shop implements ObjectWithMetadata {
  """
  Determines if user can login without confirmation when `enableAccountConfirmation` is enabled.
  
  Added in Saleor 3.15.
  
  Requires one of the following permissions: MANAGE_SETTINGS.
  """
  allowLoginWithoutConfirmation: Boolean

  """
  Enable automatic fulfillment for all digital products.
  
  Requires one of the following permissions: MANAGE_SETTINGS.
  """
  automaticFulfillmentDigitalProducts: Boolean

  """List of available external authentications."""
  availableExternalAuthentications: [ExternalAuthentication!]!

  """List of available payment gateways."""
  availablePaymentGateways(
    """Slug of a channel for which the data should be returned."""
    channel: String

    """
    A currency for which gateways will be returned. 
    
    DEPRECATED: this field will be removed in Saleor 4.0. Use `channel` argument instead.
    """
    currency: String
  ): [PaymentGateway!]!

  """Shipping methods that are available for the shop."""
  availableShippingMethods(
    """Address for which available shipping methods should be returned."""
    address: AddressInput

    """Slug of a channel for which the data should be returned."""
    channel: String!
  ): [ShippingMethod!]

  """
  List of tax apps that can be assigned to the channel. The list will be calculated by Saleor based on the apps that are subscribed to webhooks related to tax calculations: CHECKOUT_CALCULATE_TAXES
  
  Added in Saleor 3.19.
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER, MANAGE_APPS.
  """
  availableTaxApps: [App!]!

  """
  List of all currencies supported by shop's channels.
  
  Added in Saleor 3.1.
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.
  """
  channelCurrencies: [String!]!

  """Charge taxes on shipping."""
  chargeTaxesOnShipping: Boolean! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `ShippingMethodType.taxClass` to determine whether taxes are calculated for shipping methods; if a tax class is set, the taxes will be calculated, otherwise no tax rate will be applied.")

  """Company address."""
  companyAddress: Address

  """List of countries available in the shop."""
  countries(
    """Filtering options for countries"""
    filter: CountryFilterInput

    """
    A language code to return the translation for. 
    
    DEPRECATED: this field will be removed in Saleor 4.0.
    """
    languageCode: LanguageCodeEnum
  ): [CountryDisplay!]!

  """URL of a view where customers can set their password."""
  customerSetPasswordUrl: String

  """Shop's default country."""
  defaultCountry: CountryDisplay

  """
  Default number of max downloads per digital content URL.
  
  Requires one of the following permissions: MANAGE_SETTINGS.
  """
  defaultDigitalMaxDownloads: Int

  """
  Default number of days which digital content URL will be valid.
  
  Requires one of the following permissions: MANAGE_SETTINGS.
  """
  defaultDigitalUrlValidDays: Int

  """
  Default shop's email sender's address.
  
  Requires one of the following permissions: MANAGE_SETTINGS.
  """
  defaultMailSenderAddress: String

  """
  Default shop's email sender's name.
  
  Requires one of the following permissions: MANAGE_SETTINGS.
  """
  defaultMailSenderName: String

  """Default weight unit."""
  defaultWeightUnit: WeightUnitsEnum

  """Shop's description."""
  description: String

  """Display prices with tax in store."""
  displayGrossPrices: Boolean! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` to determine whether to display gross or net prices.")

  """Shop's domain data."""
  domain: Domain!

  """
  Determines if account confirmation by email is enabled.
  
  Added in Saleor 3.14.
  
  Requires one of the following permissions: MANAGE_SETTINGS.
  """
  enableAccountConfirmationByEmail: Boolean

  """
  Allow to approve fulfillments which are unpaid.
  
  Added in Saleor 3.1.
  """
  fulfillmentAllowUnpaid: Boolean!

  """
  Automatically approve all new fulfillments.
  
  Added in Saleor 3.1.
  """
  fulfillmentAutoApprove: Boolean!

  """Header text."""
  headerText: String

  """ID of the shop."""
  id: ID!

  """Include taxes in prices."""
  includeTaxesInPrices: Boolean! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `Channel.taxConfiguration.pricesEnteredWithTax` to determine whether prices are entered with tax.")

  """List of the shops's supported languages."""
  languages: [LanguageDisplay!]!

  """
  Default number of maximum line quantity in single checkout (per single checkout line).
  
  Added in Saleor 3.1.
  
  Requires one of the following permissions: MANAGE_SETTINGS.
  """
  limitQuantityPerCheckout: Int

  """
  Resource limitations and current usage if any set for a shop
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER.
  """
  limits: LimitInfo! @deprecated(reason: "This field will be removed in Saleor 4.0.")

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  """
  metafields(keys: [String!]): Metadata

  """Shop's name."""
  name: String!

  """List of available permissions."""
  permissions: [Permission!]!

  """List of possible phone prefixes."""
  phonePrefixes: [String!]!

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  """
  privateMetafields(keys: [String!]): Metadata

  """
  Default number of minutes stock will be reserved for anonymous checkout or null when stock reservation is disabled.
  
  Added in Saleor 3.1.
  
  Requires one of the following permissions: MANAGE_SETTINGS.
  """
  reserveStockDurationAnonymousUser: Int

  """
  Default number of minutes stock will be reserved for authenticated checkout or null when stock reservation is disabled.
  
  Added in Saleor 3.1.
  
  Requires one of the following permissions: MANAGE_SETTINGS.
  """
  reserveStockDurationAuthenticatedUser: Int

  """
  Minor Saleor API version.
  
  Added in Saleor 3.5.
  """
  schemaVersion: String!

  """
  List of staff notification recipients.
  
  Requires one of the following permissions: MANAGE_SETTINGS.
  """
  staffNotificationRecipients: [StaffNotificationRecipient!]

  """
  This field is used as a default value for `ProductVariant.trackInventory`.
  """
  trackInventoryByDefault: Boolean

  """Returns translated shop fields for the given language code."""
  translation(
    """A language code to return the translation for shop."""
    languageCode: LanguageCodeEnum!
  ): ShopTranslation

  """
  Saleor API version.
  
  Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.
  """
  version: String!
}

"""
Update the shop's address. If the `null` value is passed, the currently selected address will be deleted. 

Requires one of the following permissions: MANAGE_SETTINGS.
"""
type ShopAddressUpdate {
  errors: [ShopError!]!

  """Updated shop."""
  shop: Shop
  shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Updates site domain of the shop.

DEPRECATED: this mutation will be removed in Saleor 4.0. Use `PUBLIC_URL` environment variable instead. 

Requires one of the following permissions: MANAGE_SETTINGS.
"""
type ShopDomainUpdate {
  errors: [ShopError!]!

  """Updated shop."""
  shop: Shop
  shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

type ShopError {
  """The error code."""
  code: ShopErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum ShopErrorCode {
  ALREADY_EXISTS
  CANNOT_FETCH_TAX_RATES
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  REQUIRED
  UNIQUE
}

"""
Fetch tax rates. 

Requires one of the following permissions: MANAGE_SETTINGS.
"""
type ShopFetchTaxRates {
  errors: [ShopError!]!

  """Updated shop."""
  shop: Shop
  shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when shop metadata is updated.

Added in Saleor 3.15.
"""
type ShopMetadataUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Shop data."""
  shop: Shop

  """Saleor version that triggered the event."""
  version: String
}

input ShopSettingsInput {
  """
  Enable possibility to login without account confirmation.
  
  Added in Saleor 3.15.
  """
  allowLoginWithoutConfirmation: Boolean

  """Enable automatic fulfillment for all digital products."""
  automaticFulfillmentDigitalProducts: Boolean

  """
  Charge taxes on shipping. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. To enable taxes for a shipping method, assign a tax class to the shipping method with `shippingPriceCreate` or `shippingPriceUpdate` mutations.
  """
  chargeTaxesOnShipping: Boolean

  """URL of a view where customers can set their password."""
  customerSetPasswordUrl: String

  """Default number of max downloads per digital content URL."""
  defaultDigitalMaxDownloads: Int

  """Default number of days which digital content URL will be valid."""
  defaultDigitalUrlValidDays: Int

  """Default email sender's address."""
  defaultMailSenderAddress: String

  """Default email sender's name."""
  defaultMailSenderName: String

  """Default weight unit."""
  defaultWeightUnit: WeightUnitsEnum

  """SEO description."""
  description: String

  """
  Display prices with tax in store. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use `taxConfigurationUpdate` mutation to configure this setting per channel or country.
  """
  displayGrossPrices: Boolean

  """
  Enable automatic account confirmation by email.
  
  Added in Saleor 3.14.
  """
  enableAccountConfirmationByEmail: Boolean

  """
  Enable ability to approve fulfillments which are unpaid.
  
  Added in Saleor 3.1.
  """
  fulfillmentAllowUnpaid: Boolean

  """
  Enable automatic approval of all new fulfillments.
  
  Added in Saleor 3.1.
  """
  fulfillmentAutoApprove: Boolean

  """Header text."""
  headerText: String

  """
  Include taxes in prices. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use `taxConfigurationUpdate` mutation to configure this setting per channel or country.
  """
  includeTaxesInPrices: Boolean

  """
  Default number of maximum line quantity in single checkout. Minimum possible value is 1, default value is 50.
  
  Added in Saleor 3.1.
  """
  limitQuantityPerCheckout: Int

  """
  Shop public metadata.
  
  Added in Saleor 3.15.
  """
  metadata: [MetadataInput!]

  """
  Shop private metadata.
  
  Added in Saleor 3.15.
  """
  privateMetadata: [MetadataInput!]

  """
  Default number of minutes stock will be reserved for anonymous checkout. Enter 0 or null to disable.
  
  Added in Saleor 3.1.
  """
  reserveStockDurationAnonymousUser: Int

  """
  Default number of minutes stock will be reserved for authenticated checkout. Enter 0 or null to disable.
  
  Added in Saleor 3.1.
  """
  reserveStockDurationAuthenticatedUser: Int

  """
  This field is used as a default value for `ProductVariant.trackInventory`.
  """
  trackInventoryByDefault: Boolean
}

"""
Creates/updates translations for shop settings. 

Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
type ShopSettingsTranslate {
  errors: [TranslationError!]!

  """Updated shop settings."""
  shop: Shop
  translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input ShopSettingsTranslationInput {
  description: String
  headerText: String
}

"""
Updates shop settings. 

Requires one of the following permissions: MANAGE_SETTINGS.

Triggers the following webhook events:
- SHOP_METADATA_UPDATED (async): Optionally triggered when public or private metadata is updated.
"""
type ShopSettingsUpdate {
  errors: [ShopError!]!

  """Updated shop."""
  shop: Shop
  shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""Represents shop translations."""
type ShopTranslation implements Node {
  """Translated description of sale."""
  description: String!

  """Translated header text of sale."""
  headerText: String!

  """The ID of the shop translation."""
  id: ID!

  """Translation language."""
  language: LanguageDisplay!
}

input SiteDomainInput {
  """Domain name for shop."""
  domain: String

  """Shop site name."""
  name: String
}

"""
Deletes staff users. Apps are not allowed to perform this mutation. 

Requires one of the following permissions: MANAGE_STAFF.

Triggers the following webhook events:
- STAFF_DELETED (async): A staff account was deleted.
"""
type StaffBulkDelete {
  """Returns how many objects were affected."""
  count: Int!
  errors: [StaffError!]!
  staffErrors: [StaffError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Creates a new staff user. Apps are not allowed to perform this mutation. 

Requires one of the following permissions: MANAGE_STAFF.

Triggers the following webhook events:
- STAFF_CREATED (async): A new staff account was created.
- NOTIFY_USER (async): A notification for setting the password.
- STAFF_SET_PASSWORD_REQUESTED (async): Setting a new password for the staff account is requested.
"""
type StaffCreate {
  errors: [StaffError!]!
  staffErrors: [StaffError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  user: User
}

"""Fields required to create a staff user."""
input StaffCreateInput {
  """List of permission group IDs to which user should be assigned."""
  addGroups: [ID!]

  """The unique email address of the user."""
  email: String

  """Given name."""
  firstName: String

  """User account is active."""
  isActive: Boolean

  """Family name."""
  lastName: String

  """
  Fields required to update the user metadata.
  
  Added in Saleor 3.14.
  """
  metadata: [MetadataInput!]

  """A note about the user."""
  note: String

  """
  Fields required to update the user private metadata.
  
  Added in Saleor 3.14.
  """
  privateMetadata: [MetadataInput!]

  """
  URL of a view where users should be redirected to set the password. URL in RFC 1808 format.
  """
  redirectUrl: String
}

"""
Event sent when new staff user is created.

Added in Saleor 3.5.
"""
type StaffCreated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The user the event relates to."""
  user: User

  """Saleor version that triggered the event."""
  version: String
}

"""
Deletes a staff user. Apps are not allowed to perform this mutation. 

Requires one of the following permissions: MANAGE_STAFF.

Triggers the following webhook events:
- STAFF_DELETED (async): A staff account was deleted.
"""
type StaffDelete {
  errors: [StaffError!]!
  staffErrors: [StaffError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  user: User
}

"""
Event sent when staff user is deleted.

Added in Saleor 3.5.
"""
type StaffDeleted implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The user the event relates to."""
  user: User

  """Saleor version that triggered the event."""
  version: String
}

type StaffError {
  """A type of address that causes the error."""
  addressType: AddressTypeEnum

  """The error code."""
  code: AccountErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """List of permission group IDs which cause the error."""
  groups: [ID!]

  """The error message."""
  message: String

  """List of permissions which causes the error."""
  permissions: [PermissionEnum!]

  """List of user IDs which causes the error."""
  users: [ID!]
}

"""Represents status of a staff account."""
enum StaffMemberStatus {
  """User account has been activated."""
  ACTIVE

  """User account has not been activated yet."""
  DEACTIVATED
}

"""
Represents a recipient of email notifications send by Saleor, such as notifications about new orders. Notifications can be assigned to staff users or arbitrary email addresses.
"""
type StaffNotificationRecipient implements Node {
  """Determines if a notification active."""
  active: Boolean

  """Returns email address of a user subscribed to email notifications."""
  email: String

  """The ID of the staff notification recipient."""
  id: ID!

  """Returns a user subscribed to email notifications."""
  user: User
}

"""
Creates a new staff notification recipient. 

Requires one of the following permissions: MANAGE_SETTINGS.
"""
type StaffNotificationRecipientCreate {
  errors: [ShopError!]!
  shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  staffNotificationRecipient: StaffNotificationRecipient
}

"""
Delete staff notification recipient. 

Requires one of the following permissions: MANAGE_SETTINGS.
"""
type StaffNotificationRecipientDelete {
  errors: [ShopError!]!
  shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  staffNotificationRecipient: StaffNotificationRecipient
}

input StaffNotificationRecipientInput {
  """Determines if a notification active."""
  active: Boolean

  """Email address of a user subscribed to email notifications."""
  email: String

  """The ID of the user subscribed to email notifications.."""
  user: ID
}

"""
Updates a staff notification recipient. 

Requires one of the following permissions: MANAGE_SETTINGS.
"""
type StaffNotificationRecipientUpdate {
  errors: [ShopError!]!
  shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  staffNotificationRecipient: StaffNotificationRecipient
}

"""
Event sent when setting a new password for staff is requested.

Added in Saleor 3.15.
"""
type StaffSetPasswordRequested implements Event {
  """The channel data."""
  channel: Channel

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The URL to redirect the user after he accepts the request."""
  redirectUrl: String

  """Shop data."""
  shop: Shop

  """The token required to confirm request."""
  token: String

  """The user the event relates to."""
  user: User

  """Saleor version that triggered the event."""
  version: String
}

"""
Updates an existing staff user. Apps are not allowed to perform this mutation. 

Requires one of the following permissions: MANAGE_STAFF.

Triggers the following webhook events:
- STAFF_UPDATED (async): A staff account was updated.
"""
type StaffUpdate {
  errors: [StaffError!]!
  staffErrors: [StaffError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  user: User
}

"""Fields required to update a staff user."""
input StaffUpdateInput {
  """List of permission group IDs to which user should be assigned."""
  addGroups: [ID!]

  """The unique email address of the user."""
  email: String

  """Given name."""
  firstName: String

  """User account is active."""
  isActive: Boolean

  """Family name."""
  lastName: String

  """
  Fields required to update the user metadata.
  
  Added in Saleor 3.14.
  """
  metadata: [MetadataInput!]

  """A note about the user."""
  note: String

  """
  Fields required to update the user private metadata.
  
  Added in Saleor 3.14.
  """
  privateMetadata: [MetadataInput!]

  """List of permission group IDs from which user should be unassigned."""
  removeGroups: [ID!]
}

"""
Event sent when staff user is updated.

Added in Saleor 3.5.
"""
type StaffUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The user the event relates to."""
  user: User

  """Saleor version that triggered the event."""
  version: String
}

input StaffUserInput {
  ids: [ID!]
  search: String
  status: StaffMemberStatus
}

"""Represents stock."""
type Stock implements Node {
  """The ID of stock."""
  id: ID!

  """Information about the product variant."""
  productVariant: ProductVariant!

  """
  Quantity of a product in the warehouse's possession, including the allocated stock that is waiting for shipment.
  
  Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS.
  """
  quantity: Int!

  """
  Quantity allocated for orders.
  
  Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS.
  """
  quantityAllocated: Int!

  """
  Quantity reserved for checkouts.
  
  Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS.
  """
  quantityReserved: Int!

  """The warehouse associated with the stock."""
  warehouse: Warehouse!
}

enum StockAvailability {
  IN_STOCK
  OUT_OF_STOCK
}

type StockBulkResult {
  """List of errors occurred on create or update attempt."""
  errors: [StockBulkUpdateError!]

  """Stock data."""
  stock: Stock
}

"""
Updates stocks for a given variant and warehouse. Variant and warehouse selectors have to be the same for all stock inputs. Is not allowed to use 'variantId' in one input and 'variantExternalReference' in another.

Added in Saleor 3.13.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: MANAGE_PRODUCTS.

Triggers the following webhook events:
- PRODUCT_VARIANT_STOCK_UPDATED (async): A product variant stock details were updated.
"""
type StockBulkUpdate {
  """Returns how many objects were updated."""
  count: Int!
  errors: [StockBulkUpdateError!]!

  """List of the updated stocks."""
  results: [StockBulkResult!]!
}

type StockBulkUpdateError {
  """The error code."""
  code: StockBulkUpdateErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum StockBulkUpdateErrorCode {
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  REQUIRED
}

input StockBulkUpdateInput {
  """Quantity of items available for sell."""
  quantity: Int!

  """Variant external reference."""
  variantExternalReference: String

  """Variant ID."""
  variantId: ID

  """Warehouse external reference."""
  warehouseExternalReference: String

  """Warehouse ID."""
  warehouseId: ID
}

type StockCountableConnection {
  edges: [StockCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type StockCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: Stock!
}

type StockError {
  """The error code."""
  code: StockErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum StockErrorCode {
  ALREADY_EXISTS
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  REQUIRED
  UNIQUE
}

input StockFilterInput {
  quantity: Float
  search: String
}

input StockInput {
  """Quantity of items available for sell."""
  quantity: Int!

  """Warehouse in which stock is located."""
  warehouse: ID!
}

"""
Represents the channel stock settings.

Added in Saleor 3.7.
"""
type StockSettings {
  """
  Allocation strategy defines the preference of warehouses for allocations and reservations.
  """
  allocationStrategy: AllocationStrategyEnum!
}

input StockSettingsInput {
  """
  Allocation strategy options. Strategy defines the preference of warehouses for allocations and reservations.
  """
  allocationStrategy: AllocationStrategyEnum!
}

input StockUpdateInput {
  """Quantity of items available for sell."""
  quantity: Int!

  """Stock."""
  stock: ID!
}

"""
Determine how stocks should be updated, while processing an order.

    SKIP - stocks are not checked and not updated.
    UPDATE - only do update, if there is enough stock.
    FORCE - force update, if there is not enough stock.
"""
enum StockUpdatePolicyEnum {
  FORCE
  SKIP
  UPDATE
}

"""Enum representing the type of a payment storage in a gateway."""
enum StorePaymentMethodEnum {
  """Storage is disabled. The payment is not stored."""
  NONE

  """
  Off session storage type. The payment is stored to be reused even if the customer is absent.
  """
  OFF_SESSION

  """
  On session storage type. The payment is stored only to be reused when the customer is present in the checkout flow.
  """
  ON_SESSION
}

"""
Represents a payment method stored for user (tokenized) in payment gateway.

Added in Saleor 3.15.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type StoredPaymentMethod {
  """Stored credit card details if available."""
  creditCardInfo: CreditCard

  """JSON data returned by Payment Provider app for this payment method."""
  data: JSON

  """Payment gateway that stores this payment method."""
  gateway: PaymentGateway!

  """Stored payment method ID."""
  id: ID!

  """
  Payment method name. Example: last 4 digits of credit card, obfuscated email, etc.
  """
  name: String

  """
  ID of stored payment method used to make payment actions. Note: method ID is unique only within the payment gateway.
  """
  paymentMethodId: String!
  supportedPaymentFlows: [TokenizedPaymentFlowEnum!]

  """Type of the payment method. Example: credit card, wallet, etc."""
  type: String!
}

"""
Event sent when user requests to delete a payment method.

Added in Saleor 3.16.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type StoredPaymentMethodDeleteRequested implements Event {
  """Channel related to the requested delete action."""
  channel: Channel!

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """
  The ID of the payment method that should be deleted by the payment gateway.
  """
  paymentMethodId: String!

  """The application receiving the webhook."""
  recipient: App

  """
  The user for which the app should proceed with payment method delete request.
  """
  user: User!

  """Saleor version that triggered the event."""
  version: String
}

"""
Request to delete a stored payment method on payment provider side.

Added in Saleor 3.16.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: AUTHENTICATED_USER.

Triggers the following webhook events:
- STORED_PAYMENT_METHOD_DELETE_REQUESTED (sync): The customer requested to delete a payment method.
"""
type StoredPaymentMethodRequestDelete {
  errors: [PaymentMethodRequestDeleteError!]!

  """The result of deleting a stored payment method."""
  result: StoredPaymentMethodRequestDeleteResult!
}

enum StoredPaymentMethodRequestDeleteErrorCode {
  CHANNEL_INACTIVE
  GATEWAY_ERROR
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
}

"""
Result of deleting a stored payment method.

    This enum is used to determine the result of deleting a stored payment method.
    SUCCESSFULLY_DELETED - The stored payment method was successfully deleted.
    FAILED_TO_DELETE - The stored payment method was not deleted.
    FAILED_TO_DELIVER - The request to delete the stored payment method was not
    delivered.
"""
enum StoredPaymentMethodRequestDeleteResult {
  FAILED_TO_DELETE
  FAILED_TO_DELIVER
  SUCCESSFULLY_DELETED
}

"""
Define the filtering options for string fields.

Added in Saleor 3.11.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
input StringFilterInput {
  """The value equal to."""
  eq: String

  """The value included in."""
  oneOf: [String!]
}

type Subscription {
  """
  Event sent when new draft order is created.
  
  Added in Saleor 3.20.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  draftOrderCreated(
    """
    List of channel slugs. The event will be sent only if the order belongs to one of the provided channels. If the channel slug list is empty, orders that belong to any channel will be sent. Maximally 500 items.
    """
    channels: [String!]
  ): DraftOrderCreated

  """
  Event sent when draft order is deleted.
  
  Added in Saleor 3.20.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  draftOrderDeleted(
    """
    List of channel slugs. The event will be sent only if the order belongs to one of the provided channels. If the channel slug list is empty, orders that belong to any channel will be sent. Maximally 500 items.
    """
    channels: [String!]
  ): DraftOrderDeleted

  """
  Event sent when draft order is updated.
  
  Added in Saleor 3.20.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  draftOrderUpdated(
    """
    List of channel slugs. The event will be sent only if the order belongs to one of the provided channels. If the channel slug list is empty, orders that belong to any channel will be sent. Maximally 500 items.
    """
    channels: [String!]
  ): DraftOrderUpdated

  """
  Look up subscription event.
  
  Added in Saleor 3.2.
  """
  event: Event

  """
  Event sent when orders are imported.
  
  Added in Saleor 3.20.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  orderBulkCreated(
    """
    List of channel slugs. The event will be sent only if the order belongs to one of the provided channels. If the channel slug list is empty, orders that belong to any channel will be sent. Maximally 500 items.
    """
    channels: [String!]
  ): OrderBulkCreated

  """
  Event sent when order is cancelled.
  
  Added in Saleor 3.20.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  orderCancelled(
    """
    List of channel slugs. The event will be sent only if the order belongs to one of the provided channels. If the channel slug list is empty, orders that belong to any channel will be sent. Maximally 500 items.
    """
    channels: [String!]
  ): OrderCancelled

  """
  Event sent when order is confirmed.
  
  Added in Saleor 3.20.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  orderConfirmed(
    """
    List of channel slugs. The event will be sent only if the order belongs to one of the provided channels. If the channel slug list is empty, orders that belong to any channel will be sent. Maximally 500 items.
    """
    channels: [String!]
  ): OrderConfirmed

  """
  Event sent when new order is created.
  
  Added in Saleor 3.20.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  orderCreated(
    """
    List of channel slugs. The event will be sent only if the order belongs to one of the provided channels. If the channel slug list is empty, orders that belong to any channel will be sent. Maximally 500 items.
    """
    channels: [String!]
  ): OrderCreated

  """
  Event sent when order becomes expired.
  
  Added in Saleor 3.20.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  orderExpired(
    """
    List of channel slugs. The event will be sent only if the order belongs to one of the provided channels. If the channel slug list is empty, orders that belong to any channel will be sent. Maximally 500 items.
    """
    channels: [String!]
  ): OrderExpired

  """
  Event sent when order is fulfilled.
  
  Added in Saleor 3.20.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  orderFulfilled(
    """
    List of channel slugs. The event will be sent only if the order belongs to one of the provided channels. If the channel slug list is empty, orders that belong to any channel will be sent. Maximally 500 items.
    """
    channels: [String!]
  ): OrderFulfilled

  """
  Event sent when order is fully paid.
  
  Added in Saleor 3.20.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  orderFullyPaid(
    """
    List of channel slugs. The event will be sent only if the order belongs to one of the provided channels. If the channel slug list is empty, orders that belong to any channel will be sent. Maximally 500 items.
    """
    channels: [String!]
  ): OrderFullyPaid

  """
  The order is fully refunded.
  
  Added in Saleor 3.20.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  orderFullyRefunded(
    """
    List of channel slugs. The event will be sent only if the order belongs to one of the provided channels. If the channel slug list is empty, orders that belong to any channel will be sent. Maximally 500 items.
    """
    channels: [String!]
  ): OrderFullyRefunded

  """
  Event sent when order metadata is updated.
  
  Added in Saleor 3.20.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  orderMetadataUpdated(
    """
    List of channel slugs. The event will be sent only if the order belongs to one of the provided channels. If the channel slug list is empty, orders that belong to any channel will be sent. Maximally 500 items.
    """
    channels: [String!]
  ): OrderMetadataUpdated

  """
  Payment has been made. The order may be partially or fully paid.
  
  Added in Saleor 3.20.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  orderPaid(
    """
    List of channel slugs. The event will be sent only if the order belongs to one of the provided channels. If the channel slug list is empty, orders that belong to any channel will be sent. Maximally 500 items.
    """
    channels: [String!]
  ): OrderPaid

  """
  The order received a refund. The order may be partially or fully refunded.
  
  Added in Saleor 3.20.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  orderRefunded(
    """
    List of channel slugs. The event will be sent only if the order belongs to one of the provided channels. If the channel slug list is empty, orders that belong to any channel will be sent. Maximally 500 items.
    """
    channels: [String!]
  ): OrderRefunded

  """
  Event sent when order is updated.
  
  Added in Saleor 3.20.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  orderUpdated(
    """
    List of channel slugs. The event will be sent only if the order belongs to one of the provided channels. If the channel slug list is empty, orders that belong to any channel will be sent. Maximally 500 items.
    """
    channels: [String!]
  ): OrderUpdated
}

enum TaxCalculationStrategy {
  FLAT_RATES
  TAX_APP
}

"""
Tax class is a named object used to define tax rates per country. Tax class can be assigned to product types, products and shipping methods to define their tax rates.

Added in Saleor 3.9.
"""
type TaxClass implements Node & ObjectWithMetadata {
  """Country-specific tax rates for this tax class."""
  countries: [TaxClassCountryRate!]!

  """The ID of the object."""
  id: ID!

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """Name of the tax class."""
  name: String!

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata
}

type TaxClassCountableConnection {
  edges: [TaxClassCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type TaxClassCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: TaxClass!
}

"""
Tax rate for a country. When tax class is null, it represents the default tax rate for that country; otherwise it's a country tax rate specific to the given tax class.

Added in Saleor 3.9.
"""
type TaxClassCountryRate {
  """Country in which this tax rate applies."""
  country: CountryDisplay!

  """Tax rate value."""
  rate: Float!

  """Related tax class."""
  taxClass: TaxClass
}

"""
Create a tax class.

Added in Saleor 3.9. 

Requires one of the following permissions: MANAGE_TAXES.
"""
type TaxClassCreate {
  errors: [TaxClassCreateError!]!
  taxClass: TaxClass
}

type TaxClassCreateError {
  """The error code."""
  code: TaxClassCreateErrorCode!

  """List of country codes for which the configuration is invalid."""
  countryCodes: [String!]!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum TaxClassCreateErrorCode {
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
}

input TaxClassCreateInput {
  """List of country-specific tax rates to create for this tax class."""
  createCountryRates: [CountryRateInput!]

  """Name of the tax class."""
  name: String!
}

"""
Delete a tax class. After deleting the tax class any products, product types or shipping methods using it are updated to use the default tax class.

Added in Saleor 3.9. 

Requires one of the following permissions: MANAGE_TAXES.
"""
type TaxClassDelete {
  errors: [TaxClassDeleteError!]!
  taxClass: TaxClass
}

type TaxClassDeleteError {
  """The error code."""
  code: TaxClassDeleteErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum TaxClassDeleteErrorCode {
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
}

input TaxClassFilterInput {
  countries: [CountryCode!]
  ids: [ID!]
  metadata: [MetadataFilter!]
}

input TaxClassRateInput {
  """Tax rate value."""
  rate: Float

  """ID of a tax class for which to update the tax rate"""
  taxClassId: ID
}

enum TaxClassSortField {
  """Sort tax classes by name."""
  NAME
}

input TaxClassSortingInput {
  """Specifies the direction in which to sort tax classes."""
  direction: OrderDirection!

  """Sort tax classes by the selected field."""
  field: TaxClassSortField!
}

"""
Update a tax class.

Added in Saleor 3.9. 

Requires one of the following permissions: MANAGE_TAXES.
"""
type TaxClassUpdate {
  errors: [TaxClassUpdateError!]!
  taxClass: TaxClass
}

type TaxClassUpdateError {
  """The error code."""
  code: TaxClassUpdateErrorCode!

  """List of country codes for which the configuration is invalid."""
  countryCodes: [String!]!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum TaxClassUpdateErrorCode {
  DUPLICATED_INPUT_ITEM
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
}

input TaxClassUpdateInput {
  """Name of the tax class."""
  name: String

  """
  List of country codes for which to remove the tax class rates. Note: It removes all rates for given country code.
  """
  removeCountryRates: [CountryCode!]

  """
  List of country-specific tax rates to create or update for this tax class.
  """
  updateCountryRates: [CountryRateUpdateInput!]
}

"""
Channel-specific tax configuration.

Added in Saleor 3.9.
"""
type TaxConfiguration implements Node & ObjectWithMetadata {
  """A channel to which the tax configuration applies to."""
  channel: Channel!

  """Determines whether taxes are charged in the given channel."""
  chargeTaxes: Boolean!

  """List of country-specific exceptions in tax configuration."""
  countries: [TaxConfigurationPerCountry!]!

  """Determines whether displayed prices should include taxes."""
  displayGrossPrices: Boolean!

  """The ID of the object."""
  id: ID!

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """Determines whether prices are entered with the tax included."""
  pricesEnteredWithTax: Boolean!

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """
  The tax app `App.identifier` that will be used to calculate the taxes for the given channel. Empty value for `TAX_APP` set as `taxCalculationStrategy` means that Saleor will iterate over all installed tax apps. If multiple tax apps exist with provided tax app id use the `App` with newest `created` date. Will become mandatory in 4.0 for `TAX_APP` `taxCalculationStrategy`.
  
  Added in Saleor 3.19.
  """
  taxAppId: String

  """
  The default strategy to use for tax calculation in the given channel. Taxes can be calculated either using user-defined flat rates or with a tax app. Empty value means that no method is selected and taxes are not calculated.
  """
  taxCalculationStrategy: TaxCalculationStrategy
}

type TaxConfigurationCountableConnection {
  edges: [TaxConfigurationCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type TaxConfigurationCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: TaxConfiguration!
}

input TaxConfigurationFilterInput {
  ids: [ID!]
  metadata: [MetadataFilter!]
}

"""
Country-specific exceptions of a channel's tax configuration.

Added in Saleor 3.9.
"""
type TaxConfigurationPerCountry {
  """Determines whether taxes are charged in this country."""
  chargeTaxes: Boolean!

  """Country in which this configuration applies."""
  country: CountryDisplay!

  """
  Determines whether displayed prices should include taxes for this country.
  """
  displayGrossPrices: Boolean!

  """
  The tax app `App.identifier` that will be used to calculate the taxes for the given channel and country. If not provided, use the value from the channel's tax configuration.
  
  Added in Saleor 3.19.
  """
  taxAppId: String

  """
  A country-specific strategy to use for tax calculation. Taxes can be calculated either using user-defined flat rates or with a tax app. If not provided, use the value from the channel's tax configuration.
  """
  taxCalculationStrategy: TaxCalculationStrategy
}

input TaxConfigurationPerCountryInput {
  """Determines whether taxes are charged in this country."""
  chargeTaxes: Boolean!

  """Country in which this configuration applies."""
  countryCode: CountryCode!

  """
  Determines whether displayed prices should include taxes for this country.
  """
  displayGrossPrices: Boolean!

  """
  The tax app `App.identifier` that will be used to calculate the taxes for the given channel and country. If not provided, use the value from the channel's tax configuration.
  
  Added in Saleor 3.19.
  """
  taxAppId: String

  """
  A country-specific strategy to use for tax calculation. Taxes can be calculated either using user-defined flat rates or with a tax app. If not provided, use the value from the channel's tax configuration.
  """
  taxCalculationStrategy: TaxCalculationStrategy
}

"""
Update tax configuration for a channel.

Added in Saleor 3.9. 

Requires one of the following permissions: MANAGE_TAXES.
"""
type TaxConfigurationUpdate {
  errors: [TaxConfigurationUpdateError!]!
  taxConfiguration: TaxConfiguration
}

type TaxConfigurationUpdateError {
  """The error code."""
  code: TaxConfigurationUpdateErrorCode!

  """List of country codes for which the configuration is invalid."""
  countryCodes: [String!]!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum TaxConfigurationUpdateErrorCode {
  DUPLICATED_INPUT_ITEM
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
}

input TaxConfigurationUpdateInput {
  """Determines whether taxes are charged in the given channel."""
  chargeTaxes: Boolean

  """Determines whether displayed prices should include taxes."""
  displayGrossPrices: Boolean

  """Determines whether prices are entered with the tax included."""
  pricesEnteredWithTax: Boolean

  """List of country codes for which to remove the tax configuration."""
  removeCountriesConfiguration: [CountryCode!]

  """
  The tax app `App.identifier` that will be used to calculate the taxes for the given channel. Empty value for `TAX_APP` set as `taxCalculationStrategy` means that Saleor will iterate over all installed tax apps. If multiple tax apps exist with provided tax app id use the `App` with newest `created` date. It's possible to set plugin by using prefix `plugin:` with `PLUGIN_ID` e.g. with Avalara `plugin:mirumee.taxes.avalara`.Will become mandatory in 4.0 for `TAX_APP` `taxCalculationStrategy`.
  
  Added in Saleor 3.19.
  """
  taxAppId: String

  """
  The default strategy to use for tax calculation in the given channel. Taxes can be calculated either using user-defined flat rates or with a tax app. Empty value means that no method is selected and taxes are not calculated.
  """
  taxCalculationStrategy: TaxCalculationStrategy

  """
  List of tax country configurations to create or update (identified by a country code).
  """
  updateCountriesConfiguration: [TaxConfigurationPerCountryInput!]
}

"""
Tax class rates grouped by country.

Added in Saleor 3.9.
"""
type TaxCountryConfiguration {
  """A country for which tax class rates are grouped."""
  country: CountryDisplay!

  """List of tax class rates."""
  taxClassCountryRates: [TaxClassCountryRate!]!
}

"""
Remove all tax class rates for a specific country.

Added in Saleor 3.9. 

Requires one of the following permissions: MANAGE_TAXES.
"""
type TaxCountryConfigurationDelete {
  errors: [TaxCountryConfigurationDeleteError!]!

  """Updated tax class rates grouped by a country."""
  taxCountryConfiguration: TaxCountryConfiguration
}

type TaxCountryConfigurationDeleteError {
  """The error code."""
  code: TaxCountryConfigurationDeleteErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum TaxCountryConfigurationDeleteErrorCode {
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
}

"""
Update tax class rates for a specific country.

Added in Saleor 3.9. 

Requires one of the following permissions: MANAGE_TAXES.
"""
type TaxCountryConfigurationUpdate {
  errors: [TaxCountryConfigurationUpdateError!]!

  """Updated tax class rates grouped by a country."""
  taxCountryConfiguration: TaxCountryConfiguration
}

type TaxCountryConfigurationUpdateError {
  """The error code."""
  code: TaxCountryConfigurationUpdateErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String

  """List of tax class IDs for which the update failed."""
  taxClassIds: [String!]!
}

enum TaxCountryConfigurationUpdateErrorCode {
  CANNOT_CREATE_NEGATIVE_RATE
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  ONLY_ONE_DEFAULT_COUNTRY_RATE_ALLOWED
}

"""
Exempt checkout or order from charging the taxes. When tax exemption is enabled, taxes won't be charged for the checkout or order. Taxes may still be calculated in cases when product prices are entered with the tax included and the net price needs to be known.

Added in Saleor 3.8. 

Requires one of the following permissions: MANAGE_TAXES.
"""
type TaxExemptionManage {
  errors: [TaxExemptionManageError!]!
  taxableObject: TaxSourceObject
}

type TaxExemptionManageError {
  """The error code."""
  code: TaxExemptionManageErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum TaxExemptionManageErrorCode {
  GRAPHQL_ERROR
  INVALID
  NOT_EDITABLE_ORDER
  NOT_FOUND
}

union TaxSourceLine = CheckoutLine | OrderLine

union TaxSourceObject = Checkout | Order

"""Representation of tax types fetched from tax gateway."""
type TaxType {
  """Description of the tax type."""
  description: String

  """External tax code used to identify given tax group."""
  taxCode: String
}

"""Taxable object."""
type TaxableObject {
  """The address data."""
  address: Address
  channel: Channel!

  """The currency of the object."""
  currency: String!

  """List of discounts."""
  discounts: [TaxableObjectDiscount!]!

  """List of lines assigned to the object."""
  lines: [TaxableObjectLine!]!

  """Determines if prices contain entered tax.."""
  pricesEnteredWithTax: Boolean!

  """
  The price of shipping method, includes shipping voucher discount if applied.
  """
  shippingPrice: Money!

  """The source object related to this tax object."""
  sourceObject: TaxSourceObject!
}

"""Taxable object discount."""
type TaxableObjectDiscount {
  """The amount of the discount."""
  amount: Money!

  """The name of the discount."""
  name: String

  """
  Indicates which part of the order the discount should affect: SUBTOTAL or SHIPPING.
  """
  type: TaxableObjectDiscountTypeEnum!
}

"""
Indicates which part of the order the discount should affect: SUBTOTAL or SHIPPING.
"""
enum TaxableObjectDiscountTypeEnum {
  SHIPPING
  SUBTOTAL
}

type TaxableObjectLine {
  """Determines if taxes are being charged for the product."""
  chargeTaxes: Boolean!

  """The product name."""
  productName: String!

  """The product sku."""
  productSku: String

  """Number of items."""
  quantity: Int!

  """The source line related to this tax line."""
  sourceLine: TaxSourceLine!

  """
  Price of the order line. The price includes catalogue promotions, specific product and applied once per order voucher discounts. The price does not include the entire order discount.
  """
  totalPrice: Money!

  """
  Price of the single item in the order line. The price includes catalogue promotions, specific product and applied once per order voucher discounts. The price does not include the entire order discount.
  """
  unitPrice: Money!

  """The variant name."""
  variantName: String!
}

"""
Represents a monetary value with taxes. In cases where taxes were not applied, net and gross values will be equal.
"""
type TaxedMoney {
  """Currency code."""
  currency: String!

  """Amount of money including taxes."""
  gross: Money!

  """Amount of money without taxes."""
  net: Money!

  """Amount of taxes."""
  tax: Money!
}

input TaxedMoneyInput {
  """Gross value of an item."""
  gross: PositiveDecimal!

  """Net value of an item."""
  net: PositiveDecimal!
}

"""Represents a range of monetary values."""
type TaxedMoneyRange {
  """Lower bound of a price range."""
  start: TaxedMoney

  """Upper bound of a price range."""
  stop: TaxedMoney
}

"""
Event sent when thumbnail is created.

Added in Saleor 3.12.
"""
type ThumbnailCreated implements Event {
  """
  Thumbnail id.
  
  Added in Saleor 3.12.
  """
  id: ID

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """
  Original media url.
  
  Added in Saleor 3.12.
  """
  mediaUrl: String

  """
  Object the thumbnail refers to.
  
  Added in Saleor 3.12.
  """
  objectId: ID

  """The application receiving the webhook."""
  recipient: App

  """
  Thumbnail url.
  
  Added in Saleor 3.12.
  """
  url: String

  """Saleor version that triggered the event."""
  version: String
}

enum ThumbnailFormatEnum {
  AVIF
  ORIGINAL
  WEBP
}

type TimePeriod {
  """The length of the period."""
  amount: Int!

  """The type of the period."""
  type: TimePeriodTypeEnum!
}

input TimePeriodInputType {
  """The length of the period."""
  amount: Int!

  """The type of the period."""
  type: TimePeriodTypeEnum!
}

enum TimePeriodTypeEnum {
  DAY
  MONTH
  WEEK
  YEAR
}

"""
Represents possible tokenized payment flows that can be used to process payment.

    The following flows are possible:
    INTERACTIVE - Payment method can be used for 1 click checkout - it's prefilled in
    checkout form (might require additional authentication from user)
"""
enum TokenizedPaymentFlowEnum {
  INTERACTIVE
}

"""An object representing a single payment."""
type Transaction implements Node {
  """Total amount of the transaction."""
  amount: Money

  """Date and time at which transaction was created."""
  created: DateTime!

  """Error associated with transaction, if any."""
  error: String

  """Response returned by payment gateway."""
  gatewayResponse: JSONString!

  """ID of the transaction."""
  id: ID!

  """Determines if the transaction was successful."""
  isSuccess: Boolean!

  """Determines the type of transaction."""
  kind: TransactionKind!

  """Determines the payment associated with a transaction."""
  payment: Payment!

  """Unique token associated with a transaction."""
  token: String!
}

type TransactionAction {
  """Determines the action type."""
  actionType: TransactionActionEnum!

  """Transaction request amount. Null when action type is VOID."""
  amount: PositiveDecimal

  """
  Currency code.
  
  Added in Saleor 3.16.
  """
  currency: String!
}

"""
Represents possible actions on payment transaction.

    The following actions are possible:
    CHARGE - Represents the charge action.
    REFUND - Represents a refund action.
    CANCEL - Represents a cancel action. Added in Saleor 3.12.
"""
enum TransactionActionEnum {
  CANCEL
  CHARGE
  REFUND
}

"""
Event sent when transaction cancelation is requested.

Added in Saleor 3.13.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type TransactionCancelationRequested implements Event {
  """Requested action data."""
  action: TransactionAction!

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Look up a transaction."""
  transaction: TransactionItem

  """Saleor version that triggered the event."""
  version: String
}

"""
Event sent when transaction charge is requested.

Added in Saleor 3.13.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type TransactionChargeRequested implements Event {
  """Requested action data."""
  action: TransactionAction!

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Look up a transaction."""
  transaction: TransactionItem

  """Saleor version that triggered the event."""
  version: String
}

"""
Create transaction for checkout or order.

Added in Saleor 3.4.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: HANDLE_PAYMENTS.
"""
type TransactionCreate {
  errors: [TransactionCreateError!]!
  transaction: TransactionItem
}

type TransactionCreateError {
  """The error code."""
  code: TransactionCreateErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum TransactionCreateErrorCode {
  GRAPHQL_ERROR
  INCORRECT_CURRENCY
  INVALID
  METADATA_KEY_REQUIRED
  NOT_FOUND
  UNIQUE
}

input TransactionCreateInput {
  """Amount authorized by this transaction."""
  amountAuthorized: MoneyInput

  """
  Amount canceled by this transaction.
  
  Added in Saleor 3.13.
  """
  amountCanceled: MoneyInput

  """Amount charged by this transaction."""
  amountCharged: MoneyInput

  """Amount refunded by this transaction."""
  amountRefunded: MoneyInput

  """List of all possible actions for the transaction"""
  availableActions: [TransactionActionEnum!]

  """
  The url that will allow to redirect user to payment provider page with transaction event details.
  
  Added in Saleor 3.13.
  """
  externalUrl: String

  """
  The message of the transaction.
  
  Added in Saleor 3.13.
  """
  message: String

  """Payment public metadata."""
  metadata: [MetadataInput!]

  """
  Payment name of the transaction.
  
  Added in Saleor 3.13.
  """
  name: String

  """Payment private metadata."""
  privateMetadata: [MetadataInput!]

  """
  PSP Reference of the transaction. 
  
  Added in Saleor 3.13.
  """
  pspReference: String
}

"""Represents transaction's event."""
type TransactionEvent implements Node {
  """
  The amount related to this event.
  
  Added in Saleor 3.13.
  """
  amount: Money!

  """Date and time at which a transaction event was created."""
  createdAt: DateTime!

  """
  User or App that created the transaction event.
  
  Added in Saleor 3.13.
  """
  createdBy: UserOrApp

  """
  The url that will allow to redirect user to payment provider page with transaction details.
  
  Added in Saleor 3.13.
  """
  externalUrl: String!

  """The ID of the object."""
  id: ID!

  """
  Idempotency key assigned to the event.
  
  Added in Saleor 3.14.
  """
  idempotencyKey: String

  """
  Message related to the transaction's event.
  
  Added in Saleor 3.13.
  """
  message: String!

  """
  PSP reference of transaction.
  
  Added in Saleor 3.13.
  """
  pspReference: String!

  """
  The type of action related to this event.
  
  Added in Saleor 3.13.
  """
  type: TransactionEventTypeEnum
}

input TransactionEventInput {
  """
  The message related to the event.
  
  Added in Saleor 3.13.
  """
  message: String

  """
  PSP Reference related to this action.
  
  Added in Saleor 3.13.
  """
  pspReference: String
}

"""
Report the event for the transaction.

Added in Saleor 3.13.

Note: this API is currently in Feature Preview and can be subject to changes at later point.

Requires the following permissions: OWNER and HANDLE_PAYMENTS for apps, HANDLE_PAYMENTS for staff users. Staff user cannot update a transaction that is owned by the app.

Triggers the following webhook events:
- TRANSACTION_ITEM_METADATA_UPDATED (async): Optionally called when transaction's metadata was updated.
- CHECKOUT_FULLY_PAID (async): Optionally called when the checkout charge status changed to `FULL` or `OVERCHARGED`.
- ORDER_UPDATED (async): Optionally called when the transaction is related to the order and the order was updated.
"""
type TransactionEventReport {
  """Defines if the reported event hasn't been processed earlier."""
  alreadyProcessed: Boolean
  errors: [TransactionEventReportError!]!

  """The transaction related to the reported event."""
  transaction: TransactionItem

  """
  The event assigned to this report. if `alreadyProcessed` is set to `true`, the previously processed event will be returned.
  """
  transactionEvent: TransactionEvent
}

type TransactionEventReportError {
  """The error code."""
  code: TransactionEventReportErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum TransactionEventReportErrorCode {
  ALREADY_EXISTS
  GRAPHQL_ERROR
  INCORRECT_DETAILS
  INVALID
  NOT_FOUND
  REQUIRED
}

"""
Represents possible event types.

    Added in Saleor 3.12.

    The following types are possible:
    AUTHORIZATION_SUCCESS - represents success authorization.
    AUTHORIZATION_FAILURE - represents failure authorization.
    AUTHORIZATION_ADJUSTMENT - represents authorization adjustment.
    AUTHORIZATION_REQUEST - represents authorization request.
    AUTHORIZATION_ACTION_REQUIRED - represents authorization that needs
    additional actions from the customer.
    CHARGE_ACTION_REQUIRED - represents charge that needs
    additional actions from the customer.
    CHARGE_SUCCESS - represents success charge.
    CHARGE_FAILURE - represents failure charge.
    CHARGE_BACK - represents chargeback.
    CHARGE_REQUEST - represents charge request.
    REFUND_SUCCESS - represents success refund.
    REFUND_FAILURE - represents failure refund.
    REFUND_REVERSE - represents reverse refund.
    REFUND_REQUEST - represents refund request.
    CANCEL_SUCCESS - represents success cancel.
    CANCEL_FAILURE - represents failure cancel.
    CANCEL_REQUEST - represents cancel request.
    INFO - represents info event.
"""
enum TransactionEventTypeEnum {
  AUTHORIZATION_ACTION_REQUIRED
  AUTHORIZATION_ADJUSTMENT
  AUTHORIZATION_FAILURE
  AUTHORIZATION_REQUEST
  AUTHORIZATION_SUCCESS
  CANCEL_FAILURE
  CANCEL_REQUEST
  CANCEL_SUCCESS
  CHARGE_ACTION_REQUIRED
  CHARGE_BACK
  CHARGE_FAILURE
  CHARGE_REQUEST
  CHARGE_SUCCESS
  INFO
  REFUND_FAILURE
  REFUND_REQUEST
  REFUND_REVERSE
  REFUND_SUCCESS
}

"""
Determine the transaction flow strategy.

    AUTHORIZATION - the processed transaction should be only authorized
    CHARGE - the processed transaction should be charged.
"""
enum TransactionFlowStrategyEnum {
  AUTHORIZATION
  CHARGE
}

"""
Initializes a transaction session. It triggers the webhook `TRANSACTION_INITIALIZE_SESSION`, to the requested `paymentGateways`. There is a limit of 100 transaction items per checkout / order.

Added in Saleor 3.13.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type TransactionInitialize {
  """The JSON data required to finalize the payment."""
  data: JSON
  errors: [TransactionInitializeError!]!

  """The initialized transaction."""
  transaction: TransactionItem

  """The event created for the initialized transaction."""
  transactionEvent: TransactionEvent
}

type TransactionInitializeError {
  """The error code."""
  code: TransactionInitializeErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum TransactionInitializeErrorCode {
  CHECKOUT_COMPLETION_IN_PROGRESS
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  UNIQUE
}

"""
Event sent when user starts processing the payment.

Added in Saleor 3.13.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type TransactionInitializeSession implements Event {
  """Action to proceed for the transaction"""
  action: TransactionProcessAction!

  """
  The customer's IP address. If not provided as a parameter in the mutation, Saleor will try to determine the customer's IP address on its own.
  
  Added in Saleor 3.16.
  """
  customerIpAddress: String

  """Payment gateway data in JSON format, received from storefront."""
  data: JSON

  """
  Idempotency key assigned to the transaction initialize.
  
  Added in Saleor 3.14.
  """
  idempotencyKey: String!

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """Merchant reference assigned to this payment."""
  merchantReference: String!

  """The application receiving the webhook."""
  recipient: App

  """Checkout or order"""
  sourceObject: OrderOrCheckout!

  """Look up a transaction."""
  transaction: TransactionItem!

  """Saleor version that triggered the event."""
  version: String
}

"""
Represents a payment transaction.

Added in Saleor 3.4.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type TransactionItem implements Node & ObjectWithMetadata {
  """
  List of actions that can be performed in the current state of a payment.
  """
  actions: [TransactionActionEnum!]!

  """
  Total amount of ongoing authorization requests for the transaction.
  
  Added in Saleor 3.13.
  """
  authorizePendingAmount: Money!

  """Total amount authorized for this payment."""
  authorizedAmount: Money!

  """
  Total amount of ongoing cancel requests for the transaction.
  
  Added in Saleor 3.13.
  """
  cancelPendingAmount: Money!

  """
  Total amount canceled for this payment.
  
  Added in Saleor 3.13.
  """
  canceledAmount: Money!

  """
  Total amount of ongoing charge requests for the transaction.
  
  Added in Saleor 3.13.
  """
  chargePendingAmount: Money!

  """Total amount charged for this payment."""
  chargedAmount: Money!

  """
  The related checkout.
  
  Added in Saleor 3.14.
  """
  checkout: Checkout

  """Date and time at which payment transaction was created."""
  createdAt: DateTime!

  """
  User or App that created the transaction.
  
  Added in Saleor 3.13.
  """
  createdBy: UserOrApp

  """List of all transaction's events."""
  events: [TransactionEvent!]!

  """
  The url that will allow to redirect user to payment provider page with transaction details.
  
  Added in Saleor 3.13.
  """
  externalUrl: String!

  """The ID of the object."""
  id: ID!

  """
  Message related to the transaction.
  
  Added in Saleor 3.13.
  """
  message: String!

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """Date and time at which payment transaction was modified."""
  modifiedAt: DateTime!

  """
  Name of the transaction.
  
  Added in Saleor 3.13.
  """
  name: String!

  """
  The related order.
  
  Added in Saleor 3.6.
  """
  order: Order

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """
  PSP reference of transaction.
  
  Added in Saleor 3.13.
  """
  pspReference: String!

  """
  Total amount of ongoing refund requests for the transaction.
  
  Added in Saleor 3.13.
  """
  refundPendingAmount: Money!

  """Total amount refunded for this payment."""
  refundedAmount: Money!

  """
  The transaction token.
  
  Added in Saleor 3.14.
  """
  token: UUID!
}

"""
Event sent when transaction item metadata is updated.

Added in Saleor 3.8.
"""
type TransactionItemMetadataUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Look up a transaction."""
  transaction: TransactionItem

  """Saleor version that triggered the event."""
  version: String
}

enum TransactionKind {
  ACTION_TO_CONFIRM
  AUTH
  CANCEL
  CAPTURE
  CONFIRM
  EXTERNAL
  PENDING
  REFUND
  REFUND_ONGOING
  VOID
}

"""
Processes a transaction session. It triggers the webhook `TRANSACTION_PROCESS_SESSION`, to the assigned `paymentGateways`. 

Added in Saleor 3.13.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type TransactionProcess {
  """The json data required to finalize the payment."""
  data: JSON
  errors: [TransactionProcessError!]!

  """The processed transaction."""
  transaction: TransactionItem

  """The event created for the processed transaction."""
  transactionEvent: TransactionEvent
}

type TransactionProcessAction {
  actionType: TransactionFlowStrategyEnum!

  """Transaction amount to process."""
  amount: PositiveDecimal!

  """Currency of the amount."""
  currency: String!
}

type TransactionProcessError {
  """The error code."""
  code: TransactionProcessErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum TransactionProcessErrorCode {
  CHECKOUT_COMPLETION_IN_PROGRESS
  GRAPHQL_ERROR
  INVALID
  MISSING_PAYMENT_APP
  MISSING_PAYMENT_APP_RELATION
  NOT_FOUND
  TRANSACTION_ALREADY_PROCESSED
}

"""
Event sent when user has additional payment action to process.

Added in Saleor 3.13.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type TransactionProcessSession implements Event {
  """Action to proceed for the transaction"""
  action: TransactionProcessAction!

  """
  The customer's IP address. If not provided as a parameter in the mutation, Saleor will try to determine the customer's IP address on its own.
  
  Added in Saleor 3.16.
  """
  customerIpAddress: String

  """Payment gateway data in JSON format, received from storefront."""
  data: JSON

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """Merchant reference assigned to this payment."""
  merchantReference: String!

  """The application receiving the webhook."""
  recipient: App

  """Checkout or order"""
  sourceObject: OrderOrCheckout!

  """Look up a transaction."""
  transaction: TransactionItem!

  """Saleor version that triggered the event."""
  version: String
}

"""
Event sent when transaction refund is requested.

Added in Saleor 3.13.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type TransactionRefundRequested implements Event {
  """Requested action data."""
  action: TransactionAction!

  """
  Granted refund related to refund request.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  grantedRefund: OrderGrantedRefund

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Look up a transaction."""
  transaction: TransactionItem

  """Saleor version that triggered the event."""
  version: String
}

"""
Request an action for payment transaction.

Added in Saleor 3.4.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: HANDLE_PAYMENTS.
"""
type TransactionRequestAction {
  errors: [TransactionRequestActionError!]!
  transaction: TransactionItem
}

type TransactionRequestActionError {
  """The error code."""
  code: TransactionRequestActionErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum TransactionRequestActionErrorCode {
  GRAPHQL_ERROR
  INVALID
  MISSING_TRANSACTION_ACTION_REQUEST_WEBHOOK
  NOT_FOUND
}

"""
Request a refund for payment transaction based on granted refund.

Added in Saleor 3.15.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: HANDLE_PAYMENTS.
"""
type TransactionRequestRefundForGrantedRefund {
  errors: [TransactionRequestRefundForGrantedRefundError!]!
  transaction: TransactionItem
}

type TransactionRequestRefundForGrantedRefundError {
  """The error code."""
  code: TransactionRequestRefundForGrantedRefundErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum TransactionRequestRefundForGrantedRefundErrorCode {
  AMOUNT_GREATER_THAN_AVAILABLE
  GRAPHQL_ERROR
  INVALID
  MISSING_TRANSACTION_ACTION_REQUEST_WEBHOOK
  NOT_FOUND
  REFUND_ALREADY_PROCESSED
  REFUND_IS_PENDING
}

"""
Update transaction.

Added in Saleor 3.4.

Note: this API is currently in Feature Preview and can be subject to changes at later point.

Requires the following permissions: OWNER and HANDLE_PAYMENTS for apps, HANDLE_PAYMENTS for staff users. Staff user cannot update a transaction that is owned by the app.
"""
type TransactionUpdate {
  errors: [TransactionUpdateError!]!
  transaction: TransactionItem
}

type TransactionUpdateError {
  """The error code."""
  code: TransactionUpdateErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum TransactionUpdateErrorCode {
  GRAPHQL_ERROR
  INCORRECT_CURRENCY
  INVALID
  METADATA_KEY_REQUIRED
  NOT_FOUND
  UNIQUE
}

input TransactionUpdateInput {
  """Amount authorized by this transaction."""
  amountAuthorized: MoneyInput

  """
  Amount canceled by this transaction.
  
  Added in Saleor 3.13.
  """
  amountCanceled: MoneyInput

  """Amount charged by this transaction."""
  amountCharged: MoneyInput

  """Amount refunded by this transaction."""
  amountRefunded: MoneyInput

  """List of all possible actions for the transaction"""
  availableActions: [TransactionActionEnum!]

  """
  The url that will allow to redirect user to payment provider page with transaction event details.
  
  Added in Saleor 3.13.
  """
  externalUrl: String

  """
  The message of the transaction.
  
  Added in Saleor 3.13.
  """
  message: String

  """Payment public metadata."""
  metadata: [MetadataInput!]

  """
  Payment name of the transaction.
  
  Added in Saleor 3.13.
  """
  name: String

  """Payment private metadata."""
  privateMetadata: [MetadataInput!]

  """
  PSP Reference of the transaction. 
  
  Added in Saleor 3.13.
  """
  pspReference: String
}

union TranslatableItem = AttributeTranslatableContent | AttributeValueTranslatableContent | CategoryTranslatableContent | CollectionTranslatableContent | MenuItemTranslatableContent | PageTranslatableContent | ProductTranslatableContent | ProductVariantTranslatableContent | PromotionRuleTranslatableContent | PromotionTranslatableContent | SaleTranslatableContent | ShippingMethodTranslatableContent | VoucherTranslatableContent

type TranslatableItemConnection {
  edges: [TranslatableItemEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type TranslatableItemEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: TranslatableItem!
}

enum TranslatableKinds {
  ATTRIBUTE
  ATTRIBUTE_VALUE
  CATEGORY
  COLLECTION
  MENU_ITEM
  PAGE
  PRODUCT
  PROMOTION
  PROMOTION_RULE
  SALE
  SHIPPING_METHOD
  VARIANT
  VOUCHER
}

"""
Event sent when new translation is created.

Added in Saleor 3.2.
"""
type TranslationCreated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The translation the event relates to."""
  translation: TranslationTypes

  """Saleor version that triggered the event."""
  version: String
}

type TranslationError {
  """The error code."""
  code: TranslationErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum TranslationErrorCode {
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  REQUIRED
}

input TranslationInput {
  """
  Translated description.
  
  Rich text format. For reference see https://editorjs.io/
  """
  description: JSONString
  name: String
  seoDescription: String
  seoTitle: String
}

union TranslationTypes = AttributeTranslation | AttributeValueTranslation | CategoryTranslation | CollectionTranslation | MenuItemTranslation | PageTranslation | ProductTranslation | ProductVariantTranslation | PromotionRuleTranslation | PromotionTranslation | SaleTranslation | ShippingMethodTranslation | VoucherTranslation

"""
Event sent when translation is updated.

Added in Saleor 3.2.
"""
type TranslationUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """The translation the event relates to."""
  translation: TranslationTypes

  """Saleor version that triggered the event."""
  version: String
}

scalar UUID

input UpdateInvoiceInput {
  """
  Fields required to update the invoice metadata.
  
  Added in Saleor 3.14.
  """
  metadata: [MetadataInput!]

  """Invoice number"""
  number: String

  """
  Fields required to update the invoice private metadata.
  
  Added in Saleor 3.14.
  """
  privateMetadata: [MetadataInput!]

  """URL of an invoice to download."""
  url: String
}

"""
Updates metadata of an object. To use it, you need to have access to the modified object.
"""
type UpdateMetadata {
  errors: [MetadataError!]!
  item: ObjectWithMetadata
  metadataErrors: [MetadataError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Updates private metadata of an object. To use it, you need to be an authenticated staff user or an app and have access to the modified object.
"""
type UpdatePrivateMetadata {
  errors: [MetadataError!]!
  item: ObjectWithMetadata
  metadataErrors: [MetadataError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Variables of this type must be set to null in mutations. They will be replaced with a filename from a following multipart part containing a binary file. See: https://github.com/jaydenseric/graphql-multipart-request-spec.
"""
scalar Upload

type UploadError {
  """The error code."""
  code: UploadErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum UploadErrorCode {
  GRAPHQL_ERROR
}

"""Represents user data."""
type User implements Node & ObjectWithMetadata {
  """
  List of channels the user has access to. The sum of channels from all user groups. If at least one group has `restrictedAccessToChannels` set to False - all channels are returned.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  accessibleChannels: [Channel!]

  """List of all user's addresses."""
  addresses: [Address!]!

  """The avatar of the user."""
  avatar(
    """
    The format of the image. When not provided, format of the original image will be used.
    
    Added in Saleor 3.6.
    """
    format: ThumbnailFormatEnum = ORIGINAL

    """
    Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended).
    """
    size: Int
  ): Image

  """Returns the last open checkout of this user."""
  checkout: Checkout @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `checkoutTokens` field to fetch the user checkouts.")

  """Returns the checkout ID's assigned to this user."""
  checkoutIds(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): [ID!]

  """Returns the checkout UUID's assigned to this user."""
  checkoutTokens(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): [UUID!] @deprecated(reason: "This field will be removed in Saleor 4.0. Use `checkoutIds` instead.")

  """
  Returns checkouts assigned to this user.
  
  Added in Saleor 3.8.
  """
  checkouts(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Slug of a channel for which the data should be returned."""
    channel: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): CheckoutCountableConnection

  """The data when the user create account."""
  dateJoined: DateTime!

  """The default billing address of the user."""
  defaultBillingAddress: Address

  """The default shipping address of the user."""
  defaultShippingAddress: Address

  """List of user's permission groups which user can manage."""
  editableGroups: [Group!]

  """The email address of the user."""
  email: String!

  """
  List of events associated with the user.
  
  Requires one of the following permissions: MANAGE_USERS, MANAGE_STAFF.
  """
  events: [CustomerEvent!]

  """
  External ID of this user. 
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """The given name of the address."""
  firstName: String!

  """List of the user gift cards."""
  giftCards(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): GiftCardCountableConnection

  """The ID of the user."""
  id: ID!

  """Determine if the user is active."""
  isActive: Boolean!

  """
  Determines if user has confirmed email.
  
  Added in Saleor 3.15.
  """
  isConfirmed: Boolean!

  """Determine if the user is a staff admin."""
  isStaff: Boolean!

  """User language code."""
  languageCode: LanguageCodeEnum!

  """The date when the user last time log in to the system."""
  lastLogin: DateTime

  """The family name of the address."""
  lastName: String!

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """
  A note about the customer.
  
  Requires one of the following permissions: MANAGE_USERS, MANAGE_STAFF.
  """
  note: String

  """
  List of user's orders. Requires one of the following permissions: MANAGE_STAFF, OWNER.
  """
  orders(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): OrderCountableConnection

  """List of user's permission groups."""
  permissionGroups: [Group!]

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """
  Determine if user have restricted access to channels. False if at least one user group has `restrictedAccessToChannels` set to False.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  restrictedAccessToChannels: Boolean!

  """
  Returns a list of user's stored payment methods that can be used in provided channel. The field returns a list of stored payment methods by payment apps. When `amount` is not provided, 0 will be used as default value.
  
  Added in Saleor 3.15.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  storedPaymentMethods(
    """Slug of a channel for which the data should be returned."""
    channel: String!
  ): [StoredPaymentMethod!]

  """
  List of stored payment sources. The field returns a list of payment sources stored for payment plugins.
  """
  storedPaymentSources(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): [PaymentSource!]

  """The data when the user last update the account information."""
  updatedAt: DateTime!

  """List of user's permissions."""
  userPermissions: [UserPermission!]
}

"""
Deletes a user avatar. Only for staff members. 

Requires one of the following permissions: AUTHENTICATED_STAFF_USER.
"""
type UserAvatarDelete {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AccountError!]!

  """An updated user instance."""
  user: User
}

"""
Create a user avatar. Only for staff members. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec 

Requires one of the following permissions: AUTHENTICATED_STAFF_USER.
"""
type UserAvatarUpdate {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AccountError!]!

  """An updated user instance."""
  user: User
}

"""
Activate or deactivate users. 

Requires one of the following permissions: MANAGE_USERS.
"""
type UserBulkSetActive {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")

  """Returns how many objects were affected."""
  count: Int!
  errors: [AccountError!]!
}

type UserCountableConnection {
  edges: [UserCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type UserCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: User!
}

input UserCreateInput {
  """
  Slug of a channel which will be used for notify user. Optional when only one channel exists.
  """
  channel: String

  """Billing address of the customer."""
  defaultBillingAddress: AddressInput

  """Shipping address of the customer."""
  defaultShippingAddress: AddressInput

  """The unique email address of the user."""
  email: String

  """
  External ID of the customer.
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """Given name."""
  firstName: String

  """User account is active."""
  isActive: Boolean

  """
  User account is confirmed.
  
  Added in Saleor 3.15.
  
  DEPRECATED: this field will be removed in Saleor 4.0.
  
  The user will be always set as unconfirmed. The confirmation will take place when the user sets the password.
  """
  isConfirmed: Boolean

  """User language code."""
  languageCode: LanguageCodeEnum

  """Family name."""
  lastName: String

  """
  Fields required to update the user metadata.
  
  Added in Saleor 3.14.
  """
  metadata: [MetadataInput!]

  """A note about the user."""
  note: String

  """
  Fields required to update the user private metadata.
  
  Added in Saleor 3.14.
  """
  privateMetadata: [MetadataInput!]

  """
  URL of a view where users should be redirected to set the password. URL in RFC 1808 format.
  """
  redirectUrl: String
}

union UserOrApp = App | User

"""Represents user's permissions."""
type UserPermission {
  """Internal code for permission."""
  code: PermissionEnum!

  """Describe action(s) allowed to do by permission."""
  name: String!

  """List of user permission groups which contains this permission."""
  sourcePermissionGroups(
    """ID of user whose groups should be returned."""
    userId: ID!
  ): [Group!]
}

enum UserSortField {
  """Sort users by created at."""
  CREATED_AT

  """Sort users by email."""
  EMAIL

  """Sort users by first name."""
  FIRST_NAME

  """Sort users by last modified at."""
  LAST_MODIFIED_AT

  """Sort users by last name."""
  LAST_NAME

  """Sort users by order count."""
  ORDER_COUNT
}

input UserSortingInput {
  """Specifies the direction in which to sort users."""
  direction: OrderDirection!

  """Sort users by the selected field."""
  field: UserSortField!
}

"""Represents a VAT rate for a country."""
type VAT {
  """Country code."""
  countryCode: String!

  """Country's VAT rate exceptions for specific types of goods."""
  reducedRates: [ReducedRate!]!

  """Standard VAT rate in percent."""
  standardRate: Float
}

enum VariantAttributeScope {
  ALL
  NOT_VARIANT_SELECTION
  VARIANT_SELECTION
}

"""
Assign an media to a product variant. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type VariantMediaAssign {
  errors: [ProductError!]!
  media: ProductMedia
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  productVariant: ProductVariant
}

"""
Unassign an media from a product variant. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type VariantMediaUnassign {
  errors: [ProductError!]!
  media: ProductMedia
  productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  productVariant: ProductVariant
}

"""Represents availability of a variant in the storefront."""
type VariantPricingInfo {
  """The discount amount if in sale (null otherwise)."""
  discount: TaxedMoney

  """The discount amount in the local currency."""
  discountLocalCurrency: TaxedMoney @deprecated(reason: "This field will be removed in Saleor 4.0. Always returns `null`.")

  """Whether it is in sale or not."""
  onSale: Boolean

  """The price, with any discount subtracted."""
  price: TaxedMoney

  """The discounted price in the local currency."""
  priceLocalCurrency: TaxedMoney @deprecated(reason: "This field will be removed in Saleor 4.0. Always returns `null`.")

  """The price without any discount."""
  priceUndiscounted: TaxedMoney
}

"""Verify JWT token."""
type VerifyToken {
  accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [AccountError!]!

  """Determine if token is valid or not."""
  isValid: Boolean!

  """JWT payload."""
  payload: GenericScalar

  """User assigned to token."""
  user: User
}

enum VolumeUnitsEnum {
  ACRE_FT
  ACRE_IN
  CUBIC_CENTIMETER
  CUBIC_DECIMETER
  CUBIC_FOOT
  CUBIC_INCH
  CUBIC_METER
  CUBIC_MILLIMETER
  CUBIC_YARD
  FL_OZ
  LITER
  PINT
  QT
}

"""
Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes.
"""
type Voucher implements Node & ObjectWithMetadata {
  """
  Determine if the voucher usage should be limited to one use per customer.
  """
  applyOncePerCustomer: Boolean!

  """
  Determine if the voucher should be applied once per order. If set to True, the voucher is applied to a single cheapest eligible product in checkout.
  """
  applyOncePerOrder: Boolean!

  """List of categories this voucher applies to."""
  categories(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): CategoryCountableConnection

  """
  List of availability in channels for the voucher.
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  """
  channelListings: [VoucherChannelListing!]

  """The code of the voucher.This field will be removed in Saleor 4.0."""
  code: String

  """
  List of codes available for this voucher.
  
  Added in Saleor 3.18.
  """
  codes(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): VoucherCodeCountableConnection

  """
  List of collections this voucher applies to.
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  """
  collections(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): CollectionCountableConnection

  """List of countries available for the shipping voucher."""
  countries: [CountryDisplay!]

  """Currency code for voucher."""
  currency: String

  """Voucher value."""
  discountValue: Float

  """Determines a type of discount for voucher - value or percentage"""
  discountValueType: DiscountValueTypeEnum!

  """The end date and time of voucher."""
  endDate: DateTime

  """The ID of the voucher."""
  id: ID!

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """Determine minimum quantity of items for checkout."""
  minCheckoutItemsQuantity: Int

  """Minimum order value to apply voucher."""
  minSpent: Money

  """The name of the voucher."""
  name: String

  """Determine if the voucher is available only for staff members."""
  onlyForStaff: Boolean!

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """
  List of products this voucher applies to.
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  """
  products(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): ProductCountableConnection

  """
  Determine if the voucher codes can be used once or multiple times.
  
  Added in Saleor 3.18.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  singleUse: Boolean!

  """The start date and time of voucher."""
  startDate: DateTime!

  """Returns translated voucher fields for the given language code."""
  translation(
    """A language code to return the translation for voucher."""
    languageCode: LanguageCodeEnum!
  ): VoucherTranslation

  """Determines a type of voucher."""
  type: VoucherTypeEnum!

  """The number of times a voucher can be used."""
  usageLimit: Int

  """Usage count of the voucher."""
  used: Int!

  """
  List of product variants this voucher applies to.
  
  Added in Saleor 3.1.
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  """
  variants(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): ProductVariantCountableConnection
}

"""
Adds products, categories, collections to a voucher. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- VOUCHER_UPDATED (async): A voucher was updated.
"""
type VoucherAddCatalogues {
  discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [DiscountError!]!

  """Voucher of which catalogue IDs will be modified."""
  voucher: Voucher
}

"""
Deletes vouchers. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- VOUCHER_DELETED (async): A voucher was deleted.
"""
type VoucherBulkDelete {
  """Returns how many objects were affected."""
  count: Int!
  discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [DiscountError!]!
}

"""Represents voucher channel listing."""
type VoucherChannelListing implements Node {
  """The channel in which voucher can be applied."""
  channel: Channel!

  """Currency code for voucher in a channel."""
  currency: String!

  """The value of the discount on voucher in a channel."""
  discountValue: Float!

  """The ID of channel listing."""
  id: ID!

  """Minimum order value for voucher to apply in channel."""
  minSpent: Money
}

input VoucherChannelListingAddInput {
  """ID of a channel."""
  channelId: ID!

  """Value of the voucher."""
  discountValue: PositiveDecimal

  """Min purchase amount required to apply the voucher."""
  minAmountSpent: PositiveDecimal
}

input VoucherChannelListingInput {
  """List of channels to which the voucher should be assigned."""
  addChannels: [VoucherChannelListingAddInput!]

  """List of channels from which the voucher should be unassigned."""
  removeChannels: [ID!]
}

"""
Manage voucher's availability in channels. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- VOUCHER_UPDATED (async): A voucher was updated.
"""
type VoucherChannelListingUpdate {
  discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [DiscountError!]!

  """An updated voucher instance."""
  voucher: Voucher
}

"""
Represents voucher code.

Added in Saleor 3.18.

Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type VoucherCode {
  """Code to use the voucher."""
  code: String

  """Date time of code creation."""
  createdAt: DateTime!

  """The ID of the voucher code."""
  id: ID!

  """Whether a code is active or not."""
  isActive: Boolean

  """Number of times a code has been used."""
  used: Int
}

"""
Deletes voucher codes.

Added in Saleor 3.18. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- VOUCHER_CODES_DELETED (async): A voucher codes were deleted.
"""
type VoucherCodeBulkDelete {
  """Returns how many codes were deleted."""
  count: Int!
  errors: [VoucherCodeBulkDeleteError!]!
}

type VoucherCodeBulkDeleteError {
  """The error code."""
  code: VoucherCodeBulkDeleteErrorCode!

  """The error message."""
  message: String

  """
  Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  path: String

  """List of voucher codes which causes the error."""
  voucherCodes: [ID!]
}

enum VoucherCodeBulkDeleteErrorCode {
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
}

type VoucherCodeCountableConnection {
  edges: [VoucherCodeCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type VoucherCodeCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: VoucherCode!
}

"""
Event sent when voucher code export is completed.

Added in Saleor 3.18.
"""
type VoucherCodeExportCompleted implements Event {
  """The export file for voucher codes."""
  export: ExportFile

  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String
}

"""
Event sent when new voucher codes were created.

Added in Saleor 3.19.
"""
type VoucherCodesCreated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String

  """The voucher codes the event relates to."""
  voucherCodes: [VoucherCode!]
}

"""
Event sent when voucher codes were deleted.

Added in Saleor 3.19.
"""
type VoucherCodesDeleted implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String

  """The voucher codes the event relates to."""
  voucherCodes: [VoucherCode!]
}

type VoucherCountableConnection {
  edges: [VoucherCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type VoucherCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: Voucher!
}

"""
Creates a new voucher. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- VOUCHER_CREATED (async): A voucher was created.
- VOUCHER_CODES_CREATED (async): A voucher codes were created.
"""
type VoucherCreate {
  discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [DiscountError!]!
  voucher: Voucher
}

"""
Event sent when new voucher is created.

Added in Saleor 3.4.
"""
type VoucherCreated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String

  """The voucher the event relates to."""
  voucher(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): Voucher
}

"""
Deletes a voucher. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- VOUCHER_DELETED (async): A voucher was deleted.
"""
type VoucherDelete {
  discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [DiscountError!]!
  voucher: Voucher
}

"""
Event sent when voucher is deleted.

Added in Saleor 3.4.
"""
type VoucherDeleted implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String

  """The voucher the event relates to."""
  voucher(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): Voucher
}

enum VoucherDiscountType {
  FIXED
  PERCENTAGE
  SHIPPING
}

input VoucherFilterInput {
  discountType: [VoucherDiscountType!]
  ids: [ID!]
  metadata: [MetadataFilter!]
  search: String
  started: DateTimeRangeInput
  status: [DiscountStatusEnum!]
  timesUsed: IntRangeInput
}

input VoucherInput {
  """
  List of codes to add.
  
  Added in Saleor 3.18.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  addCodes: [String!]

  """Voucher should be applied once per customer."""
  applyOncePerCustomer: Boolean

  """Voucher should be applied to the cheapest item or entire order."""
  applyOncePerOrder: Boolean

  """Categories discounted by the voucher."""
  categories: [ID!]

  """
  Code to use the voucher. This field will be removed in Saleor 4.0. Use `addCodes` instead.
  """
  code: String

  """Collections discounted by the voucher."""
  collections: [ID!]

  """Country codes that can be used with the shipping voucher."""
  countries: [String!]

  """Choices: fixed or percentage."""
  discountValueType: DiscountValueTypeEnum

  """End date of the voucher in ISO 8601 format."""
  endDate: DateTime

  """Minimal quantity of checkout items required to apply the voucher."""
  minCheckoutItemsQuantity: Int

  """Voucher name."""
  name: String

  """Voucher can be used only by staff user."""
  onlyForStaff: Boolean

  """Products discounted by the voucher."""
  products: [ID!]

  """
  When set to 'True', each voucher code can be used only once; otherwise, codes can be used multiple times depending on `usageLimit`.
  
  The option can only be changed if none of the voucher codes have been used.
  
  Added in Saleor 3.18.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  singleUse: Boolean

  """Start date of the voucher in ISO 8601 format."""
  startDate: DateTime

  """Voucher type: PRODUCT, CATEGORY SHIPPING or ENTIRE_ORDER."""
  type: VoucherTypeEnum

  """Limit number of times this voucher can be used in total."""
  usageLimit: Int

  """
  Variants discounted by the voucher.
  
  Added in Saleor 3.1.
  """
  variants: [ID!]
}

"""
Event sent when voucher metadata is updated.

Added in Saleor 3.8.
"""
type VoucherMetadataUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String

  """The voucher the event relates to."""
  voucher(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): Voucher
}

"""
Removes products, categories, collections from a voucher. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- VOUCHER_UPDATED (async): A voucher was updated.
"""
type VoucherRemoveCatalogues {
  discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [DiscountError!]!

  """Voucher of which catalogue IDs will be modified."""
  voucher: Voucher
}

enum VoucherSortField {
  """
  Sort vouchers by code.
  
  DEPRECATED: this field will be removed in Saleor 4.0.
  """
  CODE

  """Sort vouchers by end date."""
  END_DATE

  """
  Sort vouchers by minimum spent amount.
  
  This option requires a channel filter to work as the values can vary between channels.
  """
  MINIMUM_SPENT_AMOUNT

  """
  Sort vouchers by name.
  
  Added in Saleor 3.18.
  """
  NAME

  """Sort vouchers by start date."""
  START_DATE

  """Sort vouchers by type."""
  TYPE

  """Sort vouchers by usage limit."""
  USAGE_LIMIT

  """
  Sort vouchers by value.
  
  This option requires a channel filter to work as the values can vary between channels.
  """
  VALUE
}

input VoucherSortingInput {
  """
  Specifies the channel in which to sort the data.
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead.
  """
  channel: String

  """Specifies the direction in which to sort vouchers."""
  direction: OrderDirection!

  """Sort vouchers by the selected field."""
  field: VoucherSortField!
}

"""
Represents voucher's original translatable fields and related translations.
"""
type VoucherTranslatableContent implements Node {
  """The ID of the voucher translatable content."""
  id: ID!

  """Voucher name to translate."""
  name: String

  """Returns translated voucher fields for the given language code."""
  translation(
    """A language code to return the translation for voucher."""
    languageCode: LanguageCodeEnum!
  ): VoucherTranslation

  """
  Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes.
  
  Requires one of the following permissions: MANAGE_DISCOUNTS.
  """
  voucher: Voucher @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.")

  """
  The ID of the voucher to translate.
  
  Added in Saleor 3.14.
  """
  voucherId: ID!
}

"""
Creates/updates translations for a voucher. 

Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
type VoucherTranslate {
  errors: [TranslationError!]!
  translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  voucher: Voucher
}

"""Represents voucher translations."""
type VoucherTranslation implements Node {
  """The ID of the voucher translation."""
  id: ID!

  """Translation language."""
  language: LanguageDisplay!

  """Translated voucher name."""
  name: String

  """
  Represents the voucher fields to translate.
  
  Added in Saleor 3.14.
  """
  translatableContent: VoucherTranslatableContent
}

enum VoucherTypeEnum {
  ENTIRE_ORDER
  SHIPPING
  SPECIFIC_PRODUCT
}

"""
Updates a voucher. 

Requires one of the following permissions: MANAGE_DISCOUNTS.

Triggers the following webhook events:
- VOUCHER_UPDATED (async): A voucher was updated.
- VOUCHER_CODES_CREATED (async): A voucher code was created.
"""
type VoucherUpdate {
  discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
  errors: [DiscountError!]!
  voucher: Voucher
}

"""
Event sent when voucher is updated.

Added in Saleor 3.4.
"""
type VoucherUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String

  """The voucher the event relates to."""
  voucher(
    """Slug of a channel for which the data should be returned."""
    channel: String
  ): Voucher
}

"""Represents warehouse."""
type Warehouse implements Node & ObjectWithMetadata {
  """Address of the warehouse."""
  address: Address!

  """
  Click and collect options: local, all or disabled.
  
  Added in Saleor 3.1.
  """
  clickAndCollectOption: WarehouseClickAndCollectOptionEnum!

  """Warehouse company name."""
  companyName: String! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `Address.companyName` instead.")

  """Warehouse email."""
  email: String!

  """
  External ID of this warehouse. 
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """The ID of the warehouse."""
  id: ID!

  """Determine if the warehouse is private."""
  isPrivate: Boolean!

  """List of public metadata items. Can be accessed without permissions."""
  metadata: [MetadataItem!]!

  """
  A single key from public metadata.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  metafield(key: String!): String

  """
  Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  metafields(keys: [String!]): Metadata

  """Warehouse name."""
  name: String!

  """List of private metadata items. Requires staff permissions to access."""
  privateMetadata: [MetadataItem!]!

  """
  A single key from private metadata. Requires staff permissions to access.
  
  Tip: Use GraphQL aliases to fetch multiple keys.
  
  Added in Saleor 3.3.
  """
  privateMetafield(key: String!): String

  """
  Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
  
  Added in Saleor 3.3.
  """
  privateMetafields(keys: [String!]): Metadata

  """Shipping zones supported by the warehouse."""
  shippingZones(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): ShippingZoneCountableConnection!

  """Warehouse slug."""
  slug: String!

  """
  Stocks that belong to this warehouse.
  
  Added in Saleor 3.20.
  
  Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS.
  """
  stocks(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int
  ): StockCountableConnection
}

enum WarehouseClickAndCollectOptionEnum {
  ALL
  DISABLED
  LOCAL
}

type WarehouseCountableConnection {
  edges: [WarehouseCountableEdge!]!

  """Pagination data for this connection."""
  pageInfo: PageInfo!

  """A total count of items in the collection."""
  totalCount: Int
}

type WarehouseCountableEdge {
  """A cursor for use in pagination."""
  cursor: String!

  """The item at the end of the edge."""
  node: Warehouse!
}

"""
Creates new warehouse. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type WarehouseCreate {
  errors: [WarehouseError!]!
  warehouse: Warehouse
  warehouseErrors: [WarehouseError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input WarehouseCreateInput {
  """Address of the warehouse."""
  address: AddressInput!

  """The email address of the warehouse."""
  email: String

  """
  External ID of the warehouse.
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """Warehouse name."""
  name: String!

  """
  Shipping zones supported by the warehouse.
  
  DEPRECATED: this field will be removed in Saleor 4.0. Providing the zone ids will raise a ValidationError.
  """
  shippingZones: [ID!]

  """Warehouse slug."""
  slug: String
}

"""
Event sent when new warehouse is created.

Added in Saleor 3.4.
"""
type WarehouseCreated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String

  """The warehouse the event relates to."""
  warehouse: Warehouse
}

"""
Deletes selected warehouse. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type WarehouseDelete {
  errors: [WarehouseError!]!
  warehouse: Warehouse
  warehouseErrors: [WarehouseError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Event sent when warehouse is deleted.

Added in Saleor 3.4.
"""
type WarehouseDeleted implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String

  """The warehouse the event relates to."""
  warehouse: Warehouse
}

type WarehouseError {
  """The error code."""
  code: WarehouseErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String

  """List of shipping zones IDs which causes the error."""
  shippingZones: [ID!]
}

enum WarehouseErrorCode {
  ALREADY_EXISTS
  GRAPHQL_ERROR
  INVALID
  NOT_FOUND
  REQUIRED
  UNIQUE
}

input WarehouseFilterInput {
  channels: [ID!]
  clickAndCollectOption: WarehouseClickAndCollectOptionEnum
  ids: [ID!]
  isPrivate: Boolean
  metadata: [MetadataFilter!]
  search: String
  slugs: [String!]
}

"""
Event sent when warehouse metadata is updated.

Added in Saleor 3.8.
"""
type WarehouseMetadataUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String

  """The warehouse the event relates to."""
  warehouse: Warehouse
}

"""
Add shipping zone to given warehouse. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type WarehouseShippingZoneAssign {
  errors: [WarehouseError!]!
  warehouse: Warehouse
  warehouseErrors: [WarehouseError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Remove shipping zone from given warehouse. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type WarehouseShippingZoneUnassign {
  errors: [WarehouseError!]!
  warehouse: Warehouse
  warehouseErrors: [WarehouseError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

enum WarehouseSortField {
  """Sort warehouses by name."""
  NAME
}

input WarehouseSortingInput {
  """Specifies the direction in which to sort warehouses."""
  direction: OrderDirection!

  """Sort warehouses by the selected field."""
  field: WarehouseSortField!
}

"""
Updates given warehouse. 

Requires one of the following permissions: MANAGE_PRODUCTS.
"""
type WarehouseUpdate {
  errors: [WarehouseError!]!
  warehouse: Warehouse
  warehouseErrors: [WarehouseError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input WarehouseUpdateInput {
  """Address of the warehouse."""
  address: AddressInput

  """
  Click and collect options: local, all or disabled.
  
  Added in Saleor 3.1.
  """
  clickAndCollectOption: WarehouseClickAndCollectOptionEnum

  """The email address of the warehouse."""
  email: String

  """
  External ID of the warehouse.
  
  Added in Saleor 3.10.
  """
  externalReference: String

  """
  Visibility of warehouse stocks.
  
  Added in Saleor 3.1.
  """
  isPrivate: Boolean

  """Warehouse name."""
  name: String

  """Warehouse slug."""
  slug: String
}

"""
Event sent when warehouse is updated.

Added in Saleor 3.4.
"""
type WarehouseUpdated implements Event {
  """Time of the event."""
  issuedAt: DateTime

  """The user or application that triggered the event."""
  issuingPrincipal: IssuingPrincipal

  """The application receiving the webhook."""
  recipient: App

  """Saleor version that triggered the event."""
  version: String

  """The warehouse the event relates to."""
  warehouse: Warehouse
}

"""Webhook."""
type Webhook implements Node {
  """The app associated with Webhook."""
  app: App!

  """List of asynchronous webhook events."""
  asyncEvents: [WebhookEventAsync!]!

  """
  Custom headers, which will be added to HTTP request.
  
  Added in Saleor 3.12.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  customHeaders: JSONString

  """Event deliveries."""
  eventDeliveries(
    """Return the elements in the list that come after the specified cursor."""
    after: String

    """Return the elements in the list that come before the specified cursor."""
    before: String

    """Event delivery filter options."""
    filter: EventDeliveryFilterInput

    """
    Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    first: Int

    """
    Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
    """
    last: Int

    """Event delivery sorter."""
    sortBy: EventDeliverySortingInput
  ): EventDeliveryCountableConnection

  """List of webhook events."""
  events: [WebhookEvent!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `asyncEvents` or `syncEvents` instead.")

  """The ID of webhook."""
  id: ID!

  """Informs if webhook is activated."""
  isActive: Boolean!

  """The name of webhook."""
  name: String

  """Used to create a hash signature for each payload."""
  secretKey: String @deprecated(reason: "This field will be removed in Saleor 4.0. As of Saleor 3.5, webhook payloads default to signing using a verifiable JWS.")

  """Used to define payloads for specific events."""
  subscriptionQuery: String

  """List of synchronous webhook events."""
  syncEvents: [WebhookEventSync!]!

  """Target URL for webhook."""
  targetUrl: String!
}

"""
Creates a new webhook subscription. 

Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP.
"""
type WebhookCreate {
  errors: [WebhookError!]!
  webhook: Webhook
  webhookErrors: [WebhookError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input WebhookCreateInput {
  """ID of the app to which webhook belongs."""
  app: ID

  """The asynchronous events that webhook wants to subscribe."""
  asyncEvents: [WebhookEventTypeAsyncEnum!]

  """
  Custom headers, which will be added to HTTP request. There is a limitation of 5 headers per webhook and 998 characters per header.Only `X-*`, `Authorization*`, and `BrokerProperties` keys are allowed.
  
  Added in Saleor 3.12.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  customHeaders: JSONString

  """
  The events that webhook wants to subscribe. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use `asyncEvents` or `syncEvents` instead.
  """
  events: [WebhookEventTypeEnum!]

  """Determine if webhook will be set active or not."""
  isActive: Boolean

  """The name of the webhook."""
  name: String

  """
  Subscription query used to define a webhook payload.
  
  Added in Saleor 3.2.
  """
  query: String

  """
  The secret key used to create a hash signature with each payload.
  
  DEPRECATED: this field will be removed in Saleor 4.0. As of Saleor 3.5, webhook payloads default to signing using a verifiable JWS.
  """
  secretKey: String

  """The synchronous events that webhook wants to subscribe."""
  syncEvents: [WebhookEventTypeSyncEnum!]

  """The url to receive the payload."""
  targetUrl: String
}

"""
Delete a webhook. Before the deletion, the webhook is deactivated to pause any deliveries that are already scheduled. The deletion might fail if delivery is in progress. In such a case, the webhook is not deleted but remains deactivated. 

Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP.
"""
type WebhookDelete {
  errors: [WebhookError!]!
  webhook: Webhook
  webhookErrors: [WebhookError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

"""
Performs a dry run of a webhook event. Supports a single event (the first, if multiple provided in the `query`). Requires permission relevant to processed event.

Added in Saleor 3.11.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: AUTHENTICATED_STAFF_USER.
"""
type WebhookDryRun {
  errors: [WebhookDryRunError!]!

  """JSON payload, that would be sent out to webhook's target URL."""
  payload: JSONString
}

type WebhookDryRunError {
  """The error code."""
  code: WebhookDryRunErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum WebhookDryRunErrorCode {
  GRAPHQL_ERROR
  INVALID_ID
  MISSING_EVENT
  MISSING_PERMISSION
  MISSING_SUBSCRIPTION
  NOT_FOUND
  SYNTAX
  TYPE_NOT_SUPPORTED
  UNABLE_TO_PARSE
}

type WebhookError {
  """The error code."""
  code: WebhookErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum WebhookErrorCode {
  DELETE_FAILED
  GRAPHQL_ERROR
  INVALID
  INVALID_CUSTOM_HEADERS
  INVALID_NOTIFY_WITH_SUBSCRIPTION
  MISSING_EVENT
  MISSING_SUBSCRIPTION
  NOT_FOUND
  REQUIRED
  SYNTAX
  UNABLE_TO_PARSE
  UNIQUE
}

"""Webhook event."""
type WebhookEvent {
  """Internal name of the event type."""
  eventType: WebhookEventTypeEnum!

  """Display name of the event."""
  name: String!
}

"""Asynchronous webhook event."""
type WebhookEventAsync {
  """Internal name of the event type."""
  eventType: WebhookEventTypeAsyncEnum!

  """Display name of the event."""
  name: String!
}

"""Synchronous webhook event."""
type WebhookEventSync {
  """Internal name of the event type."""
  eventType: WebhookEventTypeSyncEnum!

  """Display name of the event."""
  name: String!
}

"""Enum determining type of webhook."""
enum WebhookEventTypeAsyncEnum {
  """An account email change is requested."""
  ACCOUNT_CHANGE_EMAIL_REQUESTED

  """An account confirmation is requested."""
  ACCOUNT_CONFIRMATION_REQUESTED

  """An account is confirmed."""
  ACCOUNT_CONFIRMED

  """An account is deleted."""
  ACCOUNT_DELETED

  """An account delete is requested."""
  ACCOUNT_DELETE_REQUESTED

  """An account email was changed"""
  ACCOUNT_EMAIL_CHANGED

  """Setting a new password for the account is requested."""
  ACCOUNT_SET_PASSWORD_REQUESTED

  """A new address created."""
  ADDRESS_CREATED

  """An address deleted."""
  ADDRESS_DELETED

  """An address updated."""
  ADDRESS_UPDATED

  """
  All the events.
  
  DEPRECATED: this value will be removed in Saleor 4.0.
  """
  ANY_EVENTS

  """An app deleted."""
  APP_DELETED

  """A new app installed."""
  APP_INSTALLED

  """An app status is changed."""
  APP_STATUS_CHANGED

  """An app updated."""
  APP_UPDATED

  """A new attribute is created."""
  ATTRIBUTE_CREATED

  """An attribute is deleted."""
  ATTRIBUTE_DELETED

  """An attribute is updated."""
  ATTRIBUTE_UPDATED

  """A new attribute value is created."""
  ATTRIBUTE_VALUE_CREATED

  """An attribute value is deleted."""
  ATTRIBUTE_VALUE_DELETED

  """An attribute value is updated."""
  ATTRIBUTE_VALUE_UPDATED

  """A new category created."""
  CATEGORY_CREATED

  """A category is deleted."""
  CATEGORY_DELETED

  """A category is updated."""
  CATEGORY_UPDATED

  """A new channel created."""
  CHANNEL_CREATED

  """A channel is deleted."""
  CHANNEL_DELETED

  """A channel metadata is updated."""
  CHANNEL_METADATA_UPDATED

  """A channel status is changed."""
  CHANNEL_STATUS_CHANGED

  """A channel is updated."""
  CHANNEL_UPDATED

  """A new checkout is created."""
  CHECKOUT_CREATED
  CHECKOUT_FULLY_PAID

  """
  A checkout metadata is updated.
  
  Added in Saleor 3.8.
  """
  CHECKOUT_METADATA_UPDATED

  """
  A checkout is updated. It also triggers all updates related to the checkout.
  """
  CHECKOUT_UPDATED

  """A new collection is created."""
  COLLECTION_CREATED

  """A collection is deleted."""
  COLLECTION_DELETED

  """
  A collection metadata is updated.
  
  Added in Saleor 3.8.
  """
  COLLECTION_METADATA_UPDATED

  """A collection is updated."""
  COLLECTION_UPDATED

  """A new customer account is created."""
  CUSTOMER_CREATED

  """A customer account is deleted."""
  CUSTOMER_DELETED

  """
  A customer account metadata is updated.
  
  Added in Saleor 3.8.
  """
  CUSTOMER_METADATA_UPDATED

  """A customer account is updated."""
  CUSTOMER_UPDATED

  """A draft order is created."""
  DRAFT_ORDER_CREATED

  """A draft order is deleted."""
  DRAFT_ORDER_DELETED

  """A draft order is updated."""
  DRAFT_ORDER_UPDATED

  """A fulfillment is approved."""
  FULFILLMENT_APPROVED

  """A fulfillment is cancelled."""
  FULFILLMENT_CANCELED

  """A new fulfillment is created."""
  FULFILLMENT_CREATED

  """
  A fulfillment metadata is updated.
  
  Added in Saleor 3.8.
  """
  FULFILLMENT_METADATA_UPDATED
  FULFILLMENT_TRACKING_NUMBER_UPDATED

  """A new gift card created."""
  GIFT_CARD_CREATED

  """A gift card is deleted."""
  GIFT_CARD_DELETED

  """
  A gift card export is completed.
  
  Added in Saleor 3.16.
  """
  GIFT_CARD_EXPORT_COMPLETED

  """
  A gift card metadata is updated.
  
  Added in Saleor 3.8.
  """
  GIFT_CARD_METADATA_UPDATED

  """
  A gift card has been sent.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  GIFT_CARD_SENT

  """A gift card status is changed."""
  GIFT_CARD_STATUS_CHANGED

  """A gift card is updated."""
  GIFT_CARD_UPDATED

  """An invoice is deleted."""
  INVOICE_DELETED

  """An invoice for order requested."""
  INVOICE_REQUESTED

  """Invoice has been sent."""
  INVOICE_SENT

  """A new menu created."""
  MENU_CREATED

  """A menu is deleted."""
  MENU_DELETED

  """A new menu item created."""
  MENU_ITEM_CREATED

  """A menu item is deleted."""
  MENU_ITEM_DELETED

  """A menu item is updated."""
  MENU_ITEM_UPDATED

  """A menu is updated."""
  MENU_UPDATED

  """
  User notification triggered.
  
  DEPRECATED: this value will be removed in Saleor 4.0. See the docs for more details about migrating from NOTIFY_USER to other events: https://docs.saleor.io/docs/next/upgrade-guides/notify-user-deprecation
  """
  NOTIFY_USER

  """An observability event is created."""
  OBSERVABILITY

  """
  Orders are imported.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  ORDER_BULK_CREATED

  """An order is cancelled."""
  ORDER_CANCELLED

  """
  An order is confirmed (status change unconfirmed -> unfulfilled) by a staff user using the OrderConfirm mutation. It also triggers when the user completes the checkout and the shop setting `automatically_confirm_all_new_orders` is enabled.
  """
  ORDER_CONFIRMED

  """A new order is placed."""
  ORDER_CREATED

  """An order is expired."""
  ORDER_EXPIRED

  """An order is fulfilled."""
  ORDER_FULFILLED

  """Payment is made and an order is fully paid."""
  ORDER_FULLY_PAID

  """
  The order is fully refunded.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  ORDER_FULLY_REFUNDED

  """
  An order metadata is updated.
  
  Added in Saleor 3.8.
  """
  ORDER_METADATA_UPDATED

  """
  Payment has been made. The order may be partially or fully paid.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  ORDER_PAID

  """
  The order received a refund. The order may be partially or fully refunded.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  ORDER_REFUNDED

  """
  An order is updated; triggered for all changes related to an order; covers all other order webhooks, except for ORDER_CREATED.
  """
  ORDER_UPDATED

  """A new page is created."""
  PAGE_CREATED

  """A page is deleted."""
  PAGE_DELETED

  """A new page type is created."""
  PAGE_TYPE_CREATED

  """A page type is deleted."""
  PAGE_TYPE_DELETED

  """A page type is updated."""
  PAGE_TYPE_UPDATED

  """A page is updated."""
  PAGE_UPDATED

  """A new permission group is created."""
  PERMISSION_GROUP_CREATED

  """A permission group is deleted."""
  PERMISSION_GROUP_DELETED

  """A permission group is updated."""
  PERMISSION_GROUP_UPDATED

  """A new product is created."""
  PRODUCT_CREATED

  """A product is deleted."""
  PRODUCT_DELETED

  """
  A product export is completed.
  
  Added in Saleor 3.16.
  """
  PRODUCT_EXPORT_COMPLETED

  """
  A new product media is created.
  
  Added in Saleor 3.12.
  """
  PRODUCT_MEDIA_CREATED

  """
  A product media is deleted.
  
  Added in Saleor 3.12.
  """
  PRODUCT_MEDIA_DELETED

  """
  A product media is updated.
  
  Added in Saleor 3.12.
  """
  PRODUCT_MEDIA_UPDATED

  """
  A product metadata is updated.
  
  Added in Saleor 3.8.
  """
  PRODUCT_METADATA_UPDATED

  """A product is updated."""
  PRODUCT_UPDATED

  """A product variant is back in stock."""
  PRODUCT_VARIANT_BACK_IN_STOCK

  """A new product variant is created."""
  PRODUCT_VARIANT_CREATED

  """
  A product variant is deleted. Warning: this event will not be executed when parent product has been deleted. Check PRODUCT_DELETED.
  """
  PRODUCT_VARIANT_DELETED

  """
  A product variant metadata is updated.
  
  Added in Saleor 3.8.
  """
  PRODUCT_VARIANT_METADATA_UPDATED

  """A product variant is out of stock."""
  PRODUCT_VARIANT_OUT_OF_STOCK

  """A product variant stock is updated"""
  PRODUCT_VARIANT_STOCK_UPDATED

  """A product variant is updated."""
  PRODUCT_VARIANT_UPDATED

  """A promotion is created."""
  PROMOTION_CREATED

  """A promotion is deleted."""
  PROMOTION_DELETED

  """A promotion is deactivated."""
  PROMOTION_ENDED

  """A promotion rule is created."""
  PROMOTION_RULE_CREATED

  """A promotion rule is deleted."""
  PROMOTION_RULE_DELETED

  """A promotion rule is updated."""
  PROMOTION_RULE_UPDATED

  """A promotion is activated."""
  PROMOTION_STARTED

  """A promotion is updated."""
  PROMOTION_UPDATED

  """A sale is created."""
  SALE_CREATED

  """A sale is deleted."""
  SALE_DELETED

  """A sale is activated or deactivated."""
  SALE_TOGGLE

  """A sale is updated."""
  SALE_UPDATED

  """A new shipping price is created."""
  SHIPPING_PRICE_CREATED

  """A shipping price is deleted."""
  SHIPPING_PRICE_DELETED

  """A shipping price is updated."""
  SHIPPING_PRICE_UPDATED

  """A new shipping zone is created."""
  SHIPPING_ZONE_CREATED

  """A shipping zone is deleted."""
  SHIPPING_ZONE_DELETED

  """
  A shipping zone metadata is updated.
  
  Added in Saleor 3.8.
  """
  SHIPPING_ZONE_METADATA_UPDATED

  """A shipping zone is updated."""
  SHIPPING_ZONE_UPDATED

  """
  Shop metadata is updated.
  
  Added in Saleor 3.15.
  """
  SHOP_METADATA_UPDATED

  """A new staff user is created."""
  STAFF_CREATED

  """A staff user is deleted."""
  STAFF_DELETED

  """Setting a new password for the staff account is requested."""
  STAFF_SET_PASSWORD_REQUESTED

  """A staff user is updated."""
  STAFF_UPDATED

  """
  A thumbnail is created.
  
  Added in Saleor 3.12.
  """
  THUMBNAIL_CREATED

  """
  Transaction item metadata is updated.
  
  Added in Saleor 3.8.
  """
  TRANSACTION_ITEM_METADATA_UPDATED

  """A new translation is created."""
  TRANSLATION_CREATED

  """A translation is updated."""
  TRANSLATION_UPDATED
  VOUCHER_CODES_CREATED
  VOUCHER_CODES_DELETED

  """
  A voucher code export is completed.
  
  Added in Saleor 3.18.
  """
  VOUCHER_CODE_EXPORT_COMPLETED

  """A new voucher created."""
  VOUCHER_CREATED

  """A voucher is deleted."""
  VOUCHER_DELETED

  """
  A voucher metadata is updated.
  
  Added in Saleor 3.8.
  """
  VOUCHER_METADATA_UPDATED

  """A voucher is updated."""
  VOUCHER_UPDATED

  """A new warehouse created."""
  WAREHOUSE_CREATED

  """A warehouse is deleted."""
  WAREHOUSE_DELETED

  """
  A warehouse metadata is updated.
  
  Added in Saleor 3.8.
  """
  WAREHOUSE_METADATA_UPDATED

  """A warehouse is updated."""
  WAREHOUSE_UPDATED
}

"""Enum determining type of webhook."""
enum WebhookEventTypeEnum {
  """An account email change is requested."""
  ACCOUNT_CHANGE_EMAIL_REQUESTED

  """An account confirmation is requested."""
  ACCOUNT_CONFIRMATION_REQUESTED

  """An account is confirmed."""
  ACCOUNT_CONFIRMED

  """An account is deleted."""
  ACCOUNT_DELETED

  """An account delete is requested."""
  ACCOUNT_DELETE_REQUESTED

  """An account email was changed"""
  ACCOUNT_EMAIL_CHANGED

  """Setting a new password for the account is requested."""
  ACCOUNT_SET_PASSWORD_REQUESTED

  """A new address created."""
  ADDRESS_CREATED

  """An address deleted."""
  ADDRESS_DELETED

  """An address updated."""
  ADDRESS_UPDATED

  """
  All the events.
  
  DEPRECATED: this value will be removed in Saleor 4.0.
  """
  ANY_EVENTS

  """An app deleted."""
  APP_DELETED

  """A new app installed."""
  APP_INSTALLED

  """An app status is changed."""
  APP_STATUS_CHANGED

  """An app updated."""
  APP_UPDATED

  """A new attribute is created."""
  ATTRIBUTE_CREATED

  """An attribute is deleted."""
  ATTRIBUTE_DELETED

  """An attribute is updated."""
  ATTRIBUTE_UPDATED

  """A new attribute value is created."""
  ATTRIBUTE_VALUE_CREATED

  """An attribute value is deleted."""
  ATTRIBUTE_VALUE_DELETED

  """An attribute value is updated."""
  ATTRIBUTE_VALUE_UPDATED

  """A new category created."""
  CATEGORY_CREATED

  """A category is deleted."""
  CATEGORY_DELETED

  """A category is updated."""
  CATEGORY_UPDATED

  """A new channel created."""
  CHANNEL_CREATED

  """A channel is deleted."""
  CHANNEL_DELETED

  """A channel metadata is updated."""
  CHANNEL_METADATA_UPDATED

  """A channel status is changed."""
  CHANNEL_STATUS_CHANGED

  """A channel is updated."""
  CHANNEL_UPDATED

  """
  Event called for checkout tax calculation.
  
  Added in Saleor 3.6.
  """
  CHECKOUT_CALCULATE_TAXES

  """A new checkout is created."""
  CHECKOUT_CREATED

  """Filter shipping methods for checkout."""
  CHECKOUT_FILTER_SHIPPING_METHODS
  CHECKOUT_FULLY_PAID

  """
  A checkout metadata is updated.
  
  Added in Saleor 3.8.
  """
  CHECKOUT_METADATA_UPDATED

  """
  A checkout is updated. It also triggers all updates related to the checkout.
  """
  CHECKOUT_UPDATED

  """A new collection is created."""
  COLLECTION_CREATED

  """A collection is deleted."""
  COLLECTION_DELETED

  """
  A collection metadata is updated.
  
  Added in Saleor 3.8.
  """
  COLLECTION_METADATA_UPDATED

  """A collection is updated."""
  COLLECTION_UPDATED

  """A new customer account is created."""
  CUSTOMER_CREATED

  """A customer account is deleted."""
  CUSTOMER_DELETED

  """
  A customer account metadata is updated.
  
  Added in Saleor 3.8.
  """
  CUSTOMER_METADATA_UPDATED

  """A customer account is updated."""
  CUSTOMER_UPDATED

  """A draft order is created."""
  DRAFT_ORDER_CREATED

  """A draft order is deleted."""
  DRAFT_ORDER_DELETED

  """A draft order is updated."""
  DRAFT_ORDER_UPDATED

  """A fulfillment is approved."""
  FULFILLMENT_APPROVED

  """A fulfillment is cancelled."""
  FULFILLMENT_CANCELED

  """A new fulfillment is created."""
  FULFILLMENT_CREATED

  """
  A fulfillment metadata is updated.
  
  Added in Saleor 3.8.
  """
  FULFILLMENT_METADATA_UPDATED
  FULFILLMENT_TRACKING_NUMBER_UPDATED

  """A new gift card created."""
  GIFT_CARD_CREATED

  """A gift card is deleted."""
  GIFT_CARD_DELETED

  """
  A gift card export is completed.
  
  Added in Saleor 3.16.
  """
  GIFT_CARD_EXPORT_COMPLETED

  """
  A gift card metadata is updated.
  
  Added in Saleor 3.8.
  """
  GIFT_CARD_METADATA_UPDATED

  """
  A gift card has been sent.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  GIFT_CARD_SENT

  """A gift card status is changed."""
  GIFT_CARD_STATUS_CHANGED

  """A gift card is updated."""
  GIFT_CARD_UPDATED

  """An invoice is deleted."""
  INVOICE_DELETED

  """An invoice for order requested."""
  INVOICE_REQUESTED

  """Invoice has been sent."""
  INVOICE_SENT
  LIST_STORED_PAYMENT_METHODS

  """A new menu created."""
  MENU_CREATED

  """A menu is deleted."""
  MENU_DELETED

  """A new menu item created."""
  MENU_ITEM_CREATED

  """A menu item is deleted."""
  MENU_ITEM_DELETED

  """A menu item is updated."""
  MENU_ITEM_UPDATED

  """A menu is updated."""
  MENU_UPDATED

  """
  User notification triggered.
  
  DEPRECATED: this value will be removed in Saleor 4.0. See the docs for more details about migrating from NOTIFY_USER to other events: https://docs.saleor.io/docs/next/upgrade-guides/notify-user-deprecation
  """
  NOTIFY_USER

  """An observability event is created."""
  OBSERVABILITY

  """
  Orders are imported.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  ORDER_BULK_CREATED

  """
  Event called for order tax calculation.
  
  Added in Saleor 3.6.
  """
  ORDER_CALCULATE_TAXES

  """An order is cancelled."""
  ORDER_CANCELLED

  """
  An order is confirmed (status change unconfirmed -> unfulfilled) by a staff user using the OrderConfirm mutation. It also triggers when the user completes the checkout and the shop setting `automatically_confirm_all_new_orders` is enabled.
  """
  ORDER_CONFIRMED

  """A new order is placed."""
  ORDER_CREATED

  """An order is expired."""
  ORDER_EXPIRED

  """Filter shipping methods for order."""
  ORDER_FILTER_SHIPPING_METHODS

  """An order is fulfilled."""
  ORDER_FULFILLED

  """Payment is made and an order is fully paid."""
  ORDER_FULLY_PAID

  """
  The order is fully refunded.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  ORDER_FULLY_REFUNDED

  """
  An order metadata is updated.
  
  Added in Saleor 3.8.
  """
  ORDER_METADATA_UPDATED

  """
  Payment has been made. The order may be partially or fully paid.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  ORDER_PAID

  """
  The order received a refund. The order may be partially or fully refunded.
  
  Added in Saleor 3.14.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  ORDER_REFUNDED

  """
  An order is updated; triggered for all changes related to an order; covers all other order webhooks, except for ORDER_CREATED.
  """
  ORDER_UPDATED

  """A new page is created."""
  PAGE_CREATED

  """A page is deleted."""
  PAGE_DELETED

  """A new page type is created."""
  PAGE_TYPE_CREATED

  """A page type is deleted."""
  PAGE_TYPE_DELETED

  """A page type is updated."""
  PAGE_TYPE_UPDATED

  """A page is updated."""
  PAGE_UPDATED

  """Authorize payment."""
  PAYMENT_AUTHORIZE

  """Capture payment."""
  PAYMENT_CAPTURE

  """Confirm payment."""
  PAYMENT_CONFIRM
  PAYMENT_GATEWAY_INITIALIZE_SESSION
  PAYMENT_GATEWAY_INITIALIZE_TOKENIZATION_SESSION

  """Listing available payment gateways."""
  PAYMENT_LIST_GATEWAYS
  PAYMENT_METHOD_INITIALIZE_TOKENIZATION_SESSION
  PAYMENT_METHOD_PROCESS_TOKENIZATION_SESSION

  """Process payment."""
  PAYMENT_PROCESS

  """Refund payment."""
  PAYMENT_REFUND

  """Void payment."""
  PAYMENT_VOID

  """A new permission group is created."""
  PERMISSION_GROUP_CREATED

  """A permission group is deleted."""
  PERMISSION_GROUP_DELETED

  """A permission group is updated."""
  PERMISSION_GROUP_UPDATED

  """A new product is created."""
  PRODUCT_CREATED

  """A product is deleted."""
  PRODUCT_DELETED

  """
  A product export is completed.
  
  Added in Saleor 3.16.
  """
  PRODUCT_EXPORT_COMPLETED

  """
  A new product media is created.
  
  Added in Saleor 3.12.
  """
  PRODUCT_MEDIA_CREATED

  """
  A product media is deleted.
  
  Added in Saleor 3.12.
  """
  PRODUCT_MEDIA_DELETED

  """
  A product media is updated.
  
  Added in Saleor 3.12.
  """
  PRODUCT_MEDIA_UPDATED

  """
  A product metadata is updated.
  
  Added in Saleor 3.8.
  """
  PRODUCT_METADATA_UPDATED

  """A product is updated."""
  PRODUCT_UPDATED

  """A product variant is back in stock."""
  PRODUCT_VARIANT_BACK_IN_STOCK

  """A new product variant is created."""
  PRODUCT_VARIANT_CREATED

  """
  A product variant is deleted. Warning: this event will not be executed when parent product has been deleted. Check PRODUCT_DELETED.
  """
  PRODUCT_VARIANT_DELETED

  """
  A product variant metadata is updated.
  
  Added in Saleor 3.8.
  """
  PRODUCT_VARIANT_METADATA_UPDATED

  """A product variant is out of stock."""
  PRODUCT_VARIANT_OUT_OF_STOCK

  """A product variant stock is updated"""
  PRODUCT_VARIANT_STOCK_UPDATED

  """A product variant is updated."""
  PRODUCT_VARIANT_UPDATED

  """A promotion is created."""
  PROMOTION_CREATED

  """A promotion is deleted."""
  PROMOTION_DELETED

  """A promotion is deactivated."""
  PROMOTION_ENDED

  """A promotion rule is created."""
  PROMOTION_RULE_CREATED

  """A promotion rule is deleted."""
  PROMOTION_RULE_DELETED

  """A promotion rule is updated."""
  PROMOTION_RULE_UPDATED

  """A promotion is activated."""
  PROMOTION_STARTED

  """A promotion is updated."""
  PROMOTION_UPDATED

  """A sale is created."""
  SALE_CREATED

  """A sale is deleted."""
  SALE_DELETED

  """A sale is activated or deactivated."""
  SALE_TOGGLE

  """A sale is updated."""
  SALE_UPDATED

  """Fetch external shipping methods for checkout."""
  SHIPPING_LIST_METHODS_FOR_CHECKOUT

  """A new shipping price is created."""
  SHIPPING_PRICE_CREATED

  """A shipping price is deleted."""
  SHIPPING_PRICE_DELETED

  """A shipping price is updated."""
  SHIPPING_PRICE_UPDATED

  """A new shipping zone is created."""
  SHIPPING_ZONE_CREATED

  """A shipping zone is deleted."""
  SHIPPING_ZONE_DELETED

  """
  A shipping zone metadata is updated.
  
  Added in Saleor 3.8.
  """
  SHIPPING_ZONE_METADATA_UPDATED

  """A shipping zone is updated."""
  SHIPPING_ZONE_UPDATED

  """
  Shop metadata is updated.
  
  Added in Saleor 3.15.
  """
  SHOP_METADATA_UPDATED

  """A new staff user is created."""
  STAFF_CREATED

  """A staff user is deleted."""
  STAFF_DELETED

  """Setting a new password for the staff account is requested."""
  STAFF_SET_PASSWORD_REQUESTED

  """A staff user is updated."""
  STAFF_UPDATED
  STORED_PAYMENT_METHOD_DELETE_REQUESTED

  """
  A thumbnail is created.
  
  Added in Saleor 3.12.
  """
  THUMBNAIL_CREATED

  """
  Event called when cancel has been requested for transaction.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  TRANSACTION_CANCELATION_REQUESTED

  """
  Event called when charge has been requested for transaction.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  TRANSACTION_CHARGE_REQUESTED
  TRANSACTION_INITIALIZE_SESSION

  """
  Transaction item metadata is updated.
  
  Added in Saleor 3.8.
  """
  TRANSACTION_ITEM_METADATA_UPDATED
  TRANSACTION_PROCESS_SESSION

  """
  Event called when refund has been requested for transaction.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  TRANSACTION_REFUND_REQUESTED

  """A new translation is created."""
  TRANSLATION_CREATED

  """A translation is updated."""
  TRANSLATION_UPDATED
  VOUCHER_CODES_CREATED
  VOUCHER_CODES_DELETED

  """
  A voucher code export is completed.
  
  Added in Saleor 3.18.
  """
  VOUCHER_CODE_EXPORT_COMPLETED

  """A new voucher created."""
  VOUCHER_CREATED

  """A voucher is deleted."""
  VOUCHER_DELETED

  """
  A voucher metadata is updated.
  
  Added in Saleor 3.8.
  """
  VOUCHER_METADATA_UPDATED

  """A voucher is updated."""
  VOUCHER_UPDATED

  """A new warehouse created."""
  WAREHOUSE_CREATED

  """A warehouse is deleted."""
  WAREHOUSE_DELETED

  """
  A warehouse metadata is updated.
  
  Added in Saleor 3.8.
  """
  WAREHOUSE_METADATA_UPDATED

  """A warehouse is updated."""
  WAREHOUSE_UPDATED
}

"""Enum determining type of webhook."""
enum WebhookEventTypeSyncEnum {
  """
  Event called for checkout tax calculation.
  
  Added in Saleor 3.6.
  """
  CHECKOUT_CALCULATE_TAXES

  """Filter shipping methods for checkout."""
  CHECKOUT_FILTER_SHIPPING_METHODS
  LIST_STORED_PAYMENT_METHODS

  """
  Event called for order tax calculation.
  
  Added in Saleor 3.6.
  """
  ORDER_CALCULATE_TAXES

  """Filter shipping methods for order."""
  ORDER_FILTER_SHIPPING_METHODS

  """Authorize payment."""
  PAYMENT_AUTHORIZE

  """Capture payment."""
  PAYMENT_CAPTURE

  """Confirm payment."""
  PAYMENT_CONFIRM
  PAYMENT_GATEWAY_INITIALIZE_SESSION
  PAYMENT_GATEWAY_INITIALIZE_TOKENIZATION_SESSION

  """Listing available payment gateways."""
  PAYMENT_LIST_GATEWAYS
  PAYMENT_METHOD_INITIALIZE_TOKENIZATION_SESSION
  PAYMENT_METHOD_PROCESS_TOKENIZATION_SESSION

  """Process payment."""
  PAYMENT_PROCESS

  """Refund payment."""
  PAYMENT_REFUND

  """Void payment."""
  PAYMENT_VOID

  """Fetch external shipping methods for checkout."""
  SHIPPING_LIST_METHODS_FOR_CHECKOUT
  STORED_PAYMENT_METHOD_DELETE_REQUESTED

  """
  Event called when cancel has been requested for transaction.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  TRANSACTION_CANCELATION_REQUESTED

  """
  Event called when charge has been requested for transaction.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  TRANSACTION_CHARGE_REQUESTED
  TRANSACTION_INITIALIZE_SESSION
  TRANSACTION_PROCESS_SESSION

  """
  Event called when refund has been requested for transaction.
  
  Added in Saleor 3.13.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  TRANSACTION_REFUND_REQUESTED
}

enum WebhookSampleEventTypeEnum {
  ACCOUNT_CHANGE_EMAIL_REQUESTED
  ACCOUNT_CONFIRMATION_REQUESTED
  ACCOUNT_CONFIRMED
  ACCOUNT_DELETED
  ACCOUNT_DELETE_REQUESTED
  ACCOUNT_EMAIL_CHANGED
  ACCOUNT_SET_PASSWORD_REQUESTED
  ADDRESS_CREATED
  ADDRESS_DELETED
  ADDRESS_UPDATED
  APP_DELETED
  APP_INSTALLED
  APP_STATUS_CHANGED
  APP_UPDATED
  ATTRIBUTE_CREATED
  ATTRIBUTE_DELETED
  ATTRIBUTE_UPDATED
  ATTRIBUTE_VALUE_CREATED
  ATTRIBUTE_VALUE_DELETED
  ATTRIBUTE_VALUE_UPDATED
  CATEGORY_CREATED
  CATEGORY_DELETED
  CATEGORY_UPDATED
  CHANNEL_CREATED
  CHANNEL_DELETED
  CHANNEL_METADATA_UPDATED
  CHANNEL_STATUS_CHANGED
  CHANNEL_UPDATED
  CHECKOUT_CREATED
  CHECKOUT_FULLY_PAID
  CHECKOUT_METADATA_UPDATED
  CHECKOUT_UPDATED
  COLLECTION_CREATED
  COLLECTION_DELETED
  COLLECTION_METADATA_UPDATED
  COLLECTION_UPDATED
  CUSTOMER_CREATED
  CUSTOMER_DELETED
  CUSTOMER_METADATA_UPDATED
  CUSTOMER_UPDATED
  DRAFT_ORDER_CREATED
  DRAFT_ORDER_DELETED
  DRAFT_ORDER_UPDATED
  FULFILLMENT_APPROVED
  FULFILLMENT_CANCELED
  FULFILLMENT_CREATED
  FULFILLMENT_METADATA_UPDATED
  FULFILLMENT_TRACKING_NUMBER_UPDATED
  GIFT_CARD_CREATED
  GIFT_CARD_DELETED
  GIFT_CARD_EXPORT_COMPLETED
  GIFT_CARD_METADATA_UPDATED
  GIFT_CARD_SENT
  GIFT_CARD_STATUS_CHANGED
  GIFT_CARD_UPDATED
  INVOICE_DELETED
  INVOICE_REQUESTED
  INVOICE_SENT
  MENU_CREATED
  MENU_DELETED
  MENU_ITEM_CREATED
  MENU_ITEM_DELETED
  MENU_ITEM_UPDATED
  MENU_UPDATED
  NOTIFY_USER
  OBSERVABILITY
  ORDER_BULK_CREATED
  ORDER_CANCELLED
  ORDER_CONFIRMED
  ORDER_CREATED
  ORDER_EXPIRED
  ORDER_FULFILLED
  ORDER_FULLY_PAID
  ORDER_FULLY_REFUNDED
  ORDER_METADATA_UPDATED
  ORDER_PAID
  ORDER_REFUNDED
  ORDER_UPDATED
  PAGE_CREATED
  PAGE_DELETED
  PAGE_TYPE_CREATED
  PAGE_TYPE_DELETED
  PAGE_TYPE_UPDATED
  PAGE_UPDATED
  PERMISSION_GROUP_CREATED
  PERMISSION_GROUP_DELETED
  PERMISSION_GROUP_UPDATED
  PRODUCT_CREATED
  PRODUCT_DELETED
  PRODUCT_EXPORT_COMPLETED
  PRODUCT_MEDIA_CREATED
  PRODUCT_MEDIA_DELETED
  PRODUCT_MEDIA_UPDATED
  PRODUCT_METADATA_UPDATED
  PRODUCT_UPDATED
  PRODUCT_VARIANT_BACK_IN_STOCK
  PRODUCT_VARIANT_CREATED
  PRODUCT_VARIANT_DELETED
  PRODUCT_VARIANT_METADATA_UPDATED
  PRODUCT_VARIANT_OUT_OF_STOCK
  PRODUCT_VARIANT_STOCK_UPDATED
  PRODUCT_VARIANT_UPDATED
  PROMOTION_CREATED
  PROMOTION_DELETED
  PROMOTION_ENDED
  PROMOTION_RULE_CREATED
  PROMOTION_RULE_DELETED
  PROMOTION_RULE_UPDATED
  PROMOTION_STARTED
  PROMOTION_UPDATED
  SALE_CREATED
  SALE_DELETED
  SALE_TOGGLE
  SALE_UPDATED
  SHIPPING_PRICE_CREATED
  SHIPPING_PRICE_DELETED
  SHIPPING_PRICE_UPDATED
  SHIPPING_ZONE_CREATED
  SHIPPING_ZONE_DELETED
  SHIPPING_ZONE_METADATA_UPDATED
  SHIPPING_ZONE_UPDATED
  SHOP_METADATA_UPDATED
  STAFF_CREATED
  STAFF_DELETED
  STAFF_SET_PASSWORD_REQUESTED
  STAFF_UPDATED
  THUMBNAIL_CREATED
  TRANSACTION_ITEM_METADATA_UPDATED
  TRANSLATION_CREATED
  TRANSLATION_UPDATED
  VOUCHER_CODES_CREATED
  VOUCHER_CODES_DELETED
  VOUCHER_CODE_EXPORT_COMPLETED
  VOUCHER_CREATED
  VOUCHER_DELETED
  VOUCHER_METADATA_UPDATED
  VOUCHER_UPDATED
  WAREHOUSE_CREATED
  WAREHOUSE_DELETED
  WAREHOUSE_METADATA_UPDATED
  WAREHOUSE_UPDATED
}

"""
Trigger a webhook event. Supports a single event (the first, if multiple provided in the `webhook.subscription_query`). Requires permission relevant to processed event. Successfully delivered webhook returns `delivery` with status='PENDING' and empty payload.

Added in Saleor 3.11.

Note: this API is currently in Feature Preview and can be subject to changes at later point. 

Requires one of the following permissions: AUTHENTICATED_STAFF_USER.
"""
type WebhookTrigger {
  delivery: EventDelivery
  errors: [WebhookTriggerError!]!
}

type WebhookTriggerError {
  """The error code."""
  code: WebhookTriggerErrorCode!

  """
  Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
  """
  field: String

  """The error message."""
  message: String
}

enum WebhookTriggerErrorCode {
  GRAPHQL_ERROR
  INVALID_ID
  MISSING_EVENT
  MISSING_PERMISSION
  MISSING_QUERY
  MISSING_SUBSCRIPTION
  NOT_FOUND
  SYNTAX
  TYPE_NOT_SUPPORTED
  UNABLE_TO_PARSE
}

"""
Updates a webhook subscription. 

Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP.
"""
type WebhookUpdate {
  errors: [WebhookError!]!
  webhook: Webhook
  webhookErrors: [WebhookError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
}

input WebhookUpdateInput {
  """ID of the app to which webhook belongs."""
  app: ID

  """The asynchronous events that webhook wants to subscribe."""
  asyncEvents: [WebhookEventTypeAsyncEnum!]

  """
  Custom headers, which will be added to HTTP request. There is a limitation of 5 headers per webhook and 998 characters per header.Only `X-*`, `Authorization*`, and `BrokerProperties` keys are allowed.
  
  Added in Saleor 3.12.
  
  Note: this API is currently in Feature Preview and can be subject to changes at later point.
  """
  customHeaders: JSONString

  """
  The events that webhook wants to subscribe. 
  
  DEPRECATED: this field will be removed in Saleor 4.0. Use `asyncEvents` or `syncEvents` instead.
  """
  events: [WebhookEventTypeEnum!]

  """Determine if webhook will be set active or not."""
  isActive: Boolean

  """The new name of the webhook."""
  name: String

  """
  Subscription query used to define a webhook payload.
  
  Added in Saleor 3.2.
  """
  query: String

  """
  Use to create a hash signature with each payload.
  
  DEPRECATED: this field will be removed in Saleor 4.0. As of Saleor 3.5, webhook payloads default to signing using a verifiable JWS.
  """
  secretKey: String

  """The synchronous events that webhook wants to subscribe."""
  syncEvents: [WebhookEventTypeSyncEnum!]

  """The url to receive the payload."""
  targetUrl: String
}

"""Represents weight value in a specific weight unit."""
type Weight {
  """Weight unit."""
  unit: WeightUnitsEnum!

  """Weight value. Returns a value with maximal three decimal places"""
  value: Float!
}

scalar WeightScalar

enum WeightUnitsEnum {
  G
  KG
  LB
  OZ
  TONNE
}

"""_Any value scalar as defined by Federation spec."""
scalar _Any

"""_Entity union as defined by Federation spec."""
union _Entity = Address | App | Category | Collection | Group | Order | PageType | Product | ProductMedia | ProductType | ProductVariant | User

"""_Service manifest as defined by Federation spec."""
type _Service {
  sdl: String
}