diff --git a/.changeset/onboarding-app-initial.md b/.changeset/onboarding-app-initial.md new file mode 100644 index 000000000..f2db9e949 --- /dev/null +++ b/.changeset/onboarding-app-initial.md @@ -0,0 +1,8 @@ +--- +"saleor-app-onboarding": patch +--- + +Introduce the Onboarding app — a standalone Saleor App that mounts on the Dashboard home page +(`HOME_WIDGETS` extension) and walks new users through first-run tasks: creating a product, +exploring orders, opening the GraphQL playground, browsing extensions, and inviting staff. +Completion state persists in user metadata so progress is preserved across sessions. diff --git a/apps/onboarding/.env.example b/apps/onboarding/.env.example new file mode 100644 index 000000000..9f7a90b43 --- /dev/null +++ b/apps/onboarding/.env.example @@ -0,0 +1,20 @@ +# See `src/lib/env.ts` for the exhaustive list of supported env variables. + +# App identifier used when building the manifest. Override per-environment if needed. +# MANIFEST_APP_ID=saleor.app.onboarding + +# App name displayed in Dashboard. Override to recognize app instance during development. +# APP_NAME=Onboarding + +# APP_LOG_LEVEL=info # one of "fatal" | "error" | "warn" | "info" | "debug" | "trace" + +# Local development variables. When developed locally with Saleor inside docker, these can be set to: +# APP_IFRAME_BASE_URL=http://localhost:3000 # so Dashboard on host can access iframe +# APP_API_BASE_URL=http://host.docker.internal:3000 # so Saleor can reach the App from container +# https://docs.saleor.io/developer/extending/apps/local-app-development + +# Sentry — optional, enable error tracking +# NEXT_PUBLIC_SENTRY_DSN= +# SENTRY_AUTH_TOKEN= +# SENTRY_ORG= +# SENTRY_PROJECT= diff --git a/apps/onboarding/README.md b/apps/onboarding/README.md new file mode 100644 index 000000000..adc79dd0e --- /dev/null +++ b/apps/onboarding/README.md @@ -0,0 +1,29 @@ +# Saleor Onboarding App + +Saleor App that provides a "Welcome / Onboarding" widget on the Dashboard home page. It guides +users through first-run tasks (creating a product, exploring orders, opening the GraphQL +playground, browsing extensions, inviting staff). + +The app is a port of the Dashboard's built-in `WelcomePageOnboarding` widget into a standalone +Saleor App so onboarding can ship independently of Dashboard releases. + +## Tech overview + +- **Next.js App Router** for both API endpoints (`/api/manifest`, `/api/register`) and UI (`/`). +- **Manifest extension**: `HOME_WIDGETS` mount, `WIDGET` target, `GET` method (the staff JWT + comes from AppBridge automatically). +- **Client-only**: all GraphQL calls run in the browser using the user's JWT issued by AppBridge. + No webhooks, no APL persistence (a no-op APL satisfies the SDK's register handler). +- **State persistence**: completion state is stored under user metadata key `onboarding` + (drop-in compatible with the Dashboard widget's existing key) via `updateMetadata`. + +## Local development + +```bash +pnpm install +cp .env.example .env +pnpm --filter saleor-app-onboarding dev +``` + +See [the Saleor docs](https://docs.saleor.io/developer/extending/apps/local-app-development) for +running an app against a local Saleor instance. diff --git a/apps/onboarding/codegen.ts b/apps/onboarding/codegen.ts new file mode 100644 index 000000000..9ad74899d --- /dev/null +++ b/apps/onboarding/codegen.ts @@ -0,0 +1,59 @@ +import { type CodegenConfig } from "@graphql-codegen/cli"; + +const config: CodegenConfig = { + generates: { + "generated/graphql.ts": { + schema: "graphql/schema.graphql", + documents: ["graphql/**/*.graphql"], + plugins: [ + { + add: { + content: + "type JSONValue = string | number | boolean | null | { [key: string]: JSONValue } | JSONValue[];", + }, + }, + { + typescript: { + enumsAsTypes: true, + }, + }, + "typescript-operations", + { + "typescript-urql": { + documentVariablePrefix: "Untyped", + fragmentVariablePrefix: "Untyped", + withHooks: false, + }, + }, + "typed-document-node", + ], + config: { + dedupeFragments: true, + defaultScalarType: "unknown", + immutableTypes: true, + strictScalars: true, + skipTypename: true, + scalars: { + _Any: "unknown", + Date: "string", + DateTime: "string", + Decimal: "number", + Minute: "number", + GenericScalar: "JSONValue", + JSON: "JSONValue", + JSONString: "string", + Metadata: "Record", + PositiveDecimal: "number", + Upload: "unknown", + UUID: "string", + WeightScalar: "number", + Day: "string", + Hour: "number", + PositiveInt: "number", + }, + }, + }, + }, +}; + +export default config; diff --git a/apps/onboarding/eslint.config.js b/apps/onboarding/eslint.config.js new file mode 100644 index 000000000..634f1aa5a --- /dev/null +++ b/apps/onboarding/eslint.config.js @@ -0,0 +1,31 @@ +import { config } from "@saleor/eslint-config-apps/index.js"; +import nodePlugin from "eslint-plugin-n"; + +/** @type {import("eslint").Linter.Config} */ +export default [ + ...config, + { + name: "saleor-app-onboarding/custom-config", + files: ["**/*.ts", "**/*.tsx"], + plugins: { + n: nodePlugin, + }, + rules: { + "n/no-process-env": "error", + }, + }, + { + name: "saleor-app-onboarding/override-no-process-env", + files: ["next.config.ts", "src/lib/env.ts", "src/instrumentation.ts"], + rules: { + "n/no-process-env": "off", + }, + }, + { + name: "saleor-app-onboarding/router-default-exports", + files: ["src/app/**/*", "src/pages/**/*"], + rules: { + "import/no-default-export": "off", + }, + }, +]; diff --git a/apps/onboarding/generated/graphql.ts b/apps/onboarding/generated/graphql.ts new file mode 100644 index 000000000..59a93000b --- /dev/null +++ b/apps/onboarding/generated/graphql.ts @@ -0,0 +1,31510 @@ +import gql from "graphql-tag"; +import { TypedDocumentNode as DocumentNode } from "@graphql-typed-document-node/core"; +type JSONValue = string | number | boolean | null | { [key: string]: JSONValue } | JSONValue[]; +export type Maybe = T | null; +export type InputMaybe = Maybe; +export type Exact = { [K in keyof T]: T[K] }; +export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; +export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +export type MakeEmpty = { + [_ in K]?: never; +}; +export type Incremental = + | T + | { [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never }; +export type Omit = Pick>; +/** All built-in and custom scalars, mapped to their actual values */ +export type Scalars = { + ID: { input: string; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; + /** + * The `Date` scalar type represents a Date + * value as specified by + * [iso8601](https://en.wikipedia.org/wiki/ISO_8601). + */ + Date: { input: string; output: string }; + /** + * The `DateTime` scalar type represents a DateTime + * value as specified by + * [iso8601](https://en.wikipedia.org/wiki/ISO_8601). + */ + DateTime: { input: string; output: string }; + /** The `Day` scalar type represents number of days by integer value. */ + Day: { input: string; output: string }; + /** + * Custom Decimal implementation. + * + * Returns Decimal as a float in the API, + * parses float to the Decimal on the way back. + */ + Decimal: { input: number; output: number }; + /** + * The `GenericScalar` scalar type represents a generic + * GraphQL scalar value that could be: + * String, Boolean, Int, Float, List or Object. + */ + GenericScalar: { input: JSONValue; output: JSONValue }; + /** The `Hour` scalar type represents number of hours by integer value. */ + Hour: { input: number; output: number }; + JSON: { input: JSONValue; output: JSONValue }; + JSONString: { input: string; output: string }; + /** + * Metadata is a map of key-value pairs, both keys and values are `String`. + * + * Example: + * ``` + * { + * "key1": "value1", + * "key2": "value2" + * } + * ``` + */ + Metadata: { input: Record; output: Record }; + /** The `Minute` scalar type represents number of minutes by integer value. */ + Minute: { input: number; output: number }; + /** + * Nonnegative Decimal scalar implementation. + * + * Should be used in places where value must be nonnegative (0 or greater). + */ + PositiveDecimal: { input: number; output: number }; + /** + * Positive Integer scalar implementation. + * + * Should be used in places where value must be positive (greater than 0). + */ + PositiveInt: { input: number; output: number }; + UUID: { input: string; output: string }; + /** 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. */ + Upload: { input: unknown; output: unknown }; + WeightScalar: { input: number; output: number }; + /** _Any value scalar as defined by Federation spec. */ + _Any: { input: unknown; output: unknown }; +}; + +/** + * 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. + */ +export type AccountAddressCreate = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly address?: Maybe
; + readonly errors: ReadonlyArray; + /** A user instance for which the address was created. */ + readonly user?: Maybe; +}; + +/** + * Deletes 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. + */ +export type AccountAddressDelete = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly address?: Maybe
; + readonly errors: ReadonlyArray; + /** A user instance for which the address was deleted. */ + readonly user?: Maybe; +}; + +/** + * 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. + */ +export type AccountAddressUpdate = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly address?: Maybe
; + readonly errors: ReadonlyArray; + /** A user object for which the address was edited. */ + readonly user?: Maybe; +}; + +/** Event sent when account change email is requested. */ +export type AccountChangeEmailRequested = Event & { + /** The channel data. */ + readonly channel?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The new email address the user wants to change to. */ + readonly newEmail?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The URL to redirect the user after he accepts the request. */ + readonly redirectUrl?: Maybe; + /** Shop data. */ + readonly shop?: Maybe; + /** The token required to confirm request. */ + readonly token?: Maybe; + /** The user the event relates to. */ + readonly user?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when account confirmation requested. This event is always sent. enableAccountConfirmationByEmail flag set to True is not required. */ +export type AccountConfirmationRequested = Event & { + /** The channel data. */ + readonly channel?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The URL to redirect the user after he accepts the request. */ + readonly redirectUrl?: Maybe; + /** Shop data. */ + readonly shop?: Maybe; + /** The token required to confirm request. */ + readonly token?: Maybe; + /** The user the event relates to. */ + readonly user?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when account is confirmed. */ +export type AccountConfirmed = Event & { + /** The channel data. */ + readonly channel?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The URL to redirect the user after he accepts the request. */ + readonly redirectUrl?: Maybe; + /** Shop data. */ + readonly shop?: Maybe; + /** The token required to confirm request. */ + readonly token?: Maybe; + /** The user the event relates to. */ + readonly user?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Remove user account. + * + * Requires one of the following permissions: AUTHENTICATED_USER. + * + * Triggers the following webhook events: + * - ACCOUNT_DELETED (async): Account was deleted. + */ +export type AccountDelete = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + readonly user?: Maybe; +}; + +/** Event sent when account delete is requested. */ +export type AccountDeleteRequested = Event & { + /** The channel data. */ + readonly channel?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The URL to redirect the user after he accepts the request. */ + readonly redirectUrl?: Maybe; + /** Shop data. */ + readonly shop?: Maybe; + /** The token required to confirm request. */ + readonly token?: Maybe; + /** The user the event relates to. */ + readonly user?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when account is deleted. */ +export type AccountDeleted = Event & { + /** The channel data. */ + readonly channel?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The URL to redirect the user after he accepts the request. */ + readonly redirectUrl?: Maybe; + /** Shop data. */ + readonly shop?: Maybe; + /** The token required to confirm request. */ + readonly token?: Maybe; + /** The user the event relates to. */ + readonly user?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when account email is changed. */ +export type AccountEmailChanged = Event & { + /** The channel data. */ + readonly channel?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The new email address. */ + readonly newEmail?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The URL to redirect the user after he accepts the request. */ + readonly redirectUrl?: Maybe; + /** Shop data. */ + readonly shop?: Maybe; + /** The token required to confirm request. */ + readonly token?: Maybe; + /** The user the event relates to. */ + readonly user?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Represents errors in account mutations. */ +export type AccountError = { + /** A type of address that causes the error. */ + readonly addressType?: Maybe; + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type 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" + | "DISABLED_AUTHENTICATION_METHOD" + | "DUPLICATED_INPUT_ITEM" + | "FILE_SIZE_LIMIT_EXCEEDED" + | "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. */ +export type AccountInput = { + /** Billing address of the customer. */ + readonly defaultBillingAddress?: InputMaybe; + /** Shipping address of the customer. */ + readonly defaultShippingAddress?: InputMaybe; + /** Given name. */ + readonly firstName?: InputMaybe; + /** User language code. */ + readonly languageCode?: InputMaybe; + /** Family name. */ + readonly lastName?: InputMaybe; + /** + * Fields required to update the user metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; +}; + +/** + * 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. + */ +export type AccountRegister = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** Informs whether users need to confirm their email address. */ + readonly requiresConfirmation?: Maybe; + /** @deprecated The field always returns a `User` object constructed from the input data. The `user.id` is always empty. To determine whether the user exists in Saleor, query via an external app with the required permissions. */ + readonly user?: Maybe; +}; + +/** Fields required to create a user. */ +export type AccountRegisterInput = { + /** Slug of a channel which will be used to notify users. Optional when only one channel exists. */ + readonly channel?: InputMaybe; + /** The email address of the user. */ + readonly email: Scalars["String"]["input"]; + /** Given name. */ + readonly firstName?: InputMaybe; + /** User language code. */ + readonly languageCode?: InputMaybe; + /** Family name. */ + readonly lastName?: InputMaybe; + /** + * User public metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** Password. */ + readonly password: Scalars["String"]["input"]; + /** Base of frontend URL that will be needed to create confirmation URL. Required when account confirmation is enabled. */ + readonly redirectUrl?: InputMaybe; +}; + +/** + * 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. + */ +export type AccountRequestDeletion = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** + * 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. + */ +export type AccountSetDefaultAddress = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** An updated user instance. */ + readonly user?: Maybe; +}; + +/** Event sent when setting a new password is requested. */ +export type AccountSetPasswordRequested = Event & { + /** The channel data. */ + readonly channel?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The URL to redirect the user after he accepts the request. */ + readonly redirectUrl?: Maybe; + /** Shop data. */ + readonly shop?: Maybe; + /** The token required to confirm request. */ + readonly token?: Maybe; + /** The user the event relates to. */ + readonly user?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * 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. + */ +export type AccountUpdate = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + readonly user?: Maybe; +}; + +/** Represents user address data. */ +export type Address = Node & + ObjectWithMetadata & { + /** The city of the address. */ + readonly city: Scalars["String"]["output"]; + /** The district of the address. */ + readonly cityArea: Scalars["String"]["output"]; + /** Company or organization name. */ + readonly companyName: Scalars["String"]["output"]; + /** The country of the address. */ + readonly country: CountryDisplay; + /** The country area of the address. */ + readonly countryArea: Scalars["String"]["output"]; + /** The given name of the address. */ + readonly firstName: Scalars["String"]["output"]; + /** The ID of the address. */ + readonly id: Scalars["ID"]["output"]; + /** Address is user's default billing address. */ + readonly isDefaultBillingAddress?: Maybe; + /** Address is user's default shipping address. */ + readonly isDefaultShippingAddress?: Maybe; + /** The family name of the address. */ + readonly lastName: Scalars["String"]["output"]; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** The phone number assigned the address. */ + readonly phone?: Maybe; + /** The postal code of the address. */ + readonly postalCode: Scalars["String"]["output"]; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** The first line of the address. */ + readonly streetAddress1: Scalars["String"]["output"]; + /** The second line of the address. */ + readonly streetAddress2: Scalars["String"]["output"]; + }; + +/** Represents user address data. */ +export type AddressMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents user address data. */ +export type AddressMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents user address data. */ +export type AddressPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents user address data. */ +export type AddressPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** + * Creates user address. + * + * Requires one of the following permissions: MANAGE_USERS. + * + * Triggers the following webhook events: + * - ADDRESS_CREATED (async): A new address was created. + */ +export type AddressCreate = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly address?: Maybe
; + readonly errors: ReadonlyArray; + /** A user instance for which the address was created. */ + readonly user?: Maybe; +}; + +/** Event sent when new address is created. */ +export type AddressCreated = Event & { + /** The address the event relates to. */ + readonly address?: Maybe
; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Deletes an address. + * + * Requires one of the following permissions: MANAGE_USERS. + * + * Triggers the following webhook events: + * - ADDRESS_DELETED (async): An address was deleted. + */ +export type AddressDelete = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly address?: Maybe
; + readonly errors: ReadonlyArray; + /** A user instance for which the address was deleted. */ + readonly user?: Maybe; +}; + +/** Event sent when address is deleted. */ +export type AddressDeleted = Event & { + /** The address the event relates to. */ + readonly address?: Maybe
; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Filtering options for addresses. */ +export type AddressFilterInput = { + readonly country?: InputMaybe; + readonly phoneNumber?: InputMaybe; +}; + +export type AddressInput = { + /** City. */ + readonly city?: InputMaybe; + /** District. */ + readonly cityArea?: InputMaybe; + /** Company or organization. */ + readonly companyName?: InputMaybe; + /** Country. */ + readonly country?: InputMaybe; + /** State or province. */ + readonly countryArea?: InputMaybe; + /** Given name. */ + readonly firstName?: InputMaybe; + /** Family name. */ + readonly lastName?: InputMaybe; + /** + * Address public metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** + * Phone number. + * + * Phone numbers are validated with Google's [libphonenumber](https://github.com/google/libphonenumber) library. + */ + readonly phone?: InputMaybe; + /** Postal code. */ + readonly postalCode?: InputMaybe; + /** + * 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. + */ + readonly skipValidation?: InputMaybe; + /** Address. */ + readonly streetAddress1?: InputMaybe; + /** Address. */ + readonly streetAddress2?: InputMaybe; +}; + +/** + * 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. + */ +export type AddressSetDefault = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** An updated user instance. */ + readonly user?: Maybe; +}; + +export type 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. + */ +export type AddressUpdate = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly address?: Maybe
; + readonly errors: ReadonlyArray; + /** A user object for which the address was edited. */ + readonly user?: Maybe; +}; + +/** Event sent when address is updated. */ +export type AddressUpdated = Event & { + /** The address the event relates to. */ + readonly address?: Maybe
; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Represents address validation rules for a country. */ +export 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) + */ + readonly addressFormat: Scalars["String"]["output"]; + /** + * 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) + */ + readonly addressLatinFormat: Scalars["String"]["output"]; + /** The allowed fields to use in address. */ + readonly allowedFields: ReadonlyArray; + /** The available choices for the city area of the address validation rule. */ + readonly cityAreaChoices: ReadonlyArray; + /** The formal name of the city area of the address validation rule. */ + readonly cityAreaType: Scalars["String"]["output"]; + /** The available choices for the city of the address validation rule. */ + readonly cityChoices: ReadonlyArray; + /** The formal name of the city of the address validation rule. */ + readonly cityType: Scalars["String"]["output"]; + /** The available choices for the country area of the address validation rule. */ + readonly countryAreaChoices: ReadonlyArray; + /** The formal name of the county area of the address validation rule. */ + readonly countryAreaType: Scalars["String"]["output"]; + /** The country code of the address validation rule. */ + readonly countryCode: Scalars["String"]["output"]; + /** The country name of the address validation rule. */ + readonly countryName: Scalars["String"]["output"]; + /** The example postal code of the address validation rule. */ + readonly postalCodeExamples: ReadonlyArray; + /** The regular expression for postal code validation. */ + readonly postalCodeMatchers: ReadonlyArray; + /** The postal code prefix of the address validation rule. */ + readonly postalCodePrefix: Scalars["String"]["output"]; + /** The formal name of the postal code of the address validation rule. */ + readonly postalCodeType: Scalars["String"]["output"]; + /** The required fields to create a valid address. */ + readonly requiredFields: ReadonlyArray; + /** The list of fields that should be in upper case for address validation rule. */ + readonly upperFields: ReadonlyArray; +}; + +/** Represents allocation. */ +export type Allocation = Node & { + /** The ID of allocation. */ + readonly id: Scalars["ID"]["output"]; + /** + * Quantity allocated for orders. + * + * Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS. + */ + readonly quantity: Scalars["Int"]["output"]; + /** + * The warehouse were items were allocated. + * + * Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS. + */ + readonly 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 + */ +export type AllocationStrategyEnum = "PRIORITIZE_HIGH_STOCK" | "PRIORITIZE_SORTING_ORDER"; + +/** Represents app data. */ +export type App = Node & + ObjectWithMetadata & { + /** Description of this app. */ + readonly aboutApp?: Maybe; + /** JWT token used to authenticate by third-party app. */ + readonly accessToken?: Maybe; + /** URL to iframe with the app. */ + readonly appUrl?: Maybe; + /** The App's author name. */ + readonly author?: Maybe; + /** App's brand data. */ + readonly brand?: Maybe; + /** + * Circuit breaker last state change date. + * + * Added in Saleor 3.21. + */ + readonly breakerLastStateChange?: Maybe; + /** + * Circuit breaker state, if open, sync webhooks operation is disrupted. + * + * Added in Saleor 3.21. + */ + readonly breakerState: CircuitBreakerStateEnum; + /** + * URL to iframe with the configuration for the app. + * @deprecated Use `appUrl` instead. + */ + readonly configurationUrl?: Maybe; + /** The date and time when the app was created. */ + readonly created?: Maybe; + /** + * Description of the data privacy defined for this app. + * @deprecated Use `dataPrivacyUrl` instead. + */ + readonly dataPrivacy?: Maybe; + /** URL to details about the privacy policy on the app owner page. */ + readonly dataPrivacyUrl?: Maybe; + /** App's dashboard extensions. */ + readonly extensions: ReadonlyArray; + /** Homepage of the app. */ + readonly homepageUrl?: Maybe; + /** The ID of the app. */ + readonly id: Scalars["ID"]["output"]; + /** + * Canonical app ID from the manifest + * + * Added in Saleor 3.19. + */ + readonly identifier?: Maybe; + /** Determine if app will be set active or not. */ + readonly isActive?: Maybe; + /** URL to manifest used during app's installation. */ + readonly manifestUrl?: Maybe; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** Name of the app. */ + readonly name?: Maybe; + /** List of the app's permissions. */ + readonly permissions?: Maybe>; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** + * List of problems associated with this app. + * + * Added in Saleor 3.22. + * + * Requires one of the following permissions: AUTHENTICATED_APP, MANAGE_APPS. + */ + readonly problems?: Maybe>; + /** Support page for the app. */ + readonly supportUrl?: Maybe; + /** + * Last 4 characters of the tokens. + * + * Requires one of the following permissions: MANAGE_APPS, OWNER. + */ + readonly tokens?: Maybe>; + /** Type of the app. */ + readonly type?: Maybe; + /** Version number of the app. */ + readonly version?: Maybe; + /** + * List of webhooks assigned to this app. + * + * Requires one of the following permissions: MANAGE_APPS, OWNER. + */ + readonly webhooks?: Maybe>; + }; + +/** Represents app data. */ +export type AppMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents app data. */ +export type AppMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents app data. */ +export type AppPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents app data. */ +export type AppPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents app data. */ +export type AppProblemsArgs = { + limit?: InputMaybe; +}; + +/** + * Activate the app. + * + * Requires one of the following permissions: MANAGE_APPS. + * + * Triggers the following webhook events: + * - APP_STATUS_CHANGED (async): An app was activated. + */ +export type AppActivate = { + readonly app?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly appErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** Represents the app's brand data. */ +export type AppBrand = { + /** App's logos details. */ + readonly logo: AppBrandLogo; +}; + +/** Represents the app's brand logo data. */ +export type AppBrandLogo = { + /** URL to the default logo image. */ + readonly default: Scalars["String"]["output"]; +}; + +/** Represents the app's brand logo data. */ +export type AppBrandLogoDefaultArgs = { + format?: InputMaybe; + size?: InputMaybe; +}; + +export type AppCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type AppCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly 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. + */ +export type AppCreate = { + readonly app?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly appErrors: ReadonlyArray; + /** The newly created authentication token. */ + readonly authToken?: Maybe; + readonly errors: ReadonlyArray; +}; + +/** + * Deactivate the app. + * + * Requires one of the following permissions: MANAGE_APPS. + * + * Triggers the following webhook events: + * - APP_STATUS_CHANGED (async): An app was deactivated. + */ +export type AppDeactivate = { + readonly app?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly appErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** + * Deletes an app. + * + * Requires one of the following permissions: MANAGE_APPS. + * + * Triggers the following webhook events: + * - APP_DELETED (async): An app was deleted. + */ +export type AppDelete = { + readonly app?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly appErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** + * Deletes failed installation. + * + * Requires one of the following permissions: MANAGE_APPS. + */ +export type AppDeleteFailedInstallation = { + /** @deprecated Use `errors` field instead. */ + readonly appErrors: ReadonlyArray; + readonly appInstallation?: Maybe; + readonly errors: ReadonlyArray; +}; + +/** Event sent when app is deleted. */ +export type AppDeleted = Event & { + /** The application the event relates to. */ + readonly app?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type AppError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** List of permissions which causes the error. */ + readonly permissions?: Maybe>; +}; + +export type 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. */ +export type AppExtension = Node & { + /** JWT token used to authenticate by third-party app extension. */ + readonly accessToken?: Maybe; + /** The app assigned to app extension. */ + readonly app: App; + /** The ID of the app extension. */ + readonly id: Scalars["ID"]["output"]; + /** Label of the extension to show in the dashboard. */ + readonly label: Scalars["String"]["output"]; + /** + * Name of the extension mount point in the dashboard. Value returned in UPPERCASE. + * + * Added in Saleor 3.22. + */ + readonly mountName: Scalars["String"]["output"]; + /** List of the app extension's permissions. */ + readonly permissions: ReadonlyArray; + /** + * App extension settings. + * + * Added in Saleor 3.22. + */ + readonly settings: Scalars["JSON"]["output"]; + /** + * Name of the extension target in the dashboard. Value returned in UPPERCASE. + * + * Added in Saleor 3.22. + */ + readonly targetName: Scalars["String"]["output"]; + /** URL of a view where extension's iframe is placed. */ + readonly url: Scalars["String"]["output"]; +}; + +export type AppExtensionCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type AppExtensionCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: AppExtension; +}; + +export type AppExtensionFilterInput = { + /** + * Plain-text mount name (case insensitive) + * + * Added in Saleor 3.22. + */ + readonly mountName?: InputMaybe>; + /** + * Plain-text target name (case insensitive) + * + * Added in Saleor 3.22. + */ + readonly targetName?: InputMaybe; +}; + +/** + * Fetch and validate manifest. + * + * Requires one of the following permissions: MANAGE_APPS. + */ +export type AppFetchManifest = { + /** @deprecated Use `errors` field instead. */ + readonly appErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** The validated manifest. */ + readonly manifest?: Maybe; +}; + +export type AppFilterInput = { + readonly isActive?: InputMaybe; + readonly search?: InputMaybe; + readonly type?: InputMaybe; +}; + +export type AppInput = { + /** + * Canonical app ID. If not provided, the identifier will be generated based on app.id. + * + * Added in Saleor 3.19. + */ + readonly identifier?: InputMaybe; + /** Name of the app. */ + readonly name?: InputMaybe; + /** List of permission code names to assign to this app. */ + readonly permissions?: InputMaybe>; +}; + +/** Install new app by using app manifest. Requires the following permissions: AUTHENTICATED_STAFF_USER and MANAGE_APPS. */ +export type AppInstall = { + /** @deprecated Use `errors` field instead. */ + readonly appErrors: ReadonlyArray; + readonly appInstallation?: Maybe; + readonly errors: ReadonlyArray; +}; + +export type AppInstallInput = { + /** Determine if app will be set active or not. */ + readonly activateAfterInstallation?: InputMaybe; + /** Name of the app to install. */ + readonly appName: Scalars["String"]["input"]; + /** URL to app's manifest in JSON format. */ + readonly manifestUrl: Scalars["String"]["input"]; + /** List of permission code names to assign to this app. */ + readonly permissions?: InputMaybe>; +}; + +/** Represents ongoing installation of app. */ +export type AppInstallation = Job & + Node & { + /** The name of the app installation. */ + readonly appName: Scalars["String"]["output"]; + /** App's brand data. */ + readonly brand?: Maybe; + /** Created date time of job in ISO 8601 format. */ + readonly createdAt: Scalars["DateTime"]["output"]; + /** The ID of the app installation. */ + readonly id: Scalars["ID"]["output"]; + /** The URL address of manifest for the app installation. */ + readonly manifestUrl: Scalars["String"]["output"]; + /** Job message. */ + readonly message?: Maybe; + /** Job status. */ + readonly status: JobStatusEnum; + /** Date time of job last update in ISO 8601 format. */ + readonly updatedAt: Scalars["DateTime"]["output"]; + }; + +/** Event sent when new app is installed. */ +export type AppInstalled = Event & { + /** The application the event relates to. */ + readonly app?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Represents the app's manifest brand data. */ +export type AppManifestBrand = { + /** App's logos details. */ + readonly logo: AppManifestBrandLogo; +}; + +/** Represents the app's manifest brand data. */ +export type AppManifestBrandLogo = { + /** Data URL with a base64 encoded logo image. */ + readonly default: Scalars["String"]["output"]; +}; + +/** Represents the app's manifest brand data. */ +export type AppManifestBrandLogoDefaultArgs = { + format?: InputMaybe; + size?: InputMaybe; +}; + +export type AppManifestExtension = { + /** Label of the extension to show in the dashboard. */ + readonly label: Scalars["String"]["output"]; + /** + * Name of the extension mount point in the dashboard. Value returned in UPPERCASE. + * + * Added in Saleor 3.22. + */ + readonly mountName: Scalars["String"]["output"]; + /** List of the app extension's permissions. */ + readonly permissions: ReadonlyArray; + /** + * App extension settings. + * + * Added in Saleor 3.22. + */ + readonly settings: Scalars["JSON"]["output"]; + /** + * Name of the extension target in the dashboard. Value returned in UPPERCASE. + * + * Added in Saleor 3.22. + */ + readonly targetName: Scalars["String"]["output"]; + /** URL of a view where extension's iframe is placed. */ + readonly url: Scalars["String"]["output"]; +}; + +export type AppManifestRequiredSaleorVersion = { + /** Required Saleor version as semver range. */ + readonly constraint: Scalars["String"]["output"]; + /** Informs if the Saleor version matches the required one. */ + readonly satisfied: Scalars["Boolean"]["output"]; +}; + +export type AppManifestWebhook = { + /** The asynchronous events that webhook wants to subscribe. */ + readonly asyncEvents?: Maybe>; + /** The name of the webhook. */ + readonly name: Scalars["String"]["output"]; + /** Subscription query of a webhook */ + readonly query: Scalars["String"]["output"]; + /** The synchronous events that webhook wants to subscribe. */ + readonly syncEvents?: Maybe>; + /** The url to receive the payload. */ + readonly targetUrl: Scalars["String"]["output"]; +}; + +/** + * Represents a problem associated with an app. + * + * Added in Saleor 3.22. + */ +export type AppProblem = Node & { + /** + * Number of occurrences. + * + * Added in Saleor 3.22. + */ + readonly count: Scalars["Int"]["output"]; + /** + * The date and time when the problem was created. + * + * Added in Saleor 3.22. + */ + readonly createdAt: Scalars["DateTime"]["output"]; + /** + * Dismissal information. Null if the problem has not been dismissed. + * + * Added in Saleor 3.22. + * + * Requires one of the following permissions: AUTHENTICATED_APP, MANAGE_APPS. + */ + readonly dismissed?: Maybe; + /** + * The ID of the app problem. + * + * Added in Saleor 3.22. + */ + readonly id: Scalars["ID"]["output"]; + /** + * Whether the problem has reached critical threshold. + * + * Added in Saleor 3.22. + */ + readonly isCritical: Scalars["Boolean"]["output"]; + /** + * Key identifying the type of problem. + * + * Added in Saleor 3.22. + */ + readonly key: Scalars["String"]["output"]; + /** + * The problem message. + * + * Added in Saleor 3.22. + */ + readonly message: Scalars["String"]["output"]; + /** + * The date and time when the problem was last updated. + * + * Added in Saleor 3.22. + */ + readonly updatedAt: Scalars["DateTime"]["output"]; +}; + +/** + * Add a problem to the calling app. + * + * Added in Saleor 3.22. + * + * Requires one of the following permissions: AUTHENTICATED_APP. + */ +export type AppProblemCreate = { + /** The created or updated app problem. */ + readonly appProblem?: Maybe; + readonly errors: ReadonlyArray; +}; + +export type AppProblemCreateError = { + /** The error code. */ + readonly code: AppProblemCreateErrorCode; + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type AppProblemCreateErrorCode = "GRAPHQL_ERROR" | "INVALID" | "NOT_FOUND" | "REQUIRED"; + +export type AppProblemCreateInput = { + /** Time window in minutes for aggregating problems with the same key. Defaults to 60. If 0, a new problem is always created. */ + readonly aggregationPeriod?: InputMaybe; + /** If set, the problem becomes critical when count reaches this value. If sent again with higher value than already counted, problem can be de-escalated. */ + readonly criticalThreshold?: InputMaybe; + /** Key identifying the type of problem. App can add multiple problems under the same key, to merge them together or delete them in batch. Must be between 3 and 128 characters. */ + readonly key: Scalars["String"]["input"]; + /** The problem message to display. Must be at least 3 characters. Messages longer than 2048 characters will be truncated to 2048 characters with '...' suffix. */ + readonly message: Scalars["String"]["input"]; +}; + +/** + * Dismiss problems for an app. + * + * Added in Saleor 3.22. + * + * Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP. + */ +export type AppProblemDismiss = { + readonly errors: ReadonlyArray; +}; + +/** Input for app callers to dismiss their own problems. */ +export type AppProblemDismissByAppInput = { + /** List of problem IDs to dismiss. Cannot be combined with keys. Max 100. */ + readonly ids?: InputMaybe>; + /** List of problem keys to dismiss. Cannot be combined with ids. Max 100. */ + readonly keys?: InputMaybe>; +}; + +/** Input for staff callers to dismiss problems by IDs. */ +export type AppProblemDismissByStaffWithIdsInput = { + /** List of problem IDs to dismiss. Max 100. */ + readonly ids: ReadonlyArray; +}; + +/** Input for staff callers to dismiss problems by keys. */ +export type AppProblemDismissByStaffWithKeysInput = { + /** ID of the app whose problems to dismiss. */ + readonly app: Scalars["ID"]["input"]; + /** List of problem keys to dismiss. Max 100. */ + readonly keys: ReadonlyArray; +}; + +export type AppProblemDismissError = { + /** The error code. */ + readonly code: AppProblemDismissErrorCode; + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type AppProblemDismissErrorCode = + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND" + | "OUT_OF_SCOPE_APP" + | "REQUIRED"; + +/** Input for dismissing app problems. Only one can be specified. */ +export type AppProblemDismissInput = { + /** For app callers only - dismiss own problems. */ + readonly byApp?: InputMaybe; + /** For staff callers - dismiss problems by IDs. */ + readonly byStaffWithIds?: InputMaybe; + /** For staff callers - dismiss problems by keys for specified app. */ + readonly byStaffWithKeys?: InputMaybe; +}; + +/** + * Dismissal information for an app problem. + * + * Added in Saleor 3.22. + */ +export type AppProblemDismissed = { + /** + * Whether the problem was dismissed by an App or a User. + * + * Added in Saleor 3.22. + */ + readonly by: AppProblemDismissedByEnum; + /** + * The user who dismissed this problem. Null if dismissed by an app or the user was deleted. + * + * Added in Saleor 3.22. + * + * Requires one of the following permissions: MANAGE_STAFF. + */ + readonly user?: Maybe; + /** + * Email of the user who dismissed this problem. Preserved even if the user is deleted. + * + * Added in Saleor 3.22. + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + */ + readonly userEmail?: Maybe; +}; + +export type AppProblemDismissedByEnum = "APP" | "USER"; + +/** + * Re-enable sync webhooks for provided app. Can be used to manually re-enable sync webhooks for the app before the cooldown period ends. + * + * Added in Saleor 3.21. + * + * Requires one of the following permissions: MANAGE_APPS. + */ +export type AppReenableSyncWebhooks = { + /** App for which sync webhooks were re-enabled. */ + readonly app?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly appErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** + * 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. + */ +export type AppRetryInstall = { + /** @deprecated Use `errors` field instead. */ + readonly appErrors: ReadonlyArray; + readonly appInstallation?: Maybe; + readonly errors: ReadonlyArray; +}; + +export type AppSortField = + /** Sort apps by creation date. */ + | "CREATION_DATE" + /** Sort apps by name. */ + | "NAME"; + +export type AppSortingInput = { + /** Specifies the direction in which to sort apps. */ + readonly direction: OrderDirection; + /** Sort apps by the selected field. */ + readonly field: AppSortField; +}; + +/** Event sent when app status has changed. */ +export type AppStatusChanged = Event & { + /** The application the event relates to. */ + readonly app?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Represents token data. */ +export type AppToken = Node & { + /** Last 4 characters of the token. */ + readonly authToken?: Maybe; + /** The ID of the app token. */ + readonly id: Scalars["ID"]["output"]; + /** Name of the authenticated token. */ + readonly name?: Maybe; +}; + +/** + * Creates a new token. + * + * Requires one of the following permissions: MANAGE_APPS. + */ +export type AppTokenCreate = { + /** @deprecated Use `errors` field instead. */ + readonly appErrors: ReadonlyArray; + readonly appToken?: Maybe; + /** The newly created authentication token. */ + readonly authToken?: Maybe; + readonly errors: ReadonlyArray; +}; + +/** + * Deletes an authentication token assigned to app. + * + * Requires one of the following permissions: MANAGE_APPS. + */ +export type AppTokenDelete = { + /** @deprecated Use `errors` field instead. */ + readonly appErrors: ReadonlyArray; + readonly appToken?: Maybe; + readonly errors: ReadonlyArray; +}; + +export type AppTokenInput = { + /** ID of app. */ + readonly app: Scalars["ID"]["input"]; + /** Name of the token. */ + readonly name?: InputMaybe; +}; + +/** Verify provided app token. */ +export type AppTokenVerify = { + /** @deprecated Use `errors` field instead. */ + readonly appErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** Determine if token is valid or not. */ + readonly valid: Scalars["Boolean"]["output"]; +}; + +/** Enum determining type of your App. */ +export type 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. + */ +export type AppUpdate = { + readonly app?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly appErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** Event sent when app is updated. */ +export type AppUpdated = Event & { + /** The application the event relates to. */ + readonly app?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type 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. + */ +export type AssignNavigation = { + readonly errors: ReadonlyArray; + /** Assigned navigation menu. */ + readonly menu?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly menuErrors: ReadonlyArray; +}; + +/** + * Represents an attribute assigned to an object. + * + * Added in Saleor 3.22. + */ +export type AssignedAttribute = { + /** Attribute assigned to an object. */ + readonly attribute: Attribute; +}; + +export type AssignedAttributeReferenceInput = { + /** Returns objects with a reference pointing to a category identified by the given slug. */ + readonly categorySlugs?: InputMaybe; + /** Returns objects with a reference pointing to a collection identified by the given slug. */ + readonly collectionSlugs?: InputMaybe; + /** Returns objects with a reference pointing to a page identified by the given slug. */ + readonly pageSlugs?: InputMaybe; + /** Returns objects with a reference pointing to a product identified by the given slug. */ + readonly productSlugs?: InputMaybe; + /** Returns objects with a reference pointing to a product variant identified by the given sku. */ + readonly productVariantSkus?: InputMaybe; + /** Returns objects with a reference pointing to an object identified by the given ID. */ + readonly referencedIds?: InputMaybe; +}; + +export type AssignedAttributeValueInput = { + /** Filter by boolean value for attributes of boolean type. */ + readonly boolean?: InputMaybe; + /** Filter by date value for attributes of date type. */ + readonly date?: InputMaybe; + /** Filter by date time value for attributes of date time type. */ + readonly dateTime?: InputMaybe; + /** Filter by name assigned to AttributeValue. */ + readonly name?: InputMaybe; + /** Filter by numeric value for attributes of numeric type. */ + readonly numeric?: InputMaybe; + /** Filter by reference attribute value. */ + readonly reference?: InputMaybe; + /** Filter by slug assigned to AttributeValue. */ + readonly slug?: InputMaybe; +}; + +export type AssignedAttributeWhereInput = { + /** Filter by attribute slug. */ + readonly slug?: InputMaybe; + /** Filter by value of the attribute. Only one value input field is allowed. If provided more than one, the error will be raised. */ + readonly value?: InputMaybe; +}; + +/** + * Represents a boolean attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedBooleanAttribute = AssignedAttribute & { + /** Attribute assigned to an object. */ + readonly attribute: Attribute; + /** The assigned boolean value. */ + readonly value?: Maybe; +}; + +/** + * Represents a single choice value of the attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedChoiceAttributeValue = { + /** Name of a value displayed in the interface. */ + readonly name?: Maybe; + /** Internal representation of a value (unique per attribute). */ + readonly slug?: Maybe; + /** Translation of the name. */ + readonly translation?: Maybe; +}; + +/** + * Represents a single choice value of the attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedChoiceAttributeValueTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * Represents a date attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedDateAttribute = AssignedAttribute & { + /** Attribute assigned to an object. */ + readonly attribute: Attribute; + /** The assigned date value. */ + readonly value?: Maybe; +}; + +/** + * Represents a date time attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedDateTimeAttribute = AssignedAttribute & { + /** Attribute assigned to an object. */ + readonly attribute: Attribute; + /** The assigned date time value. */ + readonly value?: Maybe; +}; + +/** + * Represents file attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedFileAttribute = AssignedAttribute & { + /** Attribute assigned to an object. */ + readonly attribute: Attribute; + /** The assigned file. */ + readonly value?: Maybe; +}; + +/** + * Represents multi category reference attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedMultiCategoryReferenceAttribute = AssignedAttribute & { + /** Attribute assigned to an object. */ + readonly attribute: Attribute; + /** List of assigned category references. */ + readonly value: ReadonlyArray; +}; + +/** + * Represents multi category reference attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedMultiCategoryReferenceAttributeValueArgs = { + limit?: InputMaybe; +}; + +/** + * Represents a multi choice attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedMultiChoiceAttribute = AssignedAttribute & { + /** Attribute assigned to an object. */ + readonly attribute: Attribute; + /** List of assigned choice values. */ + readonly value: ReadonlyArray; +}; + +/** + * Represents a multi choice attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedMultiChoiceAttributeValueArgs = { + limit?: InputMaybe; +}; + +/** + * Represents multi collection reference attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedMultiCollectionReferenceAttribute = AssignedAttribute & { + /** Attribute assigned to an object. */ + readonly attribute: Attribute; + /** List of assigned collection references. */ + readonly value: ReadonlyArray; +}; + +/** + * Represents multi collection reference attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedMultiCollectionReferenceAttributeValueArgs = { + limit?: InputMaybe; +}; + +/** + * Represents multi page reference attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedMultiPageReferenceAttribute = AssignedAttribute & { + /** Attribute assigned to an object. */ + readonly attribute: Attribute; + /** List of assigned page references. */ + readonly value: ReadonlyArray; +}; + +/** + * Represents multi page reference attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedMultiPageReferenceAttributeValueArgs = { + limit?: InputMaybe; +}; + +/** + * Represents multi product reference attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedMultiProductReferenceAttribute = AssignedAttribute & { + /** Attribute assigned to an object. */ + readonly attribute: Attribute; + /** List of assigned product references. */ + readonly value: ReadonlyArray; +}; + +/** + * Represents multi product reference attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedMultiProductReferenceAttributeValueArgs = { + limit?: InputMaybe; +}; + +/** + * Represents multi product variant reference attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedMultiProductVariantReferenceAttribute = AssignedAttribute & { + /** Attribute assigned to an object. */ + readonly attribute: Attribute; + /** List of assigned product variant references. */ + readonly value: ReadonlyArray; +}; + +/** + * Represents multi product variant reference attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedMultiProductVariantReferenceAttributeValueArgs = { + limit?: InputMaybe; +}; + +/** + * Represents a numeric value of an attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedNumericAttribute = AssignedAttribute & { + /** Attribute assigned to an object. */ + readonly attribute: Attribute; + /** The assigned numeric value. */ + readonly value?: Maybe; +}; + +/** + * Represents plain text attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedPlainTextAttribute = AssignedAttribute & { + /** Attribute assigned to an object. */ + readonly attribute: Attribute; + /** Translation of the plain text content in the specified language. */ + readonly translation?: Maybe; + /** The assigned plain text content. */ + readonly value?: Maybe; +}; + +/** + * Represents plain text attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedPlainTextAttributeTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * Represents single category reference attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedSingleCategoryReferenceAttribute = AssignedAttribute & { + /** Attribute assigned to an object. */ + readonly attribute: Attribute; + /** The assigned category reference. */ + readonly value?: Maybe; +}; + +/** + * Represents a single choice attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedSingleChoiceAttribute = AssignedAttribute & { + /** Attribute assigned to an object. */ + readonly attribute: Attribute; + /** The assigned choice value. */ + readonly value?: Maybe; +}; + +/** + * Represents single collection reference attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedSingleCollectionReferenceAttribute = AssignedAttribute & { + /** Attribute assigned to an object. */ + readonly attribute: Attribute; + /** The assigned collection reference. */ + readonly value?: Maybe; +}; + +/** + * Represents single page reference attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedSinglePageReferenceAttribute = AssignedAttribute & { + /** Attribute assigned to an object. */ + readonly attribute: Attribute; + /** The assigned page reference. */ + readonly value?: Maybe; +}; + +/** + * Represents single product reference attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedSingleProductReferenceAttribute = AssignedAttribute & { + /** Attribute assigned to an object. */ + readonly attribute: Attribute; + /** The assigned product reference. */ + readonly value?: Maybe; +}; + +/** + * Represents single product variant reference attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedSingleProductVariantReferenceAttribute = AssignedAttribute & { + /** Attribute assigned to an object. */ + readonly attribute: Attribute; + /** The assigned product variant reference. */ + readonly value?: Maybe; +}; + +/** + * Represents a swatch attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedSwatchAttribute = AssignedAttribute & { + /** Attribute assigned to an object. */ + readonly attribute: Attribute; + /** The assigned swatch value. */ + readonly value?: Maybe; +}; + +/** + * Represents a single swatch value. + * + * Added in Saleor 3.22. + */ +export type AssignedSwatchAttributeValue = { + /** File associated with the attribute. */ + readonly file?: Maybe; + /** Hex color code. */ + readonly hexColor?: Maybe; + /** Name of the selected swatch value. */ + readonly name?: Maybe; + /** Slug of the selected swatch value. */ + readonly slug?: Maybe; +}; + +/** + * Represents text attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedTextAttribute = AssignedAttribute & { + /** Attribute assigned to an object. */ + readonly attribute: Attribute; + /** Translation of the rich text content in the specified language. */ + readonly translation?: Maybe; + /** The assigned rich text content. */ + readonly value?: Maybe; +}; + +/** + * Represents text attribute. + * + * Added in Saleor 3.22. + */ +export type AssignedTextAttributeTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** Represents assigned attribute to variant with variant selection attached. */ +export type AssignedVariantAttribute = { + /** Attribute assigned to variant. */ + readonly attribute: Attribute; + /** Determines, whether assigned attribute is allowed for variant selection. Supported variant types for variant selection are: ['dropdown', 'boolean', 'swatch', 'numeric'] */ + readonly variantSelection: Scalars["Boolean"]["output"]; +}; + +/** Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. */ +export type Attribute = 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. + * @deprecated Field no longer supported + */ + readonly availableInGrid: Scalars["Boolean"]["output"]; + /** A list of predefined attribute choices available for selection. Available only for attributes with predefined choices. */ + readonly choices?: Maybe; + /** The entity type which can be used as a reference. */ + readonly entityType?: Maybe; + /** External ID of this attribute. */ + readonly externalReference?: Maybe; + /** 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. */ + readonly filterableInDashboard: Scalars["Boolean"]["output"]; + /** + * 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. + * @deprecated Field no longer supported + */ + readonly filterableInStorefront: Scalars["Boolean"]["output"]; + /** The ID of the attribute. */ + readonly id: Scalars["ID"]["output"]; + /** The input type to use for entering attribute values in the dashboard. */ + readonly inputType?: Maybe; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** Name of an attribute displayed in the interface. */ + readonly name: Scalars["String"]["output"]; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** A list of product types that use this attribute as a product attribute. */ + readonly productTypes: ProductTypeCountableConnection; + /** A list of product types that use this attribute as a product variant attribute. */ + readonly productVariantTypes: ProductTypeCountableConnection; + /** + * The reference types (product or page type) that are used to narrow down the choices of reference objects. + * + * Added in Saleor 3.22. + */ + readonly referenceTypes?: Maybe>; + /** Internal representation of an attribute name. */ + readonly slug: Scalars["String"]["output"]; + /** + * 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. + * @deprecated Field no longer supported + */ + readonly storefrontSearchPosition: Scalars["Int"]["output"]; + /** Returns translated attribute fields for the given language code. */ + readonly translation?: Maybe; + /** The attribute type. */ + readonly type: AttributeTypeEnum; + /** The unit of attribute values. */ + readonly unit?: Maybe; + /** 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. */ + readonly valueRequired: Scalars["Boolean"]["output"]; + /** 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. */ + readonly visibleInStorefront: Scalars["Boolean"]["output"]; + /** Flag indicating that attribute has predefined choices. */ + readonly withChoices: Scalars["Boolean"]["output"]; + }; + +/** Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. */ +export type AttributeChoicesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + search?: InputMaybe; + sortBy?: InputMaybe; + where?: InputMaybe; +}; + +/** Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. */ +export type AttributeMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. */ +export type AttributeMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. */ +export type AttributePrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. */ +export type AttributePrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. */ +export type AttributeProductTypesArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +/** Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. */ +export type AttributeProductVariantTypesArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +/** Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. */ +export type AttributeReferenceTypesArgs = { + limit?: InputMaybe; +}; + +/** Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. */ +export type AttributeTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * Creates attributes. + * + * Triggers the following webhook events: + * - ATTRIBUTE_CREATED (async): An attribute was created. + */ +export type AttributeBulkCreate = { + /** Returns how many objects were created. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** List of the created attributes. */ + readonly results: ReadonlyArray; +}; + +export type AttributeBulkCreateError = { + /** The error code. */ + readonly code: AttributeBulkCreateErrorCode; + /** The error message. */ + readonly message?: Maybe; + /** Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly path?: Maybe; +}; + +export type AttributeBulkCreateErrorCode = + | "ALREADY_EXISTS" + | "BLANK" + | "DUPLICATED_INPUT_ITEM" + | "GRAPHQL_ERROR" + | "INVALID" + | "MAX_LENGTH" + | "NOT_FOUND" + | "REQUIRED" + | "UNIQUE"; + +export type AttributeBulkCreateResult = { + /** Attribute data. */ + readonly attribute?: Maybe; + /** List of errors occurred on create attempt. */ + readonly errors?: Maybe>; +}; + +/** + * 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. + */ +export type AttributeBulkDelete = { + /** @deprecated Use `errors` field instead. */ + readonly attributeErrors: ReadonlyArray; + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; +}; + +/** + * Creates/updates translations for attributes. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ +export type AttributeBulkTranslate = { + /** Returns how many translations were created/updated. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** List of the translations. */ + readonly results: ReadonlyArray; +}; + +export type AttributeBulkTranslateError = { + /** The error code. */ + readonly code: AttributeTranslateErrorCode; + /** The error message. */ + readonly message?: Maybe; + /** Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly path?: Maybe; +}; + +export type AttributeBulkTranslateInput = { + /** External reference of an attribute. */ + readonly externalReference?: InputMaybe; + /** Attribute ID. */ + readonly id?: InputMaybe; + /** Translation language code. */ + readonly languageCode: LanguageCodeEnum; + /** Translation fields. */ + readonly translationFields: NameTranslationInput; +}; + +export type AttributeBulkTranslateResult = { + /** List of errors occurred on translation attempt. */ + readonly errors?: Maybe>; + /** Attribute translation data. */ + readonly translation?: Maybe; +}; + +/** + * Updates attributes. + * + * 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. + */ +export type AttributeBulkUpdate = { + /** Returns how many objects were updated. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** List of the updated attributes. */ + readonly results: ReadonlyArray; +}; + +export type AttributeBulkUpdateError = { + /** The error code. */ + readonly code: AttributeBulkUpdateErrorCode; + /** The error message. */ + readonly message?: Maybe; + /** Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly path?: Maybe; +}; + +export type AttributeBulkUpdateErrorCode = + | "ALREADY_EXISTS" + | "BLANK" + | "DUPLICATED_INPUT_ITEM" + | "GRAPHQL_ERROR" + | "INVALID" + | "MAX_LENGTH" + | "NOT_FOUND" + | "REQUIRED" + | "UNIQUE"; + +export type AttributeBulkUpdateInput = { + /** External ID of this attribute. */ + readonly externalReference?: InputMaybe; + /** Fields to update. */ + readonly fields: AttributeUpdateInput; + /** ID of an attribute to update. */ + readonly id?: InputMaybe; +}; + +export type AttributeBulkUpdateResult = { + /** Attribute data. */ + readonly attribute?: Maybe; + /** List of errors occurred on update attempt. */ + readonly errors?: Maybe>; +}; + +export type AttributeChoicesSortField = + /** Sort attribute choice by name. */ + | "NAME" + /** Sort attribute choice by slug. */ + | "SLUG"; + +export type AttributeChoicesSortingInput = { + /** Specifies the direction in which to sort attribute choices. */ + readonly direction: OrderDirection; + /** Sort attribute choices by the selected field. */ + readonly field: AttributeChoicesSortField; +}; + +export type AttributeCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type AttributeCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: Attribute; +}; + +/** + * Creates an attribute. + * + * Triggers the following webhook events: + * - ATTRIBUTE_CREATED (async): An attribute was created. + */ +export type AttributeCreate = { + /** The created attribute. */ + readonly attribute?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly attributeErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** + * Represents an input for create of attribute. + * + * NOTE: Deprecated fields `filterableInStorefront`, `storefrontSearchPosition` and `availableInGrid` are not supported in bulk mutations: `attributeBulkCreate`, `attributeBulkUpdate`. + */ +export type AttributeCreateInput = { + /** + * Whether the attribute can be displayed in the admin product list. + * @deprecated Field no longer supported + */ + readonly availableInGrid?: InputMaybe; + /** The entity type which can be used as a reference. */ + readonly entityType?: InputMaybe; + /** External ID of this attribute. */ + readonly externalReference?: InputMaybe; + /** Whether the attribute can be filtered in dashboard. */ + readonly filterableInDashboard?: InputMaybe; + /** + * Whether the attribute can be filtered in storefront. + * @deprecated Field no longer supported + */ + readonly filterableInStorefront?: InputMaybe; + /** The input type to use for entering attribute values in the dashboard. */ + readonly inputType?: InputMaybe; + /** Whether the attribute is for variants only. */ + readonly isVariantOnly?: InputMaybe; + /** Name of an attribute displayed in the interface. */ + readonly name: Scalars["String"]["input"]; + /** + * Specifies reference types to narrow down the choices of reference objects. Applicable only for `REFERENCE` and `SINGLE_REFERENCE` attributes with `PRODUCT`, `PRODUCT_VARIANT` and `PAGE` entity types. Accepts `ProductType` IDs for `PRODUCT` and `PRODUCT_VARIANT` entity types, and `PageType` IDs for `PAGE` entity type. If omitted, all objects of the selected entity type are available as attribute values. + * + * A maximum of 100 reference types can be specified. + * + * Added in Saleor 3.22. + */ + readonly referenceTypes?: InputMaybe>; + /** Internal representation of an attribute name. */ + readonly slug?: InputMaybe; + /** + * The position of the attribute in the storefront navigation (0 by default). + * @deprecated Field no longer supported + */ + readonly storefrontSearchPosition?: InputMaybe; + /** The attribute type. */ + readonly type: AttributeTypeEnum; + /** The unit of attribute values. */ + readonly unit?: InputMaybe; + /** Whether the attribute requires values to be passed or not. */ + readonly valueRequired?: InputMaybe; + /** List of attribute's values. */ + readonly values?: InputMaybe>; + /** Whether the attribute should be visible or not in storefront. */ + readonly visibleInStorefront?: InputMaybe; +}; + +/** Event sent when new attribute is created. */ +export type AttributeCreated = Event & { + /** The attribute the event relates to. */ + readonly attribute?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * 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. + */ +export type AttributeDelete = { + readonly attribute?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly attributeErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** Event sent when attribute is deleted. */ +export type AttributeDeleted = Event & { + /** The attribute the event relates to. */ + readonly attribute?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type AttributeEntityTypeEnum = + | "CATEGORY" + | "COLLECTION" + | "PAGE" + | "PRODUCT" + | "PRODUCT_VARIANT"; + +export type AttributeEntityTypeEnumFilterInput = { + /** The value equal to. */ + readonly eq?: InputMaybe; + /** The value included in. */ + readonly oneOf?: InputMaybe>; +}; + +export type AttributeError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type AttributeErrorCode = + | "ALREADY_EXISTS" + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND" + | "REQUIRED" + | "UNIQUE"; + +export type AttributeFilterInput = { + readonly availableInGrid?: InputMaybe; + /** + * Specifies the channel by which the data should be filtered. + * @deprecated Use root-level channel argument instead. + */ + readonly channel?: InputMaybe; + readonly filterableInDashboard?: InputMaybe; + readonly filterableInStorefront?: InputMaybe; + readonly ids?: InputMaybe>; + readonly inCategory?: InputMaybe; + readonly inCollection?: InputMaybe; + readonly isVariantOnly?: InputMaybe; + readonly metadata?: InputMaybe>; + readonly search?: InputMaybe; + readonly slugs?: InputMaybe>; + readonly type?: InputMaybe; + readonly valueRequired?: InputMaybe; + readonly visibleInStorefront?: InputMaybe; +}; + +export type AttributeInput = { + /** + * The boolean value of the attribute. Requires `slug` to be provided. + * @deprecated Use `value` instead. + */ + readonly boolean?: InputMaybe; + /** + * 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. Requires `slug` to be provided. + * @deprecated Use `value` instead. + */ + readonly date?: InputMaybe; + /** + * The date/time range that the returned values should be in. Requires `slug` to be provided. + * @deprecated Use `value` instead. + */ + readonly dateTime?: InputMaybe; + /** Internal representation of an attribute name. */ + readonly slug?: InputMaybe; + /** Filter by value of the attribute. Only one value input field is allowed. If provided more than one, the error will be raised. Cannot be combined with deprecated fields of `AttributeInput`. */ + readonly value?: InputMaybe; + /** + * Slugs identifying the attributeValues associated with the Attribute. When specified, it filters the results to include only records with one of the matching values. Requires `slug` to be provided. + * @deprecated Use `value` instead. + */ + readonly values?: InputMaybe>; + /** + * The range that the returned values should be in. Requires `slug` to be provided. + * @deprecated Use `value` instead. + */ + readonly valuesRange?: InputMaybe; +}; + +export type AttributeInputTypeEnum = + | "BOOLEAN" + | "DATE" + | "DATE_TIME" + | "DROPDOWN" + | "FILE" + | "MULTISELECT" + | "NUMERIC" + | "PLAIN_TEXT" + | "REFERENCE" + | "RICH_TEXT" + | "SINGLE_REFERENCE" + | "SWATCH"; + +export type AttributeInputTypeEnumFilterInput = { + /** The value equal to. */ + readonly eq?: InputMaybe; + /** The value included in. */ + readonly oneOf?: InputMaybe>; +}; + +/** + * 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. + */ +export type AttributeReorderValues = { + /** Attribute from which values are reordered. */ + readonly attribute?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly attributeErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +export type 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"; + +export type AttributeSortingInput = { + /** Specifies the direction in which to sort attributes. */ + readonly direction: OrderDirection; + /** Sort attributes by the selected field. */ + readonly field: AttributeSortField; +}; + +/** Represents attribute's original translatable fields and related translations. */ +export type AttributeTranslatableContent = Node & { + /** + * Custom attribute of a product. + * @deprecated Get model fields from the root level queries. + */ + readonly attribute?: Maybe; + /** The ID of the attribute to translate. */ + readonly attributeId: Scalars["ID"]["output"]; + /** The ID of the attribute translatable content. */ + readonly id: Scalars["ID"]["output"]; + /** Name of the attribute to translate. */ + readonly name: Scalars["String"]["output"]; + /** Returns translated attribute fields for the given language code. */ + readonly translation?: Maybe; +}; + +/** Represents attribute's original translatable fields and related translations. */ +export type AttributeTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * Creates/updates translations for an attribute. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ +export type AttributeTranslate = { + readonly attribute?: Maybe; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly translationErrors: ReadonlyArray; +}; + +export type AttributeTranslateErrorCode = "GRAPHQL_ERROR" | "INVALID" | "NOT_FOUND" | "REQUIRED"; + +/** Represents attribute translations. */ +export type AttributeTranslation = Node & { + /** The ID of the attribute translation. */ + readonly id: Scalars["ID"]["output"]; + /** Translation language. */ + readonly language: LanguageDisplay; + /** Translated attribute name. */ + readonly name: Scalars["String"]["output"]; + /** Represents the attribute fields to translate. */ + readonly translatableContent?: Maybe; +}; + +export type AttributeTypeEnum = "PAGE_TYPE" | "PRODUCT_TYPE"; + +export type AttributeTypeEnumFilterInput = { + /** The value equal to. */ + readonly eq?: InputMaybe; + /** The value included in. */ + readonly oneOf?: InputMaybe>; +}; + +/** + * 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. + */ +export type AttributeUpdate = { + /** The updated attribute. */ + readonly attribute?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly attributeErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** + * Represents an input for update of attribute. + * + * NOTE: Deprecated fields `filterableInStorefront`, `storefrontSearchPosition` and `availableInGrid` are not supported in bulk mutations: `attributeBulkCreate`, `attributeBulkUpdate`. + */ +export type AttributeUpdateInput = { + /** New values to be created for this attribute. */ + readonly addValues?: InputMaybe>; + /** + * Whether the attribute can be displayed in the admin product list. + * @deprecated Field no longer supported + */ + readonly availableInGrid?: InputMaybe; + /** External ID of this product. */ + readonly externalReference?: InputMaybe; + /** Whether the attribute can be filtered in dashboard. */ + readonly filterableInDashboard?: InputMaybe; + /** + * Whether the attribute can be filtered in storefront. + * @deprecated Field no longer supported + */ + readonly filterableInStorefront?: InputMaybe; + /** Whether the attribute is for variants only. */ + readonly isVariantOnly?: InputMaybe; + /** Name of an attribute displayed in the interface. */ + readonly name?: InputMaybe; + /** + * Specifies reference types to narrow down the choices of reference objects. Applicable only for `REFERENCE` and `SINGLE_REFERENCE` attributes with `PRODUCT`, `PRODUCT_VARIANT` and `PAGE` entity types. Accepts `ProductType` IDs for `PRODUCT` and `PRODUCT_VARIANT` entity types, and `PageType` IDs for `PAGE` entity type. If omitted, all objects of the selected entity type are available as attribute values. + * + * A maximum of 100 reference types can be specified. + * + * Added in Saleor 3.22. + */ + readonly referenceTypes?: InputMaybe>; + /** IDs of values to be removed from this attribute. */ + readonly removeValues?: InputMaybe>; + /** Internal representation of an attribute name. */ + readonly slug?: InputMaybe; + /** + * The position of the attribute in the storefront navigation (0 by default). + * @deprecated Field no longer supported + */ + readonly storefrontSearchPosition?: InputMaybe; + /** The unit of attribute values. */ + readonly unit?: InputMaybe; + /** Whether the attribute requires values to be passed or not. */ + readonly valueRequired?: InputMaybe; + /** Whether the attribute should be visible or not in storefront. */ + readonly visibleInStorefront?: InputMaybe; +}; + +/** Event sent when attribute is updated. */ +export type AttributeUpdated = Event & { + /** The attribute the event relates to. */ + readonly attribute?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Represents a value of an attribute. */ +export type AttributeValue = Node & { + /** Represents the boolean value of the attribute value. */ + readonly boolean?: Maybe; + /** Represents the date value of the attribute value. */ + readonly date?: Maybe; + /** Represents the date/time value of the attribute value. */ + readonly dateTime?: Maybe; + /** External ID of this attribute value. */ + readonly externalReference?: Maybe; + /** Represents file URL and content type (if attribute value is a file). */ + readonly file?: Maybe; + /** The ID of the attribute value. */ + readonly id: Scalars["ID"]["output"]; + /** The input type to use for entering attribute values in the dashboard. */ + readonly inputType?: Maybe; + /** Name of a value displayed in the interface. */ + readonly name?: Maybe; + /** Represents the text of the attribute value, plain text without formatting. */ + readonly plainText?: Maybe; + /** The ID of the referenced object. */ + readonly reference?: Maybe; + /** + * Represents the text of the attribute value, includes formatting. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly richText?: Maybe; + /** Internal representation of a value (unique per attribute). */ + readonly slug?: Maybe; + /** Returns translated attribute value fields for the given language code. */ + readonly translation?: Maybe; + /** Represent value of the attribute value (e.g. color values for swatch attributes). */ + readonly value?: Maybe; +}; + +/** Represents a value of an attribute. */ +export type AttributeValueTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * 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. + */ +export type AttributeValueBulkDelete = { + /** @deprecated Use `errors` field instead. */ + readonly attributeErrors: ReadonlyArray; + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; +}; + +/** + * Creates/updates translations for attribute values. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ +export type AttributeValueBulkTranslate = { + /** Returns how many translations were created/updated. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** List of the translations. */ + readonly results: ReadonlyArray; +}; + +export type AttributeValueBulkTranslateError = { + /** The error code. */ + readonly code: AttributeValueTranslateErrorCode; + /** The error message. */ + readonly message?: Maybe; + /** Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly path?: Maybe; +}; + +export type AttributeValueBulkTranslateInput = { + /** External reference of an attribute value. */ + readonly externalReference?: InputMaybe; + /** Attribute value ID. */ + readonly id?: InputMaybe; + /** Translation language code. */ + readonly languageCode: LanguageCodeEnum; + /** Translation fields. */ + readonly translationFields: AttributeValueTranslationInput; +}; + +export type AttributeValueBulkTranslateResult = { + /** List of errors occurred on translation attempt. */ + readonly errors?: Maybe>; + /** Attribute value translation data. */ + readonly translation?: Maybe; +}; + +export type AttributeValueCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type AttributeValueCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly 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. + */ +export type AttributeValueCreate = { + /** The updated attribute. */ + readonly attribute?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly attributeErrors: ReadonlyArray; + readonly attributeValue?: Maybe; + readonly errors: ReadonlyArray; +}; + +export type AttributeValueCreateInput = { + /** File content type. */ + readonly contentType?: InputMaybe; + /** External ID of this attribute value. */ + readonly externalReference?: InputMaybe; + /** URL of the file attribute. Every time, a new value is created. */ + readonly fileUrl?: InputMaybe; + /** Name of a value displayed in the interface. */ + readonly name: Scalars["String"]["input"]; + /** + * Represents the text of the attribute value, plain text without formatting. + * @deprecated The plain text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute. + */ + readonly plainText?: InputMaybe; + /** + * Represents the text of the attribute value, includes formatting. + * + * Rich text format. For reference see https://editorjs.io/ + * @deprecated The rich text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute. + */ + readonly richText?: InputMaybe; + /** Represent value of the attribute value (e.g. color values for swatch attributes). */ + readonly value?: InputMaybe; +}; + +/** Event sent when new attribute value is created. */ +export type AttributeValueCreated = Event & { + /** The attribute value the event relates to. */ + readonly attributeValue?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * 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. + */ +export type AttributeValueDelete = { + /** The updated attribute. */ + readonly attribute?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly attributeErrors: ReadonlyArray; + readonly attributeValue?: Maybe; + readonly errors: ReadonlyArray; +}; + +/** Event sent when attribute value is deleted. */ +export type AttributeValueDeleted = Event & { + /** The attribute value the event relates to. */ + readonly attributeValue?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type AttributeValueFilterInput = { + readonly ids?: InputMaybe>; + readonly search?: InputMaybe; + readonly slugs?: InputMaybe>; +}; + +export type AttributeValueInput = { + /** Represents the boolean value of the attribute value. */ + readonly boolean?: InputMaybe; + /** File content type. */ + readonly contentType?: InputMaybe; + /** Represents the date value of the attribute value. */ + readonly date?: InputMaybe; + /** Represents the date/time value of the attribute value. */ + readonly dateTime?: InputMaybe; + /** Attribute value ID or external reference. */ + readonly dropdown?: InputMaybe; + /** External ID of this attribute. */ + readonly externalReference?: InputMaybe; + /** URL of the file attribute. Every time, a new value is created. */ + readonly file?: InputMaybe; + /** ID of the selected attribute. */ + readonly id?: InputMaybe; + /** List of attribute value IDs or external references. */ + readonly multiselect?: InputMaybe>; + /** Numeric value of an attribute. */ + readonly numeric?: InputMaybe; + /** Plain text content. */ + readonly plainText?: InputMaybe; + /** + * ID of the referenced entity for single reference attribute. + * + * Added in Saleor 3.22. + */ + readonly reference?: InputMaybe; + /** List of entity IDs that will be used as references. */ + readonly references?: InputMaybe>; + /** Text content in JSON format. */ + readonly richText?: InputMaybe; + /** Attribute value ID or external reference. */ + readonly swatch?: InputMaybe; + /** + * The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. + * @deprecated Field no longer supported + */ + readonly values?: InputMaybe>; +}; + +/** + * 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. + */ +export type AttributeValueSelectableTypeInput = { + /** External reference of an attribute value. */ + readonly externalReference?: InputMaybe; + /** ID of an attribute value. */ + readonly id?: InputMaybe; + /** The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. */ + readonly value?: InputMaybe; +}; + +/** Represents attribute value's original translatable fields and related translations. */ +export type AttributeValueTranslatableContent = Node & { + /** Associated attribute that can be translated. */ + readonly attribute?: Maybe; + /** + * Represents a value of an attribute. + * @deprecated Get model fields from the root level queries. + */ + readonly attributeValue?: Maybe; + /** The ID of the attribute value to translate. */ + readonly attributeValueId: Scalars["ID"]["output"]; + /** The ID of the attribute value translatable content. */ + readonly id: Scalars["ID"]["output"]; + /** Name of the attribute value to translate. */ + readonly name: Scalars["String"]["output"]; + /** Attribute plain text value. */ + readonly plainText?: Maybe; + /** + * Attribute value. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly richText?: Maybe; + /** Returns translated attribute value fields for the given language code. */ + readonly translation?: Maybe; +}; + +/** Represents attribute value's original translatable fields and related translations. */ +export type AttributeValueTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * Creates/updates translations for an attribute value. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ +export type AttributeValueTranslate = { + readonly attributeValue?: Maybe; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly translationErrors: ReadonlyArray; +}; + +export type AttributeValueTranslateErrorCode = + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND" + | "REQUIRED"; + +/** Represents attribute value translations. */ +export type AttributeValueTranslation = Node & { + /** The ID of the attribute value translation. */ + readonly id: Scalars["ID"]["output"]; + /** Translation language. */ + readonly language: LanguageDisplay; + /** Translated attribute value name. */ + readonly name: Scalars["String"]["output"]; + /** Translated plain text attribute value . */ + readonly plainText?: Maybe; + /** + * Translated rich-text attribute value. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly richText?: Maybe; + /** Represents the attribute value fields to translate. */ + readonly translatableContent?: Maybe; +}; + +export type AttributeValueTranslationInput = { + readonly name?: InputMaybe; + /** Translated text. */ + readonly plainText?: InputMaybe; + /** + * Translated text. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly richText?: InputMaybe; +}; + +/** + * 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. + */ +export type AttributeValueUpdate = { + /** The updated attribute. */ + readonly attribute?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly attributeErrors: ReadonlyArray; + readonly attributeValue?: Maybe; + readonly errors: ReadonlyArray; +}; + +export type AttributeValueUpdateInput = { + /** File content type. */ + readonly contentType?: InputMaybe; + /** External ID of this attribute value. */ + readonly externalReference?: InputMaybe; + /** URL of the file attribute. Every time, a new value is created. */ + readonly fileUrl?: InputMaybe; + /** Name of a value displayed in the interface. */ + readonly name?: InputMaybe; + /** + * Represents the text of the attribute value, plain text without formatting. + * @deprecated The plain text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute. + */ + readonly plainText?: InputMaybe; + /** + * Represents the text of the attribute value, includes formatting. + * + * Rich text format. For reference see https://editorjs.io/ + * @deprecated The rich text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute. + */ + readonly richText?: InputMaybe; + /** Represent value of the attribute value (e.g. color values for swatch attributes). */ + readonly value?: InputMaybe; +}; + +/** Event sent when attribute value is updated. */ +export type AttributeValueUpdated = Event & { + /** The attribute value the event relates to. */ + readonly attributeValue?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Where filtering options for attribute values. */ +export type AttributeValueWhereInput = { + /** List of conditions that must be met. */ + readonly AND?: InputMaybe>; + /** A list of conditions of which at least one must be met. */ + readonly OR?: InputMaybe>; + readonly ids?: InputMaybe>; + readonly name?: InputMaybe; + readonly slug?: InputMaybe; +}; + +/** Where filtering options. */ +export type AttributeWhereInput = { + /** List of conditions that must be met. */ + readonly AND?: InputMaybe>; + /** A list of conditions of which at least one must be met. */ + readonly OR?: InputMaybe>; + readonly entityType?: InputMaybe; + readonly filterableInDashboard?: InputMaybe; + readonly ids?: InputMaybe>; + readonly inCategory?: InputMaybe; + readonly inCollection?: InputMaybe; + readonly inputType?: InputMaybe; + readonly metadata?: InputMaybe>; + readonly name?: InputMaybe; + readonly slug?: InputMaybe; + readonly type?: InputMaybe; + readonly unit?: InputMaybe; + readonly valueRequired?: InputMaybe; + readonly visibleInStorefront?: InputMaybe; + readonly withChoices?: InputMaybe; +}; + +export type BulkAttributeValueInput = { + /** The boolean value of an attribute to resolve. If the passed value is non-existent, it will be created. */ + readonly boolean?: InputMaybe; + /** File content type. */ + readonly contentType?: InputMaybe; + /** Represents the date value of the attribute value. */ + readonly date?: InputMaybe; + /** Represents the date/time value of the attribute value. */ + readonly dateTime?: InputMaybe; + /** Attribute value ID. */ + readonly dropdown?: InputMaybe; + /** External ID of this attribute. */ + readonly externalReference?: InputMaybe; + /** URL of the file attribute. Every time, a new value is created. */ + readonly file?: InputMaybe; + /** ID of the selected attribute. */ + readonly id?: InputMaybe; + /** List of attribute value IDs. */ + readonly multiselect?: InputMaybe>; + /** Numeric value of an attribute. */ + readonly numeric?: InputMaybe; + /** Plain text content. */ + readonly plainText?: InputMaybe; + /** + * ID of the referenced entity for single reference attribute. + * + * Added in Saleor 3.22. + */ + readonly reference?: InputMaybe; + /** List of entity IDs that will be used as references. */ + readonly references?: InputMaybe>; + /** Text content in JSON format. */ + readonly richText?: InputMaybe; + /** Attribute value ID. */ + readonly swatch?: InputMaybe; + /** + * The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. + * @deprecated Field no longer supported + */ + readonly values?: InputMaybe>; +}; + +export type BulkProductError = { + /** List of attributes IDs which causes the error. */ + readonly attributes?: Maybe>; + /** List of channel IDs which causes the error. */ + readonly channels?: Maybe>; + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** Index of an input list item that caused the error. */ + readonly index?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** List of attribute values IDs which causes the error. */ + readonly values?: Maybe>; + /** List of warehouse IDs which causes the error. */ + readonly warehouses?: Maybe>; +}; + +export type BulkStockError = { + /** List of attributes IDs which causes the error. */ + readonly attributes?: Maybe>; + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** Index of an input list item that caused the error. */ + readonly index?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** List of attribute values IDs which causes the error. */ + readonly values?: Maybe>; +}; + +/** Synchronous webhook for calculating checkout/order taxes. */ +export type CalculateTaxes = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + readonly taxBase: TaxableObject; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type CardInput = { + /** Payment method nonce, a token returned by the appropriate provider's SDK. */ + readonly code: Scalars["String"]["input"]; + /** Card security code. */ + readonly cvc?: InputMaybe; + /** Information about currency and amount. */ + readonly money: MoneyInput; +}; + +/** + * Represents a card payment method used for a transaction. + * + * Added in Saleor 3.22. + */ +export type CardPaymentMethodDetails = PaymentMethodDetails & { + /** Card brand. */ + readonly brand?: Maybe; + /** Two-digit number representing the card’s expiration month. */ + readonly expMonth?: Maybe; + /** Four-digit number representing the card’s expiration year. */ + readonly expYear?: Maybe; + /** First 4 digits of the card number. */ + readonly firstDigits?: Maybe; + /** Last 4 digits of the card number. */ + readonly lastDigits?: Maybe; + /** Name of the payment method. */ + readonly name: Scalars["String"]["output"]; +}; + +export type CardPaymentMethodDetailsInput = { + /** Brand of the payment method used for the transaction. Max length is 40 characters. */ + readonly brand?: InputMaybe; + /** Expiration month of the card used for the transaction. Value must be between 1 and 12. */ + readonly expMonth?: InputMaybe; + /** Expiration year of the card used for the transaction. Value must be between 2000 and 9999. */ + readonly expYear?: InputMaybe; + /** First digits of the card used for the transaction. Max length is 4 characters. */ + readonly firstDigits?: InputMaybe; + /** Last digits of the card used for the transaction. Max length is 4 characters. */ + readonly lastDigits?: InputMaybe; + /** Name of the payment method used for the transaction. Max length is 256 characters. */ + readonly name: Scalars["String"]["input"]; +}; + +export type CatalogueInput = { + /** Categories related to the discount. */ + readonly categories?: InputMaybe>; + /** Collections related to the discount. */ + readonly collections?: InputMaybe>; + /** Products related to the discount. */ + readonly products?: InputMaybe>; + /** Product variant related to the discount. */ + readonly variants?: InputMaybe>; +}; + +export type CataloguePredicateInput = { + /** List of conditions that must be met. */ + readonly AND?: InputMaybe>; + /** A list of conditions of which at least one must be met. */ + readonly OR?: InputMaybe>; + /** Defines the category conditions to be met. */ + readonly categoryPredicate?: InputMaybe; + /** Defines the collection conditions to be met. */ + readonly collectionPredicate?: InputMaybe; + /** Defines the product conditions to be met. */ + readonly productPredicate?: InputMaybe; + /** Defines the product variant conditions to be met. */ + readonly variantPredicate?: InputMaybe; +}; + +/** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ +export type Category = Node & + ObjectWithMetadata & { + /** List of ancestors of the category. */ + readonly ancestors?: Maybe; + /** Background image of the category. */ + readonly backgroundImage?: Maybe; + /** List of children of the category. */ + readonly children?: Maybe; + /** + * Description of the category. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: Maybe; + /** + * Description of the category. + * + * Rich text format. For reference see https://editorjs.io/ + * @deprecated Use the `description` field instead. + */ + readonly descriptionJson?: Maybe; + /** The ID of the category. */ + readonly id: Scalars["ID"]["output"]; + /** Level of the category. */ + readonly level: Scalars["Int"]["output"]; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** Name of category */ + readonly name: Scalars["String"]["output"]; + /** Parent category. */ + readonly parent?: Maybe; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** List of products in the category. Requires the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS. */ + readonly products?: Maybe; + /** SEO description of category. */ + readonly seoDescription?: Maybe; + /** SEO title of category. */ + readonly seoTitle?: Maybe; + /** Slug of the category. */ + readonly slug: Scalars["String"]["output"]; + /** Returns translated category fields for the given language code. */ + readonly translation?: Maybe; + /** The date and time when the category was last updated. */ + readonly updatedAt: Scalars["DateTime"]["output"]; + }; + +/** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ +export type CategoryAncestorsArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +/** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ +export type CategoryBackgroundImageArgs = { + format?: InputMaybe; + size?: InputMaybe; +}; + +/** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ +export type CategoryChildrenArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +/** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ +export type CategoryMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ +export type CategoryMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ +export type CategoryPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ +export type CategoryPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ +export type CategoryProductsArgs = { + after?: InputMaybe; + before?: InputMaybe; + channel?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + search?: InputMaybe; + sortBy?: InputMaybe; + where?: InputMaybe; +}; + +/** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ +export type CategoryTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * Deletes categories. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type CategoryBulkDelete = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; +}; + +export type CategoryCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type CategoryCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: Category; +}; + +/** + * Creates a new category. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type CategoryCreate = { + readonly category?: Maybe; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; +}; + +/** Event sent when new category is created. */ +export type CategoryCreated = Event & { + /** The category the event relates to. */ + readonly category?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Deletes a category. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type CategoryDelete = { + readonly category?: Maybe; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; +}; + +/** Event sent when category is deleted. */ +export type CategoryDeleted = Event & { + /** The category the event relates to. */ + readonly category?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type CategoryFilterInput = { + readonly ids?: InputMaybe>; + readonly metadata?: InputMaybe>; + readonly search?: InputMaybe; + readonly slugs?: InputMaybe>; + /** Filter by when was the most recent update. */ + readonly updatedAt?: InputMaybe; +}; + +export type CategoryInput = { + /** Background image file. */ + readonly backgroundImage?: InputMaybe; + /** Alt text for a product media. */ + readonly backgroundImageAlt?: InputMaybe; + /** + * Category description. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: InputMaybe; + /** + * Fields required to update the category metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** Category name. */ + readonly name?: InputMaybe; + /** + * Fields required to update the category private metadata. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** Search engine optimization fields. */ + readonly seo?: InputMaybe; + /** Category slug. */ + readonly slug?: InputMaybe; +}; + +export type CategorySortField = + /** Sort categories by name. */ + | "NAME" + /** Sort categories by product count. */ + | "PRODUCT_COUNT" + /** Sort categories by subcategory count. */ + | "SUBCATEGORY_COUNT"; + +export type CategorySortingInput = { + /** + * Specifies the channel in which to sort the data. + * @deprecated Use root-level channel argument instead. + */ + readonly channel?: InputMaybe; + /** Specifies the direction in which to sort categories. */ + readonly direction: OrderDirection; + /** Sort categories by the selected field. */ + readonly field: CategorySortField; +}; + +/** Represents category original translatable fields and related translations. */ +export type CategoryTranslatableContent = Node & { + /** + * Represents a single category of products. + * @deprecated Get model fields from the root level queries. + */ + readonly category?: Maybe; + /** The ID of the category to translate. */ + readonly categoryId: Scalars["ID"]["output"]; + /** + * Category description to translate. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: Maybe; + /** + * Description of the category. + * + * Rich text format. For reference see https://editorjs.io/ + * @deprecated Use the `description` field instead. + */ + readonly descriptionJson?: Maybe; + /** The ID of the category translatable content. */ + readonly id: Scalars["ID"]["output"]; + /** Name of the category translatable content. */ + readonly name: Scalars["String"]["output"]; + /** SEO description to translate. */ + readonly seoDescription?: Maybe; + /** SEO title to translate. */ + readonly seoTitle?: Maybe; + /** + * Slug to translate. + * + * Added in Saleor 3.21. + */ + readonly slug?: Maybe; + /** Returns translated category fields for the given language code. */ + readonly translation?: Maybe; +}; + +/** Represents category original translatable fields and related translations. */ +export type CategoryTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * Creates/updates translations for a category. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ +export type CategoryTranslate = { + readonly category?: Maybe; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly translationErrors: ReadonlyArray; +}; + +/** Represents category translations. */ +export type CategoryTranslation = Node & { + /** + * Translated description of the category. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: Maybe; + /** + * Translated description of the category. + * + * Rich text format. For reference see https://editorjs.io/ + * @deprecated Use the `description` field instead. + */ + readonly descriptionJson?: Maybe; + /** The ID of the category translation. */ + readonly id: Scalars["ID"]["output"]; + /** Translation language. */ + readonly language: LanguageDisplay; + /** Translated category name. */ + readonly name?: Maybe; + /** Translated SEO description. */ + readonly seoDescription?: Maybe; + /** Translated SEO title. */ + readonly seoTitle?: Maybe; + /** + * Translated category slug. + * + * Added in Saleor 3.21. + */ + readonly slug?: Maybe; + /** Represents the category fields to translate. */ + readonly translatableContent?: Maybe; +}; + +/** + * Updates a category. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type CategoryUpdate = { + readonly category?: Maybe; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; +}; + +/** Event sent when category is updated. */ +export type CategoryUpdated = Event & { + /** The category the event relates to. */ + readonly category?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type CategoryWhereInput = { + /** List of conditions that must be met. */ + readonly AND?: InputMaybe>; + /** A list of conditions of which at least one must be met. */ + readonly OR?: InputMaybe>; + readonly ids?: InputMaybe>; + readonly metadata?: InputMaybe>; +}; + +/** Represents channel. */ +export type Channel = Node & + ObjectWithMetadata & { + /** Shipping methods that are available for the channel. */ + readonly availableShippingMethodsPerCountry?: Maybe>; + /** + * Channel-specific checkout settings. + * + * Requires one of the following permissions: MANAGE_CHANNELS, MANAGE_CHECKOUTS. + */ + readonly checkoutSettings: CheckoutSettings; + /** List of shippable countries for the channel. */ + readonly countries?: Maybe>; + /** + * A currency that is assigned to the channel. + * + * Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. + */ + readonly currencyCode: Scalars["String"]["output"]; + /** + * 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. + * + * Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. + */ + readonly defaultCountry: CountryDisplay; + /** + * Whether a channel has associated orders. + * + * Requires one of the following permissions: MANAGE_CHANNELS. + */ + readonly hasOrders: Scalars["Boolean"]["output"]; + /** The ID of the channel. */ + readonly id: Scalars["ID"]["output"]; + /** + * Whether the channel is active. + * + * Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. + */ + readonly isActive: Scalars["Boolean"]["output"]; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** + * Name of the channel. + * + * Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. + */ + readonly name: Scalars["String"]["output"]; + /** + * Channel-specific order settings. + * + * Requires one of the following permissions: MANAGE_CHANNELS, MANAGE_ORDERS. + */ + readonly orderSettings: OrderSettings; + /** + * Channel-specific payment settings. + * + * Requires one of the following permissions: MANAGE_CHANNELS, HANDLE_PAYMENTS. + */ + readonly paymentSettings: PaymentSettings; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** Slug of the channel. */ + readonly slug: Scalars["String"]["output"]; + /** + * Define the stock setting for this channel. + * + * Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. + */ + readonly stockSettings: StockSettings; + /** + * Channel specific tax configuration. + * + * Added in Saleor 3.20. + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. + */ + readonly taxConfiguration: TaxConfiguration; + /** + * List of warehouses assigned to this channel. + * + * Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. + */ + readonly warehouses: ReadonlyArray; + }; + +/** Represents channel. */ +export type ChannelAvailableShippingMethodsPerCountryArgs = { + countries?: InputMaybe>; +}; + +/** Represents channel. */ +export type ChannelMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents channel. */ +export type ChannelMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents channel. */ +export type ChannelPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents channel. */ +export type ChannelPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** + * Activate a channel. + * + * Requires one of the following permissions: MANAGE_CHANNELS. + * + * Triggers the following webhook events: + * - CHANNEL_STATUS_CHANGED (async): A channel was activated. + */ +export type ChannelActivate = { + /** Activated channel. */ + readonly channel?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly channelErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** + * Creates a new channel. + * + * Requires one of the following permissions: MANAGE_CHANNELS. + * + * Triggers the following webhook events: + * - CHANNEL_CREATED (async): A channel was created. + */ +export type ChannelCreate = { + readonly channel?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly channelErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +export type ChannelCreateInput = { + /** List of shipping zones to assign to the channel. */ + readonly addShippingZones?: InputMaybe>; + /** List of warehouses to assign to the channel. */ + readonly addWarehouses?: InputMaybe>; + /** The channel checkout settings */ + readonly checkoutSettings?: InputMaybe; + /** Currency of the channel. */ + readonly currencyCode: Scalars["String"]["input"]; + /** 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. */ + readonly defaultCountry: CountryCode; + /** Determine if channel will be set active or not. */ + readonly isActive?: InputMaybe; + /** + * Channel public metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** Name of the channel. */ + readonly name: Scalars["String"]["input"]; + /** The channel order settings */ + readonly orderSettings?: InputMaybe; + /** The channel payment settings */ + readonly paymentSettings?: InputMaybe; + /** + * Channel private metadata. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** Slug of the channel. */ + readonly slug: Scalars["String"]["input"]; + /** The channel stock settings. */ + readonly stockSettings?: InputMaybe; +}; + +/** Event sent when new channel is created. */ +export type ChannelCreated = Event & { + /** The channel the event relates to. */ + readonly channel?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Deactivate a channel. + * + * Requires one of the following permissions: MANAGE_CHANNELS. + * + * Triggers the following webhook events: + * - CHANNEL_STATUS_CHANGED (async): A channel was deactivated. + */ +export type ChannelDeactivate = { + /** Deactivated channel. */ + readonly channel?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly channelErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** + * Deletes 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. + */ +export type ChannelDelete = { + readonly channel?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly channelErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +export type ChannelDeleteInput = { + /** ID of a channel to migrate orders from the origin channel. Target channel has to have the same currency as the origin. */ + readonly channelId: Scalars["ID"]["input"]; +}; + +/** Event sent when channel is deleted. */ +export type ChannelDeleted = Event & { + /** The channel the event relates to. */ + readonly channel?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type ChannelError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** List of shipping zone IDs which causes the error. */ + readonly shippingZones?: Maybe>; + /** List of warehouses IDs which causes the error. */ + readonly warehouses?: Maybe>; +}; + +export type ChannelErrorCode = + | "ALREADY_EXISTS" + | "CHANNELS_CURRENCY_MUST_BE_THE_SAME" + | "CHANNEL_WITH_ORDERS" + | "DUPLICATED_INPUT_ITEM" + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND" + | "REQUIRED" + | "UNIQUE"; + +export type ChannelListingUpdateInput = { + /** ID of a channel listing. */ + readonly channelListing: Scalars["ID"]["input"]; + /** Cost price of the variant in channel. */ + readonly costPrice?: InputMaybe; + /** The threshold for preorder variant in channel. */ + readonly preorderThreshold?: InputMaybe; + /** Price of the particular variant in channel. */ + readonly price?: InputMaybe; + /** Price of the variant before discount. */ + readonly priorPrice?: InputMaybe; +}; + +/** Event sent when channel metadata is updated. */ +export type ChannelMetadataUpdated = Event & { + /** The channel the event relates to. */ + readonly channel?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Reorder the warehouses of a channel. + * + * Requires one of the following permissions: MANAGE_CHANNELS. + */ +export type ChannelReorderWarehouses = { + /** Channel within the warehouses are reordered. */ + readonly channel?: Maybe; + readonly errors: ReadonlyArray; +}; + +/** Event sent when channel status has changed. */ +export type ChannelStatusChanged = Event & { + /** The channel the event relates to. */ + readonly channel?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * 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. + */ +export type ChannelUpdate = { + readonly channel?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly channelErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +export type ChannelUpdateInput = { + /** List of shipping zones to assign to the channel. */ + readonly addShippingZones?: InputMaybe>; + /** List of warehouses to assign to the channel. */ + readonly addWarehouses?: InputMaybe>; + /** The channel checkout settings */ + readonly checkoutSettings?: InputMaybe; + /** 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. */ + readonly defaultCountry?: InputMaybe; + /** Determine if channel will be set active or not. */ + readonly isActive?: InputMaybe; + /** + * Channel public metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** Name of the channel. */ + readonly name?: InputMaybe; + /** The channel order settings */ + readonly orderSettings?: InputMaybe; + /** The channel payment settings */ + readonly paymentSettings?: InputMaybe; + /** + * Channel private metadata. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** List of shipping zones to unassign from the channel. */ + readonly removeShippingZones?: InputMaybe>; + /** List of warehouses to unassign from the channel. */ + readonly removeWarehouses?: InputMaybe>; + /** Slug of the channel. */ + readonly slug?: InputMaybe; + /** The channel stock settings. */ + readonly stockSettings?: InputMaybe; +}; + +/** Event sent when channel is updated. */ +export type ChannelUpdated = Event & { + /** The channel the event relates to. */ + readonly channel?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Checkout object. */ +export type Checkout = Node & + ObjectWithMetadata & { + /** + * The authorize status of the checkout. + * + * Triggers the following webhook events: + * - CHECKOUT_CALCULATE_TAXES (sync): Optionally triggered when checkout prices are expired. + */ + readonly authorizeStatus: CheckoutAuthorizeStatusEnum; + /** Collection points that can be used for this order. */ + readonly availableCollectionPoints: ReadonlyArray; + /** + * List of available payment gateways. + * + * Triggers the following webhook events: + * - PAYMENT_LIST_GATEWAYS (sync): Fetch payment gateways available for checkout. + */ + readonly availablePaymentGateways: ReadonlyArray; + /** + * 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. + * @deprecated Use `shippingMethods` instead. + */ + readonly availableShippingMethods: ReadonlyArray; + /** The billing address of the checkout. */ + readonly billingAddress?: Maybe
; + /** The channel for which checkout was created. */ + readonly channel: Channel; + /** + * The charge status of the checkout. + * + * Triggers the following webhook events: + * - CHECKOUT_CALCULATE_TAXES (sync): Optionally triggered when checkout prices are expired. + */ + readonly chargeStatus: CheckoutChargeStatusEnum; + /** The date and time when the checkout was created. */ + readonly created: Scalars["DateTime"]["output"]; + /** + * The customer note for the checkout. + * + * Added in Saleor 3.21. + */ + readonly customerNote: Scalars["String"]["output"]; + /** + * The delivery method selected for this checkout. + * + * Added in Saleor 3.23. + */ + readonly delivery?: Maybe; + /** + * The delivery method selected for 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. + * @deprecated Use `delivery` instead. + */ + readonly deliveryMethod?: Maybe; + /** The total discount applied to the checkout. Note: Only discount created via voucher are included in this field. */ + readonly discount?: Maybe; + /** The name of voucher assigned to the checkout. */ + readonly discountName?: Maybe; + /** Determines whether displayed prices should include taxes. */ + readonly displayGrossPrices: Scalars["Boolean"]["output"]; + /** Email of a customer. */ + readonly email?: Maybe; + /** List of gift cards associated with this checkout. */ + readonly giftCards: ReadonlyArray; + /** The ID of the checkout. */ + readonly id: Scalars["ID"]["output"]; + /** Returns True, if checkout requires shipping. */ + readonly isShippingRequired: Scalars["Boolean"]["output"]; + /** Checkout language code. */ + readonly languageCode: LanguageCodeEnum; + /** @deprecated Use `updatedAt` instead. */ + readonly lastChange: Scalars["DateTime"]["output"]; + /** A list of checkout lines, each containing information about an item in the checkout. */ + readonly lines: ReadonlyArray; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** + * The note for the checkout. + * @deprecated Use `customerNote` instead. + */ + readonly note: Scalars["String"]["output"]; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** List of problems with the checkout. */ + readonly problems?: Maybe>; + /** The number of items purchased. */ + readonly quantity: Scalars["Int"]["output"]; + /** The shipping address of the checkout. */ + readonly shippingAddress?: Maybe
; + /** + * 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. + * @deprecated Use `delivery` instead. + */ + readonly shippingMethod?: Maybe; + /** + * 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. + */ + readonly shippingMethods: ReadonlyArray; + /** + * 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. + */ + readonly shippingPrice: TaxedMoney; + /** Date when oldest stock reservation for this checkout expires or null if no stock is reserved. */ + readonly stockReservationExpires?: Maybe; + /** 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. */ + readonly storedPaymentMethods?: Maybe>; + /** + * 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. + */ + readonly subtotalPrice: TaxedMoney; + /** Returns True if checkout has to be exempt from taxes. */ + readonly taxExemption: Scalars["Boolean"]["output"]; + /** The checkout's token. */ + readonly token: Scalars["UUID"]["output"]; + /** + * The difference between the paid and the checkout total amount. + * + * Triggers the following webhook events: + * - CHECKOUT_CALCULATE_TAXES (sync): Optionally triggered when checkout prices are expired. + */ + readonly 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. + */ + readonly totalPrice: TaxedMoney; + /** List of transactions for the checkout. Requires one of the following permissions: MANAGE_CHECKOUTS, HANDLE_PAYMENTS. */ + readonly transactions?: Maybe>; + /** 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 */ + readonly translatedDiscountName?: Maybe; + /** Time of last modification of the given checkout. */ + readonly updatedAt: Scalars["DateTime"]["output"]; + /** The user assigned to the checkout. Requires one of the following permissions: MANAGE_USERS, HANDLE_PAYMENTS, OWNER. */ + readonly user?: Maybe; + /** + * The voucher assigned to the checkout. + * + * Added in Saleor 3.18. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + */ + readonly voucher?: Maybe; + /** The code of voucher assigned to the checkout. */ + readonly voucherCode?: Maybe; + }; + +/** Checkout object. */ +export type CheckoutMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Checkout object. */ +export type CheckoutMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Checkout object. */ +export type CheckoutPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Checkout object. */ +export type CheckoutPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Checkout object. */ +export type CheckoutStoredPaymentMethodsArgs = { + amount?: InputMaybe; +}; + +/** + * Adds a gift card or a voucher to a checkout. + * + * Triggers the following webhook events: + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ +export type CheckoutAddPromoCode = { + /** The checkout with the added gift card or voucher. */ + readonly checkout?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly checkoutErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +export type 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. */ + readonly checkFieldsFormat?: InputMaybe; + /** 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. */ + readonly checkRequiredFields?: InputMaybe; + /** Determines if Saleor should apply normalization on address fields. Example: converting city field to uppercase letters. */ + readonly enableFieldsNormalization?: InputMaybe; +}; + +/** + * 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 + */ +export type CheckoutAuthorizeStatusEnum = "FULL" | "NONE" | "PARTIAL"; + +export type CheckoutAutoCompleteInput = { + /** Specifies the earliest date on which fully paid checkouts can begin to be automatically completed. Fully paid checkouts dated before this cut-off will not be automatically completed. Must be less than the threshold of the oldest modified checkout eligible for automatic completion. Default is current date time. */ + readonly cutOffDate?: InputMaybe; + /** The time in minutes after which the fully paid checkout will be automatically completed. Default is 30. Set to 0 for immediate completion. Should be less than the threshold for the oldest modified checkout eligible for automatic completion. */ + readonly delay?: InputMaybe; + /** 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. */ + readonly enabled: Scalars["Boolean"]["input"]; +}; + +/** + * Updates billing address in the existing checkout. + * + * Triggers the following webhook events: + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ +export type CheckoutBillingAddressUpdate = { + /** An updated checkout. */ + readonly checkout?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly checkoutErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** + * 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 + */ +export type 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. + */ +export type CheckoutComplete = { + /** @deprecated Use `errors` field instead. */ + readonly checkoutErrors: ReadonlyArray; + /** Confirmation data used to process additional authorization steps. */ + readonly confirmationData?: Maybe; + /** Set to true if payment needs to be confirmed before checkout is complete. */ + readonly confirmationNeeded: Scalars["Boolean"]["output"]; + readonly errors: ReadonlyArray; + /** Placed order. */ + readonly order?: Maybe; +}; + +export type CheckoutCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type CheckoutCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly 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. + */ +export type CheckoutCreate = { + readonly checkout?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly checkoutErrors: ReadonlyArray; + /** + * 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. + * @deprecated Always returns `true`. + */ + readonly created?: Maybe; + readonly errors: ReadonlyArray; +}; + +/** Creates a new checkout from existing order. */ +export type CheckoutCreateFromOrder = { + /** Created checkout. */ + readonly checkout?: Maybe; + readonly errors: ReadonlyArray; + /** Variants that were not attached to the checkout. */ + readonly unavailableVariants?: Maybe>; +}; + +export type CheckoutCreateFromOrderError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type CheckoutCreateFromOrderErrorCode = + | "CHANNEL_INACTIVE" + | "GRAPHQL_ERROR" + | "INVALID" + | "ORDER_NOT_FOUND" + | "TAX_ERROR"; + +export type CheckoutCreateFromOrderUnavailableVariant = { + /** The error code. */ + readonly code: CheckoutCreateFromOrderUnavailableVariantErrorCode; + /** Order line ID that is unavailable. */ + readonly lineId: Scalars["ID"]["output"]; + /** The error message. */ + readonly message: Scalars["String"]["output"]; + /** Variant ID that is unavailable. */ + readonly variantId: Scalars["ID"]["output"]; +}; + +export type CheckoutCreateFromOrderUnavailableVariantErrorCode = + | "INSUFFICIENT_STOCK" + | "NOT_FOUND" + | "PRODUCT_NOT_PUBLISHED" + | "PRODUCT_UNAVAILABLE_FOR_PURCHASE" + | "QUANTITY_GREATER_THAN_LIMIT" + | "UNAVAILABLE_VARIANT_IN_CHANNEL"; + +export type CheckoutCreateInput = { + /** Billing address of the customer. `skipValidation` requires HANDLE_CHECKOUTS and AUTHENTICATED_APP permissions. */ + readonly billingAddress?: InputMaybe; + /** Slug of a channel in which to create a checkout. */ + readonly channel?: InputMaybe; + /** The customer's email address. */ + readonly email?: InputMaybe; + /** Checkout language code. */ + readonly languageCode?: InputMaybe; + /** A list of checkout lines, each containing information about an item in the checkout. */ + readonly lines: ReadonlyArray; + /** + * Checkout public metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + * + * Added in Saleor 3.21. + */ + readonly metadata?: InputMaybe>; + /** + * Checkout private metadata. Requires one of the following permissions: MANAGE_CHECKOUTS, HANDLE_CHECKOUTS + * + * Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + * + * Added in Saleor 3.21. + */ + readonly privateMetadata?: InputMaybe>; + /** + * Indicates whether the billing address should be saved to the user’s address book upon checkout completion. Can only be set when a billing address is provided. If not specified along with the address, the default behavior is to save the address. + * + * Added in Saleor 3.21. + */ + readonly saveBillingAddress?: InputMaybe; + /** + * Indicates whether the shipping address should be saved to the user’s address book upon checkout completion.Can only be set when a shipping address is provided. If not specified along with the address, the default behavior is to save the address. + * + * Added in Saleor 3.21. + */ + readonly saveShippingAddress?: InputMaybe; + /** 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. */ + readonly shippingAddress?: InputMaybe; + /** The checkout validation rules that can be changed. */ + readonly validationRules?: InputMaybe; +}; + +/** Event sent when new checkout is created. */ +export type CheckoutCreated = Event & { + /** The checkout the event relates to. */ + readonly checkout?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * 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. + */ +export type CheckoutCustomerAttach = { + /** An updated checkout. */ + readonly checkout?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly checkoutErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** + * 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. + */ +export type CheckoutCustomerDetach = { + /** An updated checkout. */ + readonly checkout?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly checkoutErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** + * Updates customer note in the existing checkout object. + * + * Added in Saleor 3.21. + * + * Triggers the following webhook events: + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ +export type CheckoutCustomerNoteUpdate = { + /** An updated checkout. */ + readonly checkout?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly checkoutErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** + * 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. + * + * Triggers the following webhook events: + * - SHIPPING_LIST_METHODS_FOR_CHECKOUT (sync): Triggered when updating the checkout delivery method with the external one. + * - CHECKOUT_FILTER_SHIPPING_METHODS (sync): Optionally triggered when cached filtered shipping methods are invalid. + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ +export type CheckoutDeliveryMethodUpdate = { + /** An updated checkout. */ + readonly checkout?: Maybe; + readonly errors: ReadonlyArray; +}; + +/** + * Updates email address in the existing checkout object. + * + * Triggers the following webhook events: + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ +export type CheckoutEmailUpdate = { + /** An updated checkout. */ + readonly checkout?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly checkoutErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +export type CheckoutError = { + /** A type of address that causes the error. */ + readonly addressType?: Maybe; + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** List of line Ids which cause the error. */ + readonly lines?: Maybe>; + /** The error message. */ + readonly message?: Maybe; + /** List of variant IDs which causes the error. */ + readonly variants?: Maybe>; +}; + +export type 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_ADDRESS_DATA" + | "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"; + +export type CheckoutFilterInput = { + readonly authorizeStatus?: InputMaybe>; + readonly channels?: InputMaybe>; + readonly chargeStatus?: InputMaybe>; + readonly created?: InputMaybe; + readonly customer?: InputMaybe; + readonly metadata?: InputMaybe>; + readonly search?: InputMaybe; + readonly updatedAt?: InputMaybe; +}; + +/** Filter shipping methods for checkout. */ +export type CheckoutFilterShippingMethods = Event & { + /** The checkout the event relates to. */ + readonly checkout?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Shipping methods that can be used with this checkout. */ + readonly shippingMethods?: Maybe>; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Event sent when a checkout was fully authorized. A checkout is considered fully authorized when its `authorizeStatus` is `FULL`. + * + * It is triggered only for checkouts whose payments are processed through the Transaction API. + */ +export type CheckoutFullyAuthorized = Event & { + /** The checkout the event relates to. */ + readonly checkout?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Event sent when a checkout was fully paid. A checkout is considered fully paid when its `chargeStatus` is `FULL` or `OVERCHARGED`. This event is not sent if payments are only authorized but not fully charged. + * + * It is triggered only for checkouts whose payments are processed through the Transaction API. + */ +export type CheckoutFullyPaid = Event & { + /** The checkout the event relates to. */ + readonly checkout?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Updates language code in the existing checkout. + * + * Triggers the following webhook events: + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ +export type CheckoutLanguageCodeUpdate = { + /** An updated checkout. */ + readonly checkout?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly checkoutErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** Represents an item in the checkout. */ +export type CheckoutLine = Node & + ObjectWithMetadata & { + /** The ID of the checkout line. */ + readonly id: Scalars["ID"]["output"]; + /** + * 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. + */ + readonly isGift?: Maybe; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** + * The sum of the checkout line price prior to promotion. + * + * Added in Saleor 3.21. + */ + readonly priorTotalPrice?: Maybe; + /** + * The unit price of the checkout line prior to promotion. + * + * Added in Saleor 3.21. + */ + readonly priorUnitPrice?: Maybe; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** List of problems with the checkout line. */ + readonly problems?: Maybe>; + /** The quantity of product variant assigned to the checkout line. */ + readonly quantity: Scalars["Int"]["output"]; + /** Indicates whether the item need to be delivered. */ + readonly requiresShipping: Scalars["Boolean"]["output"]; + /** + * 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. + */ + readonly totalPrice: TaxedMoney; + /** The sum of the checkout line price, without discounts. */ + readonly undiscountedTotalPrice: Money; + /** The unit price of the checkout line, without discounts. */ + readonly 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. + */ + readonly unitPrice: TaxedMoney; + /** The product variant from which the checkout line was created. */ + readonly variant: ProductVariant; + }; + +/** Represents an item in the checkout. */ +export type CheckoutLineMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents an item in the checkout. */ +export type CheckoutLineMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents an item in the checkout. */ +export type CheckoutLinePrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents an item in the checkout. */ +export type CheckoutLinePrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +export type CheckoutLineCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type CheckoutLineCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: CheckoutLine; +}; + +/** + * Deletes a CheckoutLine. + * + * Triggers the following webhook events: + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ +export type CheckoutLineDelete = { + /** An updated checkout. */ + readonly checkout?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly checkoutErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +export type CheckoutLineInput = { + /** Flag that allow force splitting the same variant into multiple lines by skipping the matching logic. */ + readonly forceNewLine?: InputMaybe; + /** + * Fields required to update the object's metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** 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. */ + readonly price?: InputMaybe; + /** The number of items purchased. */ + readonly quantity: Scalars["Int"]["input"]; + /** ID of the product variant. */ + readonly variantId: Scalars["ID"]["input"]; +}; + +/** Represents an problem in the checkout line. */ +export type CheckoutLineProblem = + | CheckoutLineProblemInsufficientStock + | CheckoutLineProblemVariantNotAvailable; + +/** Indicates insufficient stock for a given checkout line.Placing the order will not be possible until solving this problem. */ +export type CheckoutLineProblemInsufficientStock = { + /** Available quantity of a variant. */ + readonly availableQuantity?: Maybe; + /** The line that has variant with insufficient stock. */ + readonly line: CheckoutLine; + /** The variant with insufficient stock. */ + readonly variant: ProductVariant; +}; + +/** The variant assigned to the checkout line is not available.Placing the order will not be possible until solving this problem. */ +export type CheckoutLineProblemVariantNotAvailable = { + /** The line that has variant that is not available. */ + readonly line: CheckoutLine; +}; + +export type CheckoutLineUpdateInput = { + /** ID of the line. */ + readonly lineId?: InputMaybe; + /** + * Checkout line public metadata. Will add and update keys. To delete keys use deleteMetadata mutation. + * + * Added in Saleor 3.21. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** 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. */ + readonly price?: InputMaybe; + /** The number of items purchased. Optional for apps, required for any other users. */ + readonly quantity?: InputMaybe; + /** + * ID of the product variant. + * @deprecated Use `lineId` instead. + */ + readonly variantId?: InputMaybe; +}; + +/** + * 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. + */ +export type CheckoutLinesAdd = { + /** An updated checkout. */ + readonly checkout?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly checkoutErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** + * Deletes checkout lines. + * + * Triggers the following webhook events: + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ +export type CheckoutLinesDelete = { + /** An updated checkout. */ + readonly checkout?: Maybe; + readonly errors: ReadonlyArray; +}; + +/** + * Updates checkout line in the existing checkout. + * + * Triggers the following webhook events: + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ +export type CheckoutLinesUpdate = { + /** An updated checkout. */ + readonly checkout?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly checkoutErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** Event sent when checkout metadata is updated. */ +export type CheckoutMetadataUpdated = Event & { + /** The checkout the event relates to. */ + readonly checkout?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Creates a new payment for given checkout. */ +export type CheckoutPaymentCreate = { + /** Related checkout object. */ + readonly checkout?: Maybe; + readonly errors: ReadonlyArray; + /** A newly created payment. */ + readonly payment?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly paymentErrors: ReadonlyArray; +}; + +/** Represents an problem in the checkout. */ +export type CheckoutProblem = + | CheckoutLineProblemInsufficientStock + | CheckoutLineProblemVariantNotAvailable + | CheckoutProblemDeliveryMethodInvalid + | CheckoutProblemDeliveryMethodStale; + +/** + * Indicates that the selected delivery method is invalid. + * + * Added in Saleor 3.23. + */ +export type CheckoutProblemDeliveryMethodInvalid = { + readonly delivery: Delivery; +}; + +/** + * Indicates that the delivery methods are stale. + * + * Added in Saleor 3.23. + */ +export type CheckoutProblemDeliveryMethodStale = { + readonly delivery: Delivery; +}; + +/** + * Remove a gift card or a voucher from a checkout. + * + * Triggers the following webhook events: + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ +export type CheckoutRemovePromoCode = { + /** The checkout with the removed gift card or voucher. */ + readonly checkout?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly checkoutErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** Represents the channel-specific checkout settings. */ +export type CheckoutSettings = { + /** + * Default to `true`. Determines whether gift cards can be attached to a Checkout via `addPromoCode` mutation. Usage of this mutation with gift cards is deprecated. + * + * Added in Saleor 3.23. + */ + readonly allowLegacyGiftCardUse: Scalars["Boolean"]["output"]; + /** + * The date time defines the earliest checkout creation date on which fully paid checkouts can begin to be automatically completed. + * + * Added in Saleor 3.22. + */ + readonly automaticCompletionCutOffDate?: Maybe; + /** + * The time in minutes to wait after a checkout is fully paid before automatically completing it. + * + * Added in Saleor 3.22. + */ + readonly automaticCompletionDelay?: Maybe; + /** + * 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. + */ + readonly automaticallyCompleteFullyPaidCheckouts: Scalars["Boolean"]["output"]; + /** 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. */ + readonly useLegacyErrorFlow: Scalars["Boolean"]["output"]; +}; + +export type CheckoutSettingsInput = { + /** + * Default to `true`. Determines whether gift cards can be attached to a Checkout via `addPromoCode` mutation. Usage of this mutation with gift cards is deprecated. + * + * Added in Saleor 3.23. + */ + readonly allowLegacyGiftCardUse?: InputMaybe; + /** + * Settings for automatic completion of fully paid checkouts. + * + * Added in Saleor 3.22. + */ + readonly automaticCompletion?: InputMaybe; + /** + * 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 `authorize_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. + * @deprecated Use `automatic_completion` instead. + */ + readonly automaticallyCompleteFullyPaidCheckouts?: InputMaybe; + /** + * 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. + * @deprecated Field no longer supported + */ + readonly useLegacyErrorFlow?: InputMaybe; +}; + +/** + * Updates shipping address in the existing checkout. + * + * Triggers the following webhook events: + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ +export type CheckoutShippingAddressUpdate = { + /** An updated checkout. */ + readonly checkout?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly checkoutErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** + * 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_FILTER_SHIPPING_METHODS (sync): Optionally triggered when cached filtered shipping methods are invalid. + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ +export type CheckoutShippingMethodUpdate = { + /** An updated checkout. */ + readonly checkout?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly checkoutErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +export type CheckoutSortField = + /** Sort checkouts by creation date. */ + | "CREATION_DATE" + /** Sort checkouts by customer. */ + | "CUSTOMER" + /** Sort checkouts by payment. */ + | "PAYMENT" + /** Sort checkouts by rank. Note: This option is available only with the `search` filter. */ + | "RANK"; + +export type CheckoutSortingInput = { + /** Specifies the direction in which to sort checkouts. */ + readonly direction: OrderDirection; + /** Sort checkouts by the selected field. */ + readonly field: CheckoutSortField; +}; + +/** Event sent when checkout is updated. */ +export type CheckoutUpdated = Event & { + /** The checkout the event relates to. */ + readonly checkout?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type CheckoutValidationRules = { + /** The validation rules that can be applied to provided billing address data. */ + readonly billingAddress?: InputMaybe; + /** The validation rules that can be applied to provided shipping address data. */ + readonly shippingAddress?: InputMaybe; +}; + +export type ChoiceValue = { + /** The raw name of the choice. */ + readonly raw?: Maybe; + /** The verbose name of the choice. */ + readonly verbose?: Maybe; +}; + +/** Enum determining the state of a circuit breaker. */ +export type CircuitBreakerStateEnum = + /** The breaker is conducting (requests are passing through). */ + | "CLOSED" + /** The breaker is in a trial period (to close or open). Note that unlike classic breaker patterns, this is not a state where we are throttling the number of requests, it's a state similar to CLOSED but with different thresholds. */ + | "HALF_OPEN" + /** The breaker is tripped (no requests are passing). Breaker will enter half-open state after cooldown period. */ + | "OPEN"; + +/** Represents a collection of products. */ +export type Collection = Node & + ObjectWithMetadata & { + /** Background image of the collection. */ + readonly backgroundImage?: Maybe; + /** Channel given to retrieve this collection. Also used by federation gateway to resolve this object in a federated query. */ + readonly channel?: Maybe; + /** + * List of channels in which the collection is available. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly channelListings?: Maybe>; + /** + * Description of the collection. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: Maybe; + /** + * Description of the collection. + * + * Rich text format. For reference see https://editorjs.io/ + * @deprecated Use the `description` field instead. + */ + readonly descriptionJson?: Maybe; + /** The ID of the collection. */ + readonly id: Scalars["ID"]["output"]; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** Name of the collection. */ + readonly name: Scalars["String"]["output"]; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** List of products in this collection. */ + readonly products?: Maybe; + /** SEO description of the collection. */ + readonly seoDescription?: Maybe; + /** SEO title of the collection. */ + readonly seoTitle?: Maybe; + /** Slug of the collection. */ + readonly slug: Scalars["String"]["output"]; + /** Returns translated collection fields for the given language code. */ + readonly translation?: Maybe; + }; + +/** Represents a collection of products. */ +export type CollectionBackgroundImageArgs = { + format?: InputMaybe; + size?: InputMaybe; +}; + +/** Represents a collection of products. */ +export type CollectionMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a collection of products. */ +export type CollectionMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents a collection of products. */ +export type CollectionPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a collection of products. */ +export type CollectionPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents a collection of products. */ +export type CollectionProductsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + search?: InputMaybe; + sortBy?: InputMaybe; + where?: InputMaybe; +}; + +/** Represents a collection of products. */ +export type CollectionTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * Adds products to a collection. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type CollectionAddProducts = { + /** Collection to which products will be added. */ + readonly collection?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly collectionErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** + * Deletes collections. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type CollectionBulkDelete = { + /** @deprecated Use `errors` field instead. */ + readonly collectionErrors: ReadonlyArray; + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; +}; + +/** Represents collection channel listing. */ +export type CollectionChannelListing = Node & { + /** The channel to which the collection belongs. */ + readonly channel: Channel; + /** The ID of the collection channel listing. */ + readonly id: Scalars["ID"]["output"]; + /** Indicates if the collection is published in the channel. */ + readonly isPublished: Scalars["Boolean"]["output"]; + /** @deprecated Use the `publishedAt` field to fetch the publication date. */ + readonly publicationDate?: Maybe; + /** The collection publication date. */ + readonly publishedAt?: Maybe; +}; + +export type CollectionChannelListingError = { + /** List of attributes IDs which causes the error. */ + readonly attributes?: Maybe>; + /** List of channels IDs which causes the error. */ + readonly channels?: Maybe>; + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** List of attribute values IDs which causes the error. */ + readonly values?: Maybe>; +}; + +/** + * Manage collection's availability in channels. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type CollectionChannelListingUpdate = { + /** An updated collection instance. */ + readonly collection?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly collectionChannelListingErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +export type CollectionChannelListingUpdateInput = { + /** List of channels to which the collection should be assigned. */ + readonly addChannels?: InputMaybe>; + /** List of channels from which the collection should be unassigned. */ + readonly removeChannels?: InputMaybe>; +}; + +/** Represents a connection to a list of collections. */ +export type CollectionCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type CollectionCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: Collection; +}; + +/** + * Creates a new collection. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type CollectionCreate = { + readonly collection?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly collectionErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +export type CollectionCreateInput = { + /** Background image file. */ + readonly backgroundImage?: InputMaybe; + /** Alt text for an image. */ + readonly backgroundImageAlt?: InputMaybe; + /** + * Description of the collection. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: InputMaybe; + /** Informs whether a collection is published. */ + readonly isPublished?: InputMaybe; + /** + * Fields required to update the collection metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** Name of the collection. */ + readonly name?: InputMaybe; + /** + * Fields required to update the collection private metadata. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** List of products to be added to the collection. */ + readonly products?: InputMaybe>; + /** + * Publication date. ISO 8601 standard. + * @deprecated Field no longer supported + */ + readonly publicationDate?: InputMaybe; + /** Search engine optimization fields. */ + readonly seo?: InputMaybe; + /** Slug of the collection. */ + readonly slug?: InputMaybe; +}; + +/** Event sent when new collection is created. */ +export type CollectionCreated = Event & { + /** The collection the event relates to. */ + readonly collection?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when new collection is created. */ +export type CollectionCreatedCollectionArgs = { + channel?: InputMaybe; +}; + +/** + * Deletes a collection. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type CollectionDelete = { + readonly collection?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly collectionErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** Event sent when collection is deleted. */ +export type CollectionDeleted = Event & { + /** The collection the event relates to. */ + readonly collection?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when collection is deleted. */ +export type CollectionDeletedCollectionArgs = { + channel?: InputMaybe; +}; + +export type CollectionError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** List of products IDs which causes the error. */ + readonly products?: Maybe>; +}; + +export type CollectionErrorCode = + | "CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT" + | "DUPLICATED_INPUT_ITEM" + | "FILE_SIZE_LIMIT_EXCEEDED" + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND" + | "REQUIRED" + | "UNIQUE"; + +export type CollectionFilterInput = { + /** + * Specifies the channel by which the data should be filtered. + * @deprecated Use root-level channel argument instead. + */ + readonly channel?: InputMaybe; + readonly ids?: InputMaybe>; + readonly metadata?: InputMaybe>; + readonly published?: InputMaybe; + readonly search?: InputMaybe; + readonly slugs?: InputMaybe>; +}; + +export type CollectionInput = { + /** Background image file. */ + readonly backgroundImage?: InputMaybe; + /** Alt text for an image. */ + readonly backgroundImageAlt?: InputMaybe; + /** + * Description of the collection. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: InputMaybe; + /** Informs whether a collection is published. */ + readonly isPublished?: InputMaybe; + /** + * Fields required to update the collection metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** Name of the collection. */ + readonly name?: InputMaybe; + /** + * Fields required to update the collection private metadata. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** + * Publication date. ISO 8601 standard. + * @deprecated Field no longer supported + */ + readonly publicationDate?: InputMaybe; + /** Search engine optimization fields. */ + readonly seo?: InputMaybe; + /** Slug of the collection. */ + readonly slug?: InputMaybe; +}; + +/** Event sent when collection metadata is updated. */ +export type CollectionMetadataUpdated = Event & { + /** The collection the event relates to. */ + readonly collection?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when collection metadata is updated. */ +export type CollectionMetadataUpdatedCollectionArgs = { + channel?: InputMaybe; +}; + +export type CollectionPublished = "HIDDEN" | "PUBLISHED"; + +/** + * Remove products from a collection. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type CollectionRemoveProducts = { + /** Collection from which products will be removed. */ + readonly collection?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly collectionErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** + * Reorder the products of a collection. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type CollectionReorderProducts = { + /** Collection from which products are reordered. */ + readonly collection?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly collectionErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +export type 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 published at. + * + * This option requires a channel filter to work as the values can vary between channels. + */ + | "PUBLISHED_AT"; + +export type CollectionSortingInput = { + /** + * Specifies the channel in which to sort the data. + * @deprecated Use root-level channel argument instead. + */ + readonly channel?: InputMaybe; + /** Specifies the direction in which to sort collections. */ + readonly direction: OrderDirection; + /** Sort collections by the selected field. */ + readonly field: CollectionSortField; +}; + +/** Represents collection's original translatable fields and related translations. */ +export type CollectionTranslatableContent = Node & { + /** + * Represents a collection of products. + * @deprecated Get model fields from the root level queries. + */ + readonly collection?: Maybe; + /** The ID of the collection to translate. */ + readonly collectionId: Scalars["ID"]["output"]; + /** + * Collection's description to translate. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: Maybe; + /** + * Description of the collection. + * + * Rich text format. For reference see https://editorjs.io/ + * @deprecated Use the `description` field instead. + */ + readonly descriptionJson?: Maybe; + /** The ID of the collection translatable content. */ + readonly id: Scalars["ID"]["output"]; + /** Collection's name to translate. */ + readonly name: Scalars["String"]["output"]; + /** SEO description to translate. */ + readonly seoDescription?: Maybe; + /** SEO title to translate. */ + readonly seoTitle?: Maybe; + /** + * Slug to translate + * + * Added in Saleor 3.21. + */ + readonly slug?: Maybe; + /** Returns translated collection fields for the given language code. */ + readonly translation?: Maybe; +}; + +/** Represents collection's original translatable fields and related translations. */ +export type CollectionTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * Creates/updates translations for a collection. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ +export type CollectionTranslate = { + readonly collection?: Maybe; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly translationErrors: ReadonlyArray; +}; + +/** Represents collection translations. */ +export type CollectionTranslation = Node & { + /** + * Translated description of the collection. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: Maybe; + /** + * Translated description of the collection. + * + * Rich text format. For reference see https://editorjs.io/ + * @deprecated Use the `description` field instead. + */ + readonly descriptionJson?: Maybe; + /** The ID of the collection translation. */ + readonly id: Scalars["ID"]["output"]; + /** Translation language. */ + readonly language: LanguageDisplay; + /** Translated collection name. */ + readonly name?: Maybe; + /** Translated SEO description. */ + readonly seoDescription?: Maybe; + /** Translated SEO title. */ + readonly seoTitle?: Maybe; + /** + * Translated collection slug. + * + * Added in Saleor 3.21. + */ + readonly slug?: Maybe; + /** Represents the collection fields to translate. */ + readonly translatableContent?: Maybe; +}; + +/** + * Updates a collection. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type CollectionUpdate = { + readonly collection?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly collectionErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** Event sent when collection is updated. */ +export type CollectionUpdated = Event & { + /** The collection the event relates to. */ + readonly collection?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when collection is updated. */ +export type CollectionUpdatedCollectionArgs = { + channel?: InputMaybe; +}; + +export type CollectionWhereInput = { + /** List of conditions that must be met. */ + readonly AND?: InputMaybe>; + /** A list of conditions of which at least one must be met. */ + readonly OR?: InputMaybe>; + readonly ids?: InputMaybe>; + readonly metadata?: InputMaybe>; +}; + +/** Stores information about a single configuration field. */ +export type ConfigurationItem = { + /** Help text for the field. */ + readonly helpText?: Maybe; + /** Label for the field. */ + readonly label?: Maybe; + /** Name of the field. */ + readonly name: Scalars["String"]["output"]; + /** Type of the field. */ + readonly type?: Maybe; + /** Current value of the field. */ + readonly value?: Maybe; +}; + +export type ConfigurationItemInput = { + /** Name of the field to update. */ + readonly name: Scalars["String"]["input"]; + /** Value of the given field to update. */ + readonly value?: InputMaybe; +}; + +export type 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. + */ +export type ConfirmAccount = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** An activated user account. */ + readonly user?: Maybe; +}; + +/** + * 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. + */ +export type ConfirmEmailChange = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** A user instance with a new email. */ + readonly user?: Maybe; +}; + +/** Define the filtering options for fields that can contain multiple values. */ +export type ContainsFilterInput = { + /** The field contains all of the specified values. */ + readonly containsAll?: InputMaybe>; + /** The field contains at least one of the specified values. */ + readonly containsAny?: InputMaybe>; +}; + +/** + * 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. + */ +export type CountryCode = + /** Andorra */ + | "AD" + /** United Arab Emirates */ + | "AE" + /** Afghanistan */ + | "AF" + /** Antigua and Barbuda */ + | "AG" + /** Anguilla */ + | "AI" + /** Albania */ + | "AL" + /** Armenia */ + | "AM" + /** Angola */ + | "AO" + /** Antarctica */ + | "AQ" + /** Argentina */ + | "AR" + /** American Samoa */ + | "AS" + /** Austria */ + | "AT" + /** Australia */ + | "AU" + /** Aruba */ + | "AW" + /** Åland Islands */ + | "AX" + /** Azerbaijan */ + | "AZ" + /** Bosnia and Herzegovina */ + | "BA" + /** Barbados */ + | "BB" + /** Bangladesh */ + | "BD" + /** Belgium */ + | "BE" + /** Burkina Faso */ + | "BF" + /** Bulgaria */ + | "BG" + /** Bahrain */ + | "BH" + /** Burundi */ + | "BI" + /** Benin */ + | "BJ" + /** Saint Barthélemy */ + | "BL" + /** Bermuda */ + | "BM" + /** Brunei */ + | "BN" + /** Bolivia */ + | "BO" + /** Bonaire, Sint Eustatius and Saba */ + | "BQ" + /** Brazil */ + | "BR" + /** Bahamas */ + | "BS" + /** Bhutan */ + | "BT" + /** Bouvet Island */ + | "BV" + /** Botswana */ + | "BW" + /** Belarus */ + | "BY" + /** Belize */ + | "BZ" + /** Canada */ + | "CA" + /** Cocos (Keeling) Islands */ + | "CC" + /** Congo (the Democratic Republic of the) */ + | "CD" + /** Central African Republic */ + | "CF" + /** Congo */ + | "CG" + /** Switzerland */ + | "CH" + /** Côte d'Ivoire */ + | "CI" + /** Cook Islands */ + | "CK" + /** Chile */ + | "CL" + /** Cameroon */ + | "CM" + /** China */ + | "CN" + /** Colombia */ + | "CO" + /** Costa Rica */ + | "CR" + /** Cuba */ + | "CU" + /** Cabo Verde */ + | "CV" + /** Curaçao */ + | "CW" + /** Christmas Island */ + | "CX" + /** Cyprus */ + | "CY" + /** Czechia */ + | "CZ" + /** Germany */ + | "DE" + /** Djibouti */ + | "DJ" + /** Denmark */ + | "DK" + /** Dominica */ + | "DM" + /** Dominican Republic */ + | "DO" + /** Algeria */ + | "DZ" + /** Ecuador */ + | "EC" + /** Estonia */ + | "EE" + /** Egypt */ + | "EG" + /** Western Sahara */ + | "EH" + /** Eritrea */ + | "ER" + /** Spain */ + | "ES" + /** Ethiopia */ + | "ET" + /** European Union */ + | "EU" + /** Finland */ + | "FI" + /** Fiji */ + | "FJ" + /** Falkland Islands (Malvinas) */ + | "FK" + /** Micronesia */ + | "FM" + /** Faroe Islands */ + | "FO" + /** France */ + | "FR" + /** Gabon */ + | "GA" + /** United Kingdom */ + | "GB" + /** Grenada */ + | "GD" + /** Georgia */ + | "GE" + /** French Guiana */ + | "GF" + /** Guernsey */ + | "GG" + /** Ghana */ + | "GH" + /** Gibraltar */ + | "GI" + /** Greenland */ + | "GL" + /** Gambia */ + | "GM" + /** Guinea */ + | "GN" + /** Guadeloupe */ + | "GP" + /** Equatorial Guinea */ + | "GQ" + /** Greece */ + | "GR" + /** South Georgia and the South Sandwich Islands */ + | "GS" + /** Guatemala */ + | "GT" + /** Guam */ + | "GU" + /** Guinea-Bissau */ + | "GW" + /** Guyana */ + | "GY" + /** Hong Kong */ + | "HK" + /** Heard Island and McDonald Islands */ + | "HM" + /** Honduras */ + | "HN" + /** Croatia */ + | "HR" + /** Haiti */ + | "HT" + /** Hungary */ + | "HU" + /** Indonesia */ + | "ID" + /** Ireland */ + | "IE" + /** Israel */ + | "IL" + /** Isle of Man */ + | "IM" + /** India */ + | "IN" + /** British Indian Ocean Territory */ + | "IO" + /** Iraq */ + | "IQ" + /** Iran */ + | "IR" + /** Iceland */ + | "IS" + /** Italy */ + | "IT" + /** Jersey */ + | "JE" + /** Jamaica */ + | "JM" + /** Jordan */ + | "JO" + /** Japan */ + | "JP" + /** Kenya */ + | "KE" + /** Kyrgyzstan */ + | "KG" + /** Cambodia */ + | "KH" + /** Kiribati */ + | "KI" + /** Comoros */ + | "KM" + /** Saint Kitts and Nevis */ + | "KN" + /** North Korea */ + | "KP" + /** South Korea */ + | "KR" + /** Kuwait */ + | "KW" + /** Cayman Islands */ + | "KY" + /** Kazakhstan */ + | "KZ" + /** Laos */ + | "LA" + /** Lebanon */ + | "LB" + /** Saint Lucia */ + | "LC" + /** Liechtenstein */ + | "LI" + /** Sri Lanka */ + | "LK" + /** Liberia */ + | "LR" + /** Lesotho */ + | "LS" + /** Lithuania */ + | "LT" + /** Luxembourg */ + | "LU" + /** Latvia */ + | "LV" + /** Libya */ + | "LY" + /** Morocco */ + | "MA" + /** Monaco */ + | "MC" + /** Moldova */ + | "MD" + /** Montenegro */ + | "ME" + /** Saint Martin (French part) */ + | "MF" + /** Madagascar */ + | "MG" + /** Marshall Islands */ + | "MH" + /** North Macedonia */ + | "MK" + /** Mali */ + | "ML" + /** Myanmar */ + | "MM" + /** Mongolia */ + | "MN" + /** Macao */ + | "MO" + /** Northern Mariana Islands */ + | "MP" + /** Martinique */ + | "MQ" + /** Mauritania */ + | "MR" + /** Montserrat */ + | "MS" + /** Malta */ + | "MT" + /** Mauritius */ + | "MU" + /** Maldives */ + | "MV" + /** Malawi */ + | "MW" + /** Mexico */ + | "MX" + /** Malaysia */ + | "MY" + /** Mozambique */ + | "MZ" + /** Namibia */ + | "NA" + /** New Caledonia */ + | "NC" + /** Niger */ + | "NE" + /** Norfolk Island */ + | "NF" + /** Nigeria */ + | "NG" + /** Nicaragua */ + | "NI" + /** Netherlands */ + | "NL" + /** Norway */ + | "NO" + /** Nepal */ + | "NP" + /** Nauru */ + | "NR" + /** Niue */ + | "NU" + /** New Zealand */ + | "NZ" + /** Oman */ + | "OM" + /** Panama */ + | "PA" + /** Peru */ + | "PE" + /** French Polynesia */ + | "PF" + /** Papua New Guinea */ + | "PG" + /** Philippines */ + | "PH" + /** Pakistan */ + | "PK" + /** Poland */ + | "PL" + /** Saint Pierre and Miquelon */ + | "PM" + /** Pitcairn */ + | "PN" + /** Puerto Rico */ + | "PR" + /** Palestine, State of */ + | "PS" + /** Portugal */ + | "PT" + /** Palau */ + | "PW" + /** Paraguay */ + | "PY" + /** Qatar */ + | "QA" + /** Réunion */ + | "RE" + /** Romania */ + | "RO" + /** Serbia */ + | "RS" + /** Russia */ + | "RU" + /** Rwanda */ + | "RW" + /** Saudi Arabia */ + | "SA" + /** Solomon Islands */ + | "SB" + /** Seychelles */ + | "SC" + /** Sudan */ + | "SD" + /** Sweden */ + | "SE" + /** Singapore */ + | "SG" + /** Saint Helena, Ascension and Tristan da Cunha */ + | "SH" + /** Slovenia */ + | "SI" + /** Svalbard and Jan Mayen */ + | "SJ" + /** Slovakia */ + | "SK" + /** Sierra Leone */ + | "SL" + /** San Marino */ + | "SM" + /** Senegal */ + | "SN" + /** Somalia */ + | "SO" + /** Suriname */ + | "SR" + /** South Sudan */ + | "SS" + /** Sao Tome and Principe */ + | "ST" + /** El Salvador */ + | "SV" + /** Sint Maarten (Dutch part) */ + | "SX" + /** Syria */ + | "SY" + /** Eswatini */ + | "SZ" + /** Turks and Caicos Islands */ + | "TC" + /** Chad */ + | "TD" + /** French Southern Territories */ + | "TF" + /** Togo */ + | "TG" + /** Thailand */ + | "TH" + /** Tajikistan */ + | "TJ" + /** Tokelau */ + | "TK" + /** Timor-Leste */ + | "TL" + /** Turkmenistan */ + | "TM" + /** Tunisia */ + | "TN" + /** Tonga */ + | "TO" + /** Türkiye */ + | "TR" + /** Trinidad and Tobago */ + | "TT" + /** Tuvalu */ + | "TV" + /** Taiwan */ + | "TW" + /** Tanzania */ + | "TZ" + /** Ukraine */ + | "UA" + /** Uganda */ + | "UG" + /** United States Minor Outlying Islands */ + | "UM" + /** United States of America */ + | "US" + /** Uruguay */ + | "UY" + /** Uzbekistan */ + | "UZ" + /** Holy See */ + | "VA" + /** Saint Vincent and the Grenadines */ + | "VC" + /** Venezuela */ + | "VE" + /** Virgin Islands (British) */ + | "VG" + /** Virgin Islands (U.S.) */ + | "VI" + /** Vietnam */ + | "VN" + /** Vanuatu */ + | "VU" + /** Wallis and Futuna */ + | "WF" + /** Samoa */ + | "WS" + /** Kosovo */ + | "XK" + /** Yemen */ + | "YE" + /** Mayotte */ + | "YT" + /** South Africa */ + | "ZA" + /** Zambia */ + | "ZM" + /** Zimbabwe */ + | "ZW"; + +/** Filter by country code. */ +export type CountryCodeEnumFilterInput = { + /** The value equal to. */ + readonly eq?: InputMaybe; + /** The value not included in. */ + readonly notOneOf?: InputMaybe>; + /** The value included in. */ + readonly oneOf?: InputMaybe>; +}; + +export type CountryDisplay = { + /** Country code. */ + readonly code: Scalars["String"]["output"]; + /** Country name. */ + readonly country: Scalars["String"]["output"]; + /** + * Country tax. + * @deprecated Always returns `null`. Use `TaxClassCountryRate` type to manage tax rates per country. + */ + readonly vat?: Maybe; +}; + +export type 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. */ + readonly attachedToShippingZones?: InputMaybe; +}; + +export type CountryRateInput = { + /** Country in which this rate applies. */ + readonly countryCode: CountryCode; + /** Tax rate value provided as percentage. Example: provide `23` to represent `23%` tax rate. */ + readonly rate: Scalars["Float"]["input"]; +}; + +export type CountryRateUpdateInput = { + /** Country in which this rate applies. */ + readonly countryCode: CountryCode; + /** Tax rate value provided as percentage. Example: provide `23` to represent `23%` tax rate. Provide `null` to remove the particular rate. */ + readonly rate?: InputMaybe; +}; + +/** Create JWT token. */ +export type CreateToken = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + /** CSRF token required to re-generate access token. */ + readonly csrfToken?: Maybe; + readonly errors: ReadonlyArray; + /** JWT refresh token, required to re-generate access token. */ + readonly refreshToken?: Maybe; + /** JWT token, required to authenticate. */ + readonly token?: Maybe; + /** A user instance. */ + readonly user?: Maybe; +}; + +export type CreditCard = { + /** Card brand. */ + readonly brand: Scalars["String"]["output"]; + /** Two-digit number representing the card’s expiration month. */ + readonly expMonth?: Maybe; + /** Four-digit number representing the card’s expiration year. */ + readonly expYear?: Maybe; + /** First 4 digits of the card number. */ + readonly firstDigits?: Maybe; + /** Last 4 digits of the card number. */ + readonly lastDigits: Scalars["String"]["output"]; +}; + +/** + * Deletes customers. + * + * Requires one of the following permissions: MANAGE_USERS. + * + * Triggers the following webhook events: + * - CUSTOMER_DELETED (async): A customer account was deleted. + */ +export type CustomerBulkDelete = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; +}; + +export type CustomerBulkResult = { + /** Customer data. */ + readonly customer?: Maybe; + /** List of errors that occurred during the update attempt. */ + readonly errors?: Maybe>; +}; + +/** + * Updates customers. + * + * 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. + */ +export type CustomerBulkUpdate = { + /** Returns how many objects were created. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** List of the updated customers. */ + readonly results: ReadonlyArray; +}; + +export type CustomerBulkUpdateError = { + /** The error code. */ + readonly code: CustomerBulkUpdateErrorCode; + /** The error message. */ + readonly message?: Maybe; + /** Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly path?: Maybe; +}; + +export type CustomerBulkUpdateErrorCode = + | "BLANK" + | "DUPLICATED_INPUT_ITEM" + | "GRAPHQL_ERROR" + | "INVALID" + | "MAX_LENGTH" + | "NOT_FOUND" + | "REQUIRED" + | "UNIQUE"; + +export type CustomerBulkUpdateInput = { + /** External ID of a customer to update. */ + readonly externalReference?: InputMaybe; + /** ID of a customer to update. */ + readonly id?: InputMaybe; + /** Fields required to update a customer. */ + readonly 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. + */ +export type CustomerCreate = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + readonly user?: Maybe; +}; + +/** Event sent when new customer user is created. */ +export type CustomerCreated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The user the event relates to. */ + readonly user?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Deletes a customer. + * + * Requires one of the following permissions: MANAGE_USERS. + * + * Triggers the following webhook events: + * - CUSTOMER_DELETED (async): A customer account was deleted. + */ +export type CustomerDelete = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + readonly user?: Maybe; +}; + +/** History log of the customer. */ +export type CustomerEvent = Node & { + /** App that performed the action. */ + readonly app?: Maybe; + /** Number of objects concerned by the event. */ + readonly count?: Maybe; + /** Date when event happened at in ISO 8601 format. */ + readonly date?: Maybe; + /** The ID of the customer event. */ + readonly id: Scalars["ID"]["output"]; + /** Content of the event. */ + readonly message?: Maybe; + /** The concerned order. */ + readonly order?: Maybe; + /** Customer event type. */ + readonly type?: Maybe; + /** User who performed the action. */ + readonly user?: Maybe; +}; + +export type 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"; + +export type CustomerFilterInput = { + readonly dateJoined?: InputMaybe; + /** Filter by ids. */ + readonly ids?: InputMaybe>; + readonly metadata?: InputMaybe>; + readonly numberOfOrders?: InputMaybe; + readonly placedOrders?: InputMaybe; + readonly search?: InputMaybe; + readonly updatedAt?: InputMaybe; +}; + +export type CustomerInput = { + /** Billing address of the customer. */ + readonly defaultBillingAddress?: InputMaybe; + /** Shipping address of the customer. */ + readonly defaultShippingAddress?: InputMaybe; + /** The unique email address of the user. */ + readonly email?: InputMaybe; + /** External ID of the customer. */ + readonly externalReference?: InputMaybe; + /** Given name. */ + readonly firstName?: InputMaybe; + /** User account is active. */ + readonly isActive?: InputMaybe; + /** User account is confirmed. */ + readonly isConfirmed?: InputMaybe; + /** User language code. */ + readonly languageCode?: InputMaybe; + /** Family name. */ + readonly lastName?: InputMaybe; + /** + * Fields required to update the user metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** A note about the user. */ + readonly note?: InputMaybe; + /** + * Fields required to update the user private metadata. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; +}; + +/** Event sent when customer user metadata is updated. */ +export type CustomerMetadataUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The user the event relates to. */ + readonly user?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type CustomerOrderWhereInput = { + /** List of conditions that must be met. */ + readonly AND?: InputMaybe>; + /** A list of conditions of which at least one must be met. */ + readonly OR?: InputMaybe>; + /** Filter by authorize status. */ + readonly authorizeStatus?: InputMaybe; + /** Filter by billing address of the order. */ + readonly billingAddress?: InputMaybe; + /** Filter by channel. */ + readonly channelId?: InputMaybe; + /** Filter by charge status. */ + readonly chargeStatus?: InputMaybe; + /** Filter by checkout id. */ + readonly checkoutId?: InputMaybe; + /** Filter by checkout token. */ + readonly checkoutToken?: InputMaybe; + /** Filter order by created at date. */ + readonly createdAt?: InputMaybe; + /** Filter by whether the order has any fulfillments. */ + readonly hasFulfillments?: InputMaybe; + /** Filter by whether the order has any invoices. */ + readonly hasInvoices?: InputMaybe; + readonly ids?: InputMaybe>; + /** Filter by invoice data associated with the order. Each list item represents conditions that must be satisfied by a single object. The filter matches orders that have related objects meeting all specified groups of conditions. */ + readonly invoices?: InputMaybe>; + /** Filter by whether the order uses the click and collect delivery method. */ + readonly isClickAndCollect?: InputMaybe; + /** Filter based on whether the order includes a gift card purchase. */ + readonly isGiftCardBought?: InputMaybe; + /** Filter based on whether a gift card was used in the order. */ + readonly isGiftCardUsed?: InputMaybe; + /** Filter by number of lines in the order. */ + readonly linesCount?: InputMaybe; + /** Filter by metadata fields. */ + readonly metadata?: InputMaybe; + /** Filter by order number. */ + readonly number?: InputMaybe; + /** Filter by the product type of related order lines. */ + readonly productTypeId?: InputMaybe; + /** Filter by shipping address of the order. */ + readonly shippingAddress?: InputMaybe; + /** Filter by order status. */ + readonly status?: InputMaybe; + /** Filter by total gross amount of the order. */ + readonly totalGross?: InputMaybe; + /** Filter by total net amount of the order. */ + readonly totalNet?: InputMaybe; + /** Filter order by updated at date. */ + readonly updatedAt?: InputMaybe; + /** Filter by user email. */ + readonly userEmail?: InputMaybe; + /** Filter by voucher code used in the order. */ + readonly voucherCode?: InputMaybe; +}; + +/** + * 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. + */ +export type CustomerUpdate = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + readonly user?: Maybe; +}; + +/** Event sent when customer user is updated. */ +export type CustomerUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The user the event relates to. */ + readonly user?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type CustomerWhereInput = { + /** List of conditions that must be met. */ + readonly AND?: InputMaybe>; + /** A list of conditions of which at least one must be met. */ + readonly OR?: InputMaybe>; + /** Filter by addresses data associated with user. */ + readonly addresses?: InputMaybe; + /** Filter by date joined. */ + readonly dateJoined?: InputMaybe; + /** Filter by email address. */ + readonly email?: InputMaybe; + /** Filter by first name. */ + readonly firstName?: InputMaybe; + readonly ids?: InputMaybe>; + /** Filter by whether the user is active. */ + readonly isActive?: InputMaybe; + /** Filter by last name. */ + readonly lastName?: InputMaybe; + /** Filter by metadata fields. */ + readonly metadata?: InputMaybe; + /** Filter by number of orders placed by the user. */ + readonly numberOfOrders?: InputMaybe; + /** Filter by date when orders were placed. */ + readonly placedOrdersAt?: InputMaybe; + /** Filter by last updated date. */ + readonly updatedAt?: InputMaybe; +}; + +export type DateRangeInput = { + /** Start date. */ + readonly gte?: InputMaybe; + /** End date. */ + readonly lte?: InputMaybe; +}; + +/** Define the filtering options for date time fields. */ +export type DateTimeFilterInput = { + /** The value equal to. */ + readonly eq?: InputMaybe; + /** The value included in. */ + readonly oneOf?: InputMaybe>; + /** The value in range. */ + readonly range?: InputMaybe; +}; + +export type DateTimeRangeInput = { + /** Start date. */ + readonly gte?: InputMaybe; + /** End date. */ + readonly lte?: InputMaybe; +}; + +/** + * Deactivate all JWT tokens of the currently authenticated user. + * + * Requires one of the following permissions: AUTHENTICATED_USER. + */ +export type DeactivateAllUserTokens = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** Define the filtering options for decimal fields. */ +export type DecimalFilterInput = { + /** The value equal to. */ + readonly eq?: InputMaybe; + /** The value included in. */ + readonly oneOf?: InputMaybe>; + /** The value in range. */ + readonly range?: InputMaybe; +}; + +export type DecimalRangeInput = { + /** Decimal value greater than or equal to. */ + readonly gte?: InputMaybe; + /** Decimal value less than or equal to. */ + readonly lte?: InputMaybe; +}; + +/** Delete metadata of an object. To use it, you need to have access to the modified object. */ +export type DeleteMetadata = { + readonly errors: ReadonlyArray; + readonly item?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly metadataErrors: ReadonlyArray; +}; + +/** 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. */ +export type DeletePrivateMetadata = { + readonly errors: ReadonlyArray; + readonly item?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly metadataErrors: ReadonlyArray; +}; + +/** + * Represents a delivery option for the checkout. + * + * Added in Saleor 3.23. + */ +export type Delivery = { + /** The ID of the delivery. */ + readonly id: Scalars["ID"]["output"]; + /** Shipping method represented by the delivery. */ + readonly shippingMethod?: Maybe; +}; + +/** Represents a delivery method chosen for the checkout. `Warehouse` type is used when checkout is marked as "click and collect" and `ShippingMethod` otherwise. */ +export type DeliveryMethod = ShippingMethod | Warehouse; + +/** + * Calculates available delivery options for a checkout. + * + * Added in Saleor 3.23. + * + * Triggers the following webhook events: + * - SHIPPING_LIST_METHODS_FOR_CHECKOUT (sync): Triggered to fetch external shipping methods. + * - CHECKOUT_FILTER_SHIPPING_METHODS (sync): Triggered to filter shipping methods. + */ +export type DeliveryOptionsCalculate = { + /** List of the available deliveries. */ + readonly deliveries: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +export type DeliveryOptionsCalculateError = { + /** The error code. */ + readonly code: DeliveryOptionsCalculateErrorCode; + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type DeliveryOptionsCalculateErrorCode = "GRAPHQL_ERROR" | "INVALID" | "NOT_FOUND"; + +export type DiscountError = { + /** List of channels IDs which causes the error. */ + readonly channels?: Maybe>; + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** List of products IDs which causes the error. */ + readonly products?: Maybe>; + /** + * List of voucher codes which causes the error. + * + * Added in Saleor 3.18. + */ + readonly voucherCodes?: Maybe>; +}; + +export type DiscountErrorCode = + | "ALREADY_EXISTS" + | "CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT" + | "DUPLICATED_INPUT_ITEM" + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND" + | "REQUIRED" + | "UNIQUE" + | "VOUCHER_ALREADY_USED"; + +export type DiscountStatusEnum = "ACTIVE" | "EXPIRED" | "SCHEDULED"; + +export type DiscountValueTypeEnum = "FIXED" | "PERCENTAGE"; + +export type DiscountedObjectWhereInput = { + /** List of conditions that must be met. */ + readonly AND?: InputMaybe>; + /** A list of conditions of which at least one must be met. */ + readonly OR?: InputMaybe>; + /** Filter by the base subtotal price. */ + readonly baseSubtotalPrice?: InputMaybe; + /** Filter by the base total price. */ + readonly baseTotalPrice?: InputMaybe; +}; + +export type DistanceUnitsEnum = "CM" | "DM" | "FT" | "INCH" | "KM" | "M" | "MM" | "YD"; + +/** Represents API domain. */ +export type Domain = { + /** The host name of the domain. */ + readonly host: Scalars["String"]["output"]; + /** Inform if SSL is enabled. */ + readonly sslEnabled: Scalars["Boolean"]["output"]; + /** The absolute URL of the API. */ + readonly url: Scalars["String"]["output"]; +}; + +/** + * Deletes draft orders. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type DraftOrderBulkDelete = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +/** + * Completes creating an order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type DraftOrderComplete = { + readonly errors: ReadonlyArray; + /** Completed order. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +/** + * Creates a new draft order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type DraftOrderCreate = { + readonly errors: ReadonlyArray; + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +export type DraftOrderCreateInput = { + /** Billing address of the customer. */ + readonly billingAddress?: InputMaybe; + /** ID of the channel associated with the order. */ + readonly channelId?: InputMaybe; + /** A note from a customer. Visible by customers in the order summary. */ + readonly customerNote?: InputMaybe; + /** + * Discount amount for the order. + * @deprecated Providing a value for the field has no effect. Use `orderDiscountAdd` mutation instead. + */ + readonly discount?: InputMaybe; + /** External ID of this order. */ + readonly externalReference?: InputMaybe; + /** + * Order language code. + * + * Added in Saleor 3.21. + */ + readonly languageCode?: InputMaybe; + /** Variant line input consisting of variant ID and quantity of products. */ + readonly lines?: InputMaybe>; + /** + * Order public metadata. + * + * Added in Saleor 3.21. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** + * Order private metadata. + * + * Added in Saleor 3.21. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** URL of a view where users should be redirected to see the order details. URL in RFC 1808 format. */ + readonly redirectUrl?: InputMaybe; + /** + * Indicates whether the billing address should be saved to the user’s address book upon draft order completion. Can only be set when a billing address is provided. If not specified along with the address, the default behavior is to not save the address. + * + * Added in Saleor 3.21. + */ + readonly saveBillingAddress?: InputMaybe; + /** + * Indicates whether the shipping address should be saved to the user’s address book upon draft order completion.Can only be set when a shipping address is provided. If not specified along with the address, the default behavior is to not save the address. + * + * Added in Saleor 3.21. + */ + readonly saveShippingAddress?: InputMaybe; + /** Shipping address of the customer. */ + readonly shippingAddress?: InputMaybe; + /** ID of a selected shipping method. */ + readonly shippingMethod?: InputMaybe; + /** Customer associated with the draft order. */ + readonly user?: InputMaybe; + /** Email address of the customer. */ + readonly userEmail?: InputMaybe; + /** + * ID of the voucher associated with the order. + * @deprecated Use `voucherCode` instead. + */ + readonly voucher?: InputMaybe; + /** + * A code of the voucher associated with the order. + * + * Added in Saleor 3.18. + */ + readonly voucherCode?: InputMaybe; +}; + +/** Event sent when new draft order is created. */ +export type DraftOrderCreated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The order the event relates to. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Deletes a draft order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type DraftOrderDelete = { + readonly errors: ReadonlyArray; + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +/** Event sent when draft order is deleted. */ +export type DraftOrderDeleted = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The order the event relates to. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type DraftOrderInput = { + /** Billing address of the customer. */ + readonly billingAddress?: InputMaybe; + /** ID of the channel associated with the order. */ + readonly channelId?: InputMaybe; + /** A note from a customer. Visible by customers in the order summary. */ + readonly customerNote?: InputMaybe; + /** + * Discount amount for the order. + * @deprecated Providing a value for the field has no effect. Use `orderDiscountAdd` mutation instead. + */ + readonly discount?: InputMaybe; + /** External ID of this order. */ + readonly externalReference?: InputMaybe; + /** + * Order language code. + * + * Added in Saleor 3.21. + */ + readonly languageCode?: InputMaybe; + /** + * Order public metadata. + * + * Added in Saleor 3.21. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** + * Order private metadata. + * + * Added in Saleor 3.21. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** URL of a view where users should be redirected to see the order details. URL in RFC 1808 format. */ + readonly redirectUrl?: InputMaybe; + /** + * Indicates whether the billing address should be saved to the user’s address book upon draft order completion. Can only be set when a billing address is provided. If not specified along with the address, the default behavior is to not save the address. + * + * Added in Saleor 3.21. + */ + readonly saveBillingAddress?: InputMaybe; + /** + * Indicates whether the shipping address should be saved to the user’s address book upon draft order completion.Can only be set when a shipping address is provided. If not specified along with the address, the default behavior is to not save the address. + * + * Added in Saleor 3.21. + */ + readonly saveShippingAddress?: InputMaybe; + /** Shipping address of the customer. */ + readonly shippingAddress?: InputMaybe; + /** ID of a selected shipping method. */ + readonly shippingMethod?: InputMaybe; + /** Customer associated with the draft order. */ + readonly user?: InputMaybe; + /** Email address of the customer. */ + readonly userEmail?: InputMaybe; + /** + * ID of the voucher associated with the order. + * @deprecated Use `voucherCode` instead. + */ + readonly voucher?: InputMaybe; + /** + * A code of the voucher associated with the order. + * + * Added in Saleor 3.18. + */ + readonly voucherCode?: InputMaybe; +}; + +/** + * Deletes order lines. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type DraftOrderLinesBulkDelete = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +/** + * Updates a draft order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type DraftOrderUpdate = { + readonly errors: ReadonlyArray; + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +/** Event sent when draft order is updated. */ +export type DraftOrderUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The order the event relates to. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type DraftOrderWhereInput = { + /** List of conditions that must be met. */ + readonly AND?: InputMaybe>; + /** A list of conditions of which at least one must be met. */ + readonly OR?: InputMaybe>; + /** Filter by authorize status. */ + readonly authorizeStatus?: InputMaybe; + /** Filter by billing address of the order. */ + readonly billingAddress?: InputMaybe; + /** Filter by channel. */ + readonly channelId?: InputMaybe; + /** Filter by charge status. */ + readonly chargeStatus?: InputMaybe; + /** Filter order by created at date. */ + readonly createdAt?: InputMaybe; + /** Filter by order events. Each list item represents conditions that must be satisfied by a single object. The filter matches orders that have related objects meeting all specified groups of conditions. */ + readonly events?: InputMaybe>; + readonly ids?: InputMaybe>; + /** Filter by whether the order uses the click and collect delivery method. */ + readonly isClickAndCollect?: InputMaybe; + /** Filter by line items associated with the order. Each list item represents conditions that must be satisfied by a single object. The filter matches orders that have related objects meeting all specified groups of conditions. */ + readonly lines?: InputMaybe>; + /** Filter by number of lines in the order. */ + readonly linesCount?: InputMaybe; + /** Filter by metadata fields. */ + readonly metadata?: InputMaybe; + /** Filter by order number. */ + readonly number?: InputMaybe; + /** Filter by the product type of related order lines. */ + readonly productTypeId?: InputMaybe; + /** Filter by shipping address of the order. */ + readonly shippingAddress?: InputMaybe; + /** Filter by total gross amount of the order. */ + readonly totalGross?: InputMaybe; + /** Filter by total net amount of the order. */ + readonly totalNet?: InputMaybe; + /** Filter by transaction data associated with the order. Each list item represents conditions that must be satisfied by a single object. The filter matches orders that have related objects meeting all specified groups of conditions. */ + readonly transactions?: InputMaybe>; + /** Filter order by updated at date. */ + readonly updatedAt?: InputMaybe; + /** Filter by user. */ + readonly user?: InputMaybe; + /** Filter by user email. */ + readonly userEmail?: InputMaybe; + /** Filter by voucher code used in the order. */ + readonly voucherCode?: InputMaybe; +}; + +export type 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"; + +export type Event = { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event delivery. */ +export type EventDelivery = Node & { + /** Event delivery attempts. */ + readonly attempts?: Maybe; + /** Creation time of an event delivery. */ + readonly createdAt: Scalars["DateTime"]["output"]; + /** Webhook event type. */ + readonly eventType: WebhookEventTypeEnum; + /** The ID of an event delivery. */ + readonly id: Scalars["ID"]["output"]; + /** Event payload. */ + readonly payload?: Maybe; + /** Event delivery status. */ + readonly status: EventDeliveryStatusEnum; +}; + +/** Event delivery. */ +export type EventDeliveryAttemptsArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sortBy?: InputMaybe; +}; + +/** Event delivery attempts. */ +export type EventDeliveryAttempt = Node & { + /** Event delivery creation date and time. */ + readonly createdAt: Scalars["DateTime"]["output"]; + /** Delivery attempt duration. */ + readonly duration?: Maybe; + /** The ID of Event Delivery Attempt. */ + readonly id: Scalars["ID"]["output"]; + /** Request headers for delivery attempt. */ + readonly requestHeaders?: Maybe; + /** Delivery attempt response content. */ + readonly response?: Maybe; + /** Response headers for delivery attempt. */ + readonly responseHeaders?: Maybe; + /** Delivery attempt response status code. */ + readonly responseStatusCode?: Maybe; + /** Event delivery status. */ + readonly status: EventDeliveryStatusEnum; + /** Task id for delivery attempt. */ + readonly taskId?: Maybe; +}; + +export type EventDeliveryAttemptCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type EventDeliveryAttemptCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: EventDeliveryAttempt; +}; + +export type EventDeliveryAttemptSortField = + /** Sort event delivery attempts by created at. */ + "CREATED_AT"; + +export type EventDeliveryAttemptSortingInput = { + /** Specifies the direction in which to sort attempts. */ + readonly direction: OrderDirection; + /** Sort attempts by the selected field. */ + readonly field: EventDeliveryAttemptSortField; +}; + +export type EventDeliveryCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type EventDeliveryCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: EventDelivery; +}; + +export type EventDeliveryFilterInput = { + readonly eventType?: InputMaybe; + readonly status?: InputMaybe; +}; + +/** + * Retries event delivery. + * + * Requires one of the following permissions: MANAGE_APPS. + */ +export type EventDeliveryRetry = { + /** Event delivery. */ + readonly delivery?: Maybe; + readonly errors: ReadonlyArray; +}; + +export type EventDeliverySortField = + /** Sort event deliveries by created at. */ + "CREATED_AT"; + +export type EventDeliverySortingInput = { + /** Specifies the direction in which to sort deliveries. */ + readonly direction: OrderDirection; + /** Sort deliveries by the selected field. */ + readonly field: EventDeliverySortField; +}; + +export type EventDeliveryStatusEnum = "FAILED" | "PENDING" | "SUCCESS"; + +export type ExportError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type ExportErrorCode = "GRAPHQL_ERROR" | "INVALID" | "NOT_FOUND" | "REQUIRED"; + +/** History log of export file. */ +export type ExportEvent = Node & { + /** App which performed the action. Requires one of the following permissions: OWNER, MANAGE_APPS. */ + readonly app?: Maybe; + /** Date when event happened at in ISO 8601 format. */ + readonly date: Scalars["DateTime"]["output"]; + /** The ID of the object. */ + readonly id: Scalars["ID"]["output"]; + /** Content of the event. */ + readonly message: Scalars["String"]["output"]; + /** Export event type. */ + readonly type: ExportEventsEnum; + /** User who performed the action. Requires one of the following permissions: OWNER, MANAGE_STAFF. */ + readonly user?: Maybe; +}; + +export type ExportEventsEnum = + | "EXPORTED_FILE_SENT" + | "EXPORT_DELETED" + | "EXPORT_FAILED" + | "EXPORT_FAILED_INFO_SENT" + | "EXPORT_PENDING" + | "EXPORT_SUCCESS"; + +/** Represents a job data of exported file. */ +export type ExportFile = Job & + Node & { + /** The app which requests file export. */ + readonly app?: Maybe; + /** Created date time of job in ISO 8601 format. */ + readonly createdAt: Scalars["DateTime"]["output"]; + /** List of events associated with the export. */ + readonly events?: Maybe>; + /** The ID of the export file. */ + readonly id: Scalars["ID"]["output"]; + /** Job message. */ + readonly message?: Maybe; + /** Job status. */ + readonly status: JobStatusEnum; + /** Date time of job last update in ISO 8601 format. */ + readonly updatedAt: Scalars["DateTime"]["output"]; + /** The URL of field to download. */ + readonly url?: Maybe; + /** The user who requests file export. */ + readonly user?: Maybe; + }; + +export type ExportFileCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type ExportFileCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: ExportFile; +}; + +export type ExportFileFilterInput = { + readonly app?: InputMaybe; + readonly createdAt?: InputMaybe; + readonly status?: InputMaybe; + readonly updatedAt?: InputMaybe; + readonly user?: InputMaybe; +}; + +export type ExportFileSortField = "CREATED_AT" | "LAST_MODIFIED_AT" | "STATUS" | "UPDATED_AT"; + +export type ExportFileSortingInput = { + /** Specifies the direction in which to sort export file. */ + readonly direction: OrderDirection; + /** Sort export file by the selected field. */ + readonly field: ExportFileSortField; +}; + +/** + * Export gift cards to csv file. + * + * 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. + */ +export type ExportGiftCards = { + readonly errors: ReadonlyArray; + /** The newly created export file job which is responsible for export data. */ + readonly exportFile?: Maybe; +}; + +export type ExportGiftCardsInput = { + /** Type of exported file. */ + readonly fileType: FileTypesEnum; + /** Filtering options for gift cards. */ + readonly filter?: InputMaybe; + /** List of gift cards IDs to export. */ + readonly ids?: InputMaybe>; + /** Determine which gift cards should be exported. */ + readonly scope: ExportScope; +}; + +export type ExportInfoInput = { + /** List of attribute ids witch should be exported. */ + readonly attributes?: InputMaybe>; + /** List of channels ids which should be exported. */ + readonly channels?: InputMaybe>; + /** List of product fields witch should be exported. */ + readonly fields?: InputMaybe>; + /** List of warehouse ids witch should be exported. */ + readonly warehouses?: InputMaybe>; +}; + +/** + * 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. + */ +export type ExportProducts = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly exportErrors: ReadonlyArray; + /** The newly created export file job which is responsible for export data. */ + readonly exportFile?: Maybe; +}; + +export type ExportProductsInput = { + /** Input with info about fields which should be exported. */ + readonly exportInfo?: InputMaybe; + /** Type of exported file. */ + readonly fileType: FileTypesEnum; + /** Filtering options for products. */ + readonly filter?: InputMaybe; + /** List of products IDs to export. */ + readonly ids?: InputMaybe>; + /** Determine which products should be exported. */ + readonly scope: ExportScope; +}; + +export type 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. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - VOUCHER_CODE_EXPORT_COMPLETED (async): A notification for the exported file. + */ +export type ExportVoucherCodes = { + readonly errors: ReadonlyArray; + /** The newly created export file job which is responsible for export data. */ + readonly exportFile?: Maybe; +}; + +export type ExportVoucherCodesInput = { + /** Type of exported file. */ + readonly fileType: FileTypesEnum; + /** List of voucher code IDs to export. */ + readonly ids?: InputMaybe>; + /** The ID of the voucher. If provided, exports all codes belonging to the voucher. */ + readonly voucherId?: InputMaybe; +}; + +/** External authentication plugin. */ +export type ExternalAuthentication = { + /** ID of external authentication plugin. */ + readonly id: Scalars["String"]["output"]; + /** Name of external authentication plugin. */ + readonly name?: Maybe; +}; + +/** Prepare external authentication URL for user by custom plugin. */ +export type ExternalAuthenticationUrl = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + /** The data returned by authentication plugin. */ + readonly authenticationData?: Maybe; + readonly errors: ReadonlyArray; +}; + +/** Logout user by custom plugin. */ +export type ExternalLogout = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** The data returned by authentication plugin. */ + readonly logoutData?: Maybe; +}; + +export type ExternalNotificationError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type 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. */ +export type ExternalNotificationTrigger = { + readonly errors: ReadonlyArray; +}; + +export type ExternalNotificationTriggerInput = { + /** External event type. This field is passed to a plugin as an event type. */ + readonly externalEventType: Scalars["String"]["input"]; + /** Additional payload that will be merged with the one based on the business object ID. */ + readonly extraPayload?: InputMaybe; + /** The list of customers or orders node IDs that will be serialized and included in the notification payload. */ + readonly ids: ReadonlyArray; +}; + +/** Obtain external access tokens for user by custom plugin. */ +export type ExternalObtainAccessTokens = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + /** CSRF token required to re-generate external access token. */ + readonly csrfToken?: Maybe; + readonly errors: ReadonlyArray; + /** The refresh token, required to re-generate external access token. */ + readonly refreshToken?: Maybe; + /** The token, required to authenticate. */ + readonly token?: Maybe; + /** A user instance. */ + readonly user?: Maybe; +}; + +/** Refresh user's access by custom plugin. */ +export type ExternalRefresh = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + /** CSRF token required to re-generate external access token. */ + readonly csrfToken?: Maybe; + readonly errors: ReadonlyArray; + /** The refresh token, required to re-generate external access token. */ + readonly refreshToken?: Maybe; + /** The token, required to authenticate. */ + readonly token?: Maybe; + /** A user instance. */ + readonly user?: Maybe; +}; + +/** Verify external authentication data by plugin. */ +export type ExternalVerify = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** Determine if authentication data is valid or not. */ + readonly isValid: Scalars["Boolean"]["output"]; + /** User assigned to data. */ + readonly user?: Maybe; + /** External data. */ + readonly verifyData?: Maybe; +}; + +export type File = { + /** Content type of the file. */ + readonly contentType?: Maybe; + /** The URL of the file. */ + readonly url: Scalars["String"]["output"]; +}; + +export type 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. + */ +export type FileUpload = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly uploadErrors: ReadonlyArray; + readonly uploadedFile?: Maybe; +}; + +/** Represents order fulfillment. */ +export type Fulfillment = Node & + ObjectWithMetadata & { + /** Date and time when fulfillment was created. */ + readonly created: Scalars["DateTime"]["output"]; + /** Sequence in which the fulfillments were created for an order. */ + readonly fulfillmentOrder: Scalars["Int"]["output"]; + /** ID of the fulfillment. */ + readonly id: Scalars["ID"]["output"]; + /** List of lines for the fulfillment. */ + readonly lines?: Maybe>; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** Amount of refunded shipping price. */ + readonly shippingRefundedAmount?: Maybe; + /** Status of fulfillment. */ + readonly status: FulfillmentStatus; + /** User-friendly fulfillment status. */ + readonly statusDisplay?: Maybe; + /** Total refunded amount assigned to this fulfillment. */ + readonly totalRefundedAmount?: Maybe; + /** Fulfillment tracking number. */ + readonly trackingNumber: Scalars["String"]["output"]; + /** Warehouse from fulfillment was fulfilled. */ + readonly warehouse?: Maybe; + }; + +/** Represents order fulfillment. */ +export type FulfillmentMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents order fulfillment. */ +export type FulfillmentMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents order fulfillment. */ +export type FulfillmentPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents order fulfillment. */ +export type FulfillmentPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** + * Approve existing fulfillment. + * + * Requires one of the following permissions: MANAGE_ORDERS. + * + * Triggers the following webhook events: + * - FULFILLMENT_APPROVED (async): Fulfillment is approved. + */ +export type FulfillmentApprove = { + readonly errors: ReadonlyArray; + /** An approved fulfillment. */ + readonly fulfillment?: Maybe; + /** Order which fulfillment was approved. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +/** Event sent when fulfillment is approved. */ +export type FulfillmentApproved = Event & { + /** The fulfillment the event relates to. */ + readonly fulfillment?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** If true, send a notification to the customer. */ + readonly notifyCustomer: Scalars["Boolean"]["output"]; + /** The order the fulfillment belongs to. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Cancels existing fulfillment and optionally restocks items. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type FulfillmentCancel = { + readonly errors: ReadonlyArray; + /** A canceled fulfillment. */ + readonly fulfillment?: Maybe; + /** Order which fulfillment was cancelled. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +export type FulfillmentCancelInput = { + /** ID of a warehouse where items will be restocked. Optional when fulfillment is in WAITING_FOR_APPROVAL state. */ + readonly warehouseId?: InputMaybe; +}; + +/** Event sent when fulfillment is canceled. */ +export type FulfillmentCanceled = Event & { + /** The fulfillment the event relates to. */ + readonly fulfillment?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The order the fulfillment belongs to. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when new fulfillment is created. */ +export type FulfillmentCreated = Event & { + /** The fulfillment the event relates to. */ + readonly fulfillment?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** If true, the app should send a notification to the customer. */ + readonly notifyCustomer: Scalars["Boolean"]["output"]; + /** The order the fulfillment belongs to. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Filter input for order fulfillments data. */ +export type FulfillmentFilterInput = { + /** Filter by metadata fields. */ + readonly metadata?: InputMaybe; + /** Filter by fulfillment status. */ + readonly status?: InputMaybe; + /** Filter by fulfillment warehouse. */ + readonly warehouse?: InputMaybe; +}; + +/** Represents line of the fulfillment. */ +export type FulfillmentLine = Node & { + /** ID of the fulfillment line. */ + readonly id: Scalars["ID"]["output"]; + /** The order line to which the fulfillment line is related. */ + readonly orderLine?: Maybe; + /** The number of items included in the fulfillment line. */ + readonly quantity: Scalars["Int"]["output"]; +}; + +/** Event sent when fulfillment metadata is updated. */ +export type FulfillmentMetadataUpdated = Event & { + /** The fulfillment the event relates to. */ + readonly fulfillment?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The order the fulfillment belongs to. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Refund products. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type FulfillmentRefundProducts = { + readonly errors: ReadonlyArray; + /** A refunded fulfillment. */ + readonly fulfillment?: Maybe; + /** Order which fulfillment was refunded. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +/** + * Return products. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type FulfillmentReturnProducts = { + readonly errors: ReadonlyArray; + /** Order which fulfillment was returned. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; + /** A replace fulfillment. */ + readonly replaceFulfillment?: Maybe; + /** A draft order which was created for products with replace flag. */ + readonly replaceOrder?: Maybe; + /** A return fulfillment. */ + readonly returnFulfillment?: Maybe; +}; + +export type FulfillmentStatus = + | "CANCELED" + | "FULFILLED" + | "REFUNDED" + | "REFUNDED_AND_RETURNED" + | "REPLACED" + | "RETURNED" + | "WAITING_FOR_APPROVAL"; + +/** Filter by fulfillment status. */ +export type FulfillmentStatusEnumFilterInput = { + /** The value equal to. */ + readonly eq?: InputMaybe; + /** The value included in. */ + readonly oneOf?: InputMaybe>; +}; + +/** Event sent when the tracking number is updated. */ +export type FulfillmentTrackingNumberUpdated = Event & { + /** The fulfillment the event relates to. */ + readonly fulfillment?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The order the fulfillment belongs to. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * 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. + */ +export type FulfillmentUpdateTracking = { + readonly errors: ReadonlyArray; + /** A fulfillment with updated tracking. */ + readonly fulfillment?: Maybe; + /** Order for which fulfillment was updated. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +export type FulfillmentUpdateTrackingInput = { + /** If true, send an email notification to the customer. */ + readonly notifyCustomer?: InputMaybe; + /** Fulfillment tracking number. */ + readonly trackingNumber?: InputMaybe; +}; + +/** Filter input for fulfillment warehouses. */ +export type FulfillmentWarehouseFilterInput = { + /** Filter fulfillments by warehouse external reference. */ + readonly externalReference?: InputMaybe; + /** Filter fulfillments by warehouse ID. */ + readonly id?: InputMaybe; + /** Filter fulfillments by warehouse slug. */ + readonly slug?: InputMaybe; +}; + +/** Payment gateway client configuration key and value pair. */ +export type GatewayConfigLine = { + /** Gateway config key. */ + readonly field: Scalars["String"]["output"]; + /** Gateway config value for key. */ + readonly value?: Maybe; +}; + +/** 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. */ +export type GiftCard = Node & + ObjectWithMetadata & { + /** + * App which created the gift card. + * + * Requires one of the following permissions: MANAGE_APPS, OWNER. + */ + readonly app?: Maybe; + /** Slug of the channel where the gift card was bought. */ + readonly boughtInChannel?: Maybe; + /** + * 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. + */ + readonly code: Scalars["String"]["output"]; + /** Date and time when gift card was created. */ + readonly created: Scalars["DateTime"]["output"]; + /** The user who bought or issued a gift card. */ + readonly createdBy?: Maybe; + /** + * Email address of the user who bought or issued gift card. + * + * Requires one of the following permissions: MANAGE_USERS, OWNER. + */ + readonly createdByEmail?: Maybe; + readonly currentBalance: Money; + /** Code in format which allows displaying in a user interface. */ + readonly displayCode: Scalars["String"]["output"]; + /** + * End date of gift card. + * @deprecated Use `expiryDate` field instead. + */ + readonly endDate?: Maybe; + /** + * List of events associated with the gift card. Requires MANAGE_GIFT_CARD permission to access all events. Users with MANAGE_ORDERS permission can access only USED_IN_ORDER and REFUNDED_IN_ORDER events. + * + * Requires one of the following permissions: MANAGE_GIFT_CARD, MANAGE_ORDERS. + */ + readonly events: ReadonlyArray; + /** Expiry date of the gift card. */ + readonly expiryDate?: Maybe; + /** ID of the gift card. */ + readonly id: Scalars["ID"]["output"]; + readonly initialBalance: Money; + readonly isActive: Scalars["Boolean"]["output"]; + /** Last 4 characters of gift card code. */ + readonly last4CodeChars: Scalars["String"]["output"]; + /** Date and time when gift card was last used. */ + readonly lastUsedOn?: Maybe; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** Related gift card product. */ + readonly product?: Maybe; + /** + * Start date of gift card. + * @deprecated Field no longer supported + */ + readonly startDate?: Maybe; + /** + * The gift card tag. + * + * Requires one of the following permissions: MANAGE_GIFT_CARD. + */ + readonly tags: ReadonlyArray; + /** + * The customer who used a gift card. + * @deprecated Field no longer supported + */ + readonly usedBy?: Maybe; + /** + * Email address of the customer who used a gift card. + * @deprecated Field no longer supported + */ + readonly usedByEmail?: Maybe; + /** + * The customer who bought a gift card. + * @deprecated Use `createdBy` field instead. + */ + readonly user?: Maybe; + }; + +/** 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. */ +export type GiftCardEventsArgs = { + filter?: InputMaybe; +}; + +/** 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. */ +export type GiftCardMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** 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. */ +export type GiftCardMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** 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. */ +export type GiftCardPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** 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. */ +export type GiftCardPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** + * 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. + */ +export type GiftCardActivate = { + readonly errors: ReadonlyArray; + /** Activated gift card. */ + readonly giftCard?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly giftCardErrors: ReadonlyArray; +}; + +/** + * Adds note to the 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. + */ +export type GiftCardAddNote = { + readonly errors: ReadonlyArray; + /** Gift card note created. */ + readonly event?: Maybe; + /** Gift card with the note added. */ + readonly giftCard?: Maybe; +}; + +export type GiftCardAddNoteInput = { + /** Note message. */ + readonly message: Scalars["String"]["input"]; +}; + +/** + * Activate gift cards. + * + * Requires one of the following permissions: MANAGE_GIFT_CARD. + * + * Triggers the following webhook events: + * - GIFT_CARD_STATUS_CHANGED (async): A gift card was activated. + */ +export type GiftCardBulkActivate = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; +}; + +/** + * Creates gift cards. + * + * 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. + */ +export type GiftCardBulkCreate = { + /** Returns how many objects were created. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** List of created gift cards. */ + readonly giftCards: ReadonlyArray; +}; + +export type GiftCardBulkCreateInput = { + /** Balance of the gift card. */ + readonly balance: PriceInput; + /** The number of cards to issue. */ + readonly count: Scalars["Int"]["input"]; + /** The gift card expiry date. */ + readonly expiryDate?: InputMaybe; + /** Determine if gift card is active. */ + readonly isActive: Scalars["Boolean"]["input"]; + /** The gift card tags. */ + readonly tags?: InputMaybe>; +}; + +/** + * Deactivate gift cards. + * + * Requires one of the following permissions: MANAGE_GIFT_CARD. + * + * Triggers the following webhook events: + * - GIFT_CARD_STATUS_CHANGED (async): A gift card was deactivated. + */ +export type GiftCardBulkDeactivate = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; +}; + +/** + * Deletes gift cards. + * + * Requires one of the following permissions: MANAGE_GIFT_CARD. + * + * Triggers the following webhook events: + * - GIFT_CARD_DELETED (async): A gift card was deleted. + */ +export type GiftCardBulkDelete = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; +}; + +export type GiftCardCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type GiftCardCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly 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. + */ +export type GiftCardCreate = { + readonly errors: ReadonlyArray; + readonly giftCard?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly giftCardErrors: ReadonlyArray; +}; + +export type GiftCardCreateInput = { + /** The gift card tags to add. */ + readonly addTags?: InputMaybe>; + /** Balance of the gift card. */ + readonly balance: PriceInput; + /** Slug of a channel from which the email should be sent. */ + readonly channel?: InputMaybe; + /** + * Code to use the gift card. + * @deprecated The code is now auto generated. + */ + readonly code?: InputMaybe; + /** + * End date of the gift card in ISO 8601 format. + * @deprecated Use `expiryDate` from `expirySettings` instead. + */ + readonly endDate?: InputMaybe; + /** The gift card expiry date. */ + readonly expiryDate?: InputMaybe; + /** Determine if gift card is active. */ + readonly isActive: Scalars["Boolean"]["input"]; + /** + * Gift Card public metadata. + * + * Added in Saleor 3.21. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** The gift card note from the staff member. */ + readonly note?: InputMaybe; + /** + * Gift Card private metadata. + * + * Added in Saleor 3.21. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** + * Start date of the gift card in ISO 8601 format. + * @deprecated Field no longer supported + */ + readonly startDate?: InputMaybe; + /** Email of the customer to whom gift card will be sent. */ + readonly userEmail?: InputMaybe; +}; + +/** Event sent when new gift card is created. */ +export type GiftCardCreated = Event & { + /** The gift card the event relates to. */ + readonly giftCard?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * 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. + */ +export type GiftCardDeactivate = { + readonly errors: ReadonlyArray; + /** Deactivated gift card. */ + readonly giftCard?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly giftCardErrors: ReadonlyArray; +}; + +/** + * Deletes gift card. + * + * Requires one of the following permissions: MANAGE_GIFT_CARD. + * + * Triggers the following webhook events: + * - GIFT_CARD_DELETED (async): A gift card was deleted. + */ +export type GiftCardDelete = { + readonly errors: ReadonlyArray; + readonly giftCard?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly giftCardErrors: ReadonlyArray; +}; + +/** Event sent when gift card is deleted. */ +export type GiftCardDeleted = Event & { + /** The gift card the event relates to. */ + readonly giftCard?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type GiftCardError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** List of tag values that cause the error. */ + readonly tags?: Maybe>; +}; + +export type GiftCardErrorCode = + | "ALREADY_EXISTS" + | "DUPLICATED_INPUT_ITEM" + | "EXPIRED_GIFT_CARD" + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND" + | "REQUIRED" + | "UNIQUE"; + +/** History log of the gift card. */ +export type GiftCardEvent = Node & { + /** App that performed the action. Requires one of the following permissions: MANAGE_APPS, OWNER. */ + readonly app?: Maybe; + /** The gift card balance. */ + readonly balance?: Maybe; + /** Date when event happened at in ISO 8601 format. */ + readonly date?: Maybe; + /** Email of the customer. */ + readonly email?: Maybe; + /** The gift card expiry date. */ + readonly expiryDate?: Maybe; + /** ID of the event associated with a gift card. */ + readonly id: Scalars["ID"]["output"]; + /** Content of the event. */ + readonly message?: Maybe; + /** Previous gift card expiry date. */ + readonly oldExpiryDate?: Maybe; + /** The list of old gift card tags. */ + readonly oldTags?: Maybe>; + /** The order ID where gift card was used or bought. */ + readonly orderId?: Maybe; + /** User-friendly number of an order where gift card was used or bought. */ + readonly orderNumber?: Maybe; + /** The list of gift card tags. */ + readonly tags?: Maybe>; + /** Gift card event type. */ + readonly type?: Maybe; + /** User who performed the action. Requires one of the following permissions: MANAGE_USERS, MANAGE_STAFF, OWNER. */ + readonly user?: Maybe; +}; + +export type GiftCardEventBalance = { + /** Current balance of the gift card. */ + readonly currentBalance: Money; + /** Initial balance of the gift card. */ + readonly initialBalance?: Maybe; + /** Previous current balance of the gift card. */ + readonly oldCurrentBalance?: Maybe; + /** Previous initial balance of the gift card. */ + readonly oldInitialBalance?: Maybe; +}; + +export type GiftCardEventFilterInput = { + readonly orders?: InputMaybe>; + readonly type?: InputMaybe; +}; + +export type GiftCardEventsEnum = + | "ACTIVATED" + | "BALANCE_RESET" + | "BOUGHT" + | "DEACTIVATED" + | "EXPIRY_DATE_UPDATED" + | "ISSUED" + | "NOTE_ADDED" + | "REFUNDED_IN_ORDER" + | "RESENT" + | "SENT_TO_CUSTOMER" + | "TAGS_UPDATED" + | "UPDATED" + | "USED_IN_ORDER"; + +/** Event sent when gift card export is completed. */ +export type GiftCardExportCompleted = Event & { + /** The export file for gift cards. */ + readonly export?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type GiftCardFilterInput = { + readonly code?: InputMaybe; + readonly createdByEmail?: InputMaybe; + readonly currency?: InputMaybe; + readonly currentBalance?: InputMaybe; + readonly initialBalance?: InputMaybe; + readonly isActive?: InputMaybe; + readonly metadata?: InputMaybe>; + readonly products?: InputMaybe>; + readonly tags?: InputMaybe>; + readonly used?: InputMaybe; + readonly usedBy?: InputMaybe>; +}; + +/** Event sent when gift card metadata is updated. */ +export type GiftCardMetadataUpdated = Event & { + /** The gift card the event relates to. */ + readonly giftCard?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Represents a gift card payment method used for a transaction. + * + * Added in Saleor 3.23. + */ +export type GiftCardPaymentMethodDetails = PaymentMethodDetails & { + /** + * Brand of the gift card. + * + * Added in Saleor 3.23. + */ + readonly brand?: Maybe; + /** + * Indicates whether the gift card is a built-in Saleor gift card. + * + * Added in Saleor 3.23. + */ + readonly isSaleorGiftcard: Scalars["Boolean"]["output"]; + /** + * Last characters of the gift card code. Max 4 characters. + * + * Added in Saleor 3.23. + */ + readonly lastChars?: Maybe; + /** Name of the gift card. */ + readonly name: Scalars["String"]["output"]; +}; + +export type GiftCardPaymentMethodDetailsInput = { + /** + * Brand of the gift card used for the transaction. Max length is 40 characters. + * + * Added in Saleor 3.23. + */ + readonly brand?: InputMaybe; + /** + * Last characters of the gift card used for the transaction. Max length is 4 characters. + * + * Added in Saleor 3.23. + */ + readonly lastChars?: InputMaybe; + /** + * Name of the payment method used for the transaction. Max length is 256 characters. + * + * Added in Saleor 3.23. + */ + readonly name: Scalars["String"]["input"]; +}; + +/** + * Resend a gift card. + * + * Requires one of the following permissions: MANAGE_GIFT_CARD. + * + * Triggers the following webhook events: + * - NOTIFY_USER (async): A notification for gift card resend. + */ +export type GiftCardResend = { + readonly errors: ReadonlyArray; + /** Gift card which has been sent. */ + readonly giftCard?: Maybe; +}; + +export type GiftCardResendInput = { + /** Slug of a channel from which the email should be sent. */ + readonly channel: Scalars["String"]["input"]; + /** Email to which gift card should be send. */ + readonly email?: InputMaybe; + /** ID of a gift card to resend. */ + readonly id: Scalars["ID"]["input"]; +}; + +/** Event sent when gift card is e-mailed. */ +export type GiftCardSent = Event & { + /** Slug of a channel for which this gift card email was sent. */ + readonly channel?: Maybe; + /** The gift card the event relates to. */ + readonly giftCard?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** E-mail address to which gift card was sent. */ + readonly sentToEmail?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Gift card related settings from site settings. */ +export type GiftCardSettings = { + /** The gift card expiry period settings. */ + readonly expiryPeriod?: Maybe; + /** The gift card expiry type settings. */ + readonly expiryType: GiftCardSettingsExpiryTypeEnum; +}; + +export type GiftCardSettingsError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type GiftCardSettingsErrorCode = "GRAPHQL_ERROR" | "INVALID" | "REQUIRED"; + +export type GiftCardSettingsExpiryTypeEnum = "EXPIRY_PERIOD" | "NEVER_EXPIRE"; + +/** + * Update gift card settings. + * + * Requires one of the following permissions: MANAGE_GIFT_CARD. + */ +export type GiftCardSettingsUpdate = { + readonly errors: ReadonlyArray; + /** Gift card settings. */ + readonly giftCardSettings?: Maybe; +}; + +export type GiftCardSettingsUpdateInput = { + /** Defines gift card expiry period. */ + readonly expiryPeriod?: InputMaybe; + /** Defines gift card default expiry settings. */ + readonly expiryType?: InputMaybe; +}; + +export type GiftCardSortField = + /** Sort gift cards by created at. */ + | "CREATED_AT" + /** Sort gift cards by current balance. */ + | "CURRENT_BALANCE" + /** Sort gift cards by product. */ + | "PRODUCT" + /** Sort gift cards by rank. Note: This option is available only with the `search` filter. */ + | "RANK" + /** Sort gift cards by used by. */ + | "USED_BY"; + +export type GiftCardSortingInput = { + /** Specifies the direction in which to sort gift cards. */ + readonly direction: OrderDirection; + /** Sort gift cards by the selected field. */ + readonly field: GiftCardSortField; +}; + +/** Event sent when gift card status has changed. */ +export type GiftCardStatusChanged = Event & { + /** The gift card the event relates to. */ + readonly giftCard?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** The gift card tag. */ +export type GiftCardTag = Node & { + /** ID of the tag associated with a gift card. */ + readonly id: Scalars["ID"]["output"]; + /** Name of the tag associated with a gift card. */ + readonly name: Scalars["String"]["output"]; +}; + +export type GiftCardTagCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type GiftCardTagCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: GiftCardTag; +}; + +export type GiftCardTagFilterInput = { + readonly search?: InputMaybe; +}; + +/** + * 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. + */ +export type GiftCardUpdate = { + readonly errors: ReadonlyArray; + readonly giftCard?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly giftCardErrors: ReadonlyArray; +}; + +export type GiftCardUpdateInput = { + /** The gift card tags to add. */ + readonly addTags?: InputMaybe>; + /** The gift card balance amount. */ + readonly balanceAmount?: InputMaybe; + /** + * End date of the gift card in ISO 8601 format. + * @deprecated Use `expiryDate` from `expirySettings` instead. + */ + readonly endDate?: InputMaybe; + /** The gift card expiry date. */ + readonly expiryDate?: InputMaybe; + /** + * Gift Card public metadata. + * + * Added in Saleor 3.21. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** + * Gift Card private metadata. + * + * Added in Saleor 3.21. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** The gift card tags to remove. */ + readonly removeTags?: InputMaybe>; + /** + * Start date of the gift card in ISO 8601 format. + * @deprecated Field no longer supported + */ + readonly startDate?: InputMaybe; +}; + +/** Event sent when gift card is updated. */ +export type GiftCardUpdated = Event & { + /** The gift card the event relates to. */ + readonly giftCard?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Define the filtering options for foreign key fields. */ +export type GlobalIdFilterInput = { + /** The value equal to. */ + readonly eq?: InputMaybe; + /** The value included in. */ + readonly oneOf?: InputMaybe>; +}; + +/** Represents permission group data. */ +export type Group = Node & { + /** List of channels the group has access to. */ + readonly accessibleChannels?: Maybe>; + /** The ID of the group. */ + readonly id: Scalars["ID"]["output"]; + /** The name of the group. */ + readonly name: Scalars["String"]["output"]; + /** List of group permissions */ + readonly permissions?: Maybe>; + /** Determine if the group have restricted access to channels. */ + readonly restrictedAccessToChannels: Scalars["Boolean"]["output"]; + /** True, if the currently authenticated user has rights to manage a group. */ + readonly userCanManage: Scalars["Boolean"]["output"]; + /** + * List of group users + * + * Requires one of the following permissions: MANAGE_STAFF. + */ + readonly users?: Maybe>; +}; + +export type GroupCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type GroupCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: Group; +}; + +/** Thumbnail formats for icon images. */ +export type IconThumbnailFormatEnum = "ORIGINAL" | "WEBP"; + +/** Represents an image. */ +export type Image = { + /** Alt text for an image. */ + readonly alt?: Maybe; + /** The URL of the image. */ + readonly url: Scalars["String"]["output"]; +}; + +/** Define the filtering options for integer fields. */ +export type IntFilterInput = { + /** The value equal to. */ + readonly eq?: InputMaybe; + /** The value included in. */ + readonly oneOf?: InputMaybe>; + /** The value in range. */ + readonly range?: InputMaybe; +}; + +export type IntRangeInput = { + /** Value greater than or equal to. */ + readonly gte?: InputMaybe; + /** Value less than or equal to. */ + readonly lte?: InputMaybe; +}; + +/** Represents an Invoice. */ +export type Invoice = Job & + Node & + ObjectWithMetadata & { + /** Date and time at which invoice was created. */ + readonly createdAt: Scalars["DateTime"]["output"]; + /** + * URL to view an invoice. + * @deprecated Use `url` field. + */ + readonly externalUrl?: Maybe; + /** The ID of the object. */ + readonly id: Scalars["ID"]["output"]; + /** Message associated with an invoice. */ + readonly message?: Maybe; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** Invoice number. */ + readonly number?: Maybe; + /** Order related to the invoice. */ + readonly order?: Maybe; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** Job status. */ + readonly status: JobStatusEnum; + /** Date and time at which invoice was updated. */ + readonly updatedAt: Scalars["DateTime"]["output"]; + /** URL to view/download an invoice. */ + readonly url?: Maybe; + }; + +/** Represents an Invoice. */ +export type InvoiceMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents an Invoice. */ +export type InvoiceMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents an Invoice. */ +export type InvoicePrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents an Invoice. */ +export type InvoicePrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** + * Creates a ready to send invoice. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type InvoiceCreate = { + readonly errors: ReadonlyArray; + readonly invoice?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly invoiceErrors: ReadonlyArray; +}; + +export type InvoiceCreateInput = { + /** + * Fields required to update the invoice metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** Invoice number. */ + readonly number: Scalars["String"]["input"]; + /** + * Fields required to update the invoice private metadata. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** URL of an invoice to download. */ + readonly url: Scalars["String"]["input"]; +}; + +/** + * Deletes an invoice. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type InvoiceDelete = { + readonly errors: ReadonlyArray; + readonly invoice?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly invoiceErrors: ReadonlyArray; +}; + +/** Event sent when invoice is deleted. */ +export type InvoiceDeleted = Event & { + /** The invoice the event relates to. */ + readonly invoice?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** Order related to the invoice. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type InvoiceError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type InvoiceErrorCode = + | "EMAIL_NOT_SET" + | "INVALID_STATUS" + | "NOT_FOUND" + | "NOT_READY" + | "NO_INVOICE_PLUGIN" + | "NUMBER_NOT_SET" + | "REQUIRED" + | "URL_NOT_SET"; + +/** Filter input for invoices. */ +export type InvoiceFilterInput = { + /** Filter invoices by creation date. */ + readonly createdAt?: InputMaybe; +}; + +/** + * 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. + */ +export type InvoiceRequest = { + readonly errors: ReadonlyArray; + readonly invoice?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly invoiceErrors: ReadonlyArray; + /** Order related to an invoice. */ + readonly order?: Maybe; +}; + +/** + * 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. + */ +export type InvoiceRequestDelete = { + readonly errors: ReadonlyArray; + readonly invoice?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly invoiceErrors: ReadonlyArray; +}; + +/** Event sent when invoice is requested. */ +export type InvoiceRequested = Event & { + /** The invoice the event relates to. */ + readonly invoice?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** Order related to the invoice. */ + readonly order: Order; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * 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 + */ +export type InvoiceSendNotification = { + readonly errors: ReadonlyArray; + readonly invoice?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly invoiceErrors: ReadonlyArray; +}; + +/** Event sent when invoice is sent. */ +export type InvoiceSent = Event & { + /** The invoice the event relates to. */ + readonly invoice?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** Order related to the invoice. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Updates an invoice. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type InvoiceUpdate = { + readonly errors: ReadonlyArray; + readonly invoice?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly invoiceErrors: ReadonlyArray; +}; + +export type IssuingPrincipal = App | User; + +export type Job = { + /** Created date time of job in ISO 8601 format. */ + readonly createdAt: Scalars["DateTime"]["output"]; + /** Job message. */ + readonly message?: Maybe; + /** Job status. */ + readonly status: JobStatusEnum; + /** Date time of job last update in ISO 8601 format. */ + readonly updatedAt: Scalars["DateTime"]["output"]; +}; + +export type JobStatusEnum = "DELETED" | "FAILED" | "PENDING" | "SUCCESS"; + +/** Language code enum. It contains all the languages supported by Saleor. */ +export type LanguageCodeEnum = + /** Afrikaans */ + | "AF" + /** Afrikaans (Namibia) */ + | "AF_NA" + /** Afrikaans (South Africa) */ + | "AF_ZA" + /** Aghem */ + | "AGQ" + /** Aghem (Cameroon) */ + | "AGQ_CM" + /** Akan */ + | "AK" + /** Akan (Ghana) */ + | "AK_GH" + /** Amharic */ + | "AM" + /** Amharic (Ethiopia) */ + | "AM_ET" + /** Arabic */ + | "AR" + /** Arabic (United Arab Emirates) */ + | "AR_AE" + /** Arabic (Bahrain) */ + | "AR_BH" + /** Arabic (Djibouti) */ + | "AR_DJ" + /** Arabic (Algeria) */ + | "AR_DZ" + /** Arabic (Egypt) */ + | "AR_EG" + /** Arabic (Western Sahara) */ + | "AR_EH" + /** Arabic (Eritrea) */ + | "AR_ER" + /** Arabic (Israel) */ + | "AR_IL" + /** Arabic (Iraq) */ + | "AR_IQ" + /** Arabic (Jordan) */ + | "AR_JO" + /** Arabic (Comoros) */ + | "AR_KM" + /** Arabic (Kuwait) */ + | "AR_KW" + /** Arabic (Lebanon) */ + | "AR_LB" + /** Arabic (Libya) */ + | "AR_LY" + /** Arabic (Morocco) */ + | "AR_MA" + /** Arabic (Mauritania) */ + | "AR_MR" + /** Arabic (Oman) */ + | "AR_OM" + /** Arabic (Palestinian Territories) */ + | "AR_PS" + /** Arabic (Qatar) */ + | "AR_QA" + /** Arabic (Saudi Arabia) */ + | "AR_SA" + /** Arabic (Sudan) */ + | "AR_SD" + /** Arabic (Somalia) */ + | "AR_SO" + /** Arabic (South Sudan) */ + | "AR_SS" + /** Arabic (Syria) */ + | "AR_SY" + /** Arabic (Chad) */ + | "AR_TD" + /** Arabic (Tunisia) */ + | "AR_TN" + /** Arabic (Yemen) */ + | "AR_YE" + /** Assamese */ + | "AS" + /** Asu */ + | "ASA" + /** Asu (Tanzania) */ + | "ASA_TZ" + /** Asturian */ + | "AST" + /** Asturian (Spain) */ + | "AST_ES" + /** Assamese (India) */ + | "AS_IN" + /** Azerbaijani */ + | "AZ" + /** Azerbaijani (Cyrillic) */ + | "AZ_CYRL" + /** Azerbaijani (Cyrillic, Azerbaijan) */ + | "AZ_CYRL_AZ" + /** Azerbaijani (Latin) */ + | "AZ_LATN" + /** Azerbaijani (Latin, Azerbaijan) */ + | "AZ_LATN_AZ" + /** Basaa */ + | "BAS" + /** Basaa (Cameroon) */ + | "BAS_CM" + /** Belarusian */ + | "BE" + /** Bemba */ + | "BEM" + /** Bemba (Zambia) */ + | "BEM_ZM" + /** Bena */ + | "BEZ" + /** Bena (Tanzania) */ + | "BEZ_TZ" + /** Belarusian (Belarus) */ + | "BE_BY" + /** Bulgarian */ + | "BG" + /** Bulgarian (Bulgaria) */ + | "BG_BG" + /** Bambara */ + | "BM" + /** Bambara (Mali) */ + | "BM_ML" + /** Bangla */ + | "BN" + /** Bangla (Bangladesh) */ + | "BN_BD" + /** Bangla (India) */ + | "BN_IN" + /** Tibetan */ + | "BO" + /** Tibetan (China) */ + | "BO_CN" + /** Tibetan (India) */ + | "BO_IN" + /** Breton */ + | "BR" + /** Bodo */ + | "BRX" + /** Bodo (India) */ + | "BRX_IN" + /** Breton (France) */ + | "BR_FR" + /** Bosnian */ + | "BS" + /** Bosnian (Cyrillic) */ + | "BS_CYRL" + /** Bosnian (Cyrillic, Bosnia & Herzegovina) */ + | "BS_CYRL_BA" + /** Bosnian (Latin) */ + | "BS_LATN" + /** Bosnian (Latin, Bosnia & Herzegovina) */ + | "BS_LATN_BA" + /** Catalan */ + | "CA" + /** Catalan (Andorra) */ + | "CA_AD" + /** Catalan (Spain) */ + | "CA_ES" + /** Catalan (Spain, Valencian) */ + | "CA_ES_VALENCIA" + /** Catalan (France) */ + | "CA_FR" + /** Catalan (Italy) */ + | "CA_IT" + /** Chakma */ + | "CCP" + /** Chakma (Bangladesh) */ + | "CCP_BD" + /** Chakma (India) */ + | "CCP_IN" + /** Chechen */ + | "CE" + /** Cebuano */ + | "CEB" + /** Cebuano (Philippines) */ + | "CEB_PH" + /** Chechen (Russia) */ + | "CE_RU" + /** Chiga */ + | "CGG" + /** Chiga (Uganda) */ + | "CGG_UG" + /** Cherokee */ + | "CHR" + /** Cherokee (United States) */ + | "CHR_US" + /** Central Kurdish */ + | "CKB" + /** Central Kurdish (Iraq) */ + | "CKB_IQ" + /** Central Kurdish (Iran) */ + | "CKB_IR" + /** Czech */ + | "CS" + /** Czech (Czechia) */ + | "CS_CZ" + /** Church Slavic */ + | "CU" + /** Church Slavic (Russia) */ + | "CU_RU" + /** Welsh */ + | "CY" + /** Welsh (United Kingdom) */ + | "CY_GB" + /** Danish */ + | "DA" + /** Taita */ + | "DAV" + /** Taita (Kenya) */ + | "DAV_KE" + /** Danish (Denmark) */ + | "DA_DK" + /** Danish (Greenland) */ + | "DA_GL" + /** German */ + | "DE" + /** German (Austria) */ + | "DE_AT" + /** German (Belgium) */ + | "DE_BE" + /** German (Switzerland) */ + | "DE_CH" + /** German (Germany) */ + | "DE_DE" + /** German (Italy) */ + | "DE_IT" + /** German (Liechtenstein) */ + | "DE_LI" + /** German (Luxembourg) */ + | "DE_LU" + /** Zarma */ + | "DJE" + /** Zarma (Niger) */ + | "DJE_NE" + /** Lower Sorbian */ + | "DSB" + /** Lower Sorbian (Germany) */ + | "DSB_DE" + /** Duala */ + | "DUA" + /** Duala (Cameroon) */ + | "DUA_CM" + /** Jola-Fonyi */ + | "DYO" + /** Jola-Fonyi (Senegal) */ + | "DYO_SN" + /** Dzongkha */ + | "DZ" + /** Dzongkha (Bhutan) */ + | "DZ_BT" + /** Embu */ + | "EBU" + /** Embu (Kenya) */ + | "EBU_KE" + /** Ewe */ + | "EE" + /** Ewe (Ghana) */ + | "EE_GH" + /** Ewe (Togo) */ + | "EE_TG" + /** Greek */ + | "EL" + /** Greek (Cyprus) */ + | "EL_CY" + /** Greek (Greece) */ + | "EL_GR" + /** English */ + | "EN" + /** English (United Arab Emirates) */ + | "EN_AE" + /** English (Antigua & Barbuda) */ + | "EN_AG" + /** English (Anguilla) */ + | "EN_AI" + /** English (American Samoa) */ + | "EN_AS" + /** English (Austria) */ + | "EN_AT" + /** English (Australia) */ + | "EN_AU" + /** English (Barbados) */ + | "EN_BB" + /** English (Belgium) */ + | "EN_BE" + /** English (Burundi) */ + | "EN_BI" + /** English (Bermuda) */ + | "EN_BM" + /** English (Bahamas) */ + | "EN_BS" + /** English (Botswana) */ + | "EN_BW" + /** English (Belize) */ + | "EN_BZ" + /** English (Canada) */ + | "EN_CA" + /** English (Cocos (Keeling) Islands) */ + | "EN_CC" + /** English (Switzerland) */ + | "EN_CH" + /** English (Cook Islands) */ + | "EN_CK" + /** English (Cameroon) */ + | "EN_CM" + /** English (Christmas Island) */ + | "EN_CX" + /** English (Cyprus) */ + | "EN_CY" + /** English (Germany) */ + | "EN_DE" + /** English (Diego Garcia) */ + | "EN_DG" + /** English (Denmark) */ + | "EN_DK" + /** English (Dominica) */ + | "EN_DM" + /** English (Eritrea) */ + | "EN_ER" + /** English (Finland) */ + | "EN_FI" + /** English (Fiji) */ + | "EN_FJ" + /** English (Falkland Islands) */ + | "EN_FK" + /** English (Micronesia) */ + | "EN_FM" + /** English (United Kingdom) */ + | "EN_GB" + /** English (Grenada) */ + | "EN_GD" + /** English (Guernsey) */ + | "EN_GG" + /** English (Ghana) */ + | "EN_GH" + /** English (Gibraltar) */ + | "EN_GI" + /** English (Gambia) */ + | "EN_GM" + /** English (Guam) */ + | "EN_GU" + /** English (Guyana) */ + | "EN_GY" + /** English (Hong Kong SAR China) */ + | "EN_HK" + /** English (Ireland) */ + | "EN_IE" + /** English (Israel) */ + | "EN_IL" + /** English (Isle of Man) */ + | "EN_IM" + /** English (India) */ + | "EN_IN" + /** English (British Indian Ocean Territory) */ + | "EN_IO" + /** English (Jersey) */ + | "EN_JE" + /** English (Jamaica) */ + | "EN_JM" + /** English (Kenya) */ + | "EN_KE" + /** English (Kiribati) */ + | "EN_KI" + /** English (St. Kitts & Nevis) */ + | "EN_KN" + /** English (Cayman Islands) */ + | "EN_KY" + /** English (St. Lucia) */ + | "EN_LC" + /** English (Liberia) */ + | "EN_LR" + /** English (Lesotho) */ + | "EN_LS" + /** English (Madagascar) */ + | "EN_MG" + /** English (Marshall Islands) */ + | "EN_MH" + /** English (Macao SAR China) */ + | "EN_MO" + /** English (Northern Mariana Islands) */ + | "EN_MP" + /** English (Montserrat) */ + | "EN_MS" + /** English (Malta) */ + | "EN_MT" + /** English (Mauritius) */ + | "EN_MU" + /** English (Malawi) */ + | "EN_MW" + /** English (Malaysia) */ + | "EN_MY" + /** English (Namibia) */ + | "EN_NA" + /** English (Norfolk Island) */ + | "EN_NF" + /** English (Nigeria) */ + | "EN_NG" + /** English (Netherlands) */ + | "EN_NL" + /** English (Nauru) */ + | "EN_NR" + /** English (Niue) */ + | "EN_NU" + /** English (New Zealand) */ + | "EN_NZ" + /** English (Papua New Guinea) */ + | "EN_PG" + /** English (Philippines) */ + | "EN_PH" + /** English (Pakistan) */ + | "EN_PK" + /** English (Pitcairn Islands) */ + | "EN_PN" + /** English (Puerto Rico) */ + | "EN_PR" + /** English (Palau) */ + | "EN_PW" + /** English (Rwanda) */ + | "EN_RW" + /** English (Solomon Islands) */ + | "EN_SB" + /** English (Seychelles) */ + | "EN_SC" + /** English (Sudan) */ + | "EN_SD" + /** English (Sweden) */ + | "EN_SE" + /** English (Singapore) */ + | "EN_SG" + /** English (St. Helena) */ + | "EN_SH" + /** English (Slovenia) */ + | "EN_SI" + /** English (Sierra Leone) */ + | "EN_SL" + /** English (South Sudan) */ + | "EN_SS" + /** English (Sint Maarten) */ + | "EN_SX" + /** English (Eswatini) */ + | "EN_SZ" + /** English (Turks & Caicos Islands) */ + | "EN_TC" + /** English (Tokelau) */ + | "EN_TK" + /** English (Tonga) */ + | "EN_TO" + /** English (Trinidad & Tobago) */ + | "EN_TT" + /** English (Tuvalu) */ + | "EN_TV" + /** English (Tanzania) */ + | "EN_TZ" + /** English (Uganda) */ + | "EN_UG" + /** English (U.S. Outlying Islands) */ + | "EN_UM" + /** English (United States) */ + | "EN_US" + /** English (St. Vincent & Grenadines) */ + | "EN_VC" + /** English (British Virgin Islands) */ + | "EN_VG" + /** English (U.S. Virgin Islands) */ + | "EN_VI" + /** English (Vanuatu) */ + | "EN_VU" + /** English (Samoa) */ + | "EN_WS" + /** English (South Africa) */ + | "EN_ZA" + /** English (Zambia) */ + | "EN_ZM" + /** English (Zimbabwe) */ + | "EN_ZW" + /** Esperanto */ + | "EO" + /** Spanish */ + | "ES" + /** Spanish (Argentina) */ + | "ES_AR" + /** Spanish (Bolivia) */ + | "ES_BO" + /** Spanish (Brazil) */ + | "ES_BR" + /** Spanish (Belize) */ + | "ES_BZ" + /** Spanish (Chile) */ + | "ES_CL" + /** Spanish (Colombia) */ + | "ES_CO" + /** Spanish (Costa Rica) */ + | "ES_CR" + /** Spanish (Cuba) */ + | "ES_CU" + /** Spanish (Dominican Republic) */ + | "ES_DO" + /** Spanish (Ceuta & Melilla) */ + | "ES_EA" + /** Spanish (Ecuador) */ + | "ES_EC" + /** Spanish (Spain) */ + | "ES_ES" + /** Spanish (Equatorial Guinea) */ + | "ES_GQ" + /** Spanish (Guatemala) */ + | "ES_GT" + /** Spanish (Honduras) */ + | "ES_HN" + /** Spanish (Canary Islands) */ + | "ES_IC" + /** Spanish (Mexico) */ + | "ES_MX" + /** Spanish (Nicaragua) */ + | "ES_NI" + /** Spanish (Panama) */ + | "ES_PA" + /** Spanish (Peru) */ + | "ES_PE" + /** Spanish (Philippines) */ + | "ES_PH" + /** Spanish (Puerto Rico) */ + | "ES_PR" + /** Spanish (Paraguay) */ + | "ES_PY" + /** Spanish (El Salvador) */ + | "ES_SV" + /** Spanish (United States) */ + | "ES_US" + /** Spanish (Uruguay) */ + | "ES_UY" + /** Spanish (Venezuela) */ + | "ES_VE" + /** Estonian */ + | "ET" + /** Estonian (Estonia) */ + | "ET_EE" + /** Basque */ + | "EU" + /** Basque (Spain) */ + | "EU_ES" + /** Ewondo */ + | "EWO" + /** Ewondo (Cameroon) */ + | "EWO_CM" + /** Persian */ + | "FA" + /** Persian (Afghanistan) */ + | "FA_AF" + /** Persian (Iran) */ + | "FA_IR" + /** Fulah */ + | "FF" + /** Fulah (Adlam) */ + | "FF_ADLM" + /** Fulah (Adlam, Burkina Faso) */ + | "FF_ADLM_BF" + /** Fulah (Adlam, Cameroon) */ + | "FF_ADLM_CM" + /** Fulah (Adlam, Ghana) */ + | "FF_ADLM_GH" + /** Fulah (Adlam, Gambia) */ + | "FF_ADLM_GM" + /** Fulah (Adlam, Guinea) */ + | "FF_ADLM_GN" + /** Fulah (Adlam, Guinea-Bissau) */ + | "FF_ADLM_GW" + /** Fulah (Adlam, Liberia) */ + | "FF_ADLM_LR" + /** Fulah (Adlam, Mauritania) */ + | "FF_ADLM_MR" + /** Fulah (Adlam, Niger) */ + | "FF_ADLM_NE" + /** Fulah (Adlam, Nigeria) */ + | "FF_ADLM_NG" + /** Fulah (Adlam, Sierra Leone) */ + | "FF_ADLM_SL" + /** Fulah (Adlam, Senegal) */ + | "FF_ADLM_SN" + /** Fulah (Latin) */ + | "FF_LATN" + /** Fulah (Latin, Burkina Faso) */ + | "FF_LATN_BF" + /** Fulah (Latin, Cameroon) */ + | "FF_LATN_CM" + /** Fulah (Latin, Ghana) */ + | "FF_LATN_GH" + /** Fulah (Latin, Gambia) */ + | "FF_LATN_GM" + /** Fulah (Latin, Guinea) */ + | "FF_LATN_GN" + /** Fulah (Latin, Guinea-Bissau) */ + | "FF_LATN_GW" + /** Fulah (Latin, Liberia) */ + | "FF_LATN_LR" + /** Fulah (Latin, Mauritania) */ + | "FF_LATN_MR" + /** Fulah (Latin, Niger) */ + | "FF_LATN_NE" + /** Fulah (Latin, Nigeria) */ + | "FF_LATN_NG" + /** Fulah (Latin, Sierra Leone) */ + | "FF_LATN_SL" + /** Fulah (Latin, Senegal) */ + | "FF_LATN_SN" + /** Finnish */ + | "FI" + /** Filipino */ + | "FIL" + /** Filipino (Philippines) */ + | "FIL_PH" + /** Finnish (Finland) */ + | "FI_FI" + /** Faroese */ + | "FO" + /** Faroese (Denmark) */ + | "FO_DK" + /** Faroese (Faroe Islands) */ + | "FO_FO" + /** French */ + | "FR" + /** French (Belgium) */ + | "FR_BE" + /** French (Burkina Faso) */ + | "FR_BF" + /** French (Burundi) */ + | "FR_BI" + /** French (Benin) */ + | "FR_BJ" + /** French (St. Barthélemy) */ + | "FR_BL" + /** French (Canada) */ + | "FR_CA" + /** French (Congo - Kinshasa) */ + | "FR_CD" + /** French (Central African Republic) */ + | "FR_CF" + /** French (Congo - Brazzaville) */ + | "FR_CG" + /** French (Switzerland) */ + | "FR_CH" + /** French (Côte d’Ivoire) */ + | "FR_CI" + /** French (Cameroon) */ + | "FR_CM" + /** French (Djibouti) */ + | "FR_DJ" + /** French (Algeria) */ + | "FR_DZ" + /** French (France) */ + | "FR_FR" + /** French (Gabon) */ + | "FR_GA" + /** French (French Guiana) */ + | "FR_GF" + /** French (Guinea) */ + | "FR_GN" + /** French (Guadeloupe) */ + | "FR_GP" + /** French (Equatorial Guinea) */ + | "FR_GQ" + /** French (Haiti) */ + | "FR_HT" + /** French (Comoros) */ + | "FR_KM" + /** French (Luxembourg) */ + | "FR_LU" + /** French (Morocco) */ + | "FR_MA" + /** French (Monaco) */ + | "FR_MC" + /** French (St. Martin) */ + | "FR_MF" + /** French (Madagascar) */ + | "FR_MG" + /** French (Mali) */ + | "FR_ML" + /** French (Martinique) */ + | "FR_MQ" + /** French (Mauritania) */ + | "FR_MR" + /** French (Mauritius) */ + | "FR_MU" + /** French (New Caledonia) */ + | "FR_NC" + /** French (Niger) */ + | "FR_NE" + /** French (French Polynesia) */ + | "FR_PF" + /** French (St. Pierre & Miquelon) */ + | "FR_PM" + /** French (Réunion) */ + | "FR_RE" + /** French (Rwanda) */ + | "FR_RW" + /** French (Seychelles) */ + | "FR_SC" + /** French (Senegal) */ + | "FR_SN" + /** French (Syria) */ + | "FR_SY" + /** French (Chad) */ + | "FR_TD" + /** French (Togo) */ + | "FR_TG" + /** French (Tunisia) */ + | "FR_TN" + /** French (Vanuatu) */ + | "FR_VU" + /** French (Wallis & Futuna) */ + | "FR_WF" + /** French (Mayotte) */ + | "FR_YT" + /** Friulian */ + | "FUR" + /** Friulian (Italy) */ + | "FUR_IT" + /** Western Frisian */ + | "FY" + /** Western Frisian (Netherlands) */ + | "FY_NL" + /** Irish */ + | "GA" + /** Irish (United Kingdom) */ + | "GA_GB" + /** Irish (Ireland) */ + | "GA_IE" + /** Scottish Gaelic */ + | "GD" + /** Scottish Gaelic (United Kingdom) */ + | "GD_GB" + /** Galician */ + | "GL" + /** Galician (Spain) */ + | "GL_ES" + /** Swiss German */ + | "GSW" + /** Swiss German (Switzerland) */ + | "GSW_CH" + /** Swiss German (France) */ + | "GSW_FR" + /** Swiss German (Liechtenstein) */ + | "GSW_LI" + /** Gujarati */ + | "GU" + /** Gusii */ + | "GUZ" + /** Gusii (Kenya) */ + | "GUZ_KE" + /** Gujarati (India) */ + | "GU_IN" + /** Manx */ + | "GV" + /** Manx (Isle of Man) */ + | "GV_IM" + /** Hausa */ + | "HA" + /** Hawaiian */ + | "HAW" + /** Hawaiian (United States) */ + | "HAW_US" + /** Hausa (Ghana) */ + | "HA_GH" + /** Hausa (Niger) */ + | "HA_NE" + /** Hausa (Nigeria) */ + | "HA_NG" + /** Hebrew */ + | "HE" + /** Hebrew (Israel) */ + | "HE_IL" + /** Hindi */ + | "HI" + /** Hindi (India) */ + | "HI_IN" + /** Croatian */ + | "HR" + /** Croatian (Bosnia & Herzegovina) */ + | "HR_BA" + /** Croatian (Croatia) */ + | "HR_HR" + /** Upper Sorbian */ + | "HSB" + /** Upper Sorbian (Germany) */ + | "HSB_DE" + /** Hungarian */ + | "HU" + /** Hungarian (Hungary) */ + | "HU_HU" + /** Armenian */ + | "HY" + /** Armenian (Armenia) */ + | "HY_AM" + /** Interlingua */ + | "IA" + /** Indonesian */ + | "ID" + /** Indonesian (Indonesia) */ + | "ID_ID" + /** Igbo */ + | "IG" + /** Igbo (Nigeria) */ + | "IG_NG" + /** Sichuan Yi */ + | "II" + /** Sichuan Yi (China) */ + | "II_CN" + /** Icelandic */ + | "IS" + /** Icelandic (Iceland) */ + | "IS_IS" + /** Italian */ + | "IT" + /** Italian (Switzerland) */ + | "IT_CH" + /** Italian (Italy) */ + | "IT_IT" + /** Italian (San Marino) */ + | "IT_SM" + /** Italian (Vatican City) */ + | "IT_VA" + /** Japanese */ + | "JA" + /** Japanese (Japan) */ + | "JA_JP" + /** Ngomba */ + | "JGO" + /** Ngomba (Cameroon) */ + | "JGO_CM" + /** Machame */ + | "JMC" + /** Machame (Tanzania) */ + | "JMC_TZ" + /** Javanese */ + | "JV" + /** Javanese (Indonesia) */ + | "JV_ID" + /** Georgian */ + | "KA" + /** Kabyle */ + | "KAB" + /** Kabyle (Algeria) */ + | "KAB_DZ" + /** Kamba */ + | "KAM" + /** Kamba (Kenya) */ + | "KAM_KE" + /** Georgian (Georgia) */ + | "KA_GE" + /** Makonde */ + | "KDE" + /** Makonde (Tanzania) */ + | "KDE_TZ" + /** Kabuverdianu */ + | "KEA" + /** Kabuverdianu (Cape Verde) */ + | "KEA_CV" + /** Koyra Chiini */ + | "KHQ" + /** Koyra Chiini (Mali) */ + | "KHQ_ML" + /** Kikuyu */ + | "KI" + /** Kikuyu (Kenya) */ + | "KI_KE" + /** Kazakh */ + | "KK" + /** Kako */ + | "KKJ" + /** Kako (Cameroon) */ + | "KKJ_CM" + /** Kazakh (Kazakhstan) */ + | "KK_KZ" + /** Kalaallisut */ + | "KL" + /** Kalenjin */ + | "KLN" + /** Kalenjin (Kenya) */ + | "KLN_KE" + /** Kalaallisut (Greenland) */ + | "KL_GL" + /** Khmer */ + | "KM" + /** Khmer (Cambodia) */ + | "KM_KH" + /** Kannada */ + | "KN" + /** Kannada (India) */ + | "KN_IN" + /** Korean */ + | "KO" + /** Konkani */ + | "KOK" + /** Konkani (India) */ + | "KOK_IN" + /** Korean (North Korea) */ + | "KO_KP" + /** Korean (South Korea) */ + | "KO_KR" + /** Kashmiri */ + | "KS" + /** Shambala */ + | "KSB" + /** Shambala (Tanzania) */ + | "KSB_TZ" + /** Bafia */ + | "KSF" + /** Bafia (Cameroon) */ + | "KSF_CM" + /** Colognian */ + | "KSH" + /** Colognian (Germany) */ + | "KSH_DE" + /** Kashmiri (Arabic) */ + | "KS_ARAB" + /** Kashmiri (Arabic, India) */ + | "KS_ARAB_IN" + /** Kurdish */ + | "KU" + /** Kurdish (Turkey) */ + | "KU_TR" + /** Cornish */ + | "KW" + /** Cornish (United Kingdom) */ + | "KW_GB" + /** Kyrgyz */ + | "KY" + /** Kyrgyz (Kyrgyzstan) */ + | "KY_KG" + /** Langi */ + | "LAG" + /** Langi (Tanzania) */ + | "LAG_TZ" + /** Luxembourgish */ + | "LB" + /** Luxembourgish (Luxembourg) */ + | "LB_LU" + /** Ganda */ + | "LG" + /** Ganda (Uganda) */ + | "LG_UG" + /** Lakota */ + | "LKT" + /** Lakota (United States) */ + | "LKT_US" + /** Lingala */ + | "LN" + /** Lingala (Angola) */ + | "LN_AO" + /** Lingala (Congo - Kinshasa) */ + | "LN_CD" + /** Lingala (Central African Republic) */ + | "LN_CF" + /** Lingala (Congo - Brazzaville) */ + | "LN_CG" + /** Lao */ + | "LO" + /** Lao (Laos) */ + | "LO_LA" + /** Northern Luri */ + | "LRC" + /** Northern Luri (Iraq) */ + | "LRC_IQ" + /** Northern Luri (Iran) */ + | "LRC_IR" + /** Lithuanian */ + | "LT" + /** Lithuanian (Lithuania) */ + | "LT_LT" + /** Luba-Katanga */ + | "LU" + /** Luo */ + | "LUO" + /** Luo (Kenya) */ + | "LUO_KE" + /** Luyia */ + | "LUY" + /** Luyia (Kenya) */ + | "LUY_KE" + /** Luba-Katanga (Congo - Kinshasa) */ + | "LU_CD" + /** Latvian */ + | "LV" + /** Latvian (Latvia) */ + | "LV_LV" + /** Maithili */ + | "MAI" + /** Maithili (India) */ + | "MAI_IN" + /** Masai */ + | "MAS" + /** Masai (Kenya) */ + | "MAS_KE" + /** Masai (Tanzania) */ + | "MAS_TZ" + /** Meru */ + | "MER" + /** Meru (Kenya) */ + | "MER_KE" + /** Morisyen */ + | "MFE" + /** Morisyen (Mauritius) */ + | "MFE_MU" + /** Malagasy */ + | "MG" + /** Makhuwa-Meetto */ + | "MGH" + /** Makhuwa-Meetto (Mozambique) */ + | "MGH_MZ" + /** Metaʼ */ + | "MGO" + /** Metaʼ (Cameroon) */ + | "MGO_CM" + /** Malagasy (Madagascar) */ + | "MG_MG" + /** Maori */ + | "MI" + /** Maori (New Zealand) */ + | "MI_NZ" + /** Macedonian */ + | "MK" + /** Macedonian (North Macedonia) */ + | "MK_MK" + /** Malayalam */ + | "ML" + /** Malayalam (India) */ + | "ML_IN" + /** Mongolian */ + | "MN" + /** Manipuri */ + | "MNI" + /** Manipuri (Bangla) */ + | "MNI_BENG" + /** Manipuri (Bangla, India) */ + | "MNI_BENG_IN" + /** Mongolian (Mongolia) */ + | "MN_MN" + /** Marathi */ + | "MR" + /** Marathi (India) */ + | "MR_IN" + /** Malay */ + | "MS" + /** Malay (Brunei) */ + | "MS_BN" + /** Malay (Indonesia) */ + | "MS_ID" + /** Malay (Malaysia) */ + | "MS_MY" + /** Malay (Singapore) */ + | "MS_SG" + /** Maltese */ + | "MT" + /** Maltese (Malta) */ + | "MT_MT" + /** Mundang */ + | "MUA" + /** Mundang (Cameroon) */ + | "MUA_CM" + /** Burmese */ + | "MY" + /** Burmese (Myanmar (Burma)) */ + | "MY_MM" + /** Mazanderani */ + | "MZN" + /** Mazanderani (Iran) */ + | "MZN_IR" + /** Nama */ + | "NAQ" + /** Nama (Namibia) */ + | "NAQ_NA" + /** Norwegian Bokmål */ + | "NB" + /** Norwegian Bokmål (Norway) */ + | "NB_NO" + /** Norwegian Bokmål (Svalbard & Jan Mayen) */ + | "NB_SJ" + /** North Ndebele */ + | "ND" + /** Low German */ + | "NDS" + /** Low German (Germany) */ + | "NDS_DE" + /** Low German (Netherlands) */ + | "NDS_NL" + /** North Ndebele (Zimbabwe) */ + | "ND_ZW" + /** Nepali */ + | "NE" + /** Nepali (India) */ + | "NE_IN" + /** Nepali (Nepal) */ + | "NE_NP" + /** Dutch */ + | "NL" + /** Dutch (Aruba) */ + | "NL_AW" + /** Dutch (Belgium) */ + | "NL_BE" + /** Dutch (Caribbean Netherlands) */ + | "NL_BQ" + /** Dutch (Curaçao) */ + | "NL_CW" + /** Dutch (Netherlands) */ + | "NL_NL" + /** Dutch (Suriname) */ + | "NL_SR" + /** Dutch (Sint Maarten) */ + | "NL_SX" + /** Kwasio */ + | "NMG" + /** Kwasio (Cameroon) */ + | "NMG_CM" + /** Norwegian Nynorsk */ + | "NN" + /** Ngiemboon */ + | "NNH" + /** Ngiemboon (Cameroon) */ + | "NNH_CM" + /** Norwegian Nynorsk (Norway) */ + | "NN_NO" + /** Nuer */ + | "NUS" + /** Nuer (South Sudan) */ + | "NUS_SS" + /** Nyankole */ + | "NYN" + /** Nyankole (Uganda) */ + | "NYN_UG" + /** Oromo */ + | "OM" + /** Oromo (Ethiopia) */ + | "OM_ET" + /** Oromo (Kenya) */ + | "OM_KE" + /** Odia */ + | "OR" + /** Odia (India) */ + | "OR_IN" + /** Ossetic */ + | "OS" + /** Ossetic (Georgia) */ + | "OS_GE" + /** Ossetic (Russia) */ + | "OS_RU" + /** Punjabi */ + | "PA" + /** Punjabi (Arabic) */ + | "PA_ARAB" + /** Punjabi (Arabic, Pakistan) */ + | "PA_ARAB_PK" + /** Punjabi (Gurmukhi) */ + | "PA_GURU" + /** Punjabi (Gurmukhi, India) */ + | "PA_GURU_IN" + /** Nigerian Pidgin */ + | "PCM" + /** Nigerian Pidgin (Nigeria) */ + | "PCM_NG" + /** Polish */ + | "PL" + /** Polish (Poland) */ + | "PL_PL" + /** Prussian */ + | "PRG" + /** Pashto */ + | "PS" + /** Pashto (Afghanistan) */ + | "PS_AF" + /** Pashto (Pakistan) */ + | "PS_PK" + /** Portuguese */ + | "PT" + /** Portuguese (Angola) */ + | "PT_AO" + /** Portuguese (Brazil) */ + | "PT_BR" + /** Portuguese (Switzerland) */ + | "PT_CH" + /** Portuguese (Cape Verde) */ + | "PT_CV" + /** Portuguese (Equatorial Guinea) */ + | "PT_GQ" + /** Portuguese (Guinea-Bissau) */ + | "PT_GW" + /** Portuguese (Luxembourg) */ + | "PT_LU" + /** Portuguese (Macao SAR China) */ + | "PT_MO" + /** Portuguese (Mozambique) */ + | "PT_MZ" + /** Portuguese (Portugal) */ + | "PT_PT" + /** Portuguese (São Tomé & Príncipe) */ + | "PT_ST" + /** Portuguese (Timor-Leste) */ + | "PT_TL" + /** Quechua */ + | "QU" + /** Quechua (Bolivia) */ + | "QU_BO" + /** Quechua (Ecuador) */ + | "QU_EC" + /** Quechua (Peru) */ + | "QU_PE" + /** Romansh */ + | "RM" + /** Romansh (Switzerland) */ + | "RM_CH" + /** Rundi */ + | "RN" + /** Rundi (Burundi) */ + | "RN_BI" + /** Romanian */ + | "RO" + /** Rombo */ + | "ROF" + /** Rombo (Tanzania) */ + | "ROF_TZ" + /** Romanian (Moldova) */ + | "RO_MD" + /** Romanian (Romania) */ + | "RO_RO" + /** Russian */ + | "RU" + /** Russian (Belarus) */ + | "RU_BY" + /** Russian (Kyrgyzstan) */ + | "RU_KG" + /** Russian (Kazakhstan) */ + | "RU_KZ" + /** Russian (Moldova) */ + | "RU_MD" + /** Russian (Russia) */ + | "RU_RU" + /** Russian (Ukraine) */ + | "RU_UA" + /** Kinyarwanda */ + | "RW" + /** Rwa */ + | "RWK" + /** Rwa (Tanzania) */ + | "RWK_TZ" + /** Kinyarwanda (Rwanda) */ + | "RW_RW" + /** Sakha */ + | "SAH" + /** Sakha (Russia) */ + | "SAH_RU" + /** Samburu */ + | "SAQ" + /** Samburu (Kenya) */ + | "SAQ_KE" + /** Santali */ + | "SAT" + /** Santali (Ol Chiki) */ + | "SAT_OLCK" + /** Santali (Ol Chiki, India) */ + | "SAT_OLCK_IN" + /** Sangu */ + | "SBP" + /** Sangu (Tanzania) */ + | "SBP_TZ" + /** Sindhi */ + | "SD" + /** Sindhi (Arabic) */ + | "SD_ARAB" + /** Sindhi (Arabic, Pakistan) */ + | "SD_ARAB_PK" + /** Sindhi (Devanagari) */ + | "SD_DEVA" + /** Sindhi (Devanagari, India) */ + | "SD_DEVA_IN" + /** Northern Sami */ + | "SE" + /** Sena */ + | "SEH" + /** Sena (Mozambique) */ + | "SEH_MZ" + /** Koyraboro Senni */ + | "SES" + /** Koyraboro Senni (Mali) */ + | "SES_ML" + /** Northern Sami (Finland) */ + | "SE_FI" + /** Northern Sami (Norway) */ + | "SE_NO" + /** Northern Sami (Sweden) */ + | "SE_SE" + /** Sango */ + | "SG" + /** Sango (Central African Republic) */ + | "SG_CF" + /** Tachelhit */ + | "SHI" + /** Tachelhit (Latin) */ + | "SHI_LATN" + /** Tachelhit (Latin, Morocco) */ + | "SHI_LATN_MA" + /** Tachelhit (Tifinagh) */ + | "SHI_TFNG" + /** Tachelhit (Tifinagh, Morocco) */ + | "SHI_TFNG_MA" + /** Sinhala */ + | "SI" + /** Sinhala (Sri Lanka) */ + | "SI_LK" + /** Slovak */ + | "SK" + /** Slovak (Slovakia) */ + | "SK_SK" + /** Slovenian */ + | "SL" + /** Slovenian (Slovenia) */ + | "SL_SI" + /** Inari Sami */ + | "SMN" + /** Inari Sami (Finland) */ + | "SMN_FI" + /** Shona */ + | "SN" + /** Shona (Zimbabwe) */ + | "SN_ZW" + /** Somali */ + | "SO" + /** Somali (Djibouti) */ + | "SO_DJ" + /** Somali (Ethiopia) */ + | "SO_ET" + /** Somali (Kenya) */ + | "SO_KE" + /** Somali (Somalia) */ + | "SO_SO" + /** Albanian */ + | "SQ" + /** Albanian (Albania) */ + | "SQ_AL" + /** Albanian (North Macedonia) */ + | "SQ_MK" + /** Albanian (Kosovo) */ + | "SQ_XK" + /** Serbian */ + | "SR" + /** Serbian (Cyrillic) */ + | "SR_CYRL" + /** Serbian (Cyrillic, Bosnia & Herzegovina) */ + | "SR_CYRL_BA" + /** Serbian (Cyrillic, Montenegro) */ + | "SR_CYRL_ME" + /** Serbian (Cyrillic, Serbia) */ + | "SR_CYRL_RS" + /** Serbian (Cyrillic, Kosovo) */ + | "SR_CYRL_XK" + /** Serbian (Latin) */ + | "SR_LATN" + /** Serbian (Latin, Bosnia & Herzegovina) */ + | "SR_LATN_BA" + /** Serbian (Latin, Montenegro) */ + | "SR_LATN_ME" + /** Serbian (Latin, Serbia) */ + | "SR_LATN_RS" + /** Serbian (Latin, Kosovo) */ + | "SR_LATN_XK" + /** Sundanese */ + | "SU" + /** Sundanese (Latin) */ + | "SU_LATN" + /** Sundanese (Latin, Indonesia) */ + | "SU_LATN_ID" + /** Swedish */ + | "SV" + /** Swedish (Åland Islands) */ + | "SV_AX" + /** Swedish (Finland) */ + | "SV_FI" + /** Swedish (Sweden) */ + | "SV_SE" + /** Swahili */ + | "SW" + /** Swahili (Congo - Kinshasa) */ + | "SW_CD" + /** Swahili (Kenya) */ + | "SW_KE" + /** Swahili (Tanzania) */ + | "SW_TZ" + /** Swahili (Uganda) */ + | "SW_UG" + /** Tamil */ + | "TA" + /** Tamil (India) */ + | "TA_IN" + /** Tamil (Sri Lanka) */ + | "TA_LK" + /** Tamil (Malaysia) */ + | "TA_MY" + /** Tamil (Singapore) */ + | "TA_SG" + /** Telugu */ + | "TE" + /** Teso */ + | "TEO" + /** Teso (Kenya) */ + | "TEO_KE" + /** Teso (Uganda) */ + | "TEO_UG" + /** Telugu (India) */ + | "TE_IN" + /** Tajik */ + | "TG" + /** Tajik (Tajikistan) */ + | "TG_TJ" + /** Thai */ + | "TH" + /** Thai (Thailand) */ + | "TH_TH" + /** Tigrinya */ + | "TI" + /** Tigrinya (Eritrea) */ + | "TI_ER" + /** Tigrinya (Ethiopia) */ + | "TI_ET" + /** Turkmen */ + | "TK" + /** Turkmen (Turkmenistan) */ + | "TK_TM" + /** Tongan */ + | "TO" + /** Tongan (Tonga) */ + | "TO_TO" + /** Turkish */ + | "TR" + /** Turkish (Cyprus) */ + | "TR_CY" + /** Turkish (Turkey) */ + | "TR_TR" + /** Tatar */ + | "TT" + /** Tatar (Russia) */ + | "TT_RU" + /** Tasawaq */ + | "TWQ" + /** Tasawaq (Niger) */ + | "TWQ_NE" + /** Central Atlas Tamazight */ + | "TZM" + /** Central Atlas Tamazight (Morocco) */ + | "TZM_MA" + /** Uyghur */ + | "UG" + /** Uyghur (China) */ + | "UG_CN" + /** Ukrainian */ + | "UK" + /** Ukrainian (Ukraine) */ + | "UK_UA" + /** Urdu */ + | "UR" + /** Urdu (India) */ + | "UR_IN" + /** Urdu (Pakistan) */ + | "UR_PK" + /** Uzbek */ + | "UZ" + /** Uzbek (Arabic) */ + | "UZ_ARAB" + /** Uzbek (Arabic, Afghanistan) */ + | "UZ_ARAB_AF" + /** Uzbek (Cyrillic) */ + | "UZ_CYRL" + /** Uzbek (Cyrillic, Uzbekistan) */ + | "UZ_CYRL_UZ" + /** Uzbek (Latin) */ + | "UZ_LATN" + /** Uzbek (Latin, Uzbekistan) */ + | "UZ_LATN_UZ" + /** Vai */ + | "VAI" + /** Vai (Latin) */ + | "VAI_LATN" + /** Vai (Latin, Liberia) */ + | "VAI_LATN_LR" + /** Vai (Vai) */ + | "VAI_VAII" + /** Vai (Vai, Liberia) */ + | "VAI_VAII_LR" + /** Vietnamese */ + | "VI" + /** Vietnamese (Vietnam) */ + | "VI_VN" + /** Volapük */ + | "VO" + /** Vunjo */ + | "VUN" + /** Vunjo (Tanzania) */ + | "VUN_TZ" + /** Walser */ + | "WAE" + /** Walser (Switzerland) */ + | "WAE_CH" + /** Wolof */ + | "WO" + /** Wolof (Senegal) */ + | "WO_SN" + /** Xhosa */ + | "XH" + /** Xhosa (South Africa) */ + | "XH_ZA" + /** Soga */ + | "XOG" + /** Soga (Uganda) */ + | "XOG_UG" + /** Yangben */ + | "YAV" + /** Yangben (Cameroon) */ + | "YAV_CM" + /** Yiddish */ + | "YI" + /** Yoruba */ + | "YO" + /** Yoruba (Benin) */ + | "YO_BJ" + /** Yoruba (Nigeria) */ + | "YO_NG" + /** Cantonese */ + | "YUE" + /** Cantonese (Simplified) */ + | "YUE_HANS" + /** Cantonese (Simplified, China) */ + | "YUE_HANS_CN" + /** Cantonese (Traditional) */ + | "YUE_HANT" + /** Cantonese (Traditional, Hong Kong SAR China) */ + | "YUE_HANT_HK" + /** Standard Moroccan Tamazight */ + | "ZGH" + /** Standard Moroccan Tamazight (Morocco) */ + | "ZGH_MA" + /** Chinese */ + | "ZH" + /** Chinese (Simplified) */ + | "ZH_HANS" + /** Chinese (Simplified, China) */ + | "ZH_HANS_CN" + /** Chinese (Simplified, Hong Kong SAR China) */ + | "ZH_HANS_HK" + /** Chinese (Simplified, Macao SAR China) */ + | "ZH_HANS_MO" + /** Chinese (Simplified, Singapore) */ + | "ZH_HANS_SG" + /** Chinese (Traditional) */ + | "ZH_HANT" + /** Chinese (Traditional, Hong Kong SAR China) */ + | "ZH_HANT_HK" + /** Chinese (Traditional, Macao SAR China) */ + | "ZH_HANT_MO" + /** Chinese (Traditional, Taiwan) */ + | "ZH_HANT_TW" + /** Zulu */ + | "ZU" + /** Zulu (South Africa) */ + | "ZU_ZA"; + +export type LanguageDisplay = { + /** ISO 639 representation of the language name. */ + readonly code: LanguageCodeEnum; + /** Full name of the language. */ + readonly language: Scalars["String"]["output"]; +}; + +/** Store the current and allowed usage. */ +export type LimitInfo = { + /** Defines the allowed maximum resource usage, null means unlimited. */ + readonly allowedUsage: Limits; + /** Defines the current resource usage. */ + readonly currentUsage: Limits; +}; + +export type Limits = { + /** Defines the number of channels. */ + readonly channels?: Maybe; + /** Defines the number of order. */ + readonly orders?: Maybe; + /** Defines the number of product variants. */ + readonly productVariants?: Maybe; + /** Defines the number of staff users. */ + readonly staffUsers?: Maybe; + /** Defines the number of warehouses. */ + readonly warehouses?: Maybe; +}; + +/** Filter input for order lines data. */ +export type LinesFilterInput = { + /** Filter by metadata fields of order lines. */ + readonly metadata?: InputMaybe; +}; + +/** + * List payment methods stored for the user by payment gateway. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ +export type ListStoredPaymentMethods = Event & { + /** Channel in context which was used to fetch the list of payment methods. */ + readonly channel: Channel; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The user for which the app should return a list of payment methods. */ + readonly user: User; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** The manifest definition. */ +export type Manifest = { + /** Description of the app displayed in the dashboard. */ + readonly about?: Maybe; + /** App website rendered in the dashboard. */ + readonly appUrl?: Maybe; + /** The audience that will be included in all JWT tokens for the app. */ + readonly audience?: Maybe; + /** The App's author name. */ + readonly author?: Maybe; + /** App's brand data. */ + readonly brand?: Maybe; + /** + * URL to iframe with the configuration for the app. + * @deprecated Use `appUrl` instead. + */ + readonly configurationUrl?: Maybe; + /** + * Description of the data privacy defined for this app. + * @deprecated Use `dataPrivacyUrl` instead. + */ + readonly dataPrivacy?: Maybe; + /** URL to the full privacy policy. */ + readonly dataPrivacyUrl?: Maybe; + /** List of extensions that will be mounted in Saleor's dashboard. For details, please [see the extension section.](https://docs.saleor.io/developer/extending/apps/extending-dashboard-with-apps#key-concepts) */ + readonly extensions: ReadonlyArray; + /** External URL to the app homepage. */ + readonly homepageUrl?: Maybe; + /** The identifier of the manifest for the app. */ + readonly identifier: Scalars["String"]["output"]; + /** The name of the manifest for the app . */ + readonly name: Scalars["String"]["output"]; + /** The array permissions required for the app. */ + readonly permissions?: Maybe>; + /** Determines the app's required Saleor version as semver range. */ + readonly requiredSaleorVersion?: Maybe; + /** External URL to the page where app users can find support. */ + readonly supportUrl?: Maybe; + /** Endpoint used during process of app installation, [see installing an app.](https://docs.saleor.io/developer/extending/apps/installing-apps#installing-an-app) */ + readonly tokenTargetUrl?: Maybe; + /** The version of the manifest for the app. */ + readonly version: Scalars["String"]["output"]; + /** List of the app's webhooks. */ + readonly webhooks: ReadonlyArray; +}; + +/** Metadata for the Margin class. */ +export type Margin = { + /** The starting value of the margin. */ + readonly start?: Maybe; + /** The ending value of the margin. */ + readonly stop?: Maybe; +}; + +/** + * 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`. + */ +export type MarkAsPaidStrategyEnum = "PAYMENT_FLOW" | "TRANSACTION_FLOW"; + +export type 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"; + +export type MeasurementUnitsEnumFilterInput = { + /** The value equal to. */ + readonly eq?: InputMaybe; + /** The value included in. */ + readonly oneOf?: InputMaybe>; +}; + +export type MediaChoicesSortField = + /** Sort media by ID. */ + "ID"; + +export type MediaInput = { + /** Alt text for a product media. */ + readonly alt?: InputMaybe; + /** Represents an image file in a multipart request. */ + readonly image?: InputMaybe; + /** Represents an URL to an external media. */ + readonly mediaUrl?: InputMaybe; +}; + +export type MediaSortingInput = { + /** Specifies the direction in which to sort media. */ + readonly direction: OrderDirection; + /** Sort media by the selected field. */ + readonly field: MediaChoicesSortField; +}; + +/** Represents a single menu - an object that is used to help navigate through the store. */ +export type Menu = Node & + ObjectWithMetadata & { + /** The ID of the menu. */ + readonly id: Scalars["ID"]["output"]; + /** Menu items associated with this menu. */ + readonly items?: Maybe>; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** The name of the menu. */ + readonly name: Scalars["String"]["output"]; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** Slug of the menu. */ + readonly slug: Scalars["String"]["output"]; + }; + +/** Represents a single menu - an object that is used to help navigate through the store. */ +export type MenuMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a single menu - an object that is used to help navigate through the store. */ +export type MenuMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents a single menu - an object that is used to help navigate through the store. */ +export type MenuPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a single menu - an object that is used to help navigate through the store. */ +export type MenuPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** + * Deletes menus. + * + * Requires one of the following permissions: MANAGE_MENUS. + * + * Triggers the following webhook events: + * - MENU_DELETED (async): A menu was deleted. + */ +export type MenuBulkDelete = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly menuErrors: ReadonlyArray; +}; + +export type MenuCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type MenuCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly 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. + */ +export type MenuCreate = { + readonly errors: ReadonlyArray; + readonly menu?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly menuErrors: ReadonlyArray; +}; + +export type MenuCreateInput = { + /** List of menu items. */ + readonly items?: InputMaybe>; + /** Name of the menu. */ + readonly name: Scalars["String"]["input"]; + /** Slug of the menu. Will be generated if not provided. */ + readonly slug?: InputMaybe; +}; + +/** Event sent when new menu is created. */ +export type MenuCreated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The menu the event relates to. */ + readonly menu?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when new menu is created. */ +export type MenuCreatedMenuArgs = { + channel?: InputMaybe; +}; + +/** + * Deletes a menu. + * + * Requires one of the following permissions: MANAGE_MENUS. + * + * Triggers the following webhook events: + * - MENU_DELETED (async): A menu was deleted. + */ +export type MenuDelete = { + readonly errors: ReadonlyArray; + readonly menu?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly menuErrors: ReadonlyArray; +}; + +/** Event sent when menu is deleted. */ +export type MenuDeleted = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The menu the event relates to. */ + readonly menu?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when menu is deleted. */ +export type MenuDeletedMenuArgs = { + channel?: InputMaybe; +}; + +export type MenuError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type MenuErrorCode = + | "CANNOT_ASSIGN_NODE" + | "GRAPHQL_ERROR" + | "INVALID" + | "INVALID_MENU_ITEM" + | "NOT_FOUND" + | "NO_MENU_ITEM_PROVIDED" + | "REQUIRED" + | "TOO_MANY_MENU_ITEMS" + | "UNIQUE"; + +export type MenuFilterInput = { + readonly metadata?: InputMaybe>; + readonly search?: InputMaybe; + readonly slug?: InputMaybe>; + readonly slugs?: InputMaybe>; +}; + +export type MenuInput = { + /** Name of the menu. */ + readonly name?: InputMaybe; + /** Slug of the menu. */ + readonly slug?: InputMaybe; +}; + +/** Represents a single item of the related menu. Can store categories, collection or pages. */ +export type MenuItem = Node & + ObjectWithMetadata & { + /** Category associated with the menu item. */ + readonly category?: Maybe; + /** Represents the child items of the current menu item. */ + readonly children?: Maybe>; + /** A collection associated with this menu item. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS. */ + readonly collection?: Maybe; + /** The ID of the menu item. */ + readonly id: Scalars["ID"]["output"]; + /** Indicates the position of the menu item within the menu structure. */ + readonly level: Scalars["Int"]["output"]; + /** Represents the menu to which the menu item belongs. */ + readonly menu: Menu; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** The name of the menu item. */ + readonly name: Scalars["String"]["output"]; + /** A page associated with this menu item. Requires one of the following permissions to include unpublished items: MANAGE_PAGES. */ + readonly page?: Maybe; + /** ID of parent menu item. If empty, menu will be top level menu. */ + readonly parent?: Maybe; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** Returns translated menu item fields for the given language code. */ + readonly translation?: Maybe; + /** URL to the menu item. */ + readonly url?: Maybe; + }; + +/** Represents a single item of the related menu. Can store categories, collection or pages. */ +export type MenuItemMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a single item of the related menu. Can store categories, collection or pages. */ +export type MenuItemMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents a single item of the related menu. Can store categories, collection or pages. */ +export type MenuItemPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a single item of the related menu. Can store categories, collection or pages. */ +export type MenuItemPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents a single item of the related menu. Can store categories, collection or pages. */ +export type MenuItemTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * 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. + */ +export type MenuItemBulkDelete = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly menuErrors: ReadonlyArray; +}; + +export type MenuItemCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type MenuItemCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly 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. + */ +export type MenuItemCreate = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly menuErrors: ReadonlyArray; + readonly menuItem?: Maybe; +}; + +export type MenuItemCreateInput = { + /** Category to which item points. */ + readonly category?: InputMaybe; + /** Collection to which item points. */ + readonly collection?: InputMaybe; + /** Menu to which item belongs. */ + readonly menu: Scalars["ID"]["input"]; + /** Name of the menu item. */ + readonly name: Scalars["String"]["input"]; + /** Page to which item points. */ + readonly page?: InputMaybe; + /** ID of the parent menu. If empty, menu will be top level menu. */ + readonly parent?: InputMaybe; + /** URL of the pointed item. */ + readonly url?: InputMaybe; +}; + +/** Event sent when new menu item is created. */ +export type MenuItemCreated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The menu item the event relates to. */ + readonly menuItem?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when new menu item is created. */ +export type MenuItemCreatedMenuItemArgs = { + channel?: InputMaybe; +}; + +/** + * 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. + */ +export type MenuItemDelete = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly menuErrors: ReadonlyArray; + readonly menuItem?: Maybe; +}; + +/** Event sent when menu item is deleted. */ +export type MenuItemDeleted = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The menu item the event relates to. */ + readonly menuItem?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when menu item is deleted. */ +export type MenuItemDeletedMenuItemArgs = { + channel?: InputMaybe; +}; + +export type MenuItemFilterInput = { + readonly metadata?: InputMaybe>; + readonly search?: InputMaybe; +}; + +export type MenuItemInput = { + /** Category to which item points. */ + readonly category?: InputMaybe; + /** Collection to which item points. */ + readonly collection?: InputMaybe; + /** Name of the menu item. */ + readonly name?: InputMaybe; + /** Page to which item points. */ + readonly page?: InputMaybe; + /** URL of the pointed item. */ + readonly url?: InputMaybe; +}; + +/** + * 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. + */ +export type MenuItemMove = { + readonly errors: ReadonlyArray; + /** Assigned menu to move within. */ + readonly menu?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly menuErrors: ReadonlyArray; +}; + +export type MenuItemMoveInput = { + /** The menu item ID to move. */ + readonly itemId: Scalars["ID"]["input"]; + /** ID of the parent menu. If empty, menu will be top level menu. */ + readonly parentId?: InputMaybe; + /** 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. */ + readonly sortOrder?: InputMaybe; +}; + +export type MenuItemSortingInput = { + /** Specifies the direction in which to sort menu items. */ + readonly direction: OrderDirection; + /** Sort menu items by the selected field. */ + readonly field: MenuItemsSortField; +}; + +/** Represents menu item's original translatable fields and related translations. */ +export type MenuItemTranslatableContent = Node & { + /** The ID of the menu item translatable content. */ + readonly id: Scalars["ID"]["output"]; + /** + * Represents a single item of the related menu. Can store categories, collection or pages. + * @deprecated Get model fields from the root level queries. + */ + readonly menuItem?: Maybe; + /** The ID of the menu item to translate. */ + readonly menuItemId: Scalars["ID"]["output"]; + /** Name of the menu item to translate. */ + readonly name: Scalars["String"]["output"]; + /** Returns translated menu item fields for the given language code. */ + readonly translation?: Maybe; +}; + +/** Represents menu item's original translatable fields and related translations. */ +export type MenuItemTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * Creates/updates translations for a menu item. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ +export type MenuItemTranslate = { + readonly errors: ReadonlyArray; + readonly menuItem?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly translationErrors: ReadonlyArray; +}; + +/** Represents menu item translations. */ +export type MenuItemTranslation = Node & { + /** The ID of the menu item translation. */ + readonly id: Scalars["ID"]["output"]; + /** Translation language. */ + readonly language: LanguageDisplay; + /** Translated menu item name. */ + readonly name: Scalars["String"]["output"]; + /** Represents the menu item fields to translate. */ + readonly translatableContent?: Maybe; +}; + +/** + * 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. + */ +export type MenuItemUpdate = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly menuErrors: ReadonlyArray; + readonly menuItem?: Maybe; +}; + +/** Event sent when menu item is updated. */ +export type MenuItemUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The menu item the event relates to. */ + readonly menuItem?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when menu item is updated. */ +export type MenuItemUpdatedMenuItemArgs = { + channel?: InputMaybe; +}; + +export type MenuItemsSortField = + /** Sort menu items by name. */ + "NAME"; + +export type MenuSortField = + /** Sort menus by items count. */ + | "ITEMS_COUNT" + /** Sort menus by name. */ + | "NAME"; + +export type MenuSortingInput = { + /** Specifies the direction in which to sort menus. */ + readonly direction: OrderDirection; + /** Sort menus by the selected field. */ + readonly 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. + */ +export type MenuUpdate = { + readonly errors: ReadonlyArray; + readonly menu?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly menuErrors: ReadonlyArray; +}; + +/** Event sent when menu is updated. */ +export type MenuUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The menu the event relates to. */ + readonly menu?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when menu is updated. */ +export type MenuUpdatedMenuArgs = { + channel?: InputMaybe; +}; + +export type MetadataError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type MetadataErrorCode = + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND" + | "NOT_UPDATED" + | "REQUIRED"; + +export type MetadataFilter = { + /** Key of a metadata item. */ + readonly key: Scalars["String"]["input"]; + /** Value of a metadata item. */ + readonly value?: InputMaybe; +}; + +/** + * Allows filtering based on metadata key/value pairs. + * + * Examples: + * - `{key: "size"}` + * Matches objects where the metadata key "size" exists, regardless of its value. + * - `{key: "color", value: {oneOf: ["blue", "green"]}}` + * Matches objects where the metadata key "color" is set to either "blue" or "green". + * - `{key: "status", value: {eq: "active"}}` + * Matches objects where the metadata key "status" is set to "active". + */ +export type MetadataFilterInput = { + /** Key to filter by. If not other fields provided - checking the existence of the key in metadata. */ + readonly key: Scalars["String"]["input"]; + /** Value to filter by. */ + readonly value?: InputMaybe; +}; + +export type MetadataInput = { + /** Key of a metadata item. */ + readonly key: Scalars["String"]["input"]; + /** Value of a metadata item. */ + readonly value: Scalars["String"]["input"]; +}; + +export type MetadataItem = { + /** Key of a metadata item. */ + readonly key: Scalars["String"]["output"]; + /** Value of a metadata item. */ + readonly value: Scalars["String"]["output"]; +}; + +/** Define the filtering options for metadata value fields. */ +export type MetadataValueFilterInput = { + /** The value equal to. */ + readonly eq?: InputMaybe; + /** The value included in. */ + readonly oneOf?: InputMaybe>; +}; + +/** Represents amount of money in specific currency. */ +export type Money = { + /** Amount of money. */ + readonly amount: Scalars["Float"]["output"]; + /** Currency code. */ + readonly currency: Scalars["String"]["output"]; + /** Number of digits after the decimal point in the currency. */ + readonly fractionDigits: Scalars["Int"]["output"]; + /** Amount of money represented as an integer in the smallest currency unit. */ + readonly fractionalAmount: Scalars["Int"]["output"]; +}; + +export type MoneyInput = { + /** Amount of money. */ + readonly amount: Scalars["PositiveDecimal"]["input"]; + /** Currency code. */ + readonly currency: Scalars["String"]["input"]; +}; + +/** Represents a range of amounts of money. */ +export type MoneyRange = { + /** Lower bound of a price range. */ + readonly start?: Maybe; + /** Upper bound of a price range. */ + readonly stop?: Maybe; +}; + +export type MoveProductInput = { + /** The ID of the product to move. */ + readonly productId: Scalars["ID"]["input"]; + /** 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. */ + readonly sortOrder?: InputMaybe; +}; + +export 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. + */ + readonly accountAddressCreate?: Maybe; + /** + * Deletes 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. + */ + readonly accountAddressDelete?: Maybe; + /** + * 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. + */ + readonly accountAddressUpdate?: Maybe; + /** + * Remove user account. + * + * Requires one of the following permissions: AUTHENTICATED_USER. + * + * Triggers the following webhook events: + * - ACCOUNT_DELETED (async): Account was deleted. + */ + readonly accountDelete?: Maybe; + /** + * 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. + */ + readonly accountRegister?: Maybe; + /** + * 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. + */ + readonly accountRequestDeletion?: Maybe; + /** + * 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. + */ + readonly accountSetDefaultAddress?: Maybe; + /** + * 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. + */ + readonly accountUpdate?: Maybe; + /** + * Creates user address. + * + * Requires one of the following permissions: MANAGE_USERS. + * + * Triggers the following webhook events: + * - ADDRESS_CREATED (async): A new address was created. + */ + readonly addressCreate?: Maybe; + /** + * Deletes an address. + * + * Requires one of the following permissions: MANAGE_USERS. + * + * Triggers the following webhook events: + * - ADDRESS_DELETED (async): An address was deleted. + */ + readonly addressDelete?: Maybe; + /** + * 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. + */ + readonly addressSetDefault?: Maybe; + /** + * Updates an address. + * + * Requires one of the following permissions: MANAGE_USERS. + * + * Triggers the following webhook events: + * - ADDRESS_UPDATED (async): An address was updated. + */ + readonly addressUpdate?: Maybe; + /** + * Activate the app. + * + * Requires one of the following permissions: MANAGE_APPS. + * + * Triggers the following webhook events: + * - APP_STATUS_CHANGED (async): An app was activated. + */ + readonly appActivate?: Maybe; + /** + * 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. + */ + readonly appCreate?: Maybe; + /** + * Deactivate the app. + * + * Requires one of the following permissions: MANAGE_APPS. + * + * Triggers the following webhook events: + * - APP_STATUS_CHANGED (async): An app was deactivated. + */ + readonly appDeactivate?: Maybe; + /** + * Deletes an app. + * + * Requires one of the following permissions: MANAGE_APPS. + * + * Triggers the following webhook events: + * - APP_DELETED (async): An app was deleted. + */ + readonly appDelete?: Maybe; + /** + * Deletes failed installation. + * + * Requires one of the following permissions: MANAGE_APPS. + */ + readonly appDeleteFailedInstallation?: Maybe; + /** + * Fetch and validate manifest. + * + * Requires one of the following permissions: MANAGE_APPS. + */ + readonly appFetchManifest?: Maybe; + /** Install new app by using app manifest. Requires the following permissions: AUTHENTICATED_STAFF_USER and MANAGE_APPS. */ + readonly appInstall?: Maybe; + /** + * Add a problem to the calling app. + * + * Added in Saleor 3.22. + * + * Requires one of the following permissions: AUTHENTICATED_APP. + */ + readonly appProblemCreate?: Maybe; + /** + * Dismiss problems for an app. + * + * Added in Saleor 3.22. + * + * Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP. + */ + readonly appProblemDismiss?: Maybe; + /** + * Re-enable sync webhooks for provided app. Can be used to manually re-enable sync webhooks for the app before the cooldown period ends. + * + * Added in Saleor 3.21. + * + * Requires one of the following permissions: MANAGE_APPS. + */ + readonly appReenableSyncWebhooks?: Maybe; + /** + * 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. + */ + readonly appRetryInstall?: Maybe; + /** + * Creates a new token. + * + * Requires one of the following permissions: MANAGE_APPS. + */ + readonly appTokenCreate?: Maybe; + /** + * Deletes an authentication token assigned to app. + * + * Requires one of the following permissions: MANAGE_APPS. + */ + readonly appTokenDelete?: Maybe; + /** Verify provided app token. */ + readonly appTokenVerify?: Maybe; + /** + * Updates an existing app. + * + * Requires one of the following permissions: MANAGE_APPS. + * + * Triggers the following webhook events: + * - APP_UPDATED (async): An app was updated. + */ + readonly appUpdate?: Maybe; + /** + * Assigns storefront's navigation menus. + * + * Requires one of the following permissions: MANAGE_MENUS, MANAGE_SETTINGS. + */ + readonly assignNavigation?: Maybe; + /** + * Add shipping zone to given warehouse. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly assignWarehouseShippingZone?: Maybe; + /** + * Creates attributes. + * + * Triggers the following webhook events: + * - ATTRIBUTE_CREATED (async): An attribute was created. + */ + readonly attributeBulkCreate?: Maybe; + /** + * 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. + */ + readonly attributeBulkDelete?: Maybe; + /** + * Creates/updates translations for attributes. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ + readonly attributeBulkTranslate?: Maybe; + /** + * Updates attributes. + * + * 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. + */ + readonly attributeBulkUpdate?: Maybe; + /** + * Creates an attribute. + * + * Triggers the following webhook events: + * - ATTRIBUTE_CREATED (async): An attribute was created. + */ + readonly attributeCreate?: Maybe; + /** + * 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. + */ + readonly attributeDelete?: Maybe; + /** + * 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. + */ + readonly attributeReorderValues?: Maybe; + /** + * Creates/updates translations for an attribute. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ + readonly attributeTranslate?: Maybe; + /** + * 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. + */ + readonly attributeUpdate?: Maybe; + /** + * 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. + */ + readonly attributeValueBulkDelete?: Maybe; + /** + * Creates/updates translations for attribute values. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ + readonly attributeValueBulkTranslate?: Maybe; + /** + * 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. + */ + readonly attributeValueCreate?: Maybe; + /** + * 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. + */ + readonly attributeValueDelete?: Maybe; + /** + * Creates/updates translations for an attribute value. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ + readonly attributeValueTranslate?: Maybe; + /** + * 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. + */ + readonly attributeValueUpdate?: Maybe; + /** + * Deletes categories. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly categoryBulkDelete?: Maybe; + /** + * Creates a new category. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly categoryCreate?: Maybe; + /** + * Deletes a category. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly categoryDelete?: Maybe; + /** + * Creates/updates translations for a category. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ + readonly categoryTranslate?: Maybe; + /** + * Updates a category. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly categoryUpdate?: Maybe; + /** + * Activate a channel. + * + * Requires one of the following permissions: MANAGE_CHANNELS. + * + * Triggers the following webhook events: + * - CHANNEL_STATUS_CHANGED (async): A channel was activated. + */ + readonly channelActivate?: Maybe; + /** + * Creates a new channel. + * + * Requires one of the following permissions: MANAGE_CHANNELS. + * + * Triggers the following webhook events: + * - CHANNEL_CREATED (async): A channel was created. + */ + readonly channelCreate?: Maybe; + /** + * Deactivate a channel. + * + * Requires one of the following permissions: MANAGE_CHANNELS. + * + * Triggers the following webhook events: + * - CHANNEL_STATUS_CHANGED (async): A channel was deactivated. + */ + readonly channelDeactivate?: Maybe; + /** + * Deletes 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. + */ + readonly channelDelete?: Maybe; + /** + * Reorder the warehouses of a channel. + * + * Requires one of the following permissions: MANAGE_CHANNELS. + */ + readonly channelReorderWarehouses?: Maybe; + /** + * 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. + */ + readonly channelUpdate?: Maybe; + /** + * Adds a gift card or a voucher to a checkout. + * + * Triggers the following webhook events: + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ + readonly checkoutAddPromoCode?: Maybe; + /** + * Updates billing address in the existing checkout. + * + * Triggers the following webhook events: + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ + readonly checkoutBillingAddressUpdate?: Maybe; + /** + * 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. + */ + readonly checkoutComplete?: Maybe; + /** + * 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. + */ + readonly checkoutCreate?: Maybe; + /** Creates a new checkout from existing order. */ + readonly checkoutCreateFromOrder?: Maybe; + /** + * 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. + */ + readonly checkoutCustomerAttach?: Maybe; + /** + * 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. + */ + readonly checkoutCustomerDetach?: Maybe; + /** + * Updates customer note in the existing checkout object. + * + * Added in Saleor 3.21. + * + * Triggers the following webhook events: + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ + readonly checkoutCustomerNoteUpdate?: Maybe; + /** + * 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. + * + * Triggers the following webhook events: + * - SHIPPING_LIST_METHODS_FOR_CHECKOUT (sync): Triggered when updating the checkout delivery method with the external one. + * - CHECKOUT_FILTER_SHIPPING_METHODS (sync): Optionally triggered when cached filtered shipping methods are invalid. + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ + readonly checkoutDeliveryMethodUpdate?: Maybe; + /** + * Updates email address in the existing checkout object. + * + * Triggers the following webhook events: + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ + readonly checkoutEmailUpdate?: Maybe; + /** + * Updates language code in the existing checkout. + * + * Triggers the following webhook events: + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ + readonly checkoutLanguageCodeUpdate?: Maybe; + /** + * Deletes a CheckoutLine. + * + * Triggers the following webhook events: + * - CHECKOUT_UPDATED (async): A checkout was updated. + * @deprecated Use `checkoutLinesDelete` instead. + */ + readonly checkoutLineDelete?: Maybe; + /** + * 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. + */ + readonly checkoutLinesAdd?: Maybe; + /** + * Deletes checkout lines. + * + * Triggers the following webhook events: + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ + readonly checkoutLinesDelete?: Maybe; + /** + * Updates checkout line in the existing checkout. + * + * Triggers the following webhook events: + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ + readonly checkoutLinesUpdate?: Maybe; + /** Creates a new payment for given checkout. */ + readonly checkoutPaymentCreate?: Maybe; + /** + * Remove a gift card or a voucher from a checkout. + * + * Triggers the following webhook events: + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ + readonly checkoutRemovePromoCode?: Maybe; + /** + * Updates shipping address in the existing checkout. + * + * Triggers the following webhook events: + * - CHECKOUT_UPDATED (async): A checkout was updated. + */ + readonly checkoutShippingAddressUpdate?: Maybe; + /** + * 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_FILTER_SHIPPING_METHODS (sync): Optionally triggered when cached filtered shipping methods are invalid. + * - CHECKOUT_UPDATED (async): A checkout was updated. + * @deprecated Use `checkoutDeliveryMethodUpdate` instead. + */ + readonly checkoutShippingMethodUpdate?: Maybe; + /** + * Adds products to a collection. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly collectionAddProducts?: Maybe; + /** + * Deletes collections. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly collectionBulkDelete?: Maybe; + /** + * Manage collection's availability in channels. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly collectionChannelListingUpdate?: Maybe; + /** + * Creates a new collection. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly collectionCreate?: Maybe; + /** + * Deletes a collection. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly collectionDelete?: Maybe; + /** + * Remove products from a collection. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly collectionRemoveProducts?: Maybe; + /** + * Reorder the products of a collection. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly collectionReorderProducts?: Maybe; + /** + * Creates/updates translations for a collection. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ + readonly collectionTranslate?: Maybe; + /** + * Updates a collection. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly collectionUpdate?: Maybe; + /** + * Confirm user account with token sent by email during registration. + * + * Triggers the following webhook events: + * - ACCOUNT_CONFIRMED (async): Account was confirmed. + */ + readonly confirmAccount?: Maybe; + /** + * 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. + */ + readonly confirmEmailChange?: Maybe; + /** + * Creates a new warehouse. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly createWarehouse?: Maybe; + /** + * Deletes customers. + * + * Requires one of the following permissions: MANAGE_USERS. + * + * Triggers the following webhook events: + * - CUSTOMER_DELETED (async): A customer account was deleted. + */ + readonly customerBulkDelete?: Maybe; + /** + * Updates customers. + * + * 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. + */ + readonly customerBulkUpdate?: Maybe; + /** + * 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. + */ + readonly customerCreate?: Maybe; + /** + * Deletes a customer. + * + * Requires one of the following permissions: MANAGE_USERS. + * + * Triggers the following webhook events: + * - CUSTOMER_DELETED (async): A customer account was deleted. + */ + readonly customerDelete?: Maybe; + /** + * 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. + */ + readonly customerUpdate?: Maybe; + /** Delete metadata of an object. To use it, you need to have access to the modified object. */ + readonly deleteMetadata?: Maybe; + /** 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. */ + readonly deletePrivateMetadata?: Maybe; + /** + * Deletes selected warehouse. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + * + * Triggers the following webhook events: + * - WAREHOUSE_DELETED (async): A warehouse is deleted. + * - PRODUCT_VARIANT_OUT_OF_STOCK (async): A product variant stock is removed together with the deleted warehouse. + * - PRODUCT_VARIANT_OUT_OF_STOCK_IN_CHANNEL (async): A product variant is out of stock in a channel (non click-and-collect warehouses). + * + * Note: Triggered only when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + * - PRODUCT_VARIANT_OUT_OF_STOCK_FOR_CLICK_AND_COLLECT (async): A product variant is out of stock in a channel (click-and-collect warehouses). + * + * Note: Triggered only when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + */ + readonly deleteWarehouse?: Maybe; + /** + * Calculates available delivery options for a checkout. + * + * Added in Saleor 3.23. + * + * Triggers the following webhook events: + * - SHIPPING_LIST_METHODS_FOR_CHECKOUT (sync): Triggered to fetch external shipping methods. + * - CHECKOUT_FILTER_SHIPPING_METHODS (sync): Triggered to filter shipping methods. + */ + readonly deliveryOptionsCalculate?: Maybe; + /** + * Deletes draft orders. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly draftOrderBulkDelete?: Maybe; + /** + * Completes creating an order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly draftOrderComplete?: Maybe; + /** + * Creates a new draft order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly draftOrderCreate?: Maybe; + /** + * Deletes a draft order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly draftOrderDelete?: Maybe; + /** + * Deletes order lines. + * + * Requires one of the following permissions: MANAGE_ORDERS. + * @deprecated Field no longer supported + */ + readonly draftOrderLinesBulkDelete?: Maybe; + /** + * Updates a draft order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly draftOrderUpdate?: Maybe; + /** + * Retries event delivery. + * + * Requires one of the following permissions: MANAGE_APPS. + */ + readonly eventDeliveryRetry?: Maybe; + /** + * Export gift cards to csv file. + * + * 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. + * @deprecated Export functionality is deprecated and will be removed. All data can be fetched via the GraphQL API and parsed into the desired format by apps or external tools. + */ + readonly exportGiftCards?: Maybe; + /** + * 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. + * @deprecated Export functionality is deprecated and will be removed. All data can be fetched via the GraphQL API and parsed into the desired format by apps or external tools. + */ + readonly exportProducts?: Maybe; + /** + * Export voucher codes to csv/xlsx file. + * + * Added in Saleor 3.18. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - VOUCHER_CODE_EXPORT_COMPLETED (async): A notification for the exported file. + * @deprecated Export functionality is deprecated and will be removed. All data can be fetched via the GraphQL API and parsed into the desired format by apps or external tools. + */ + readonly exportVoucherCodes?: Maybe; + /** Prepare external authentication URL for user by custom plugin. */ + readonly externalAuthenticationUrl?: Maybe; + /** Logout user by custom plugin. */ + readonly externalLogout?: Maybe; + /** + * Trigger sending a notification with the notify plugin method. Serializes nodes provided as ids parameter and includes this data in the notification payload. + * @deprecated Field no longer supported + */ + readonly externalNotificationTrigger?: Maybe; + /** Obtain external access tokens for user by custom plugin. */ + readonly externalObtainAccessTokens?: Maybe; + /** Refresh user's access by custom plugin. */ + readonly externalRefresh?: Maybe; + /** Verify external authentication data by plugin. */ + readonly externalVerify?: Maybe; + /** + * 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. + */ + readonly fileUpload?: Maybe; + /** + * 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. + */ + readonly giftCardActivate?: Maybe; + /** + * Adds note to the 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. + */ + readonly giftCardAddNote?: Maybe; + /** + * Activate gift cards. + * + * Requires one of the following permissions: MANAGE_GIFT_CARD. + * + * Triggers the following webhook events: + * - GIFT_CARD_STATUS_CHANGED (async): A gift card was activated. + */ + readonly giftCardBulkActivate?: Maybe; + /** + * Creates gift cards. + * + * 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. + */ + readonly giftCardBulkCreate?: Maybe; + /** + * Deactivate gift cards. + * + * Requires one of the following permissions: MANAGE_GIFT_CARD. + * + * Triggers the following webhook events: + * - GIFT_CARD_STATUS_CHANGED (async): A gift card was deactivated. + */ + readonly giftCardBulkDeactivate?: Maybe; + /** + * Deletes gift cards. + * + * Requires one of the following permissions: MANAGE_GIFT_CARD. + * + * Triggers the following webhook events: + * - GIFT_CARD_DELETED (async): A gift card was deleted. + */ + readonly giftCardBulkDelete?: Maybe; + /** + * 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. + */ + readonly giftCardCreate?: Maybe; + /** + * 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. + */ + readonly giftCardDeactivate?: Maybe; + /** + * Deletes gift card. + * + * Requires one of the following permissions: MANAGE_GIFT_CARD. + * + * Triggers the following webhook events: + * - GIFT_CARD_DELETED (async): A gift card was deleted. + */ + readonly giftCardDelete?: Maybe; + /** + * Resend a gift card. + * + * Requires one of the following permissions: MANAGE_GIFT_CARD. + * + * Triggers the following webhook events: + * - NOTIFY_USER (async): A notification for gift card resend. + */ + readonly giftCardResend?: Maybe; + /** + * Update gift card settings. + * + * Requires one of the following permissions: MANAGE_GIFT_CARD. + */ + readonly giftCardSettingsUpdate?: Maybe; + /** + * 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. + */ + readonly giftCardUpdate?: Maybe; + /** + * Creates a ready to send invoice. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly invoiceCreate?: Maybe; + /** + * Deletes an invoice. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly invoiceDelete?: Maybe; + /** + * 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. + */ + readonly invoiceRequest?: Maybe; + /** + * 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. + */ + readonly invoiceRequestDelete?: Maybe; + /** + * 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 + */ + readonly invoiceSendNotification?: Maybe; + /** + * Updates an invoice. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly invoiceUpdate?: Maybe; + /** + * Deletes menus. + * + * Requires one of the following permissions: MANAGE_MENUS. + * + * Triggers the following webhook events: + * - MENU_DELETED (async): A menu was deleted. + */ + readonly menuBulkDelete?: Maybe; + /** + * Creates a new Menu. + * + * Requires one of the following permissions: MANAGE_MENUS. + * + * Triggers the following webhook events: + * - MENU_CREATED (async): A menu was created. + */ + readonly menuCreate?: Maybe; + /** + * Deletes a menu. + * + * Requires one of the following permissions: MANAGE_MENUS. + * + * Triggers the following webhook events: + * - MENU_DELETED (async): A menu was deleted. + */ + readonly menuDelete?: Maybe; + /** + * 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. + */ + readonly menuItemBulkDelete?: Maybe; + /** + * 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. + */ + readonly menuItemCreate?: Maybe; + /** + * 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. + */ + readonly menuItemDelete?: Maybe; + /** + * 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. + */ + readonly menuItemMove?: Maybe; + /** + * Creates/updates translations for a menu item. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ + readonly menuItemTranslate?: Maybe; + /** + * 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. + */ + readonly menuItemUpdate?: Maybe; + /** + * Updates a menu. + * + * Requires one of the following permissions: MANAGE_MENUS. + * + * Triggers the following webhook events: + * - MENU_UPDATED (async): A menu was updated. + */ + readonly menuUpdate?: Maybe; + /** + * Adds note to the order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + * @deprecated Use `orderNoteAdd` instead. + */ + readonly orderAddNote?: Maybe; + /** + * Cancels orders. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderBulkCancel?: Maybe; + /** + * Creates multiple orders. + * + * Requires one of the following permissions: MANAGE_ORDERS_IMPORT. + */ + readonly orderBulkCreate?: Maybe; + /** + * Cancel an order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderCancel?: Maybe; + /** + * Capture an order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderCapture?: Maybe; + /** + * Confirms an unconfirmed order by changing status to unfulfilled. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderConfirm?: Maybe; + /** + * Create new order from existing checkout. Requires the following permissions: AUTHENTICATED_APP and HANDLE_CHECKOUTS. + * + * 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. + */ + readonly orderCreateFromCheckout?: Maybe; + /** + * Adds discount to the order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderDiscountAdd?: Maybe; + /** + * Remove discount from the order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderDiscountDelete?: Maybe; + /** + * Update discount for the order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderDiscountUpdate?: Maybe; + /** + * 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. + */ + readonly orderFulfill?: Maybe; + /** + * Approve existing fulfillment. + * + * Requires one of the following permissions: MANAGE_ORDERS. + * + * Triggers the following webhook events: + * - FULFILLMENT_APPROVED (async): Fulfillment is approved. + */ + readonly orderFulfillmentApprove?: Maybe; + /** + * Cancels existing fulfillment and optionally restocks items. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderFulfillmentCancel?: Maybe; + /** + * Refund products. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderFulfillmentRefundProducts?: Maybe; + /** + * Return products. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderFulfillmentReturnProducts?: Maybe; + /** + * 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. + */ + readonly orderFulfillmentUpdateTracking?: Maybe; + /** + * Adds granted refund to the order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderGrantRefundCreate?: Maybe; + /** + * Updates granted refund. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderGrantRefundUpdate?: Maybe; + /** + * Deletes an order line from an order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderLineDelete?: Maybe; + /** + * Remove discount applied to the order line. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderLineDiscountRemove?: Maybe; + /** + * Update discount for the order line. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderLineDiscountUpdate?: Maybe; + /** + * Updates an order line of an order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderLineUpdate?: Maybe; + /** + * Creates order lines for an order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderLinesCreate?: Maybe; + /** + * Mark order as manually paid. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderMarkAsPaid?: Maybe; + /** + * Adds note to the order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderNoteAdd?: Maybe; + /** + * Updates note of an order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderNoteUpdate?: Maybe; + /** + * Refund an order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderRefund?: Maybe; + /** + * Update shop order settings across all channels. Returns `orderSettings` for the first `channel` in alphabetical order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + * @deprecated Use `channelUpdate` mutation instead. + */ + readonly orderSettingsUpdate?: Maybe; + /** + * Updates an order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderUpdate?: Maybe; + /** + * 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. + */ + readonly orderUpdateShipping?: Maybe; + /** + * Void an order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orderVoid?: Maybe; + /** + * Assign attributes to a given page type. + * + * Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. + */ + readonly pageAttributeAssign?: Maybe; + /** + * Unassign attributes from a given page type. + * + * Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. + */ + readonly pageAttributeUnassign?: Maybe; + /** + * Deletes pages. + * + * Requires one of the following permissions: MANAGE_PAGES. + */ + readonly pageBulkDelete?: Maybe; + /** + * Publish pages. + * + * Requires one of the following permissions: MANAGE_PAGES. + */ + readonly pageBulkPublish?: Maybe; + /** + * Creates a new page. + * + * Requires one of the following permissions: MANAGE_PAGES. + */ + readonly pageCreate?: Maybe; + /** + * Deletes a page. + * + * Requires one of the following permissions: MANAGE_PAGES. + */ + readonly pageDelete?: Maybe; + /** + * Reorder page attribute values. + * + * Requires one of the following permissions: MANAGE_PAGES. + */ + readonly pageReorderAttributeValues?: Maybe; + /** + * Creates/updates translations for a page. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ + readonly pageTranslate?: Maybe; + /** + * Deletes page types. + * + * Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. + */ + readonly pageTypeBulkDelete?: Maybe; + /** + * Creates a new page type. + * + * Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. + */ + readonly pageTypeCreate?: Maybe; + /** + * Deletes a page type. + * + * Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. + */ + readonly pageTypeDelete?: Maybe; + /** + * Reorder the attributes of a page type. + * + * Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. + */ + readonly pageTypeReorderAttributes?: Maybe; + /** + * Updates page type. + * + * Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. + */ + readonly pageTypeUpdate?: Maybe; + /** + * Updates an existing page. + * + * Requires one of the following permissions: MANAGE_PAGES. + */ + readonly pageUpdate?: Maybe; + /** + * Change the password of the logged in user. + * + * Requires one of the following permissions: AUTHENTICATED_USER. + */ + readonly passwordChange?: Maybe; + /** + * Captures the authorized payment amount. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly paymentCapture?: Maybe; + /** Check payment balance. */ + readonly paymentCheckBalance?: Maybe; + /** 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. */ + readonly paymentGatewayInitialize?: Maybe; + /** + * Initializes payment gateway for tokenizing payment method session. + * + * 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. + */ + readonly paymentGatewayInitializeTokenization?: Maybe; + /** Initializes payment process when it is required by gateway. */ + readonly paymentInitialize?: Maybe; + /** + * Tokenize payment method. + * + * 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. + */ + readonly paymentMethodInitializeTokenization?: Maybe; + /** + * Tokenize payment method. + * + * 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. + */ + readonly paymentMethodProcessTokenization?: Maybe; + /** + * Refunds the captured payment amount. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly paymentRefund?: Maybe; + /** + * Voids the authorized payment. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly paymentVoid?: Maybe; + /** + * 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) + */ + readonly permissionGroupCreate?: Maybe; + /** + * 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) + */ + readonly permissionGroupDelete?: Maybe; + /** + * 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) + */ + readonly permissionGroupUpdate?: Maybe; + /** + * Update plugin configuration. + * + * Requires one of the following permissions: MANAGE_PLUGINS. + */ + readonly pluginUpdate?: Maybe; + /** + * Assign attributes to a given product type. + * + * Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. + */ + readonly productAttributeAssign?: Maybe; + /** + * Update attributes assigned to product variant for given product type. + * + * Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. + */ + readonly productAttributeAssignmentUpdate?: Maybe; + /** + * Un-assign attributes from a given product type. + * + * Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. + */ + readonly productAttributeUnassign?: Maybe; + /** + * Creates products. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly productBulkCreate?: Maybe; + /** + * Deletes products. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly productBulkDelete?: Maybe; + /** + * Creates/updates translations for products. + * + * 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. + */ + readonly productBulkTranslate?: Maybe; + /** + * Manage product's availability in channels. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly productChannelListingUpdate?: Maybe; + /** + * Creates a new product. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly productCreate?: Maybe; + /** + * Deletes a product. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly productDelete?: Maybe; + /** + * Deletes product media. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly productMediaBulkDelete?: Maybe; + /** + * 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. + */ + readonly productMediaCreate?: Maybe; + /** + * Deletes a product media. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly productMediaDelete?: Maybe; + /** + * Changes ordering of the product media. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly productMediaReorder?: Maybe; + /** + * Updates a product media. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly productMediaUpdate?: Maybe; + /** + * Reorder product attribute values. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly productReorderAttributeValues?: Maybe; + /** + * Creates/updates translations for a product. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ + readonly productTranslate?: Maybe; + /** + * Deletes product types. + * + * Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. + */ + readonly productTypeBulkDelete?: Maybe; + /** + * Creates a new product type. + * + * Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. + */ + readonly productTypeCreate?: Maybe; + /** + * Deletes a product type. + * + * Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. + */ + readonly productTypeDelete?: Maybe; + /** + * Reorder the attributes of a product type. + * + * Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. + */ + readonly productTypeReorderAttributes?: Maybe; + /** + * Updates an existing product type. + * + * Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. + */ + readonly productTypeUpdate?: Maybe; + /** + * Updates an existing product. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly productUpdate?: Maybe; + /** + * Creates product variants for a given product. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly productVariantBulkCreate?: Maybe; + /** + * Deletes product variants. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly productVariantBulkDelete?: Maybe; + /** + * Creates/updates translations for product variants. + * + * 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. + */ + readonly productVariantBulkTranslate?: Maybe; + /** + * Updates multiple product variants. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly productVariantBulkUpdate?: Maybe; + /** + * Manage product variant prices in channels. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly productVariantChannelListingUpdate?: Maybe; + /** + * Creates a new variant for a product. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly productVariantCreate?: Maybe; + /** + * Deletes a product variant. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly productVariantDelete?: Maybe; + /** + * Deactivates product variant preorder. It changes all preorder allocation into regular allocation. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly productVariantPreorderDeactivate?: Maybe; + /** + * 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. + */ + readonly productVariantReorder?: Maybe; + /** + * Reorder product variant attribute values. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly productVariantReorderAttributeValues?: Maybe; + /** + * Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly productVariantSetDefault?: Maybe; + /** + * Creates stocks for product variant. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + * + * Triggers the following webhook events: + * - PRODUCT_VARIANT_BACK_IN_STOCK (async): A product variant stock is created in a warehouse. + * - PRODUCT_VARIANT_BACK_IN_STOCK_IN_CHANNEL (async): A product variant is back in stock in a channel (non click-and-collect warehouses). + * + * Note: Triggered only when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + * - PRODUCT_VARIANT_BACK_IN_STOCK_FOR_CLICK_AND_COLLECT (async): A product variant is back in stock in a channel (click-and-collect warehouses). + * + * Note: Triggered only when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + */ + readonly productVariantStocksCreate?: Maybe; + /** + * Deletes stocks from product variant. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + * + * Triggers the following webhook events: + * - PRODUCT_VARIANT_OUT_OF_STOCK (async): A product variant stock is deleted from a warehouse. + * - PRODUCT_VARIANT_OUT_OF_STOCK_IN_CHANNEL (async): A product variant is out of stock in a channel (non click-and-collect warehouses). + * + * Note: Triggered only when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + * - PRODUCT_VARIANT_OUT_OF_STOCK_FOR_CLICK_AND_COLLECT (async): A product variant is out of stock in a channel (click-and-collect warehouses). + * + * Note: Triggered only when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + */ + readonly productVariantStocksDelete?: Maybe; + /** + * Updates stocks for product variant. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + * + * Triggers the following webhook events: + * - PRODUCT_VARIANT_STOCK_UPDATED (async): A product variant stock is updated. + * - PRODUCT_VARIANT_BACK_IN_STOCK (async): A product variant stock transitioned from no availability to available quantity. + * - PRODUCT_VARIANT_OUT_OF_STOCK (async): A product variant stock transitioned from available quantity to no availability. + * - PRODUCT_VARIANT_BACK_IN_STOCK_IN_CHANNEL (async): A product variant is back in stock in a channel (non click-and-collect warehouses). + * + * Note: Triggered only when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + * - PRODUCT_VARIANT_OUT_OF_STOCK_IN_CHANNEL (async): A product variant is out of stock in a channel (non click-and-collect warehouses). + * + * Note: Triggered only when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + * - PRODUCT_VARIANT_BACK_IN_STOCK_FOR_CLICK_AND_COLLECT (async): A product variant is back in stock in a channel (click-and-collect warehouses). + * + * Note: Triggered only when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + * - PRODUCT_VARIANT_OUT_OF_STOCK_FOR_CLICK_AND_COLLECT (async): A product variant is out of stock in a channel (click-and-collect warehouses). + * + * Note: Triggered only when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + */ + readonly productVariantStocksUpdate?: Maybe; + /** + * Creates/updates translations for a product variant. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ + readonly productVariantTranslate?: Maybe; + /** + * Updates an existing variant for product. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly productVariantUpdate?: Maybe; + /** + * Deletes promotions. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - PROMOTION_DELETED (async): A promotion was deleted. + */ + readonly promotionBulkDelete?: Maybe; + /** + * Creates a new promotion. + * + * 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. + */ + readonly promotionCreate?: Maybe; + /** + * Deletes a promotion. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - PROMOTION_DELETED (async): A promotion was deleted. + */ + readonly promotionDelete?: Maybe; + /** + * Creates a new promotion rule. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - PROMOTION_RULE_CREATED (async): A promotion rule was created. + */ + readonly promotionRuleCreate?: Maybe; + /** + * Deletes a promotion rule. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - PROMOTION_RULE_DELETED (async): A promotion rule was deleted. + */ + readonly promotionRuleDelete?: Maybe; + /** + * Creates/updates translations for a promotion rule. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ + readonly promotionRuleTranslate?: Maybe; + /** + * Updates an existing promotion rule. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - PROMOTION_RULE_UPDATED (async): A promotion rule was updated. + */ + readonly promotionRuleUpdate?: Maybe; + /** + * Creates/updates translations for a promotion. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ + readonly promotionTranslate?: Maybe; + /** + * Updates an existing promotion. + * + * 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. + */ + readonly promotionUpdate?: Maybe; + /** + * Updates RefundSettings. The `Page` (Model) Type will be cleared from `reasonReferenceType`. When it's cleared, passing reason reference to refund mutations is no longer accepted and will raise error. + * + * Added in Saleor 3.22. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + readonly refundReasonReferenceClear?: Maybe; + /** + * Update refund settings across all channels. + * + * Added in Saleor 3.22. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + readonly refundSettingsUpdate?: Maybe; + /** + * 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. + */ + readonly requestEmailChange?: Maybe; + /** + * 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. + */ + readonly requestPasswordReset?: Maybe; + /** + * Deletes sales. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - SALE_DELETED (async): A sale was deleted. + */ + readonly saleBulkDelete?: Maybe; + /** + * Adds products, categories, collections to a sale. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - SALE_UPDATED (async): A sale was updated. + * @deprecated Use `promotionRuleCreate` and `promotionRuleUpdate` mutations instead. + */ + readonly saleCataloguesAdd?: Maybe; + /** + * Removes products, categories, collections from a sale. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - SALE_UPDATED (async): A sale was updated. + * @deprecated Use `promotionRuleUpdate` and `promotionRuleDelete` mutations instead. + */ + readonly saleCataloguesRemove?: Maybe; + /** + * Manage sale's availability in channels. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * @deprecated Use `promotionRuleUpdate` mutation instead. + */ + readonly saleChannelListingUpdate?: Maybe; + /** + * Creates a new sale. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - SALE_CREATED (async): A sale was created. + * @deprecated Use `promotionCreate` mutation instead. + */ + readonly saleCreate?: Maybe; + /** + * Deletes a sale. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - SALE_DELETED (async): A sale was deleted. + * @deprecated Use `promotionDelete` mutation instead. + */ + readonly saleDelete?: Maybe; + /** + * Creates/updates translations for a sale. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + * @deprecated Use `promotionTranslate` mutation instead. + */ + readonly saleTranslate?: Maybe; + /** + * Updates a sale. + * + * 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. + * @deprecated Use `promotionUpdate` mutation instead. + */ + readonly saleUpdate?: Maybe; + /** + * Sends a notification confirmation. + * + * 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. + */ + readonly sendConfirmationEmail?: Maybe; + /** Sets the user's password from the token sent by email using the RequestPasswordReset mutation. */ + readonly setPassword?: Maybe; + /** + * Manage shipping method's availability in channels. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ + readonly shippingMethodChannelListingUpdate?: Maybe; + /** + * Deletes shipping prices. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ + readonly shippingPriceBulkDelete?: Maybe; + /** + * Creates a new shipping price. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ + readonly shippingPriceCreate?: Maybe; + /** + * Deletes a shipping price. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ + readonly shippingPriceDelete?: Maybe; + /** + * Exclude products from shipping price. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ + readonly shippingPriceExcludeProducts?: Maybe; + /** + * Remove product from excluded list for shipping price. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ + readonly shippingPriceRemoveProductFromExclude?: Maybe; + /** + * Creates/updates translations for a shipping method. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ + readonly shippingPriceTranslate?: Maybe; + /** + * Updates a new shipping price. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ + readonly shippingPriceUpdate?: Maybe; + /** + * Deletes shipping zones. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ + readonly shippingZoneBulkDelete?: Maybe; + /** + * Creates a new shipping zone. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ + readonly shippingZoneCreate?: Maybe; + /** + * Deletes a shipping zone. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ + readonly shippingZoneDelete?: Maybe; + /** + * Updates a new shipping zone. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ + readonly shippingZoneUpdate?: Maybe; + /** + * 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. + */ + readonly shopAddressUpdate?: Maybe; + /** + * Updates site domain of the shop. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + * @deprecated Use `PUBLIC_URL` environment variable instead. + */ + readonly shopDomainUpdate?: Maybe; + /** + * Fetch tax rates. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + * @deprecated Field no longer supported + */ + readonly shopFetchTaxRates?: Maybe; + /** + * Creates/updates translations for shop settings. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ + readonly shopSettingsTranslate?: Maybe; + /** + * 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. + */ + readonly shopSettingsUpdate?: Maybe; + /** + * 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. + */ + readonly staffBulkDelete?: Maybe; + /** + * 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. + */ + readonly staffCreate?: Maybe; + /** + * 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. + */ + readonly staffDelete?: Maybe; + /** + * Creates a new staff notification recipient. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + readonly staffNotificationRecipientCreate?: Maybe; + /** + * Deletes staff notification recipient. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + readonly staffNotificationRecipientDelete?: Maybe; + /** + * Updates a staff notification recipient. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + readonly staffNotificationRecipientUpdate?: Maybe; + /** + * 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. + */ + readonly staffUpdate?: Maybe; + /** + * 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. + * + * 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. + */ + readonly stockBulkUpdate?: Maybe; + /** + * Request to delete a stored payment method on payment provider side. + * + * 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. + */ + readonly storedPaymentMethodRequestDelete?: Maybe; + /** + * Creates a tax class. + * + * Requires one of the following permissions: MANAGE_TAXES. + */ + readonly taxClassCreate?: Maybe; + /** + * Deletes 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. + * + * Requires one of the following permissions: MANAGE_TAXES. + */ + readonly taxClassDelete?: Maybe; + /** + * Updates a tax class. + * + * Requires one of the following permissions: MANAGE_TAXES. + */ + readonly taxClassUpdate?: Maybe; + /** + * Updates tax configuration for a channel. + * + * Requires one of the following permissions: MANAGE_TAXES. + */ + readonly taxConfigurationUpdate?: Maybe; + /** + * Remove all tax class rates for a specific country. + * + * Requires one of the following permissions: MANAGE_TAXES. + */ + readonly taxCountryConfigurationDelete?: Maybe; + /** + * Updates tax class rates for a specific country. + * + * Requires one of the following permissions: MANAGE_TAXES. + */ + readonly taxCountryConfigurationUpdate?: Maybe; + /** + * 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. + * + * Requires one of the following permissions: MANAGE_TAXES. + */ + readonly taxExemptionManage?: Maybe; + /** Create JWT token. */ + readonly tokenCreate?: Maybe; + /** 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. */ + readonly tokenRefresh?: Maybe; + /** Verify JWT token. */ + readonly tokenVerify?: Maybe; + /** + * Deactivate all JWT tokens of the currently authenticated user. + * + * Requires one of the following permissions: AUTHENTICATED_USER. + */ + readonly tokensDeactivateAll?: Maybe; + /** + * Creates transaction for checkout or order. + * + * Requires one of the following permissions: HANDLE_PAYMENTS. + */ + readonly transactionCreate?: Maybe; + /** + * Report the event for the transaction. + * + * 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. + */ + readonly transactionEventReport?: Maybe; + /** 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. */ + readonly transactionInitialize?: Maybe; + /** Processes a transaction session. It triggers the webhook `TRANSACTION_PROCESS_SESSION`, to the assigned `paymentGateways`. */ + readonly transactionProcess?: Maybe; + /** + * Request an action for payment transaction. + * + * Requires one of the following permissions: HANDLE_PAYMENTS. + */ + readonly transactionRequestAction?: Maybe; + /** + * Request a refund for payment transaction based on granted refund. + * + * Requires one of the following permissions: HANDLE_PAYMENTS. + */ + readonly transactionRequestRefundForGrantedRefund?: Maybe; + /** + * Update transaction. + * + * 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. + */ + readonly transactionUpdate?: Maybe; + /** + * Remove shipping zone from given warehouse. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly unassignWarehouseShippingZone?: Maybe; + /** + * Updates metadata of an object.Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly updateMetadata?: Maybe; + /** + * Updates private metadata of an object. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly updatePrivateMetadata?: Maybe; + /** + * Updates given warehouse. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly updateWarehouse?: Maybe; + /** + * Deletes a user avatar. Only for staff members. + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + */ + readonly userAvatarDelete?: Maybe; + /** + * 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. + */ + readonly userAvatarUpdate?: Maybe; + /** + * Activate or deactivate users. + * + * Requires one of the following permissions: MANAGE_USERS. + */ + readonly userBulkSetActive?: Maybe; + /** + * Assign an media to a product variant. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly variantMediaAssign?: Maybe; + /** + * Unassign an media from a product variant. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly variantMediaUnassign?: Maybe; + /** + * Deletes vouchers. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - VOUCHER_DELETED (async): A voucher was deleted. + */ + readonly voucherBulkDelete?: Maybe; + /** + * 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. + */ + readonly voucherCataloguesAdd?: Maybe; + /** + * 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. + */ + readonly voucherCataloguesRemove?: Maybe; + /** + * 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. + */ + readonly voucherChannelListingUpdate?: Maybe; + /** + * 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. + */ + readonly voucherCodeBulkDelete?: Maybe; + /** + * 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. + */ + readonly voucherCreate?: Maybe; + /** + * Deletes a voucher. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - VOUCHER_DELETED (async): A voucher was deleted. + */ + readonly voucherDelete?: Maybe; + /** + * Creates/updates translations for a voucher. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ + readonly voucherTranslate?: Maybe; + /** + * 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. + */ + readonly voucherUpdate?: Maybe; + /** + * Creates a new webhook subscription. + * + * Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP. + */ + readonly webhookCreate?: Maybe; + /** + * Deletes 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. + */ + readonly webhookDelete?: Maybe; + /** + * 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. + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + */ + readonly webhookDryRun?: Maybe; + /** + * 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. + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + */ + readonly webhookTrigger?: Maybe; + /** + * Updates a webhook subscription. + * + * Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP. + */ + readonly webhookUpdate?: Maybe; +}; + +export type MutationAccountAddressCreateArgs = { + customerId?: InputMaybe; + input: AddressInput; + type?: InputMaybe; +}; + +export type MutationAccountAddressDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationAccountAddressUpdateArgs = { + id: Scalars["ID"]["input"]; + input: AddressInput; +}; + +export type MutationAccountDeleteArgs = { + token: Scalars["String"]["input"]; +}; + +export type MutationAccountRegisterArgs = { + input: AccountRegisterInput; +}; + +export type MutationAccountRequestDeletionArgs = { + channel?: InputMaybe; + redirectUrl: Scalars["String"]["input"]; +}; + +export type MutationAccountSetDefaultAddressArgs = { + id: Scalars["ID"]["input"]; + type: AddressTypeEnum; +}; + +export type MutationAccountUpdateArgs = { + customerId?: InputMaybe; + input: AccountInput; +}; + +export type MutationAddressCreateArgs = { + input: AddressInput; + userId: Scalars["ID"]["input"]; +}; + +export type MutationAddressDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationAddressSetDefaultArgs = { + addressId: Scalars["ID"]["input"]; + type: AddressTypeEnum; + userId: Scalars["ID"]["input"]; +}; + +export type MutationAddressUpdateArgs = { + id: Scalars["ID"]["input"]; + input: AddressInput; +}; + +export type MutationAppActivateArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationAppCreateArgs = { + input: AppInput; +}; + +export type MutationAppDeactivateArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationAppDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationAppDeleteFailedInstallationArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationAppFetchManifestArgs = { + manifestUrl: Scalars["String"]["input"]; +}; + +export type MutationAppInstallArgs = { + input: AppInstallInput; +}; + +export type MutationAppProblemCreateArgs = { + input: AppProblemCreateInput; +}; + +export type MutationAppProblemDismissArgs = { + input: AppProblemDismissInput; +}; + +export type MutationAppReenableSyncWebhooksArgs = { + appId: Scalars["ID"]["input"]; +}; + +export type MutationAppRetryInstallArgs = { + activateAfterInstallation?: InputMaybe; + id: Scalars["ID"]["input"]; +}; + +export type MutationAppTokenCreateArgs = { + input: AppTokenInput; +}; + +export type MutationAppTokenDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationAppTokenVerifyArgs = { + token: Scalars["String"]["input"]; +}; + +export type MutationAppUpdateArgs = { + id: Scalars["ID"]["input"]; + input: AppInput; +}; + +export type MutationAssignNavigationArgs = { + menu?: InputMaybe; + navigationType: NavigationType; +}; + +export type MutationAssignWarehouseShippingZoneArgs = { + id: Scalars["ID"]["input"]; + shippingZoneIds: ReadonlyArray; +}; + +export type MutationAttributeBulkCreateArgs = { + attributes: ReadonlyArray; + errorPolicy?: InputMaybe; +}; + +export type MutationAttributeBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationAttributeBulkTranslateArgs = { + errorPolicy?: InputMaybe; + translations: ReadonlyArray; +}; + +export type MutationAttributeBulkUpdateArgs = { + attributes: ReadonlyArray; + errorPolicy?: InputMaybe; +}; + +export type MutationAttributeCreateArgs = { + input: AttributeCreateInput; +}; + +export type MutationAttributeDeleteArgs = { + externalReference?: InputMaybe; + id?: InputMaybe; +}; + +export type MutationAttributeReorderValuesArgs = { + attributeId: Scalars["ID"]["input"]; + moves: ReadonlyArray; +}; + +export type MutationAttributeTranslateArgs = { + id: Scalars["ID"]["input"]; + input: NameTranslationInput; + languageCode: LanguageCodeEnum; +}; + +export type MutationAttributeUpdateArgs = { + externalReference?: InputMaybe; + id?: InputMaybe; + input: AttributeUpdateInput; +}; + +export type MutationAttributeValueBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationAttributeValueBulkTranslateArgs = { + errorPolicy?: InputMaybe; + translations: ReadonlyArray; +}; + +export type MutationAttributeValueCreateArgs = { + attribute: Scalars["ID"]["input"]; + input: AttributeValueCreateInput; +}; + +export type MutationAttributeValueDeleteArgs = { + externalReference?: InputMaybe; + id?: InputMaybe; +}; + +export type MutationAttributeValueTranslateArgs = { + id: Scalars["ID"]["input"]; + input: AttributeValueTranslationInput; + languageCode: LanguageCodeEnum; +}; + +export type MutationAttributeValueUpdateArgs = { + externalReference?: InputMaybe; + id?: InputMaybe; + input: AttributeValueUpdateInput; +}; + +export type MutationCategoryBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationCategoryCreateArgs = { + input: CategoryInput; + parent?: InputMaybe; +}; + +export type MutationCategoryDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationCategoryTranslateArgs = { + id: Scalars["ID"]["input"]; + input: TranslationInput; + languageCode: LanguageCodeEnum; +}; + +export type MutationCategoryUpdateArgs = { + id: Scalars["ID"]["input"]; + input: CategoryInput; +}; + +export type MutationChannelActivateArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationChannelCreateArgs = { + input: ChannelCreateInput; +}; + +export type MutationChannelDeactivateArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationChannelDeleteArgs = { + id: Scalars["ID"]["input"]; + input?: InputMaybe; +}; + +export type MutationChannelReorderWarehousesArgs = { + channelId: Scalars["ID"]["input"]; + moves: ReadonlyArray; +}; + +export type MutationChannelUpdateArgs = { + id: Scalars["ID"]["input"]; + input: ChannelUpdateInput; +}; + +export type MutationCheckoutAddPromoCodeArgs = { + checkoutId?: InputMaybe; + id?: InputMaybe; + promoCode: Scalars["String"]["input"]; + token?: InputMaybe; +}; + +export type MutationCheckoutBillingAddressUpdateArgs = { + billingAddress: AddressInput; + checkoutId?: InputMaybe; + id?: InputMaybe; + saveAddress?: InputMaybe; + token?: InputMaybe; + validationRules?: InputMaybe; +}; + +export type MutationCheckoutCompleteArgs = { + checkoutId?: InputMaybe; + id?: InputMaybe; + metadata?: InputMaybe>; + paymentData?: InputMaybe; + redirectUrl?: InputMaybe; + storeSource?: InputMaybe; + token?: InputMaybe; +}; + +export type MutationCheckoutCreateArgs = { + input: CheckoutCreateInput; +}; + +export type MutationCheckoutCreateFromOrderArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationCheckoutCustomerAttachArgs = { + checkoutId?: InputMaybe; + customerId?: InputMaybe; + id?: InputMaybe; + token?: InputMaybe; +}; + +export type MutationCheckoutCustomerDetachArgs = { + checkoutId?: InputMaybe; + id?: InputMaybe; + token?: InputMaybe; +}; + +export type MutationCheckoutCustomerNoteUpdateArgs = { + customerNote: Scalars["String"]["input"]; + id: Scalars["ID"]["input"]; +}; + +export type MutationCheckoutDeliveryMethodUpdateArgs = { + deliveryMethodId?: InputMaybe; + id?: InputMaybe; + token?: InputMaybe; +}; + +export type MutationCheckoutEmailUpdateArgs = { + checkoutId?: InputMaybe; + email: Scalars["String"]["input"]; + id?: InputMaybe; + token?: InputMaybe; +}; + +export type MutationCheckoutLanguageCodeUpdateArgs = { + checkoutId?: InputMaybe; + id?: InputMaybe; + languageCode: LanguageCodeEnum; + token?: InputMaybe; +}; + +export type MutationCheckoutLineDeleteArgs = { + checkoutId?: InputMaybe; + id?: InputMaybe; + lineId?: InputMaybe; + token?: InputMaybe; +}; + +export type MutationCheckoutLinesAddArgs = { + checkoutId?: InputMaybe; + id?: InputMaybe; + lines: ReadonlyArray; + token?: InputMaybe; +}; + +export type MutationCheckoutLinesDeleteArgs = { + id?: InputMaybe; + linesIds: ReadonlyArray; + token?: InputMaybe; +}; + +export type MutationCheckoutLinesUpdateArgs = { + checkoutId?: InputMaybe; + id?: InputMaybe; + lines: ReadonlyArray; + token?: InputMaybe; +}; + +export type MutationCheckoutPaymentCreateArgs = { + checkoutId?: InputMaybe; + id?: InputMaybe; + input: PaymentInput; + token?: InputMaybe; +}; + +export type MutationCheckoutRemovePromoCodeArgs = { + checkoutId?: InputMaybe; + id?: InputMaybe; + promoCode?: InputMaybe; + promoCodeId?: InputMaybe; + token?: InputMaybe; +}; + +export type MutationCheckoutShippingAddressUpdateArgs = { + checkoutId?: InputMaybe; + id?: InputMaybe; + saveAddress?: InputMaybe; + shippingAddress: AddressInput; + token?: InputMaybe; + validationRules?: InputMaybe; +}; + +export type MutationCheckoutShippingMethodUpdateArgs = { + checkoutId?: InputMaybe; + id?: InputMaybe; + shippingMethodId?: InputMaybe; + token?: InputMaybe; +}; + +export type MutationCollectionAddProductsArgs = { + collectionId: Scalars["ID"]["input"]; + products: ReadonlyArray; +}; + +export type MutationCollectionBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationCollectionChannelListingUpdateArgs = { + id: Scalars["ID"]["input"]; + input: CollectionChannelListingUpdateInput; +}; + +export type MutationCollectionCreateArgs = { + input: CollectionCreateInput; +}; + +export type MutationCollectionDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationCollectionRemoveProductsArgs = { + collectionId: Scalars["ID"]["input"]; + products: ReadonlyArray; +}; + +export type MutationCollectionReorderProductsArgs = { + collectionId: Scalars["ID"]["input"]; + moves: ReadonlyArray; +}; + +export type MutationCollectionTranslateArgs = { + id: Scalars["ID"]["input"]; + input: TranslationInput; + languageCode: LanguageCodeEnum; +}; + +export type MutationCollectionUpdateArgs = { + id: Scalars["ID"]["input"]; + input: CollectionInput; +}; + +export type MutationConfirmAccountArgs = { + email: Scalars["String"]["input"]; + token: Scalars["String"]["input"]; +}; + +export type MutationConfirmEmailChangeArgs = { + channel?: InputMaybe; + token: Scalars["String"]["input"]; +}; + +export type MutationCreateWarehouseArgs = { + input: WarehouseCreateInput; +}; + +export type MutationCustomerBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationCustomerBulkUpdateArgs = { + customers: ReadonlyArray; + errorPolicy?: InputMaybe; +}; + +export type MutationCustomerCreateArgs = { + input: UserCreateInput; +}; + +export type MutationCustomerDeleteArgs = { + externalReference?: InputMaybe; + id?: InputMaybe; +}; + +export type MutationCustomerUpdateArgs = { + externalReference?: InputMaybe; + id?: InputMaybe; + input: CustomerInput; +}; + +export type MutationDeleteMetadataArgs = { + id: Scalars["ID"]["input"]; + keys: ReadonlyArray; +}; + +export type MutationDeletePrivateMetadataArgs = { + id: Scalars["ID"]["input"]; + keys: ReadonlyArray; +}; + +export type MutationDeleteWarehouseArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationDeliveryOptionsCalculateArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationDraftOrderBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationDraftOrderCompleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationDraftOrderCreateArgs = { + input: DraftOrderCreateInput; +}; + +export type MutationDraftOrderDeleteArgs = { + externalReference?: InputMaybe; + id?: InputMaybe; +}; + +export type MutationDraftOrderLinesBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationDraftOrderUpdateArgs = { + externalReference?: InputMaybe; + id?: InputMaybe; + input: DraftOrderInput; +}; + +export type MutationEventDeliveryRetryArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationExportGiftCardsArgs = { + input: ExportGiftCardsInput; +}; + +export type MutationExportProductsArgs = { + input: ExportProductsInput; +}; + +export type MutationExportVoucherCodesArgs = { + input: ExportVoucherCodesInput; +}; + +export type MutationExternalAuthenticationUrlArgs = { + input: Scalars["JSONString"]["input"]; + pluginId: Scalars["String"]["input"]; +}; + +export type MutationExternalLogoutArgs = { + input: Scalars["JSONString"]["input"]; + pluginId: Scalars["String"]["input"]; +}; + +export type MutationExternalNotificationTriggerArgs = { + channel: Scalars["String"]["input"]; + input: ExternalNotificationTriggerInput; + pluginId?: InputMaybe; +}; + +export type MutationExternalObtainAccessTokensArgs = { + input: Scalars["JSONString"]["input"]; + pluginId: Scalars["String"]["input"]; +}; + +export type MutationExternalRefreshArgs = { + input: Scalars["JSONString"]["input"]; + pluginId: Scalars["String"]["input"]; +}; + +export type MutationExternalVerifyArgs = { + input: Scalars["JSONString"]["input"]; + pluginId: Scalars["String"]["input"]; +}; + +export type MutationFileUploadArgs = { + file: Scalars["Upload"]["input"]; +}; + +export type MutationGiftCardActivateArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationGiftCardAddNoteArgs = { + id: Scalars["ID"]["input"]; + input: GiftCardAddNoteInput; +}; + +export type MutationGiftCardBulkActivateArgs = { + ids: ReadonlyArray; +}; + +export type MutationGiftCardBulkCreateArgs = { + input: GiftCardBulkCreateInput; +}; + +export type MutationGiftCardBulkDeactivateArgs = { + ids: ReadonlyArray; +}; + +export type MutationGiftCardBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationGiftCardCreateArgs = { + input: GiftCardCreateInput; +}; + +export type MutationGiftCardDeactivateArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationGiftCardDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationGiftCardResendArgs = { + input: GiftCardResendInput; +}; + +export type MutationGiftCardSettingsUpdateArgs = { + input: GiftCardSettingsUpdateInput; +}; + +export type MutationGiftCardUpdateArgs = { + id: Scalars["ID"]["input"]; + input: GiftCardUpdateInput; +}; + +export type MutationInvoiceCreateArgs = { + input: InvoiceCreateInput; + orderId: Scalars["ID"]["input"]; +}; + +export type MutationInvoiceDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationInvoiceRequestArgs = { + number?: InputMaybe; + orderId: Scalars["ID"]["input"]; +}; + +export type MutationInvoiceRequestDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationInvoiceSendNotificationArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationInvoiceUpdateArgs = { + id: Scalars["ID"]["input"]; + input: UpdateInvoiceInput; +}; + +export type MutationMenuBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationMenuCreateArgs = { + input: MenuCreateInput; +}; + +export type MutationMenuDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationMenuItemBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationMenuItemCreateArgs = { + input: MenuItemCreateInput; +}; + +export type MutationMenuItemDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationMenuItemMoveArgs = { + menu: Scalars["ID"]["input"]; + moves: ReadonlyArray; +}; + +export type MutationMenuItemTranslateArgs = { + id: Scalars["ID"]["input"]; + input: NameTranslationInput; + languageCode: LanguageCodeEnum; +}; + +export type MutationMenuItemUpdateArgs = { + id: Scalars["ID"]["input"]; + input: MenuItemInput; +}; + +export type MutationMenuUpdateArgs = { + id: Scalars["ID"]["input"]; + input: MenuInput; +}; + +export type MutationOrderAddNoteArgs = { + input: OrderAddNoteInput; + order: Scalars["ID"]["input"]; +}; + +export type MutationOrderBulkCancelArgs = { + ids: ReadonlyArray; +}; + +export type MutationOrderBulkCreateArgs = { + errorPolicy?: InputMaybe; + orders: ReadonlyArray; + stockUpdatePolicy?: InputMaybe; +}; + +export type MutationOrderCancelArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationOrderCaptureArgs = { + amount: Scalars["PositiveDecimal"]["input"]; + id: Scalars["ID"]["input"]; +}; + +export type MutationOrderConfirmArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationOrderCreateFromCheckoutArgs = { + id: Scalars["ID"]["input"]; + metadata?: InputMaybe>; + privateMetadata?: InputMaybe>; + removeCheckout?: InputMaybe; +}; + +export type MutationOrderDiscountAddArgs = { + input: OrderDiscountCommonInput; + orderId: Scalars["ID"]["input"]; +}; + +export type MutationOrderDiscountDeleteArgs = { + discountId: Scalars["ID"]["input"]; +}; + +export type MutationOrderDiscountUpdateArgs = { + discountId: Scalars["ID"]["input"]; + input: OrderDiscountCommonInput; +}; + +export type MutationOrderFulfillArgs = { + input: OrderFulfillInput; + order?: InputMaybe; +}; + +export type MutationOrderFulfillmentApproveArgs = { + allowStockToBeExceeded?: InputMaybe; + id: Scalars["ID"]["input"]; + notifyCustomer: Scalars["Boolean"]["input"]; +}; + +export type MutationOrderFulfillmentCancelArgs = { + id: Scalars["ID"]["input"]; + input?: InputMaybe; +}; + +export type MutationOrderFulfillmentRefundProductsArgs = { + input: OrderRefundProductsInput; + order: Scalars["ID"]["input"]; +}; + +export type MutationOrderFulfillmentReturnProductsArgs = { + input: OrderReturnProductsInput; + order: Scalars["ID"]["input"]; +}; + +export type MutationOrderFulfillmentUpdateTrackingArgs = { + id: Scalars["ID"]["input"]; + input: FulfillmentUpdateTrackingInput; +}; + +export type MutationOrderGrantRefundCreateArgs = { + id: Scalars["ID"]["input"]; + input: OrderGrantRefundCreateInput; +}; + +export type MutationOrderGrantRefundUpdateArgs = { + id: Scalars["ID"]["input"]; + input: OrderGrantRefundUpdateInput; +}; + +export type MutationOrderLineDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationOrderLineDiscountRemoveArgs = { + orderLineId: Scalars["ID"]["input"]; +}; + +export type MutationOrderLineDiscountUpdateArgs = { + input: OrderDiscountCommonInput; + orderLineId: Scalars["ID"]["input"]; +}; + +export type MutationOrderLineUpdateArgs = { + id: Scalars["ID"]["input"]; + input: OrderLineInput; +}; + +export type MutationOrderLinesCreateArgs = { + id: Scalars["ID"]["input"]; + input: ReadonlyArray; +}; + +export type MutationOrderMarkAsPaidArgs = { + id: Scalars["ID"]["input"]; + transactionReference?: InputMaybe; +}; + +export type MutationOrderNoteAddArgs = { + input: OrderNoteInput; + order: Scalars["ID"]["input"]; +}; + +export type MutationOrderNoteUpdateArgs = { + input: OrderNoteInput; + note: Scalars["ID"]["input"]; +}; + +export type MutationOrderRefundArgs = { + amount: Scalars["PositiveDecimal"]["input"]; + id: Scalars["ID"]["input"]; +}; + +export type MutationOrderSettingsUpdateArgs = { + input: OrderSettingsUpdateInput; +}; + +export type MutationOrderUpdateArgs = { + externalReference?: InputMaybe; + id?: InputMaybe; + input: OrderUpdateInput; +}; + +export type MutationOrderUpdateShippingArgs = { + input: OrderUpdateShippingInput; + order: Scalars["ID"]["input"]; +}; + +export type MutationOrderVoidArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationPageAttributeAssignArgs = { + attributeIds: ReadonlyArray; + pageTypeId: Scalars["ID"]["input"]; +}; + +export type MutationPageAttributeUnassignArgs = { + attributeIds: ReadonlyArray; + pageTypeId: Scalars["ID"]["input"]; +}; + +export type MutationPageBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationPageBulkPublishArgs = { + ids: ReadonlyArray; + isPublished: Scalars["Boolean"]["input"]; +}; + +export type MutationPageCreateArgs = { + input: PageCreateInput; +}; + +export type MutationPageDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationPageReorderAttributeValuesArgs = { + attributeId: Scalars["ID"]["input"]; + moves: ReadonlyArray; + pageId: Scalars["ID"]["input"]; +}; + +export type MutationPageTranslateArgs = { + id: Scalars["ID"]["input"]; + input: PageTranslationInput; + languageCode: LanguageCodeEnum; +}; + +export type MutationPageTypeBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationPageTypeCreateArgs = { + input: PageTypeCreateInput; +}; + +export type MutationPageTypeDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationPageTypeReorderAttributesArgs = { + moves: ReadonlyArray; + pageTypeId: Scalars["ID"]["input"]; +}; + +export type MutationPageTypeUpdateArgs = { + id?: InputMaybe; + input: PageTypeUpdateInput; +}; + +export type MutationPageUpdateArgs = { + id: Scalars["ID"]["input"]; + input: PageInput; +}; + +export type MutationPasswordChangeArgs = { + newPassword: Scalars["String"]["input"]; + oldPassword?: InputMaybe; +}; + +export type MutationPaymentCaptureArgs = { + amount?: InputMaybe; + paymentId: Scalars["ID"]["input"]; +}; + +export type MutationPaymentCheckBalanceArgs = { + input: PaymentCheckBalanceInput; +}; + +export type MutationPaymentGatewayInitializeArgs = { + amount?: InputMaybe; + id: Scalars["ID"]["input"]; + paymentGateways?: InputMaybe>; +}; + +export type MutationPaymentGatewayInitializeTokenizationArgs = { + channel: Scalars["String"]["input"]; + data?: InputMaybe; + id: Scalars["String"]["input"]; +}; + +export type MutationPaymentInitializeArgs = { + channel?: InputMaybe; + gateway: Scalars["String"]["input"]; + paymentData?: InputMaybe; +}; + +export type MutationPaymentMethodInitializeTokenizationArgs = { + channel: Scalars["String"]["input"]; + data?: InputMaybe; + id: Scalars["String"]["input"]; + paymentFlowToSupport: TokenizedPaymentFlowEnum; +}; + +export type MutationPaymentMethodProcessTokenizationArgs = { + channel: Scalars["String"]["input"]; + data?: InputMaybe; + id: Scalars["String"]["input"]; +}; + +export type MutationPaymentRefundArgs = { + amount?: InputMaybe; + paymentId: Scalars["ID"]["input"]; +}; + +export type MutationPaymentVoidArgs = { + paymentId: Scalars["ID"]["input"]; +}; + +export type MutationPermissionGroupCreateArgs = { + input: PermissionGroupCreateInput; +}; + +export type MutationPermissionGroupDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationPermissionGroupUpdateArgs = { + id: Scalars["ID"]["input"]; + input: PermissionGroupUpdateInput; +}; + +export type MutationPluginUpdateArgs = { + channelId?: InputMaybe; + id: Scalars["ID"]["input"]; + input: PluginUpdateInput; +}; + +export type MutationProductAttributeAssignArgs = { + operations: ReadonlyArray; + productTypeId: Scalars["ID"]["input"]; +}; + +export type MutationProductAttributeAssignmentUpdateArgs = { + operations: ReadonlyArray; + productTypeId: Scalars["ID"]["input"]; +}; + +export type MutationProductAttributeUnassignArgs = { + attributeIds: ReadonlyArray; + productTypeId: Scalars["ID"]["input"]; +}; + +export type MutationProductBulkCreateArgs = { + errorPolicy?: InputMaybe; + products: ReadonlyArray; +}; + +export type MutationProductBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationProductBulkTranslateArgs = { + errorPolicy?: InputMaybe; + translations: ReadonlyArray; +}; + +export type MutationProductChannelListingUpdateArgs = { + id: Scalars["ID"]["input"]; + input: ProductChannelListingUpdateInput; +}; + +export type MutationProductCreateArgs = { + input: ProductCreateInput; +}; + +export type MutationProductDeleteArgs = { + externalReference?: InputMaybe; + id?: InputMaybe; +}; + +export type MutationProductMediaBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationProductMediaCreateArgs = { + input: ProductMediaCreateInput; +}; + +export type MutationProductMediaDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationProductMediaReorderArgs = { + mediaIds: ReadonlyArray; + productId: Scalars["ID"]["input"]; +}; + +export type MutationProductMediaUpdateArgs = { + id: Scalars["ID"]["input"]; + input: ProductMediaUpdateInput; +}; + +export type MutationProductReorderAttributeValuesArgs = { + attributeId: Scalars["ID"]["input"]; + moves: ReadonlyArray; + productId: Scalars["ID"]["input"]; +}; + +export type MutationProductTranslateArgs = { + id: Scalars["ID"]["input"]; + input: TranslationInput; + languageCode: LanguageCodeEnum; +}; + +export type MutationProductTypeBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationProductTypeCreateArgs = { + input: ProductTypeInput; +}; + +export type MutationProductTypeDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationProductTypeReorderAttributesArgs = { + moves: ReadonlyArray; + productTypeId: Scalars["ID"]["input"]; + type: ProductAttributeType; +}; + +export type MutationProductTypeUpdateArgs = { + id: Scalars["ID"]["input"]; + input: ProductTypeInput; +}; + +export type MutationProductUpdateArgs = { + externalReference?: InputMaybe; + id?: InputMaybe; + input: ProductInput; +}; + +export type MutationProductVariantBulkCreateArgs = { + errorPolicy?: InputMaybe; + product: Scalars["ID"]["input"]; + variants: ReadonlyArray; +}; + +export type MutationProductVariantBulkDeleteArgs = { + ids?: InputMaybe>; + skus?: InputMaybe>; +}; + +export type MutationProductVariantBulkTranslateArgs = { + errorPolicy?: InputMaybe; + translations: ReadonlyArray; +}; + +export type MutationProductVariantBulkUpdateArgs = { + errorPolicy?: InputMaybe; + product: Scalars["ID"]["input"]; + variants: ReadonlyArray; +}; + +export type MutationProductVariantChannelListingUpdateArgs = { + id?: InputMaybe; + input: ReadonlyArray; + sku?: InputMaybe; +}; + +export type MutationProductVariantCreateArgs = { + input: ProductVariantCreateInput; +}; + +export type MutationProductVariantDeleteArgs = { + externalReference?: InputMaybe; + id?: InputMaybe; + sku?: InputMaybe; +}; + +export type MutationProductVariantPreorderDeactivateArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationProductVariantReorderArgs = { + moves: ReadonlyArray; + productId: Scalars["ID"]["input"]; +}; + +export type MutationProductVariantReorderAttributeValuesArgs = { + attributeId: Scalars["ID"]["input"]; + moves: ReadonlyArray; + variantId: Scalars["ID"]["input"]; +}; + +export type MutationProductVariantSetDefaultArgs = { + productId: Scalars["ID"]["input"]; + variantId: Scalars["ID"]["input"]; +}; + +export type MutationProductVariantStocksCreateArgs = { + stocks: ReadonlyArray; + variantId: Scalars["ID"]["input"]; +}; + +export type MutationProductVariantStocksDeleteArgs = { + sku?: InputMaybe; + variantId?: InputMaybe; + warehouseIds?: InputMaybe>; +}; + +export type MutationProductVariantStocksUpdateArgs = { + sku?: InputMaybe; + stocks: ReadonlyArray; + variantId?: InputMaybe; +}; + +export type MutationProductVariantTranslateArgs = { + id: Scalars["ID"]["input"]; + input: NameTranslationInput; + languageCode: LanguageCodeEnum; +}; + +export type MutationProductVariantUpdateArgs = { + externalReference?: InputMaybe; + id?: InputMaybe; + input: ProductVariantInput; + sku?: InputMaybe; +}; + +export type MutationPromotionBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationPromotionCreateArgs = { + input: PromotionCreateInput; +}; + +export type MutationPromotionDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationPromotionRuleCreateArgs = { + input: PromotionRuleCreateInput; +}; + +export type MutationPromotionRuleDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationPromotionRuleTranslateArgs = { + id: Scalars["ID"]["input"]; + input: PromotionRuleTranslationInput; + languageCode: LanguageCodeEnum; +}; + +export type MutationPromotionRuleUpdateArgs = { + id: Scalars["ID"]["input"]; + input: PromotionRuleUpdateInput; +}; + +export type MutationPromotionTranslateArgs = { + id: Scalars["ID"]["input"]; + input: PromotionTranslationInput; + languageCode: LanguageCodeEnum; +}; + +export type MutationPromotionUpdateArgs = { + id: Scalars["ID"]["input"]; + input: PromotionUpdateInput; +}; + +export type MutationRefundSettingsUpdateArgs = { + input: RefundSettingsUpdateInput; +}; + +export type MutationRequestEmailChangeArgs = { + channel?: InputMaybe; + newEmail: Scalars["String"]["input"]; + password: Scalars["String"]["input"]; + redirectUrl: Scalars["String"]["input"]; +}; + +export type MutationRequestPasswordResetArgs = { + channel?: InputMaybe; + email: Scalars["String"]["input"]; + redirectUrl: Scalars["String"]["input"]; +}; + +export type MutationSaleBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationSaleCataloguesAddArgs = { + id: Scalars["ID"]["input"]; + input: CatalogueInput; +}; + +export type MutationSaleCataloguesRemoveArgs = { + id: Scalars["ID"]["input"]; + input: CatalogueInput; +}; + +export type MutationSaleChannelListingUpdateArgs = { + id: Scalars["ID"]["input"]; + input: SaleChannelListingInput; +}; + +export type MutationSaleCreateArgs = { + input: SaleInput; +}; + +export type MutationSaleDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationSaleTranslateArgs = { + id: Scalars["ID"]["input"]; + input: NameTranslationInput; + languageCode: LanguageCodeEnum; +}; + +export type MutationSaleUpdateArgs = { + id: Scalars["ID"]["input"]; + input: SaleInput; +}; + +export type MutationSendConfirmationEmailArgs = { + channel: Scalars["String"]["input"]; + redirectUrl: Scalars["String"]["input"]; +}; + +export type MutationSetPasswordArgs = { + email: Scalars["String"]["input"]; + password: Scalars["String"]["input"]; + token: Scalars["String"]["input"]; +}; + +export type MutationShippingMethodChannelListingUpdateArgs = { + id: Scalars["ID"]["input"]; + input: ShippingMethodChannelListingInput; +}; + +export type MutationShippingPriceBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationShippingPriceCreateArgs = { + input: ShippingPriceInput; +}; + +export type MutationShippingPriceDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationShippingPriceExcludeProductsArgs = { + id: Scalars["ID"]["input"]; + input: ShippingPriceExcludeProductsInput; +}; + +export type MutationShippingPriceRemoveProductFromExcludeArgs = { + id: Scalars["ID"]["input"]; + products: ReadonlyArray; +}; + +export type MutationShippingPriceTranslateArgs = { + id: Scalars["ID"]["input"]; + input: ShippingPriceTranslationInput; + languageCode: LanguageCodeEnum; +}; + +export type MutationShippingPriceUpdateArgs = { + id: Scalars["ID"]["input"]; + input: ShippingPriceInput; +}; + +export type MutationShippingZoneBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationShippingZoneCreateArgs = { + input: ShippingZoneCreateInput; +}; + +export type MutationShippingZoneDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationShippingZoneUpdateArgs = { + id: Scalars["ID"]["input"]; + input: ShippingZoneUpdateInput; +}; + +export type MutationShopAddressUpdateArgs = { + input?: InputMaybe; +}; + +export type MutationShopDomainUpdateArgs = { + input?: InputMaybe; +}; + +export type MutationShopSettingsTranslateArgs = { + input: ShopSettingsTranslationInput; + languageCode: LanguageCodeEnum; +}; + +export type MutationShopSettingsUpdateArgs = { + input: ShopSettingsInput; +}; + +export type MutationStaffBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationStaffCreateArgs = { + input: StaffCreateInput; +}; + +export type MutationStaffDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationStaffNotificationRecipientCreateArgs = { + input: StaffNotificationRecipientInput; +}; + +export type MutationStaffNotificationRecipientDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationStaffNotificationRecipientUpdateArgs = { + id: Scalars["ID"]["input"]; + input: StaffNotificationRecipientInput; +}; + +export type MutationStaffUpdateArgs = { + id: Scalars["ID"]["input"]; + input: StaffUpdateInput; +}; + +export type MutationStockBulkUpdateArgs = { + errorPolicy?: InputMaybe; + stocks: ReadonlyArray; +}; + +export type MutationStoredPaymentMethodRequestDeleteArgs = { + channel: Scalars["String"]["input"]; + id: Scalars["ID"]["input"]; +}; + +export type MutationTaxClassCreateArgs = { + input: TaxClassCreateInput; +}; + +export type MutationTaxClassDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationTaxClassUpdateArgs = { + id: Scalars["ID"]["input"]; + input: TaxClassUpdateInput; +}; + +export type MutationTaxConfigurationUpdateArgs = { + id: Scalars["ID"]["input"]; + input: TaxConfigurationUpdateInput; +}; + +export type MutationTaxCountryConfigurationDeleteArgs = { + countryCode: CountryCode; +}; + +export type MutationTaxCountryConfigurationUpdateArgs = { + countryCode: CountryCode; + updateTaxClassRates: ReadonlyArray; +}; + +export type MutationTaxExemptionManageArgs = { + id: Scalars["ID"]["input"]; + taxExemption: Scalars["Boolean"]["input"]; +}; + +export type MutationTokenCreateArgs = { + audience?: InputMaybe; + email: Scalars["String"]["input"]; + password: Scalars["String"]["input"]; +}; + +export type MutationTokenRefreshArgs = { + csrfToken?: InputMaybe; + refreshToken?: InputMaybe; +}; + +export type MutationTokenVerifyArgs = { + token: Scalars["String"]["input"]; +}; + +export type MutationTransactionCreateArgs = { + id: Scalars["ID"]["input"]; + transaction: TransactionCreateInput; + transactionEvent?: InputMaybe; +}; + +export type MutationTransactionEventReportArgs = { + amount?: InputMaybe; + availableActions?: InputMaybe>; + externalUrl?: InputMaybe; + id?: InputMaybe; + message?: InputMaybe; + paymentMethodDetails?: InputMaybe; + pspReference: Scalars["String"]["input"]; + time?: InputMaybe; + token?: InputMaybe; + transactionMetadata?: InputMaybe>; + transactionPrivateMetadata?: InputMaybe>; + type: TransactionEventTypeEnum; +}; + +export type MutationTransactionInitializeArgs = { + action?: InputMaybe; + amount?: InputMaybe; + customerIpAddress?: InputMaybe; + id: Scalars["ID"]["input"]; + idempotencyKey?: InputMaybe; + paymentGateway: PaymentGatewayToInitialize; +}; + +export type MutationTransactionProcessArgs = { + customerIpAddress?: InputMaybe; + data?: InputMaybe; + id?: InputMaybe; + token?: InputMaybe; +}; + +export type MutationTransactionRequestActionArgs = { + actionType: TransactionActionEnum; + amount?: InputMaybe; + id?: InputMaybe; + refundReason?: InputMaybe; + refundReasonReference?: InputMaybe; + token?: InputMaybe; +}; + +export type MutationTransactionRequestRefundForGrantedRefundArgs = { + grantedRefundId: Scalars["ID"]["input"]; + id?: InputMaybe; + token?: InputMaybe; +}; + +export type MutationTransactionUpdateArgs = { + id?: InputMaybe; + token?: InputMaybe; + transaction?: InputMaybe; + transactionEvent?: InputMaybe; +}; + +export type MutationUnassignWarehouseShippingZoneArgs = { + id: Scalars["ID"]["input"]; + shippingZoneIds: ReadonlyArray; +}; + +export type MutationUpdateMetadataArgs = { + id: Scalars["ID"]["input"]; + input: ReadonlyArray; +}; + +export type MutationUpdatePrivateMetadataArgs = { + id: Scalars["ID"]["input"]; + input: ReadonlyArray; +}; + +export type MutationUpdateWarehouseArgs = { + externalReference?: InputMaybe; + id?: InputMaybe; + input: WarehouseUpdateInput; +}; + +export type MutationUserAvatarUpdateArgs = { + image: Scalars["Upload"]["input"]; +}; + +export type MutationUserBulkSetActiveArgs = { + ids: ReadonlyArray; + isActive: Scalars["Boolean"]["input"]; +}; + +export type MutationVariantMediaAssignArgs = { + mediaId: Scalars["ID"]["input"]; + variantId: Scalars["ID"]["input"]; +}; + +export type MutationVariantMediaUnassignArgs = { + mediaId: Scalars["ID"]["input"]; + variantId: Scalars["ID"]["input"]; +}; + +export type MutationVoucherBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationVoucherCataloguesAddArgs = { + id: Scalars["ID"]["input"]; + input: CatalogueInput; +}; + +export type MutationVoucherCataloguesRemoveArgs = { + id: Scalars["ID"]["input"]; + input: CatalogueInput; +}; + +export type MutationVoucherChannelListingUpdateArgs = { + id: Scalars["ID"]["input"]; + input: VoucherChannelListingInput; +}; + +export type MutationVoucherCodeBulkDeleteArgs = { + ids: ReadonlyArray; +}; + +export type MutationVoucherCreateArgs = { + input: VoucherInput; +}; + +export type MutationVoucherDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationVoucherTranslateArgs = { + id: Scalars["ID"]["input"]; + input: NameTranslationInput; + languageCode: LanguageCodeEnum; +}; + +export type MutationVoucherUpdateArgs = { + id: Scalars["ID"]["input"]; + input: VoucherInput; +}; + +export type MutationWebhookCreateArgs = { + input: WebhookCreateInput; +}; + +export type MutationWebhookDeleteArgs = { + id: Scalars["ID"]["input"]; +}; + +export type MutationWebhookDryRunArgs = { + objectId: Scalars["ID"]["input"]; + query: Scalars["String"]["input"]; +}; + +export type MutationWebhookTriggerArgs = { + objectId: Scalars["ID"]["input"]; + webhookId: Scalars["ID"]["input"]; +}; + +export type MutationWebhookUpdateArgs = { + id: Scalars["ID"]["input"]; + input: WebhookUpdateInput; +}; + +export type NameTranslationInput = { + readonly name?: InputMaybe; +}; + +export type NavigationType = + /** Main storefront navigation. */ + | "MAIN" + /** Secondary storefront navigation. */ + | "SECONDARY"; + +/** An object with an ID */ +export type Node = { + /** The ID of the object. */ + readonly id: Scalars["ID"]["output"]; +}; + +/** + * An object with attributes. + * + * Added in Saleor 3.22. + */ +export type ObjectWithAttributes = { + /** + * Get a single attribute attached to the object by attribute slug. + * + * Added in Saleor 3.22. + */ + readonly assignedAttribute?: Maybe; + /** + * List of attributes assigned to the object. + * + * Added in Saleor 3.22. + */ + readonly assignedAttributes: ReadonlyArray; +}; + +/** + * An object with attributes. + * + * Added in Saleor 3.22. + */ +export type ObjectWithAttributesAssignedAttributeArgs = { + slug: Scalars["String"]["input"]; +}; + +/** + * An object with attributes. + * + * Added in Saleor 3.22. + */ +export type ObjectWithAttributesAssignedAttributesArgs = { + limit?: InputMaybe; +}; + +export type ObjectWithMetadata = { + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; +}; + +export type ObjectWithMetadataMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +export type ObjectWithMetadataMetafieldsArgs = { + keys?: InputMaybe>; +}; + +export type ObjectWithMetadataPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +export type ObjectWithMetadataPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents an order in the shop. */ +export type Order = Node & + ObjectWithMetadata & { + /** List of actions that can be performed in the current state of an order. */ + readonly actions: ReadonlyArray; + /** The authorize status of the order. */ + readonly authorizeStatus: OrderAuthorizeStatusEnum; + /** Collection points that can be used for this order. */ + readonly availableCollectionPoints: ReadonlyArray; + /** + * Shipping methods that can be used with this order. + * @deprecated Use `shippingMethods`, this field will be removed in 4.0 + */ + readonly availableShippingMethods?: Maybe>; + /** 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. */ + readonly billingAddress?: Maybe
; + /** Informs whether a draft order can be finalized(turned into a regular order). */ + readonly canFinalize: Scalars["Boolean"]["output"]; + /** Channel through which the order was placed. */ + readonly channel: Channel; + /** The charge status of the order. */ + readonly chargeStatus: OrderChargeStatusEnum; + /** ID of the checkout that the order was created from. */ + readonly checkoutId?: Maybe; + /** Name of the collection point where the order should be picked up by the customer. */ + readonly collectionPointName?: Maybe; + /** Date and time when the order was created. */ + readonly created: Scalars["DateTime"]["output"]; + /** Additional information provided by the customer about the order. */ + readonly customerNote: Scalars["String"]["output"]; + /** The delivery method selected for this order. */ + readonly deliveryMethod?: Maybe; + /** + * Returns applied discount. + * @deprecated Use the `discounts` field instead. + */ + readonly discount?: Maybe; + /** + * Discount name. + * @deprecated Use the `discounts` field instead. + */ + readonly discountName?: Maybe; + /** List of all discounts assigned to the order. */ + readonly discounts: ReadonlyArray; + /** Determines whether displayed prices should include taxes. */ + readonly displayGrossPrices: Scalars["Boolean"]["output"]; + /** List of errors that occurred during order validation. */ + readonly errors: ReadonlyArray; + /** + * List of events associated with the order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly events: ReadonlyArray; + /** External ID of this order. */ + readonly externalReference?: Maybe; + /** List of shipments for the order. */ + readonly fulfillments: ReadonlyArray; + /** List of user gift cards. */ + readonly giftCards: ReadonlyArray; + /** + * List of granted refunds. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly grantedRefunds: ReadonlyArray; + /** ID of the order. */ + readonly id: Scalars["ID"]["output"]; + /** 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. */ + readonly invoices: ReadonlyArray; + /** Informs if an order is fully paid. */ + readonly isPaid: Scalars["Boolean"]["output"]; + /** Returns True, if order requires shipping. */ + readonly isShippingRequired: Scalars["Boolean"]["output"]; + /** @deprecated Use the `languageCodeEnum` field to fetch the language code. */ + readonly languageCode: Scalars["String"]["output"]; + /** Order language code. */ + readonly languageCodeEnum: LanguageCodeEnum; + /** List of order lines. */ + readonly lines: ReadonlyArray; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** User-friendly number of an order. */ + readonly number: Scalars["String"]["output"]; + /** The order origin. */ + readonly origin: OrderOriginEnum; + /** The ID of the order that was the base for this order. */ + readonly original?: Maybe; + /** Internal payment status. */ + readonly paymentStatus: PaymentChargeStatusEnum; + /** User-friendly payment status. */ + readonly paymentStatusDisplay: Scalars["String"]["output"]; + /** List of payments for the order. */ + readonly payments: ReadonlyArray; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** URL to which user should be redirected after order is placed. */ + readonly redirectUrl?: Maybe; + /** 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. */ + readonly shippingAddress?: Maybe
; + /** + * Shipping method for this order. + * @deprecated Use `deliveryMethod` instead. + */ + readonly shippingMethod?: Maybe; + /** Method used for shipping. */ + readonly shippingMethodName?: Maybe; + /** Shipping methods related to this order. */ + readonly shippingMethods: ReadonlyArray; + /** Total price of shipping. */ + readonly shippingPrice: TaxedMoney; + /** + * Denormalized tax class assigned to the shipping method. + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. + */ + readonly shippingTaxClass?: Maybe; + /** Denormalized public metadata of the shipping method's tax class. */ + readonly shippingTaxClassMetadata: ReadonlyArray; + /** Denormalized name of the tax class assigned to the shipping method. */ + readonly shippingTaxClassName?: Maybe; + /** Denormalized private metadata of the shipping method's tax class. Requires staff permissions to access. */ + readonly shippingTaxClassPrivateMetadata: ReadonlyArray; + /** The shipping tax rate value. */ + readonly shippingTaxRate: Scalars["Float"]["output"]; + /** Status of the order. */ + readonly status: OrderStatus; + /** User-friendly order status. */ + readonly statusDisplay: Scalars["String"]["output"]; + /** The sum of line prices not including shipping. */ + readonly subtotal: TaxedMoney; + /** Returns True if order has to be exempt from taxes. */ + readonly taxExemption: Scalars["Boolean"]["output"]; + /** @deprecated Use `id` instead. */ + readonly token: Scalars["String"]["output"]; + /** Total amount of the order. */ + readonly total: TaxedMoney; + /** + * Total amount of ongoing authorize requests for the order's transactions. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly totalAuthorizePending: Money; + /** Amount authorized for the order. */ + readonly totalAuthorized: Money; + /** The difference between the paid and the order total amount. */ + readonly totalBalance: Money; + /** + * Total amount of ongoing cancel requests for the order's transactions. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly totalCancelPending: Money; + /** Amount canceled for the order. */ + readonly totalCanceled: Money; + /** + * Amount captured for the order. + * @deprecated Use `totalCharged` instead. + */ + readonly totalCaptured: Money; + /** + * Total amount of ongoing charge requests for the order's transactions. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly totalChargePending: Money; + /** Amount charged for the order. */ + readonly totalCharged: Money; + /** + * Total amount of granted refund. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly totalGrantedRefund: Money; + /** + * Total amount of ongoing refund requests for the order's transactions. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly totalRefundPending: Money; + /** Total refund amount for the order. */ + readonly totalRefunded: Money; + /** + * The difference amount between granted refund and the amounts that are pending and refunded. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly totalRemainingGrant: Money; + /** Google Analytics tracking client ID. */ + readonly trackingClientId: Scalars["String"]["output"]; + /** List of transactions for the order. Requires one of the following permissions: MANAGE_ORDERS, HANDLE_PAYMENTS. */ + readonly transactions: ReadonlyArray; + /** + * Translated discount name. + * @deprecated Use the `discounts` field instead. + */ + readonly translatedDiscountName?: Maybe; + /** + * Undiscounted total price of shipping. + * + * Added in Saleor 3.19. + */ + readonly undiscountedShippingPrice: Money; + /** Undiscounted total amount of the order. */ + readonly undiscountedTotal: TaxedMoney; + /** Date and time when the order was created. */ + readonly updatedAt: Scalars["DateTime"]["output"]; + /** 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. */ + readonly user?: Maybe; + /** 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. */ + readonly userEmail?: Maybe; + /** Voucher linked to the order. */ + readonly voucher?: Maybe; + /** + * Voucher code that was used for Order. + * + * Added in Saleor 3.18. + */ + readonly voucherCode?: Maybe; + /** Weight of the order. */ + readonly weight: Weight; + }; + +/** Represents an order in the shop. */ +export type OrderMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents an order in the shop. */ +export type OrderMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents an order in the shop. */ +export type OrderPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents an order in the shop. */ +export type OrderPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +export type 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. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderAddNote = { + readonly errors: ReadonlyArray; + /** Order note created. */ + readonly event?: Maybe; + /** Order with the note added. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +export type OrderAddNoteInput = { + /** Note message. */ + readonly message: Scalars["String"]["input"]; +}; + +/** + * 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` + */ +export type OrderAuthorizeStatusEnum = "FULL" | "NONE" | "PARTIAL"; + +/** Filter by authorize status. */ +export type OrderAuthorizeStatusEnumFilterInput = { + /** The value equal to. */ + readonly eq?: InputMaybe; + /** The value included in. */ + readonly oneOf?: InputMaybe>; +}; + +/** + * Cancels orders. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderBulkCancel = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +/** + * Creates multiple orders. + * + * Requires one of the following permissions: MANAGE_ORDERS_IMPORT. + */ +export type OrderBulkCreate = { + /** Returns how many objects were created. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** List of the created orders. */ + readonly results: ReadonlyArray; +}; + +export type OrderBulkCreateDeliveryMethodInput = { + /** The ID of the shipping method. */ + readonly shippingMethodId?: InputMaybe; + /** The name of the shipping method. */ + readonly shippingMethodName?: InputMaybe; + /** The price of the shipping. */ + readonly shippingPrice?: InputMaybe; + /** The ID of the tax class. */ + readonly shippingTaxClassId?: InputMaybe; + /** + * Metadata of the tax class. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly shippingTaxClassMetadata?: InputMaybe>; + /** The name of the tax class. */ + readonly shippingTaxClassName?: InputMaybe; + /** + * Private metadata of the tax class. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly shippingTaxClassPrivateMetadata?: InputMaybe>; + /** Tax rate of the shipping. */ + readonly shippingTaxRate?: InputMaybe; + /** The ID of the warehouse. */ + readonly warehouseId?: InputMaybe; + /** The name of the warehouse. */ + readonly warehouseName?: InputMaybe; +}; + +export type OrderBulkCreateError = { + /** The error code. */ + readonly code?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly path?: Maybe; +}; + +export type 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"; + +export type OrderBulkCreateFulfillmentInput = { + /** List of items informing how to fulfill the order. */ + readonly lines?: InputMaybe>; + /** Fulfillment's tracking code. */ + readonly trackingCode?: InputMaybe; +}; + +export type OrderBulkCreateFulfillmentLineInput = { + /** 0-based index of order line, which the fulfillment line refers to. */ + readonly orderLineIndex: Scalars["Int"]["input"]; + /** The number of line items to be fulfilled from given warehouse. */ + readonly quantity: Scalars["Int"]["input"]; + /** The external ID of the product variant. */ + readonly variantExternalReference?: InputMaybe; + /** The ID of the product variant. */ + readonly variantId?: InputMaybe; + /** The SKU of the product variant. */ + readonly variantSku?: InputMaybe; + /** ID of the warehouse from which the item will be fulfilled. */ + readonly warehouse: Scalars["ID"]["input"]; +}; + +export type OrderBulkCreateInput = { + /** Billing address of the customer. */ + readonly billingAddress: AddressInput; + /** Slug of the channel associated with the order. */ + readonly channel: Scalars["String"]["input"]; + /** The date, when the order was inserted to Saleor database. */ + readonly createdAt: Scalars["DateTime"]["input"]; + /** Currency code. */ + readonly currency: Scalars["String"]["input"]; + /** Note about customer. */ + readonly customerNote?: InputMaybe; + /** The delivery method selected for this order. */ + readonly deliveryMethod?: InputMaybe; + /** List of discounts. */ + readonly discounts?: InputMaybe>; + /** Determines whether displayed prices should include taxes. */ + readonly displayGrossPrices?: InputMaybe; + /** External ID of the order. */ + readonly externalReference?: InputMaybe; + /** Fulfillments of the order. */ + readonly fulfillments?: InputMaybe>; + /** List of gift card codes associated with the order. */ + readonly giftCards?: InputMaybe>; + /** Invoices related to the order. */ + readonly invoices?: InputMaybe>; + /** Order language code. */ + readonly languageCode: LanguageCodeEnum; + /** List of order lines. */ + readonly lines: ReadonlyArray; + /** + * Metadata of the order. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** Notes related to the order. */ + readonly notes?: InputMaybe>; + /** + * Private metadata of the order. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** URL of a view, where users should be redirected to see the order details. */ + readonly redirectUrl?: InputMaybe; + /** Shipping address of the customer. */ + readonly shippingAddress?: InputMaybe; + /** Status of the order. */ + readonly status?: InputMaybe; + /** Transactions related to the order. */ + readonly transactions?: InputMaybe>; + /** Customer associated with the order. */ + readonly user: OrderBulkCreateUserInput; + /** + * Code of a voucher associated with the order. + * + * Added in Saleor 3.18. + */ + readonly voucherCode?: InputMaybe; + /** Weight of the order in kg. */ + readonly weight?: InputMaybe; +}; + +export type OrderBulkCreateInvoiceInput = { + /** The date, when the invoice was created. */ + readonly createdAt: Scalars["DateTime"]["input"]; + /** + * Metadata of the invoice. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** Invoice number. */ + readonly number?: InputMaybe; + /** + * Private metadata of the invoice. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** URL of the invoice to download. */ + readonly url?: InputMaybe; +}; + +export type OrderBulkCreateNoteInput = { + /** The app ID associated with the message. */ + readonly appId?: InputMaybe; + /** The date associated with the message. */ + readonly date?: InputMaybe; + /** Note message. Max characters: 255. */ + readonly message: Scalars["String"]["input"]; + /** The user email associated with the message. */ + readonly userEmail?: InputMaybe; + /** The user external ID associated with the message. */ + readonly userExternalReference?: InputMaybe; + /** The user ID associated with the message. */ + readonly userId?: InputMaybe; +}; + +export type OrderBulkCreateOrderLineInput = { + /** The date, when the order line was created. */ + readonly createdAt: Scalars["DateTime"]["input"]; + /** Gift card flag. */ + readonly isGiftCard: Scalars["Boolean"]["input"]; + /** Determines whether shipping of the order line items is required. */ + readonly isShippingRequired: Scalars["Boolean"]["input"]; + /** + * Metadata of the order line. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** + * Private metadata of the order line. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** The name of the product. */ + readonly productName?: InputMaybe; + /** + * The SKU of the product. + * + * Added in Saleor 3.18. + */ + readonly productSku?: InputMaybe; + /** Number of items in the order line */ + readonly quantity: Scalars["Int"]["input"]; + /** The ID of the tax class. */ + readonly taxClassId?: InputMaybe; + /** + * Metadata of the tax class. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly taxClassMetadata?: InputMaybe>; + /** The name of the tax class. */ + readonly taxClassName?: InputMaybe; + /** + * Private metadata of the tax class. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly taxClassPrivateMetadata?: InputMaybe>; + /** Tax rate of the order line. */ + readonly taxRate?: InputMaybe; + /** Price of the order line. */ + readonly totalPrice: TaxedMoneyInput; + /** Translation of the product name. */ + readonly translatedProductName?: InputMaybe; + /** Translation of the product variant name. */ + readonly translatedVariantName?: InputMaybe; + /** Price of the order line excluding applied discount. */ + readonly undiscountedTotalPrice: TaxedMoneyInput; + /** + * Reason of the discount on order line. + * + * Added in Saleor 3.19. + */ + readonly unitDiscountReason?: InputMaybe; + /** + * Type of the discount: fixed or percent + * + * Added in Saleor 3.19. + */ + readonly unitDiscountType?: InputMaybe; + /** + * Value of the discount. Can store fixed value or percent value + * + * Added in Saleor 3.19. + */ + readonly unitDiscountValue?: InputMaybe; + /** The external ID of the product variant. */ + readonly variantExternalReference?: InputMaybe; + /** The ID of the product variant. */ + readonly variantId?: InputMaybe; + /** The name of the product variant. */ + readonly variantName?: InputMaybe; + /** The SKU of the product variant. */ + readonly variantSku?: InputMaybe; + /** The ID of the warehouse, where the line will be allocated. */ + readonly warehouse: Scalars["ID"]["input"]; +}; + +export type OrderBulkCreateResult = { + /** List of errors occurred on create attempt. */ + readonly errors?: Maybe>; + /** Order data. */ + readonly order?: Maybe; +}; + +export type OrderBulkCreateUserInput = { + /** Customer email associated with the order. */ + readonly email?: InputMaybe; + /** Customer external ID associated with the order. */ + readonly externalReference?: InputMaybe; + /** Customer ID associated with the order. */ + readonly id?: InputMaybe; +}; + +/** Event sent when orders are imported. */ +export type OrderBulkCreated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The orders the event relates to. */ + readonly orders?: Maybe>; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Cancel an order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderCancel = { + readonly errors: ReadonlyArray; + /** Canceled order. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +/** Event sent when order is canceled. */ +export type OrderCancelled = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The order the event relates to. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Capture an order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderCapture = { + readonly errors: ReadonlyArray; + /** Captured order. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +/** + * 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` + */ +export type OrderChargeStatusEnum = "FULL" | "NONE" | "OVERCHARGED" | "PARTIAL"; + +/** Filter by charge status. */ +export type OrderChargeStatusEnumFilterInput = { + /** The value equal to. */ + readonly eq?: InputMaybe; + /** The value included in. */ + readonly oneOf?: InputMaybe>; +}; + +/** + * Confirms an unconfirmed order by changing status to unfulfilled. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderConfirm = { + readonly errors: ReadonlyArray; + /** Order which has been confirmed. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +/** Event sent when order is confirmed. */ +export type OrderConfirmed = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The order the event relates to. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type OrderCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type OrderCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: Order; +}; + +/** + * Create new order from existing checkout. Requires the following permissions: AUTHENTICATED_APP and HANDLE_CHECKOUTS. + * + * 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. + */ +export type OrderCreateFromCheckout = { + readonly errors: ReadonlyArray; + /** Placed order. */ + readonly order?: Maybe; +}; + +export type OrderCreateFromCheckoutError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** List of line Ids which cause the error. */ + readonly lines?: Maybe>; + /** The error message. */ + readonly message?: Maybe; + /** List of variant IDs which causes the error. */ + readonly variants?: Maybe>; +}; + +export type 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. */ +export type OrderCreated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The order the event relates to. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type OrderDirection = + /** Specifies an ascending sort order. */ + | "ASC" + /** Specifies a descending sort order. */ + | "DESC"; + +/** Contains all details related to the applied discount to the order. */ +export type OrderDiscount = Node & { + /** + * Returns amount of discount. + * @deprecated Use `total` instead. + */ + readonly amount: Money; + /** The ID of discount applied. */ + readonly id: Scalars["ID"]["output"]; + /** The name of applied discount. */ + readonly name?: Maybe; + /** + * Explanation for the applied discount. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly reason?: Maybe; + /** + * The amount of discount applied to the order. + * + * Added in Saleor 3.21. + */ + readonly total: Money; + /** Translated name of the applied discount. */ + readonly translatedName?: Maybe; + /** The type of applied discount: Sale, Voucher or Manual. */ + readonly type: OrderDiscountType; + /** Value of the discount. Can store fixed value or percent value */ + readonly value: Scalars["PositiveDecimal"]["output"]; + /** Type of the discount: fixed or percent */ + readonly valueType: DiscountValueTypeEnum; +}; + +/** + * Adds discount to the order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderDiscountAdd = { + readonly errors: ReadonlyArray; + /** Order which has been discounted. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +export type OrderDiscountCommonInput = { + /** Explanation for the applied discount. */ + readonly reason?: InputMaybe; + /** Value of the discount. Can store fixed value or percent value */ + readonly value: Scalars["PositiveDecimal"]["input"]; + /** Type of the discount: fixed or percent */ + readonly valueType: DiscountValueTypeEnum; +}; + +/** + * Remove discount from the order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderDiscountDelete = { + readonly errors: ReadonlyArray; + /** Order which has removed discount. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +export type OrderDiscountType = "MANUAL" | "ORDER_PROMOTION" | "PROMOTION" | "SALE" | "VOUCHER"; + +/** + * Update discount for the order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderDiscountUpdate = { + readonly errors: ReadonlyArray; + /** Order which has been discounted. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +export type OrderDraftFilterInput = { + readonly channels?: InputMaybe>; + readonly created?: InputMaybe; + readonly customer?: InputMaybe; + readonly metadata?: InputMaybe>; + readonly search?: InputMaybe; +}; + +export type OrderError = { + /** A type of address that causes the error. */ + readonly addressType?: Maybe; + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** List of order line IDs that cause the error. */ + readonly orderLines?: Maybe>; + /** List of product variants that are associated with the error */ + readonly variants?: Maybe>; + /** Warehouse ID which causes the error. */ + readonly warehouse?: Maybe; +}; + +export type 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" + | "MISSING_ADDRESS_DATA" + | "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. */ +export type OrderEvent = Node & { + /** Amount of money. */ + readonly amount?: Maybe; + /** App that performed the action. Requires of of the following permissions: MANAGE_APPS, MANAGE_ORDERS, OWNER. */ + readonly app?: Maybe; + /** Composed ID of the Fulfillment. */ + readonly composedId?: Maybe; + /** Date when event happened at in ISO 8601 format. */ + readonly date?: Maybe; + /** The discount applied to the order. */ + readonly discount?: Maybe; + /** Email of the customer. */ + readonly email?: Maybe; + /** Type of an email sent to the customer. */ + readonly emailType?: Maybe; + /** The lines fulfilled. */ + readonly fulfilledItems?: Maybe>; + /** ID of the event associated with an order. */ + readonly id: Scalars["ID"]["output"]; + /** Number of an invoice related to the order. */ + readonly invoiceNumber?: Maybe; + /** The concerned lines. */ + readonly lines?: Maybe>; + /** Content of the event. */ + readonly message?: Maybe; + /** User-friendly number of an order. */ + readonly orderNumber?: Maybe; + /** List of oversold lines names. */ + readonly oversoldItems?: Maybe>; + /** The payment gateway of the payment. */ + readonly paymentGateway?: Maybe; + /** The payment reference from the payment provider. */ + readonly paymentId?: Maybe; + /** Number of items. */ + readonly quantity?: Maybe; + /** The reference of payment's transaction. */ + readonly reference?: Maybe; + /** The order event which is related to this event. */ + readonly related?: Maybe; + /** The order which is related to this order. */ + readonly relatedOrder?: Maybe; + /** Define if shipping costs were included to the refund. */ + readonly shippingCostsIncluded?: Maybe; + /** The transaction reference of captured payment. */ + readonly transactionReference?: Maybe; + /** Order event type. */ + readonly type?: Maybe; + /** User who performed the action. */ + readonly user?: Maybe; + /** The warehouse were items were restocked. */ + readonly warehouse?: Maybe; +}; + +export type OrderEventCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type OrderEventCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: OrderEvent; +}; + +export type OrderEventDiscountObject = { + /** Returns amount of discount. */ + readonly amount?: Maybe; + /** Returns amount of discount. */ + readonly oldAmount?: Maybe; + /** Value of the discount. Can store fixed value or percent value. */ + readonly oldValue?: Maybe; + /** Type of the discount: fixed or percent. */ + readonly oldValueType?: Maybe; + /** Explanation for the applied discount. */ + readonly reason?: Maybe; + /** Value of the discount. Can store fixed value or percent value. */ + readonly value: Scalars["PositiveDecimal"]["output"]; + /** Type of the discount: fixed or percent. */ + readonly valueType: DiscountValueTypeEnum; +}; + +/** Filter input for order events data. */ +export type OrderEventFilterInput = { + /** Filter order events by date. */ + readonly date?: InputMaybe; + /** Filter order events by type. */ + readonly type?: InputMaybe; +}; + +export type OrderEventOrderLineObject = { + /** The discount applied to the order line. */ + readonly discount?: Maybe; + /** The variant name. */ + readonly itemName?: Maybe; + /** The order line. */ + readonly orderLine?: Maybe; + /** The variant quantity. */ + readonly quantity?: Maybe; +}; + +export type OrderEventTypeEnumFilterInput = { + /** The value equal to. */ + readonly eq?: InputMaybe; + /** The value included in. */ + readonly oneOf?: InputMaybe>; +}; + +export type OrderEventsEmailsEnum = + | "CONFIRMED" + | "DIGITAL_LINKS" + | "FULFILLMENT_CONFIRMATION" + | "ORDER_CANCEL" + | "ORDER_CONFIRMATION" + | "ORDER_REFUND" + | "PAYMENT_CONFIRMATION" + | "SHIPPING_CONFIRMATION" + | "TRACKING_UPDATED"; + +/** The different order event types. */ +export type 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. */ +export type OrderExpired = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The order the event relates to. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type OrderFilterInput = { + readonly authorizeStatus?: InputMaybe>; + readonly channels?: InputMaybe>; + readonly chargeStatus?: InputMaybe>; + readonly checkoutIds?: InputMaybe>; + readonly checkoutTokens?: InputMaybe>; + readonly created?: InputMaybe; + readonly customer?: InputMaybe; + readonly giftCardBought?: InputMaybe; + readonly giftCardUsed?: InputMaybe; + readonly ids?: InputMaybe>; + readonly isClickAndCollect?: InputMaybe; + readonly isPreorder?: InputMaybe; + readonly metadata?: InputMaybe>; + readonly numbers?: InputMaybe>; + readonly paymentStatus?: InputMaybe>; + readonly search?: InputMaybe; + readonly status?: InputMaybe>; + readonly updatedAt?: InputMaybe; +}; + +/** Filter shipping methods for order. */ +export type OrderFilterShippingMethods = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The order the event relates to. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Shipping methods that can be used with this checkout. */ + readonly shippingMethods?: Maybe>; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * 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. + */ +export type OrderFulfill = { + readonly errors: ReadonlyArray; + /** List of created fulfillments. */ + readonly fulfillments?: Maybe>; + /** Fulfilled order. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +export type OrderFulfillInput = { + /** If true, then allow proceed fulfillment when stock is exceeded. */ + readonly allowStockToBeExceeded?: InputMaybe; + /** List of items informing how to fulfill the order. */ + readonly lines: ReadonlyArray; + /** If true, send an email notification to the customer. */ + readonly notifyCustomer?: InputMaybe; + /** Fulfillment tracking number. */ + readonly trackingNumber?: InputMaybe; +}; + +export type OrderFulfillLineInput = { + /** The ID of the order line. */ + readonly orderLineId?: InputMaybe; + /** List of stock items to create. */ + readonly stocks: ReadonlyArray; +}; + +export type OrderFulfillStockInput = { + /** The number of line items to be fulfilled from given warehouse. */ + readonly quantity: Scalars["Int"]["input"]; + /** ID of the warehouse from which the item will be fulfilled. */ + readonly warehouse: Scalars["ID"]["input"]; +}; + +/** Event sent when order is fulfilled. */ +export type OrderFulfilled = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The order the event relates to. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when order is fully paid. */ +export type OrderFullyPaid = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The order the event relates to. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** The order is fully refunded. */ +export type OrderFullyRefunded = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The order the event relates to. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Adds granted refund to the order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderGrantRefundCreate = { + readonly errors: ReadonlyArray; + /** Created granted refund. */ + readonly grantedRefund?: Maybe; + /** Order which has assigned new grant refund. */ + readonly order?: Maybe; +}; + +export type OrderGrantRefundCreateError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** List of lines which cause the error. */ + readonly lines?: Maybe>; + /** The error message. */ + readonly message?: Maybe; +}; + +export type OrderGrantRefundCreateErrorCode = + | "AMOUNT_GREATER_THAN_AVAILABLE" + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND" + | "REQUIRED" + | "SHIPPING_COSTS_ALREADY_GRANTED"; + +export type OrderGrantRefundCreateInput = { + /** Amount of the granted refund. If not provided, the amount will be calculated automatically based on provided `lines` and `grantRefundForShipping`. */ + readonly amount?: InputMaybe; + /** Determine if granted refund should include shipping costs. */ + readonly grantRefundForShipping?: InputMaybe; + /** Lines to assign to granted refund. */ + readonly lines?: InputMaybe>; + /** Reason of the granted refund. */ + readonly reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason. + * + * Added in Saleor 3.22. + */ + readonly reasonReference?: InputMaybe; + /** + * 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 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. + */ + readonly transactionId: Scalars["ID"]["input"]; +}; + +export type OrderGrantRefundCreateLineError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The ID of the line related to the error. */ + readonly lineId: Scalars["ID"]["output"]; + /** The error message. */ + readonly message?: Maybe; +}; + +export type OrderGrantRefundCreateLineErrorCode = + | "GRAPHQL_ERROR" + | "NOT_FOUND" + | "QUANTITY_GREATER_THAN_AVAILABLE"; + +export type OrderGrantRefundCreateLineInput = { + /** The ID of the order line. */ + readonly id: Scalars["ID"]["input"]; + /** The quantity of line items to be marked to refund. */ + readonly quantity: Scalars["Int"]["input"]; + /** Reason of the granted refund for the line. */ + readonly reason?: InputMaybe; +}; + +/** + * Updates granted refund. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderGrantRefundUpdate = { + readonly errors: ReadonlyArray; + /** Created granted refund. */ + readonly grantedRefund?: Maybe; + /** Order which has assigned updated grant refund. */ + readonly order?: Maybe; +}; + +export type OrderGrantRefundUpdateError = { + /** List of lines to add which cause the error. */ + readonly addLines?: Maybe>; + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** List of lines to remove which cause the error. */ + readonly removeLines?: Maybe>; +}; + +export type OrderGrantRefundUpdateErrorCode = + | "AMOUNT_GREATER_THAN_AVAILABLE" + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND" + | "REQUIRED" + | "SHIPPING_COSTS_ALREADY_GRANTED"; + +export type OrderGrantRefundUpdateInput = { + /** Lines to assign to granted refund. */ + readonly addLines?: InputMaybe>; + /** Amount of the granted refund. if not provided and `addLines` or `removeLines` or `grantRefundForShipping` is provided, amount will be calculated automatically. */ + readonly amount?: InputMaybe; + /** Determine if granted refund should include shipping costs. */ + readonly grantRefundForShipping?: InputMaybe; + /** Reason of the granted refund. */ + readonly reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason. + * + * Added in Saleor 3.22. + */ + readonly reasonReference?: InputMaybe; + /** Lines to remove from granted refund. */ + readonly removeLines?: InputMaybe>; + /** + * 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. + */ + readonly transactionId?: InputMaybe; +}; + +export type OrderGrantRefundUpdateLineAddInput = { + /** The ID of the order line. */ + readonly id: Scalars["ID"]["input"]; + /** The quantity of line items to be marked to refund. */ + readonly quantity: Scalars["Int"]["input"]; + /** Reason of the granted refund for the line. */ + readonly reason?: InputMaybe; +}; + +export type OrderGrantRefundUpdateLineError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The ID of the line related to the error. */ + readonly lineId: Scalars["ID"]["output"]; + /** The error message. */ + readonly message?: Maybe; +}; + +export type OrderGrantRefundUpdateLineErrorCode = + | "GRAPHQL_ERROR" + | "NOT_FOUND" + | "QUANTITY_GREATER_THAN_AVAILABLE"; + +/** The details of granted refund. */ +export type OrderGrantedRefund = { + /** Refund amount. */ + readonly amount: Money; + /** App that performed the action. */ + readonly app?: Maybe; + /** Time of creation. */ + readonly createdAt: Scalars["DateTime"]["output"]; + readonly id: Scalars["ID"]["output"]; + /** Lines assigned to the granted refund. */ + readonly lines?: Maybe>; + /** + * Reason of the refund. + * + * Added in Saleor 3.22. + */ + readonly reason?: Maybe; + /** + * Reason Model (Page) reference for refund. + * + * Added in Saleor 3.22. + */ + readonly reasonReference?: Maybe; + /** If true, the refunded amount includes the shipping price.If false, the refunded amount does not include the shipping price. */ + readonly shippingCostsIncluded: Scalars["Boolean"]["output"]; + /** + * Status of the granted refund calculated based on transactionItem assigned to granted refund. + * + * Added in Saleor 3.20. + */ + readonly status: OrderGrantedRefundStatusEnum; + /** + * The transaction assigned to the granted refund. + * + * Added in Saleor 3.20. + */ + readonly transaction?: Maybe; + /** + * List of refund events associated with the granted refund. + * + * Added in Saleor 3.20. + */ + readonly transactionEvents?: Maybe>; + /** Time of last update. */ + readonly updatedAt: Scalars["DateTime"]["output"]; + /** User who performed the action. Requires of of the following permissions: MANAGE_USERS, MANAGE_STAFF, OWNER. */ + readonly user?: Maybe; +}; + +/** Represents granted refund line. */ +export type OrderGrantedRefundLine = { + readonly id: Scalars["ID"]["output"]; + /** Line of the order associated with this granted refund. */ + readonly orderLine: OrderLine; + /** Number of items to refund. */ + readonly quantity: Scalars["Int"]["output"]; + /** Reason for refunding the line. */ + readonly reason?: Maybe; +}; + +/** + * 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 + */ +export type OrderGrantedRefundStatusEnum = "FAILURE" | "NONE" | "PENDING" | "SUCCESS"; + +/** Represents order line of particular order. */ +export type OrderLine = Node & + ObjectWithMetadata & { + /** + * List of allocations across warehouses. + * + * Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS. + */ + readonly allocations?: Maybe>; + /** + * List of applied discounts + * + * Added in Saleor 3.21. + */ + readonly discounts?: Maybe>; + /** ID of the order line. */ + readonly id: Scalars["ID"]["output"]; + /** + * 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. + */ + readonly isGift?: Maybe; + /** Returns True, if the line unit price was overridden. */ + readonly isPriceOverridden?: Maybe; + /** Whether the product variant requires shipping. */ + readonly isShippingRequired: Scalars["Boolean"]["output"]; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** Name of the product in order line. */ + readonly productName: Scalars["String"]["output"]; + /** SKU of the product variant. */ + readonly productSku?: Maybe; + /** The ID of the product variant. */ + readonly productVariantId?: Maybe; + /** Number of variant items ordered. */ + readonly quantity: Scalars["Int"]["output"]; + /** Number of variant items fulfilled. */ + readonly quantityFulfilled: Scalars["Int"]["output"]; + /** A quantity of items remaining to be fulfilled. */ + readonly quantityToFulfill: Scalars["Int"]["output"]; + /** Denormalized sale ID, set when order line is created for a product variant that is on sale. */ + readonly saleId?: Maybe; + /** + * Denormalized tax class of the product in this order line. + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. + */ + readonly taxClass?: Maybe; + /** Denormalized public metadata of the tax class. */ + readonly taxClassMetadata: ReadonlyArray; + /** Denormalized name of the tax class. */ + readonly taxClassName?: Maybe; + /** Denormalized private metadata of the tax class. Requires staff permissions to access. */ + readonly taxClassPrivateMetadata: ReadonlyArray; + /** Rate of tax applied on product variant. */ + readonly taxRate: Scalars["Float"]["output"]; + readonly thumbnail?: Maybe; + /** Price of the order line. */ + readonly totalPrice: TaxedMoney; + /** Product name in the customer's language */ + readonly translatedProductName: Scalars["String"]["output"]; + /** Variant name in the customer's language */ + readonly translatedVariantName: Scalars["String"]["output"]; + /** Price of the order line without discounts. */ + readonly undiscountedTotalPrice: TaxedMoney; + /** Price of the single item in the order line without any discount applied. */ + readonly 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. */ + readonly 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. */ + readonly unitDiscountReason?: Maybe; + /** 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`. */ + readonly unitDiscountType?: Maybe; + /** 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. */ + readonly unitDiscountValue: Scalars["PositiveDecimal"]["output"]; + /** Price of the single item in the order line with all the line-level discounts and order-level discount portions applied. */ + readonly 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. */ + readonly variant?: Maybe; + /** Name of the variant of product in order line. */ + readonly variantName: Scalars["String"]["output"]; + /** Voucher code that was used for this order line. */ + readonly voucherCode?: Maybe; + }; + +/** Represents order line of particular order. */ +export type OrderLineMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents order line of particular order. */ +export type OrderLineMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents order line of particular order. */ +export type OrderLinePrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents order line of particular order. */ +export type OrderLinePrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents order line of particular order. */ +export type OrderLineThumbnailArgs = { + format?: InputMaybe; + size?: InputMaybe; +}; + +export type OrderLineCreateInput = { + /** Flag that allow force splitting the same variant into multiple lines by skipping the matching logic. */ + readonly forceNewLine?: InputMaybe; + /** Custom price of the item.When the line with the same variant will be provided multiple times, the last price will be used. */ + readonly price?: InputMaybe; + /** Number of variant items ordered. */ + readonly quantity: Scalars["Int"]["input"]; + /** Product variant ID. */ + readonly variantId: Scalars["ID"]["input"]; +}; + +/** + * Deletes an order line from an order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderLineDelete = { + readonly errors: ReadonlyArray; + /** A related order. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; + /** An order line that was deleted. */ + readonly orderLine?: Maybe; +}; + +/** Represent the discount applied to order line. */ +export type OrderLineDiscount = { + /** The ID of discount applied. */ + readonly id: Scalars["ID"]["output"]; + /** The name of applied discount. */ + readonly name?: Maybe; + /** + * Explanation for the applied discount. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly reason?: Maybe; + /** The discount amount applied to the line item. */ + readonly total: Money; + /** Translated name of the applied discount. */ + readonly translatedName?: Maybe; + /** The type of applied discount: Sale, Voucher or Manual. */ + readonly type: OrderDiscountType; + /** The discount amount applied to the single line unit. */ + readonly unit: Money; + /** Value of the discount. Can store fixed value or percent value */ + readonly value: Scalars["PositiveDecimal"]["output"]; + /** Type of the discount: fixed or percent */ + readonly valueType: DiscountValueTypeEnum; +}; + +/** + * Remove discount applied to the order line. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderLineDiscountRemove = { + readonly errors: ReadonlyArray; + /** Order which is related to line which has removed discount. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; + /** Order line which has removed discount. */ + readonly orderLine?: Maybe; +}; + +/** + * Update discount for the order line. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderLineDiscountUpdate = { + readonly errors: ReadonlyArray; + /** Order which is related to the discounted line. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; + /** Order line which has been discounted. */ + readonly orderLine?: Maybe; +}; + +export type OrderLineInput = { + /** Number of variant items ordered. */ + readonly quantity: Scalars["Int"]["input"]; +}; + +/** + * Updates an order line of an order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderLineUpdate = { + readonly errors: ReadonlyArray; + /** Related order. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; + readonly orderLine?: Maybe; +}; + +/** + * Creates order lines for an order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderLinesCreate = { + readonly errors: ReadonlyArray; + /** Related order. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; + /** List of added order lines. */ + readonly orderLines?: Maybe>; +}; + +/** + * Mark order as manually paid. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderMarkAsPaid = { + readonly errors: ReadonlyArray; + /** Order marked as paid. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +/** Event sent when order metadata is updated. */ +export type OrderMetadataUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The order the event relates to. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Adds note to the order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderNoteAdd = { + readonly errors: ReadonlyArray; + /** Order note created. */ + readonly event?: Maybe; + /** Order with the note added. */ + readonly order?: Maybe; +}; + +export type OrderNoteAddError = { + /** The error code. */ + readonly code?: Maybe; + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type OrderNoteAddErrorCode = "GRAPHQL_ERROR" | "REQUIRED"; + +export type OrderNoteInput = { + /** Note message. */ + readonly message: Scalars["String"]["input"]; +}; + +/** + * Updates note of an order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderNoteUpdate = { + readonly errors: ReadonlyArray; + /** Order note updated. */ + readonly event?: Maybe; + /** Order with the note updated. */ + readonly order?: Maybe; +}; + +export type OrderNoteUpdateError = { + /** The error code. */ + readonly code?: Maybe; + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type OrderNoteUpdateErrorCode = "GRAPHQL_ERROR" | "NOT_FOUND" | "REQUIRED"; + +export type OrderOrCheckout = Checkout | Order; + +export type OrderOriginEnum = "BULK_CREATE" | "CHECKOUT" | "DRAFT" | "REISSUE"; + +/** Payment has been made. The order may be partially or fully paid. */ +export type OrderPaid = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The order the event relates to. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type OrderPredicateInput = { + /** List of conditions that must be met. */ + readonly AND?: InputMaybe>; + /** A list of conditions of which at least one must be met. */ + readonly OR?: InputMaybe>; + /** Defines the conditions related to checkout and order objects. */ + readonly discountedObjectPredicate?: InputMaybe; +}; + +/** + * Refund an order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderRefund = { + readonly errors: ReadonlyArray; + /** A refunded order. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +export type OrderRefundFulfillmentLineInput = { + /** The ID of the fulfillment line to refund. */ + readonly fulfillmentLineId: Scalars["ID"]["input"]; + /** The number of items to be refunded. */ + readonly quantity: Scalars["Int"]["input"]; +}; + +export type OrderRefundLineInput = { + /** The ID of the order line to refund. */ + readonly orderLineId: Scalars["ID"]["input"]; + /** The number of items to be refunded. */ + readonly quantity: Scalars["Int"]["input"]; +}; + +export type OrderRefundProductsInput = { + /** The total amount of refund when the value is provided manually. */ + readonly amountToRefund?: InputMaybe; + /** List of fulfilled lines to refund. */ + readonly fulfillmentLines?: InputMaybe>; + /** If true, Saleor will refund shipping costs. If amountToRefund is providedincludeShippingCosts will be ignored. */ + readonly includeShippingCosts?: InputMaybe; + /** List of unfulfilled lines to refund. */ + readonly orderLines?: InputMaybe>; +}; + +/** The order received a refund. The order may be partially or fully refunded. */ +export type OrderRefunded = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The order the event relates to. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type OrderReturnFulfillmentLineInput = { + /** The ID of the fulfillment line to return. */ + readonly fulfillmentLineId: Scalars["ID"]["input"]; + /** The number of items to be returned. */ + readonly quantity: Scalars["Int"]["input"]; + /** Determines, if the line should be added to replace order. */ + readonly replace?: InputMaybe; +}; + +export type OrderReturnLineInput = { + /** The ID of the order line to return. */ + readonly orderLineId: Scalars["ID"]["input"]; + /** The number of items to be returned. */ + readonly quantity: Scalars["Int"]["input"]; + /** Determines, if the line should be added to replace order. */ + readonly replace?: InputMaybe; +}; + +export type OrderReturnProductsInput = { + /** The total amount of refund when the value is provided manually. */ + readonly amountToRefund?: InputMaybe; + /** List of fulfilled lines to return. */ + readonly fulfillmentLines?: InputMaybe>; + /** If true, Saleor will refund shipping costs. If amountToRefund is providedincludeShippingCosts will be ignored. */ + readonly includeShippingCosts?: InputMaybe; + /** List of unfulfilled lines to return. */ + readonly orderLines?: InputMaybe>; + /** If true, Saleor will call refund action for all lines. */ + readonly refund?: InputMaybe; +}; + +/** Represents the channel-specific order settings. */ +export type OrderSettings = { + /** Determine if it is possible to place unpaid order by calling `checkoutComplete` mutation. */ + readonly allowUnpaidOrders: Scalars["Boolean"]["output"]; + /** When disabled, all new orders from checkout will be marked as unconfirmed. When enabled orders from checkout will become unfulfilled immediately. */ + readonly automaticallyConfirmAllNewOrders: Scalars["Boolean"]["output"]; + /** When enabled, all non-shippable gift card orders will be fulfilled automatically. */ + readonly automaticallyFulfillNonShippableGiftCard: Scalars["Boolean"]["output"]; + /** The time in days after expired orders will be deleted. */ + readonly deleteExpiredOrdersAfter: Scalars["Day"]["output"]; + /** + * Time in hours after which the draft order line price will be refreshed. + * + * Added in Saleor 3.21. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + readonly draftOrderLinePriceFreezePeriod?: Maybe; + /** Expiration time in minutes. Default null - means do not expire any orders. */ + readonly expireOrdersAfter?: Maybe; + /** + * 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. + */ + readonly includeDraftOrderInVoucherUsage: Scalars["Boolean"]["output"]; + /** + * 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. + */ + readonly markAsPaidStrategy: MarkAsPaidStrategyEnum; + /** + * This flag only affects orders created from checkout and applies specifically to vouchers of the types: `SPECIFIC_PRODUCT` and `ENTIRE_ORDER` with `applyOncePerOrder` enabled. + * - When legacy propagation is enabled, discounts from these vouchers are represented as `OrderDiscount` objects, attached to the order and returned in the `Order.discounts` field. Additionally, percentage-based vouchers are converted to fixed-value discounts. + * - When legacy propagation is disabled, discounts are represented as `OrderLineDiscount` objects, attached to individual lines and returned in the `OrderLine.discounts` field. In this case, percentage-based vouchers retain their original type. + * In future releases, `OrderLineDiscount` will become the default behavior, and this flag will be deprecated and removed. + * + * Added in Saleor 3.21. + */ + readonly useLegacyLineDiscountPropagation: Scalars["Boolean"]["output"]; +}; + +export type OrderSettingsError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type OrderSettingsErrorCode = "INVALID"; + +export type OrderSettingsInput = { + /** Determine if it is possible to place unpaid order by calling `checkoutComplete` mutation. */ + readonly allowUnpaidOrders?: InputMaybe; + /** 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 */ + readonly automaticallyConfirmAllNewOrders?: InputMaybe; + /** When enabled, all non-shippable gift card orders will be fulfilled automatically. By default set to True. */ + readonly automaticallyFulfillNonShippableGiftCard?: InputMaybe; + /** The time in days after expired orders will be deleted.Allowed range is from 1 to 120. */ + readonly deleteExpiredOrdersAfter?: InputMaybe; + /** + * Time in hours after which the draft order line price will be refreshed. Default value is 24 hours. Enter 0 or null to disable. + * + * Added in Saleor 3.21. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + readonly draftOrderLinePriceFreezePeriod?: InputMaybe; + /** Expiration time in minutes. Default null - means do not expire any orders. Enter 0 or null to disable. */ + readonly expireOrdersAfter?: InputMaybe; + /** + * 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. + */ + readonly includeDraftOrderInVoucherUsage?: InputMaybe; + /** + * 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. + */ + readonly markAsPaidStrategy?: InputMaybe; + /** + * This flag only affects orders created from checkout and applies specifically to vouchers of the types: `SPECIFIC_PRODUCT` and `ENTIRE_ORDER` with `applyOncePerOrder` enabled. + * - When legacy propagation is enabled, discounts from these vouchers are represented as `OrderDiscount` objects, attached to the order and returned in the `Order.discounts` field. Additionally, percentage-based vouchers are converted to fixed-value discounts. + * - When legacy propagation is disabled, discounts are represented as `OrderLineDiscount` objects, attached to individual lines and returned in the `OrderLine.discounts` field. In this case, percentage-based vouchers retain their original type. + * In future releases, `OrderLineDiscount` will become the default behavior, and this flag will be deprecated and removed. + * + * Added in Saleor 3.21. + */ + readonly useLegacyLineDiscountPropagation?: InputMaybe; +}; + +/** + * Update shop order settings across all channels. Returns `orderSettings` for the first `channel` in alphabetical order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderSettingsUpdate = { + readonly errors: ReadonlyArray; + /** Order settings. */ + readonly orderSettings?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderSettingsErrors: ReadonlyArray; +}; + +export type 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 */ + readonly automaticallyConfirmAllNewOrders?: InputMaybe; + /** When enabled, all non-shippable gift card orders will be fulfilled automatically. By default set to True. */ + readonly automaticallyFulfillNonShippableGiftCard?: InputMaybe; +}; + +export type OrderSortField = + /** Sort orders by creation date. */ + | "CREATED_AT" + /** Sort orders by creation date */ + | "CREATION_DATE" + /** Sort orders by customer. */ + | "CUSTOMER" + /** Sort orders by fulfillment status. */ + | "FULFILLMENT_STATUS" + /** Sort orders by last modified date. */ + | "LAST_MODIFIED_AT" + /** Sort orders by number. */ + | "NUMBER" + /** Sort orders by payment status. */ + | "PAYMENT" + /** Sort orders by rank. Note: This option is available only with the `search` filter. */ + | "RANK" + /** + * Sort orders by order status. + * + * Added in Saleor 3.22. + */ + | "STATUS"; + +export type OrderSortingInput = { + /** Specifies the direction in which to sort orders. */ + readonly direction: OrderDirection; + /** Sort orders by the selected field. */ + readonly field: OrderSortField; +}; + +export type OrderStatus = + | "CANCELED" + | "DRAFT" + | "EXPIRED" + | "FULFILLED" + | "PARTIALLY_FULFILLED" + | "PARTIALLY_RETURNED" + | "RETURNED" + | "UNCONFIRMED" + | "UNFULFILLED"; + +/** Filter by order status. */ +export type OrderStatusEnumFilterInput = { + /** The value equal to. */ + readonly eq?: InputMaybe; + /** The value included in. */ + readonly oneOf?: InputMaybe>; +}; + +export type OrderStatusFilter = + | "CANCELED" + | "FULFILLED" + | "PARTIALLY_FULFILLED" + | "READY_TO_CAPTURE" + | "READY_TO_FULFILL" + | "UNCONFIRMED" + | "UNFULFILLED"; + +/** + * Updates an order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderUpdate = { + readonly errors: ReadonlyArray; + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +export type OrderUpdateInput = { + /** Billing address of the customer. */ + readonly billingAddress?: InputMaybe; + /** External ID of this order. */ + readonly externalReference?: InputMaybe; + /** + * Order language code. + * + * Added in Saleor 3.21. + */ + readonly languageCode?: InputMaybe; + /** + * Order public metadata. + * + * Added in Saleor 3.21.Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** + * Order private metadata. + * + * Added in Saleor 3.21.Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** Shipping address of the customer. */ + readonly shippingAddress?: InputMaybe; + /** Email address of the customer. */ + readonly userEmail?: InputMaybe; +}; + +/** + * 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. + */ +export type OrderUpdateShipping = { + readonly errors: ReadonlyArray; + /** Order with updated shipping method. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +export type OrderUpdateShippingInput = { + /** ID of the selected shipping method, pass null to remove currently assigned shipping method. */ + readonly shippingMethod?: InputMaybe; +}; + +/** Event sent when order is updated. */ +export type OrderUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The order the event relates to. */ + readonly order?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Void an order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type OrderVoid = { + readonly errors: ReadonlyArray; + /** A voided order. */ + readonly order?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly orderErrors: ReadonlyArray; +}; + +export type OrderWhereInput = { + /** List of conditions that must be met. */ + readonly AND?: InputMaybe>; + /** A list of conditions of which at least one must be met. */ + readonly OR?: InputMaybe>; + /** Filter by authorize status. */ + readonly authorizeStatus?: InputMaybe; + /** Filter by billing address of the order. */ + readonly billingAddress?: InputMaybe; + /** Filter by channel. */ + readonly channelId?: InputMaybe; + /** Filter by charge status. */ + readonly chargeStatus?: InputMaybe; + /** Filter by checkout id. */ + readonly checkoutId?: InputMaybe; + /** Filter by checkout token. */ + readonly checkoutToken?: InputMaybe; + /** Filter order by created at date. */ + readonly createdAt?: InputMaybe; + /** Filter by order events. Each list item represents conditions that must be satisfied by a single object. The filter matches orders that have related objects meeting all specified groups of conditions. */ + readonly events?: InputMaybe>; + /** Filter by fulfillment data associated with the order. Each list item represents conditions that must be satisfied by a single object. The filter matches orders that have related objects meeting all specified groups of conditions. */ + readonly fulfillments?: InputMaybe>; + /** Filter by whether the order has any fulfillments. */ + readonly hasFulfillments?: InputMaybe; + /** Filter by whether the order has any invoices. */ + readonly hasInvoices?: InputMaybe; + readonly ids?: InputMaybe>; + /** Filter by invoice data associated with the order. Each list item represents conditions that must be satisfied by a single object. The filter matches orders that have related objects meeting all specified groups of conditions. */ + readonly invoices?: InputMaybe>; + /** Filter by whether the order uses the click and collect delivery method. */ + readonly isClickAndCollect?: InputMaybe; + /** Filter based on whether the order includes a gift card purchase. */ + readonly isGiftCardBought?: InputMaybe; + /** Filter based on whether a gift card was used in the order. */ + readonly isGiftCardUsed?: InputMaybe; + /** Filter by line items associated with the order. Each list item represents conditions that must be satisfied by a single object. The filter matches orders that have related objects meeting all specified groups of conditions. */ + readonly lines?: InputMaybe>; + /** Filter by number of lines in the order. */ + readonly linesCount?: InputMaybe; + /** Filter by metadata fields. */ + readonly metadata?: InputMaybe; + /** Filter by order number. */ + readonly number?: InputMaybe; + /** Filter by the product type of related order lines. */ + readonly productTypeId?: InputMaybe; + /** Filter by shipping address of the order. */ + readonly shippingAddress?: InputMaybe; + /** Filter by order status. */ + readonly status?: InputMaybe; + /** Filter by total gross amount of the order. */ + readonly totalGross?: InputMaybe; + /** Filter by total net amount of the order. */ + readonly totalNet?: InputMaybe; + /** Filter by transaction data associated with the order. Each list item represents conditions that must be satisfied by a single object. The filter matches orders that have related objects meeting all specified groups of conditions. */ + readonly transactions?: InputMaybe>; + /** Filter order by updated at date. */ + readonly updatedAt?: InputMaybe; + /** Filter by user. */ + readonly user?: InputMaybe; + /** Filter by user email. */ + readonly userEmail?: InputMaybe; + /** Filter by voucher code used in the order. */ + readonly voucherCode?: InputMaybe; +}; + +/** + * Represents a payment method used for a transaction. + * + * Added in Saleor 3.22. + */ +export type OtherPaymentMethodDetails = PaymentMethodDetails & { + /** Name of the payment method. */ + readonly name: Scalars["String"]["output"]; +}; + +export type OtherPaymentMethodDetailsInput = { + /** Name of the payment method used for the transaction. */ + readonly name: Scalars["String"]["input"]; +}; + +/** A static page that can be manually added by a shop operator through the dashboard. */ +export type Page = Node & + ObjectWithAttributes & + ObjectWithMetadata & { + /** + * Get a single attribute attached to page by attribute slug. + * + * Added in Saleor 3.22. + */ + readonly assignedAttribute?: Maybe; + /** + * List of attributes assigned to this page. + * + * Added in Saleor 3.22. + */ + readonly assignedAttributes: ReadonlyArray; + /** + * Get a single attribute attached to page by attribute slug. + * @deprecated Use `assignedAttribute` field instead. + */ + readonly attribute?: Maybe; + /** + * List of attributes assigned to this page. + * @deprecated Use `assignedAttributes` field instead. + */ + readonly attributes: ReadonlyArray; + /** + * Content of the page. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly content?: Maybe; + /** + * Content of the page. + * + * Rich text format. For reference see https://editorjs.io/ + * @deprecated Use the `content` field instead. + */ + readonly contentJson: Scalars["JSONString"]["output"]; + /** Date and time at which page was created. */ + readonly created: Scalars["DateTime"]["output"]; + /** ID of the page. */ + readonly id: Scalars["ID"]["output"]; + /** Determines if the page is published. */ + readonly isPublished: Scalars["Boolean"]["output"]; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** Determines the type of page */ + readonly pageType: PageType; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** @deprecated Use the `publishedAt` field to fetch the publication date. */ + readonly publicationDate?: Maybe; + /** The page publication date. */ + readonly publishedAt?: Maybe; + /** Description of the page for SEO. */ + readonly seoDescription?: Maybe; + /** Title of the page for SEO. */ + readonly seoTitle?: Maybe; + /** Slug of the page. */ + readonly slug: Scalars["String"]["output"]; + /** Title of the page. */ + readonly title: Scalars["String"]["output"]; + /** Returns translated page fields for the given language code. */ + readonly translation?: Maybe; + }; + +/** A static page that can be manually added by a shop operator through the dashboard. */ +export type PageAssignedAttributeArgs = { + slug: Scalars["String"]["input"]; +}; + +/** A static page that can be manually added by a shop operator through the dashboard. */ +export type PageAssignedAttributesArgs = { + limit?: InputMaybe; +}; + +/** A static page that can be manually added by a shop operator through the dashboard. */ +export type PageAttributeArgs = { + slug: Scalars["String"]["input"]; +}; + +/** A static page that can be manually added by a shop operator through the dashboard. */ +export type PageMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** A static page that can be manually added by a shop operator through the dashboard. */ +export type PageMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** A static page that can be manually added by a shop operator through the dashboard. */ +export type PagePrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** A static page that can be manually added by a shop operator through the dashboard. */ +export type PagePrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** A static page that can be manually added by a shop operator through the dashboard. */ +export type PageTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * Assign attributes to a given page type. + * + * Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. + */ +export type PageAttributeAssign = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly pageErrors: ReadonlyArray; + /** The updated page type. */ + readonly pageType?: Maybe; +}; + +/** + * Unassign attributes from a given page type. + * + * Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. + */ +export type PageAttributeUnassign = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly pageErrors: ReadonlyArray; + /** The updated page type. */ + readonly pageType?: Maybe; +}; + +/** + * Deletes pages. + * + * Requires one of the following permissions: MANAGE_PAGES. + */ +export type PageBulkDelete = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly pageErrors: ReadonlyArray; +}; + +/** + * Publish pages. + * + * Requires one of the following permissions: MANAGE_PAGES. + */ +export type PageBulkPublish = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly pageErrors: ReadonlyArray; +}; + +export type PageCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type PageCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: Page; +}; + +/** + * Creates a new page. + * + * Requires one of the following permissions: MANAGE_PAGES. + */ +export type PageCreate = { + readonly errors: ReadonlyArray; + readonly page?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly pageErrors: ReadonlyArray; +}; + +export type PageCreateInput = { + /** List of attributes. */ + readonly attributes?: InputMaybe>; + /** + * Page content. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly content?: InputMaybe; + /** Determines if page is visible in the storefront. */ + readonly isPublished?: InputMaybe; + /** ID of the page type that page belongs to. */ + readonly pageType: Scalars["ID"]["input"]; + /** + * Publication date. ISO 8601 standard. + * @deprecated Use `publishedAt` field instead. + */ + readonly publicationDate?: InputMaybe; + /** Publication date time. ISO 8601 standard. */ + readonly publishedAt?: InputMaybe; + /** Search engine optimization fields. */ + readonly seo?: InputMaybe; + /** Page internal name. */ + readonly slug?: InputMaybe; + /** Page title. */ + readonly title?: InputMaybe; +}; + +/** Event sent when new page is created. */ +export type PageCreated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The page the event relates to. */ + readonly page?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Deletes a page. + * + * Requires one of the following permissions: MANAGE_PAGES. + */ +export type PageDelete = { + readonly errors: ReadonlyArray; + readonly page?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly pageErrors: ReadonlyArray; +}; + +/** Event sent when page is deleted. */ +export type PageDeleted = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The page the event relates to. */ + readonly page?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type PageError = { + /** List of attributes IDs which causes the error. */ + readonly attributes?: Maybe>; + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** List of attribute values IDs which causes the error. */ + readonly values?: Maybe>; +}; + +export type PageErrorCode = + | "ATTRIBUTE_ALREADY_ASSIGNED" + | "DUPLICATED_INPUT_ITEM" + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND" + | "REQUIRED" + | "UNIQUE"; + +export type PageFilterInput = { + readonly ids?: InputMaybe>; + readonly metadata?: InputMaybe>; + readonly pageTypes?: InputMaybe>; + readonly search?: InputMaybe; + readonly slugs?: InputMaybe>; +}; + +/** The Relay compliant `PageInfo` type, containing data necessary to paginate this connection. */ +export type PageInfo = { + /** When paginating forwards, the cursor to continue. */ + readonly endCursor?: Maybe; + /** When paginating forwards, are there more items? */ + readonly hasNextPage: Scalars["Boolean"]["output"]; + /** When paginating backwards, are there more items? */ + readonly hasPreviousPage: Scalars["Boolean"]["output"]; + /** When paginating backwards, the cursor to continue. */ + readonly startCursor?: Maybe; +}; + +export type PageInput = { + /** List of attributes. */ + readonly attributes?: InputMaybe>; + /** + * Page content. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly content?: InputMaybe; + /** Determines if page is visible in the storefront. */ + readonly isPublished?: InputMaybe; + /** + * Publication date. ISO 8601 standard. + * @deprecated Use `publishedAt` field instead. + */ + readonly publicationDate?: InputMaybe; + /** Publication date time. ISO 8601 standard. */ + readonly publishedAt?: InputMaybe; + /** Search engine optimization fields. */ + readonly seo?: InputMaybe; + /** Page internal name. */ + readonly slug?: InputMaybe; + /** Page title. */ + readonly title?: InputMaybe; +}; + +/** + * Reorder page attribute values. + * + * Requires one of the following permissions: MANAGE_PAGES. + */ +export type PageReorderAttributeValues = { + readonly errors: ReadonlyArray; + /** Page from which attribute values are reordered. */ + readonly page?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly pageErrors: ReadonlyArray; +}; + +export type PageSortField = + /** Sort pages by creation date. */ + | "CREATED_AT" + /** Sort pages by creation date. */ + | "CREATION_DATE" + /** Sort pages by publication date. */ + | "PUBLICATION_DATE" + /** Sort pages by publication date. */ + | "PUBLISHED_AT" + /** Sort pages by rank. Note: This option is available only with the `search` filter. */ + | "RANK" + /** Sort pages by slug. */ + | "SLUG" + /** Sort pages by title. */ + | "TITLE" + /** Sort pages by visibility. */ + | "VISIBILITY"; + +export type PageSortingInput = { + /** Specifies the direction in which to sort pages. */ + readonly direction: OrderDirection; + /** Sort pages by the selected field. */ + readonly field: PageSortField; +}; + +/** Represents page's original translatable fields and related translations. */ +export type PageTranslatableContent = Node & { + /** List of page content attribute values that can be translated. */ + readonly attributeValues: ReadonlyArray; + /** + * Content of the page to translate. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly content?: Maybe; + /** + * Content of the page. + * + * Rich text format. For reference see https://editorjs.io/ + * @deprecated Use the `content` field instead. + */ + readonly contentJson?: Maybe; + /** The ID of the page translatable content. */ + readonly id: Scalars["ID"]["output"]; + /** + * A static page that can be manually added by a shop operator through the dashboard. + * @deprecated Get model fields from the root level queries. + */ + readonly page?: Maybe; + /** The ID of the page to translate. */ + readonly pageId: Scalars["ID"]["output"]; + /** SEO description to translate. */ + readonly seoDescription?: Maybe; + /** SEO title to translate. */ + readonly seoTitle?: Maybe; + /** + * Slug to translate. + * + * Added in Saleor 3.21. + */ + readonly slug?: Maybe; + /** Page title to translate. */ + readonly title: Scalars["String"]["output"]; + /** Returns translated page fields for the given language code. */ + readonly translation?: Maybe; +}; + +/** Represents page's original translatable fields and related translations. */ +export type PageTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * Creates/updates translations for a page. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ +export type PageTranslate = { + readonly errors: ReadonlyArray; + readonly page?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly translationErrors: ReadonlyArray; +}; + +/** Represents page translations. */ +export type PageTranslation = Node & { + /** + * Translated content of the page. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly content?: Maybe; + /** + * Translated description of the page. + * + * Rich text format. For reference see https://editorjs.io/ + * @deprecated Use the `content` field instead. + */ + readonly contentJson?: Maybe; + /** The ID of the page translation. */ + readonly id: Scalars["ID"]["output"]; + /** Translation language. */ + readonly language: LanguageDisplay; + /** Translated SEO description. */ + readonly seoDescription?: Maybe; + /** Translated SEO title. */ + readonly seoTitle?: Maybe; + /** + * Translated page slug. + * + * Added in Saleor 3.21. + */ + readonly slug?: Maybe; + /** Translated page title. */ + readonly title?: Maybe; + /** Represents the page fields to translate. */ + readonly translatableContent?: Maybe; +}; + +export type PageTranslationInput = { + /** + * Translated page content. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly content?: InputMaybe; + readonly seoDescription?: InputMaybe; + readonly seoTitle?: InputMaybe; + readonly slug?: InputMaybe; + readonly title?: InputMaybe; +}; + +/** Represents a type of page. It defines what attributes are available to pages of this type. */ +export type PageType = Node & + ObjectWithMetadata & { + /** Page attributes of that page type. */ + readonly attributes?: Maybe>; + /** + * Attributes that can be assigned to the page type. + * + * Requires one of the following permissions: MANAGE_PAGES, MANAGE_PAGE_TYPES_AND_ATTRIBUTES. + */ + readonly availableAttributes?: Maybe; + /** + * Whether page type has pages assigned. + * + * Requires one of the following permissions: MANAGE_PAGES, MANAGE_PAGE_TYPES_AND_ATTRIBUTES. + */ + readonly hasPages?: Maybe; + /** ID of the page type. */ + readonly id: Scalars["ID"]["output"]; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** Name of the page type. */ + readonly name: Scalars["String"]["output"]; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** Slug of the page type. */ + readonly slug: Scalars["String"]["output"]; + }; + +/** Represents a type of page. It defines what attributes are available to pages of this type. */ +export type PageTypeAvailableAttributesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + search?: InputMaybe; + where?: InputMaybe; +}; + +/** Represents a type of page. It defines what attributes are available to pages of this type. */ +export type PageTypeMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a type of page. It defines what attributes are available to pages of this type. */ +export type PageTypeMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents a type of page. It defines what attributes are available to pages of this type. */ +export type PageTypePrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a type of page. It defines what attributes are available to pages of this type. */ +export type PageTypePrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** + * Deletes page types. + * + * Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. + */ +export type PageTypeBulkDelete = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly pageErrors: ReadonlyArray; +}; + +export type PageTypeCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type PageTypeCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: PageType; +}; + +/** + * Creates a new page type. + * + * Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. + */ +export type PageTypeCreate = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly pageErrors: ReadonlyArray; + readonly pageType?: Maybe; +}; + +export type PageTypeCreateInput = { + /** List of attribute IDs to be assigned to the page type. */ + readonly addAttributes?: InputMaybe>; + /** Name of the page type. */ + readonly name?: InputMaybe; + /** Page type slug. */ + readonly slug?: InputMaybe; +}; + +/** Event sent when new page type is created. */ +export type PageTypeCreated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The page type the event relates to. */ + readonly pageType?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Deletes a page type. + * + * Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. + */ +export type PageTypeDelete = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly pageErrors: ReadonlyArray; + readonly pageType?: Maybe; +}; + +/** Event sent when page type is deleted. */ +export type PageTypeDeleted = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The page type the event relates to. */ + readonly pageType?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type PageTypeFilterInput = { + readonly search?: InputMaybe; + readonly slugs?: InputMaybe>; +}; + +/** + * Reorder the attributes of a page type. + * + * Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. + */ +export type PageTypeReorderAttributes = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly pageErrors: ReadonlyArray; + /** Page type from which attributes are reordered. */ + readonly pageType?: Maybe; +}; + +export type PageTypeSortField = + /** Sort page types by name. */ + | "NAME" + /** Sort page types by slug. */ + | "SLUG"; + +export type PageTypeSortingInput = { + /** Specifies the direction in which to sort page types. */ + readonly direction: OrderDirection; + /** Sort page types by the selected field. */ + readonly field: PageTypeSortField; +}; + +/** + * Updates page type. + * + * Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. + */ +export type PageTypeUpdate = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly pageErrors: ReadonlyArray; + readonly pageType?: Maybe; +}; + +export type PageTypeUpdateInput = { + /** List of attribute IDs to be assigned to the page type. */ + readonly addAttributes?: InputMaybe>; + /** Name of the page type. */ + readonly name?: InputMaybe; + /** List of attribute IDs to be unassigned from the page type. */ + readonly removeAttributes?: InputMaybe>; + /** Page type slug. */ + readonly slug?: InputMaybe; +}; + +/** Event sent when page type is updated. */ +export type PageTypeUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The page type the event relates to. */ + readonly pageType?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Updates an existing page. + * + * Requires one of the following permissions: MANAGE_PAGES. + */ +export type PageUpdate = { + readonly errors: ReadonlyArray; + readonly page?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly pageErrors: ReadonlyArray; +}; + +/** Event sent when page is updated. */ +export type PageUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The page the event relates to. */ + readonly page?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type PageWhereInput = { + /** List of conditions that must be met. */ + readonly AND?: InputMaybe>; + /** A list of conditions of which at least one must be met. */ + readonly OR?: InputMaybe>; + /** Filter by attributes associated with the page. */ + readonly attributes?: InputMaybe>; + readonly ids?: InputMaybe>; + /** Filter by metadata fields. */ + readonly metadata?: InputMaybe; + /** Filter by page type. */ + readonly pageType?: InputMaybe; + /** Filter by page slug. */ + readonly slug?: InputMaybe; +}; + +/** + * Change the password of the logged in user. + * + * Requires one of the following permissions: AUTHENTICATED_USER. + */ +export type PasswordChange = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** A user instance with a new password. */ + readonly user?: Maybe; +}; + +/** + * Controls whether password-based authentication is allowed. + * + * ENABLED - any user can log in with a password. This is the default behavior. + * CUSTOMERS_ONLY - only customer users can log in with a password. + * If a staff user logs in with a password, they will be treated as a customer + * — the issued token will not contain any staff permissions. + * DISABLED - no user can log in with a password. + */ +export type PasswordLoginModeEnum = "CUSTOMERS_ONLY" | "DISABLED" | "ENABLED"; + +/** Represents a payment of a given type. */ +export type Payment = Node & + ObjectWithMetadata & { + /** + * List of actions that can be performed in the current state of a payment. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly actions: ReadonlyArray; + /** + * Maximum amount of money that can be captured. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly availableCaptureAmount?: Maybe; + /** + * Maximum amount of money that can be refunded. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly availableRefundAmount?: Maybe; + /** Total amount captured for this payment. */ + readonly capturedAmount?: Maybe; + /** Internal payment status. */ + readonly chargeStatus: PaymentChargeStatusEnum; + /** Checkout associated with a payment. */ + readonly checkout?: Maybe; + /** Date and time at which payment was created. */ + readonly created: Scalars["DateTime"]["output"]; + /** The details of the card used for this payment. */ + readonly creditCard?: Maybe; + /** + * IP address of the user who created the payment. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly customerIpAddress?: Maybe; + /** Payment gateway used for payment. */ + readonly gateway: Scalars["String"]["output"]; + /** ID of the payment. */ + readonly id: Scalars["ID"]["output"]; + /** Determines if the payment is active or not. */ + readonly isActive: Scalars["Boolean"]["output"]; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** Date and time at which payment was modified. */ + readonly modified: Scalars["DateTime"]["output"]; + /** Order associated with a payment. */ + readonly order?: Maybe; + /** Type of method used for payment. */ + readonly paymentMethodType: Scalars["String"]["output"]; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** PSP reference of the payment. */ + readonly pspReference?: Maybe; + /** Unique token associated with a payment. */ + readonly token: Scalars["String"]["output"]; + /** Total amount of the payment. */ + readonly total?: Maybe; + /** + * List of all transactions within this payment. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly transactions?: Maybe>; + }; + +/** Represents a payment of a given type. */ +export type PaymentMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a payment of a given type. */ +export type PaymentMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents a payment of a given type. */ +export type PaymentPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a payment of a given type. */ +export type PaymentPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Authorize payment. */ +export type PaymentAuthorize = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** Look up a payment. */ + readonly payment?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Captures the authorized payment amount. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type PaymentCapture = { + readonly errors: ReadonlyArray; + /** Updated payment. */ + readonly payment?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly paymentErrors: ReadonlyArray; +}; + +/** Capture payment. */ +export type PaymentCaptureEvent = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** Look up a payment. */ + readonly payment?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type PaymentChargeStatusEnum = + | "CANCELLED" + | "FULLY_CHARGED" + | "FULLY_REFUNDED" + | "NOT_CHARGED" + | "PARTIALLY_CHARGED" + | "PARTIALLY_REFUNDED" + | "PENDING" + | "REFUSED"; + +/** Check payment balance. */ +export type PaymentCheckBalance = { + /** Response from the gateway. */ + readonly data?: Maybe; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly paymentErrors: ReadonlyArray; +}; + +export type PaymentCheckBalanceInput = { + /** Information about card. */ + readonly card: CardInput; + /** Slug of a channel for which the data should be returned. */ + readonly channel: Scalars["String"]["input"]; + /** An ID of a payment gateway to check. */ + readonly gatewayId: Scalars["String"]["input"]; + /** Payment method name. */ + readonly method: Scalars["String"]["input"]; +}; + +/** Confirm payment. */ +export type PaymentConfirmEvent = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** Look up a payment. */ + readonly payment?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type PaymentCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type PaymentCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: Payment; +}; + +export type PaymentError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** List of variant IDs which causes the error. */ + readonly variants?: Maybe>; +}; + +export type PaymentErrorCode = + | "BALANCE_CHECK_ERROR" + | "BILLING_ADDRESS_NOT_SET" + | "CHANNEL_INACTIVE" + | "CHECKOUT_COMPLETION_IN_PROGRESS" + | "CHECKOUT_EMAIL_NOT_SET" + | "CHECKOUT_HAS_TRANSACTION" + | "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"; + +export type PaymentFilterInput = { + readonly checkouts?: InputMaybe>; + /** Filter by ids. */ + readonly ids?: InputMaybe>; +}; + +/** Available payment gateway backend with configuration necessary to setup client. */ +export type PaymentGateway = { + /** Payment gateway client configuration. */ + readonly config: ReadonlyArray; + /** Payment gateway supported currencies. */ + readonly currencies: ReadonlyArray; + /** Payment gateway ID. */ + readonly id: Scalars["ID"]["output"]; + /** Payment gateway name. */ + readonly name: Scalars["String"]["output"]; +}; + +export type PaymentGatewayConfig = { + /** The JSON data required to initialize the payment gateway. */ + readonly data?: Maybe; + readonly errors?: Maybe>; + /** The app identifier. */ + readonly id: Scalars["String"]["output"]; +}; + +export type PaymentGatewayConfigError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type 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. */ +export type PaymentGatewayInitialize = { + readonly errors: ReadonlyArray; + /** List of payment gateway configurations. */ + readonly gatewayConfigs?: Maybe>; +}; + +export type PaymentGatewayInitializeError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type PaymentGatewayInitializeErrorCode = "GRAPHQL_ERROR" | "INVALID" | "NOT_FOUND"; + +/** Event sent when user wants to initialize the payment gateway. */ +export type PaymentGatewayInitializeSession = Event & { + /** Amount requested for initializing the payment gateway. */ + readonly amount?: Maybe; + /** Payment gateway data in JSON format, received from storefront. */ + readonly data?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Checkout or order */ + readonly sourceObject: OrderOrCheckout; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Initializes payment gateway for tokenizing payment method session. + * + * 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. + */ +export type PaymentGatewayInitializeTokenization = { + /** A data returned by payment app. */ + readonly data?: Maybe; + readonly errors: ReadonlyArray; + /** A status of the payment gateway initialization. */ + readonly result: PaymentGatewayInitializeTokenizationResult; +}; + +export type PaymentGatewayInitializeTokenizationError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type 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. + */ +export type PaymentGatewayInitializeTokenizationResult = + | "FAILED_TO_DELIVER" + | "FAILED_TO_INITIALIZE" + | "SUCCESSFULLY_INITIALIZED"; + +/** Event sent to initialize a new session in payment gateway to store the payment method. */ +export type PaymentGatewayInitializeTokenizationSession = Event & { + /** Channel related to the requested action. */ + readonly channel: Channel; + /** Payment gateway data in JSON format, received from storefront. */ + readonly data?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The user related to the requested action. */ + readonly user: User; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type PaymentGatewayToInitialize = { + /** The data that will be passed to the payment gateway. */ + readonly data?: InputMaybe; + /** The identifier of the payment gateway app to initialize. */ + readonly id: Scalars["String"]["input"]; +}; + +/** Initializes payment process when it is required by gateway. */ +export type PaymentInitialize = { + readonly errors: ReadonlyArray; + /** Payment that was initialized. */ + readonly initializedPayment?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly paymentErrors: ReadonlyArray; +}; + +/** Server-side data generated by a payment gateway. Optional step when the payment provider requires an additional action to initialize payment session. */ +export type PaymentInitialized = { + /** Initialized data by gateway. */ + readonly data?: Maybe; + /** ID of a payment gateway. */ + readonly gateway: Scalars["String"]["output"]; + /** Payment gateway name. */ + readonly name: Scalars["String"]["output"]; +}; + +export type PaymentInput = { + /** Total amount of the transaction, including all taxes and discounts. If no amount is provided, the checkout total will be used. */ + readonly amount?: InputMaybe; + /** A gateway to use with that payment. */ + readonly gateway: Scalars["String"]["input"]; + /** + * User public metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** 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. */ + readonly returnUrl?: InputMaybe; + /** Payment store type. */ + readonly storePaymentMethod?: InputMaybe; + /** Client-side generated payment token, representing customer's billing data in a secure manner. */ + readonly token?: InputMaybe; +}; + +/** List payment gateways. */ +export type PaymentListGateways = Event & { + /** The checkout the event relates to. */ + readonly checkout?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Represents a payment method used for a transaction. + * + * Added in Saleor 3.22. + */ +export type PaymentMethodDetails = { + /** Name of the payment method. */ + readonly name: Scalars["String"]["output"]; +}; + +export type PaymentMethodDetailsCardFilterInput = { + /** Filter by payment method brand used to pay for the order. */ + readonly brand?: InputMaybe; +}; + +export type PaymentMethodDetailsFilterInput = { + /** Filter by card details used to pay for the order. Skips `type` filter if provided. */ + readonly card?: InputMaybe; + /** Filter by payment method type used to pay for the order. */ + readonly type?: InputMaybe; +}; + +/** + * Details of the payment method used for the transaction. One of `card`, `other`, or `giftCard` is required. + * + * Added in Saleor 3.22. + */ +export type PaymentMethodDetailsInput = { + /** Details of the card payment method used for the transaction. */ + readonly card?: InputMaybe; + /** + * Details of the gift card payment method used for the transaction. + * + * Added in Saleor 3.23. + */ + readonly giftCard?: InputMaybe; + /** Details of the non-card payment method used for this transaction. */ + readonly other?: InputMaybe; +}; + +/** + * Tokenize payment method. + * + * 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. + */ +export type PaymentMethodInitializeTokenization = { + /** A data returned by the payment app. */ + readonly data?: Maybe; + readonly errors: ReadonlyArray; + /** The identifier of the payment method. */ + readonly id?: Maybe; + /** A status of the payment method tokenization. */ + readonly result: PaymentMethodTokenizationResult; +}; + +export type PaymentMethodInitializeTokenizationError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type PaymentMethodInitializeTokenizationErrorCode = + | "CHANNEL_INACTIVE" + | "GATEWAY_ERROR" + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND"; + +/** Event sent when user requests a tokenization of payment method. */ +export type PaymentMethodInitializeTokenizationSession = Event & { + /** Channel related to the requested action. */ + readonly channel: Channel; + /** Payment gateway data in JSON format, received from storefront. */ + readonly data?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The payment flow that the tokenized payment method should support. */ + readonly paymentFlowToSupport: TokenizedPaymentFlowEnum; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The user related to the requested action. */ + readonly user: User; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Tokenize payment method. + * + * 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. + */ +export type PaymentMethodProcessTokenization = { + /** A data returned by the payment app. */ + readonly data?: Maybe; + readonly errors: ReadonlyArray; + /** The identifier of the payment method. */ + readonly id?: Maybe; + /** A status of the payment method tokenization. */ + readonly result: PaymentMethodTokenizationResult; +}; + +export type PaymentMethodProcessTokenizationError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type PaymentMethodProcessTokenizationErrorCode = + | "CHANNEL_INACTIVE" + | "GATEWAY_ERROR" + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND"; + +/** Event sent when user continues a tokenization of payment method. */ +export type PaymentMethodProcessTokenizationSession = Event & { + /** Channel related to the requested action. */ + readonly channel: Channel; + /** Payment gateway data in JSON format, received from storefront. */ + readonly data?: Maybe; + /** The ID returned by app from `PAYMENT_METHOD_INITIALIZE_TOKENIZATION_SESSION` webhook. */ + readonly id: Scalars["String"]["output"]; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The user related to the requested action. */ + readonly user: User; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type PaymentMethodRequestDeleteError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +/** + * 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. + */ +export type PaymentMethodTokenizationResult = + | "ADDITIONAL_ACTION_REQUIRED" + | "FAILED_TO_DELIVER" + | "FAILED_TO_TOKENIZE" + | "PENDING" + | "SUCCESSFULLY_TOKENIZED"; + +/** + * Represents possible payment method types. + * + * The following types are possible: + * CARD - represents a card payment method. + * OTHER - represents any payment method that is not a card payment. + * GIFT_CARD - represents a gift card payment method. + */ +export type PaymentMethodTypeEnum = "CARD" | "GIFT_CARD" | "OTHER"; + +export type PaymentMethodTypeEnumFilterInput = { + /** The value equal to. */ + readonly eq?: InputMaybe; + /** The value included in. */ + readonly oneOf?: InputMaybe>; +}; + +/** Process payment. */ +export type PaymentProcessEvent = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** Look up a payment. */ + readonly payment?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Refunds the captured payment amount. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type PaymentRefund = { + readonly errors: ReadonlyArray; + /** Updated payment. */ + readonly payment?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly paymentErrors: ReadonlyArray; +}; + +/** Refund payment. */ +export type PaymentRefundEvent = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** Look up a payment. */ + readonly payment?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Represents the channel-specific payment settings. */ +export type PaymentSettings = { + /** + * Specifies the earliest date on which funds for expired checkouts can begin to be released. Expired checkouts dated before this cut-off will not have their funds released. Additionally, no funds will be released for checkouts that are more than one year old, regardless of the cut-off date. + * + * Added in Saleor 3.20. + */ + readonly checkoutReleaseFundsCutOffDate?: Maybe; + /** + * The time in hours after which funds for expired checkouts will be released. + * + * Added in Saleor 3.20. + */ + readonly checkoutTtlBeforeReleasingFunds?: Maybe; + /** 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. */ + readonly defaultTransactionFlowStrategy: TransactionFlowStrategyEnum; + /** + * Determine if the funds for expired checkouts should be released automatically. + * + * Added in Saleor 3.20. + */ + readonly releaseFundsForExpiredCheckouts?: Maybe; +}; + +export type PaymentSettingsInput = { + /** + * Specifies the earliest date on which funds for expired checkouts can begin to be released. Expired checkouts dated before this cut-off will not have their funds released. Additionally, no funds will be released for checkouts that are more than one year old, regardless of the cut-off date. + * + * Added in Saleor 3.20. + */ + readonly checkoutReleaseFundsCutOffDate?: InputMaybe; + /** + * The time in hours after which funds for expired checkouts will be released. + * + * Added in Saleor 3.20. + */ + readonly checkoutTtlBeforeReleasingFunds?: InputMaybe; + /** 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. */ + readonly defaultTransactionFlowStrategy?: InputMaybe; + /** + * Determine if the funds for expired checkouts should be released automatically. + * + * Added in Saleor 3.20. + */ + readonly releaseFundsForExpiredCheckouts?: InputMaybe; +}; + +/** Represents a payment source stored for user in payment gateway, such as credit card. */ +export type PaymentSource = { + /** Stored credit card details if available. */ + readonly creditCardInfo?: Maybe; + /** Payment gateway name. */ + readonly gateway: Scalars["String"]["output"]; + /** + * List of public metadata items. + * + * Can be accessed without permissions. + */ + readonly metadata: ReadonlyArray; + /** ID of stored payment method. */ + readonly paymentMethodId?: Maybe; +}; + +/** + * Voids the authorized payment. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ +export type PaymentVoid = { + readonly errors: ReadonlyArray; + /** Updated payment. */ + readonly payment?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly paymentErrors: ReadonlyArray; +}; + +/** Void payment. */ +export type PaymentVoidEvent = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** Look up a payment. */ + readonly payment?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Represents a permission object in a friendly form. */ +export type Permission = { + /** Internal code for permission. */ + readonly code: PermissionEnum; + /** Describe action(s) allowed to do by permission. */ + readonly name: Scalars["String"]["output"]; +}; + +export type 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) + */ +export type PermissionGroupCreate = { + readonly errors: ReadonlyArray; + readonly group?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly permissionGroupErrors: ReadonlyArray; +}; + +export type PermissionGroupCreateInput = { + /** List of channels to assign to this group. */ + readonly addChannels?: InputMaybe>; + /** List of permission code names to assign to this group. */ + readonly addPermissions?: InputMaybe>; + /** List of users to assign to this group. */ + readonly addUsers?: InputMaybe>; + /** Group name. */ + readonly name: Scalars["String"]["input"]; + /** Determine if the group has restricted access to channels. DEFAULT: False */ + readonly restrictedAccessToChannels?: InputMaybe; +}; + +/** Event sent when new permission group is created. */ +export type PermissionGroupCreated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The permission group the event relates to. */ + readonly permissionGroup?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * 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) + */ +export type PermissionGroupDelete = { + readonly errors: ReadonlyArray; + readonly group?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly permissionGroupErrors: ReadonlyArray; +}; + +/** Event sent when permission group is deleted. */ +export type PermissionGroupDeleted = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The permission group the event relates to. */ + readonly permissionGroup?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type PermissionGroupError = { + /** List of channels IDs which causes the error. */ + readonly channels?: Maybe>; + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** List of permissions which causes the error. */ + readonly permissions?: Maybe>; + /** List of user IDs which causes the error. */ + readonly users?: Maybe>; +}; + +export type 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"; + +export type PermissionGroupFilterInput = { + readonly ids?: InputMaybe>; + readonly search?: InputMaybe; +}; + +/** Sorting options for permission groups. */ +export type PermissionGroupSortField = + /** Sort permission group accounts by name. */ + "NAME"; + +export type PermissionGroupSortingInput = { + /** Specifies the direction in which to sort permission group. */ + readonly direction: OrderDirection; + /** Sort permission group by the selected field. */ + readonly 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) + */ +export type PermissionGroupUpdate = { + readonly errors: ReadonlyArray; + readonly group?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly permissionGroupErrors: ReadonlyArray; +}; + +export type PermissionGroupUpdateInput = { + /** List of channels to assign to this group. */ + readonly addChannels?: InputMaybe>; + /** List of permission code names to assign to this group. */ + readonly addPermissions?: InputMaybe>; + /** List of users to assign to this group. */ + readonly addUsers?: InputMaybe>; + /** Group name. */ + readonly name?: InputMaybe; + /** List of channels to unassign from this group. */ + readonly removeChannels?: InputMaybe>; + /** List of permission code names to unassign from this group. */ + readonly removePermissions?: InputMaybe>; + /** List of users to unassign from this group. */ + readonly removeUsers?: InputMaybe>; + /** Determine if the group has restricted access to channels. */ + readonly restrictedAccessToChannels?: InputMaybe; +}; + +/** Event sent when permission group is updated. */ +export type PermissionGroupUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The permission group the event relates to. */ + readonly permissionGroup?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Plugin. */ +export type Plugin = { + /** Channel-specific plugin configuration. */ + readonly channelConfigurations: ReadonlyArray; + /** Description of the plugin. */ + readonly description: Scalars["String"]["output"]; + /** Global configuration of the plugin (not channel-specific). */ + readonly globalConfiguration?: Maybe; + /** Identifier of the plugin. */ + readonly id: Scalars["ID"]["output"]; + /** Name of the plugin. */ + readonly name: Scalars["String"]["output"]; +}; + +/** Stores information about a configuration of plugin. */ +export type PluginConfiguration = { + /** Determines if plugin is active or not. */ + readonly active: Scalars["Boolean"]["output"]; + /** The channel to which the plugin configuration is assigned to. */ + readonly channel?: Maybe; + /** Configuration of the plugin. */ + readonly configuration?: Maybe>; +}; + +export type PluginConfigurationType = "GLOBAL" | "PER_CHANNEL"; + +export type PluginCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type PluginCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: Plugin; +}; + +export type PluginError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type PluginErrorCode = + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND" + | "PLUGIN_MISCONFIGURED" + | "REQUIRED" + | "UNIQUE"; + +export type PluginFilterInput = { + readonly search?: InputMaybe; + readonly statusInChannels?: InputMaybe; + readonly type?: InputMaybe; +}; + +export type PluginSortField = "IS_ACTIVE" | "NAME"; + +export type PluginSortingInput = { + /** Specifies the direction in which to sort plugins. */ + readonly direction: OrderDirection; + /** Sort plugins by the selected field. */ + readonly field: PluginSortField; +}; + +export type PluginStatusInChannelsInput = { + readonly active: Scalars["Boolean"]["input"]; + readonly channels: ReadonlyArray; +}; + +/** + * Update plugin configuration. + * + * Requires one of the following permissions: MANAGE_PLUGINS. + */ +export type PluginUpdate = { + readonly errors: ReadonlyArray; + readonly plugin?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly pluginsErrors: ReadonlyArray; +}; + +export type PluginUpdateInput = { + /** Indicates whether the plugin should be enabled. */ + readonly active?: InputMaybe; + /** Configuration of the plugin. */ + readonly configuration?: InputMaybe>; +}; + +export type PostalCodeRuleInclusionTypeEnum = "EXCLUDE" | "INCLUDE"; + +/** Represents preorder settings for product variant. */ +export type PreorderData = { + /** Preorder end date. */ + readonly endDate?: Maybe; + /** + * Total number of sold product variant during preorder. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly globalSoldUnits: Scalars["Int"]["output"]; + /** + * The global preorder threshold for product variant. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly globalThreshold?: Maybe; +}; + +export type PreorderSettingsInput = { + /** The end date for preorder. */ + readonly endDate?: InputMaybe; + /** The global threshold for preorder variant. */ + readonly globalThreshold?: InputMaybe; +}; + +/** Represents preorder variant data for channel. */ +export type PreorderThreshold = { + /** Preorder threshold for product variant in this channel. */ + readonly quantity?: Maybe; + /** Number of sold product variant in this channel. */ + readonly soldUnits: Scalars["Int"]["output"]; +}; + +export type PriceFilterInput = { + /** The amount of the price to filter by. */ + readonly amount: DecimalFilterInput; + /** The currency of the price to filter by. */ + readonly currency?: InputMaybe; +}; + +export type PriceInput = { + /** Amount of money. */ + readonly amount: Scalars["PositiveDecimal"]["input"]; + /** Currency code. */ + readonly currency: Scalars["String"]["input"]; +}; + +export type PriceRangeInput = { + /** Price greater than or equal to. */ + readonly gte?: InputMaybe; + /** Price less than or equal to. */ + readonly lte?: InputMaybe; +}; + +/** Represents an individual item for sale in the storefront. */ +export type Product = Node & + ObjectWithAttributes & + ObjectWithMetadata & { + /** + * Get a single attribute attached to product by attribute slug. + * + * Added in Saleor 3.22. + */ + readonly assignedAttribute?: Maybe; + /** + * List of attributes assigned to this product. + * + * Added in Saleor 3.22. + */ + readonly assignedAttributes: ReadonlyArray; + /** + * Get a single attribute attached to product by attribute slug. + * @deprecated Use the `assignedAttribute` field instead. + */ + readonly attribute?: Maybe; + /** + * List of attributes assigned to this product. + * @deprecated Use the `assignedAttributes` field instead. + */ + readonly attributes: ReadonlyArray; + /** + * Date when product is available for purchase. + * @deprecated Use the `availableForPurchaseAt` field to fetch the available for purchase date. + */ + readonly availableForPurchase?: Maybe; + /** Date when product is available for purchase. */ + readonly availableForPurchaseAt?: Maybe; + readonly category?: Maybe; + /** Channel given to retrieve this product. Also used by federation gateway to resolve this object in a federated query. */ + readonly channel?: Maybe; + /** + * List of availability in channels for the product. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly channelListings?: Maybe>; + /** @deprecated Use `Channel.taxConfiguration` field to determine whether tax collection is enabled. */ + readonly chargeTaxes: Scalars["Boolean"]["output"]; + /** List of collections for the product. Requires the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS. */ + readonly collections?: Maybe>; + /** The date and time when the product was created. */ + readonly created: Scalars["DateTime"]["output"]; + /** Default variant of the product. */ + readonly defaultVariant?: Maybe; + /** + * Description of the product. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: Maybe; + /** + * Description of the product. + * + * Rich text format. For reference see https://editorjs.io/ + * @deprecated Use the `description` field instead. + */ + readonly descriptionJson?: Maybe; + /** External ID of this product. */ + readonly externalReference?: Maybe; + /** The ID of the product. */ + readonly id: Scalars["ID"]["output"]; + /** + * Get a single product image by ID. + * @deprecated Use the `mediaById` field instead. + */ + readonly imageById?: Maybe; + /** + * List of images for the product. + * @deprecated Use the `media` field instead. + */ + readonly images?: Maybe>; + /** Whether the product is in stock, set as available for purchase in the given channel, and published. */ + readonly isAvailable?: Maybe; + /** 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. */ + readonly isAvailableForPurchase?: Maybe; + /** List of media for the product. */ + readonly media?: Maybe>; + /** Get a single product media by ID. */ + readonly mediaById?: Maybe; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** SEO description of the product. */ + readonly name: Scalars["String"]["output"]; + /** Lists the storefront product's pricing, the current price and discounts, only meant for displaying. */ + readonly pricing?: Maybe; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** Type of the product. */ + readonly productType: ProductType; + /** + * List of variants for the product. Requires the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS. + * + * Added in Saleor 3.21. + */ + readonly productVariants?: Maybe; + /** Rating of the product. */ + readonly rating?: Maybe; + /** SEO description of the product. */ + readonly seoDescription?: Maybe; + /** SEO title of the product. */ + readonly seoTitle?: Maybe; + /** Slug of the product. */ + readonly slug: Scalars["String"]["output"]; + /** + * 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. + */ + readonly taxClass?: Maybe; + /** + * A type of tax. Assigned by enabled tax gateway + * @deprecated Use `taxClass` field instead. + */ + readonly taxType?: Maybe; + /** Thumbnail of the product. */ + readonly thumbnail?: Maybe; + /** Returns translated product fields for the given language code. */ + readonly translation?: Maybe; + /** The date and time when the product was last updated. */ + readonly updatedAt: Scalars["DateTime"]["output"]; + /** + * Get a single variant by SKU or ID. + * @deprecated Use top-level `variant` query. + */ + readonly variant?: Maybe; + /** + * List of variants for the product. Requires the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS. + * @deprecated Use `productVariants` field instead. + */ + readonly variants?: Maybe>; + /** Weight of the product. */ + readonly weight?: Maybe; + }; + +/** Represents an individual item for sale in the storefront. */ +export type ProductAssignedAttributeArgs = { + slug: Scalars["String"]["input"]; +}; + +/** Represents an individual item for sale in the storefront. */ +export type ProductAssignedAttributesArgs = { + limit?: InputMaybe; +}; + +/** Represents an individual item for sale in the storefront. */ +export type ProductAttributeArgs = { + slug: Scalars["String"]["input"]; +}; + +/** Represents an individual item for sale in the storefront. */ +export type ProductImageByIdArgs = { + id: Scalars["ID"]["input"]; +}; + +/** Represents an individual item for sale in the storefront. */ +export type ProductIsAvailableArgs = { + address?: InputMaybe; +}; + +/** Represents an individual item for sale in the storefront. */ +export type ProductMediaArgs = { + sortBy?: InputMaybe; +}; + +/** Represents an individual item for sale in the storefront. */ +export type ProductMediaByIdArgs = { + id: Scalars["ID"]["input"]; +}; + +/** Represents an individual item for sale in the storefront. */ +export type ProductMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents an individual item for sale in the storefront. */ +export type ProductMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents an individual item for sale in the storefront. */ +export type ProductPricingArgs = { + address?: InputMaybe; +}; + +/** Represents an individual item for sale in the storefront. */ +export type ProductPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents an individual item for sale in the storefront. */ +export type ProductPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents an individual item for sale in the storefront. */ +export type ProductProductVariantsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sortBy?: InputMaybe; + where?: InputMaybe; +}; + +/** Represents an individual item for sale in the storefront. */ +export type ProductThumbnailArgs = { + format?: InputMaybe; + size?: InputMaybe; +}; + +/** Represents an individual item for sale in the storefront. */ +export type ProductTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** Represents an individual item for sale in the storefront. */ +export type ProductVariantArgs = { + id?: InputMaybe; + sku?: InputMaybe; +}; + +/** + * Assign attributes to a given product type. + * + * Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. + */ +export type ProductAttributeAssign = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; + /** The updated product type. */ + readonly productType?: Maybe; +}; + +export type ProductAttributeAssignInput = { + /** The ID of the attribute to assign. */ + readonly id: Scalars["ID"]["input"]; + /** The attribute type to be assigned as. */ + readonly type: ProductAttributeType; + /** Whether attribute is allowed in variant selection. Allowed types are: ['dropdown', 'boolean', 'swatch', 'numeric']. */ + readonly variantSelection?: InputMaybe; +}; + +/** + * Update attributes assigned to product variant for given product type. + * + * Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. + */ +export type ProductAttributeAssignmentUpdate = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; + /** The updated product type. */ + readonly productType?: Maybe; +}; + +export type ProductAttributeAssignmentUpdateInput = { + /** The ID of the attribute to assign. */ + readonly id: Scalars["ID"]["input"]; + /** Whether attribute is allowed in variant selection. Allowed types are: ['dropdown', 'boolean', 'swatch', 'numeric']. */ + readonly variantSelection: Scalars["Boolean"]["input"]; +}; + +export type ProductAttributeType = "PRODUCT" | "VARIANT"; + +/** + * Un-assign attributes from a given product type. + * + * Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. + */ +export type ProductAttributeUnassign = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; + /** The updated product type. */ + readonly productType?: Maybe; +}; + +/** + * Creates products. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type ProductBulkCreate = { + /** Returns how many objects were created. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** List of the created products. */ + readonly results: ReadonlyArray; +}; + +export type ProductBulkCreateError = { + /** List of attributes IDs which causes the error. */ + readonly attributes?: Maybe>; + /** List of channel IDs which causes the error. */ + readonly channels?: Maybe>; + /** The error code. */ + readonly code: ProductBulkCreateErrorCode; + /** The error message. */ + readonly message?: Maybe; + /** Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly path?: Maybe; + /** List of attribute values IDs which causes the error. */ + readonly values?: Maybe>; + /** List of warehouse IDs which causes the error. */ + readonly warehouses?: Maybe>; +}; + +export type ProductBulkCreateErrorCode = + | "ATTRIBUTE_ALREADY_ASSIGNED" + | "ATTRIBUTE_CANNOT_BE_ASSIGNED" + | "ATTRIBUTE_VARIANTS_DISABLED" + | "BLANK" + | "DUPLICATED_INPUT_ITEM" + | "FILE_SIZE_LIMIT_EXCEEDED" + | "GRAPHQL_ERROR" + | "INVALID" + | "INVALID_PRICE" + | "MAX_LENGTH" + | "NOT_FOUND" + | "PRODUCT_NOT_ASSIGNED_TO_CHANNEL" + | "PRODUCT_WITHOUT_CATEGORY" + | "REQUIRED" + | "UNIQUE" + | "UNSUPPORTED_MEDIA_PROVIDER"; + +export type ProductBulkCreateInput = { + /** List of attributes. */ + readonly attributes?: InputMaybe>; + /** ID of the product's category. */ + readonly category?: InputMaybe; + /** List of channels in which the product is available. */ + readonly channelListings?: InputMaybe>; + /** + * Determine if taxes are being charged for the product. + * @deprecated Use `Channel.taxConfiguration` to configure whether tax collection is enabled. + */ + readonly chargeTaxes?: InputMaybe; + /** List of IDs of collections that the product belongs to. */ + readonly collections?: InputMaybe>; + /** + * Product description. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: InputMaybe; + /** External ID of this product. */ + readonly externalReference?: InputMaybe; + /** List of media inputs associated with the product. */ + readonly media?: InputMaybe>; + /** + * Fields required to update the product metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** Product name. */ + readonly name?: InputMaybe; + /** + * Fields required to update the product private metadata. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** ID of the type that product belongs to. */ + readonly productType: Scalars["ID"]["input"]; + /** Defines the product rating value. */ + readonly rating?: InputMaybe; + /** Search engine optimization fields. */ + readonly seo?: InputMaybe; + /** Product slug. */ + readonly slug?: InputMaybe; + /** 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. */ + readonly taxClass?: InputMaybe; + /** + * Tax rate for enabled tax gateway. + * @deprecated 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. + */ + readonly taxCode?: InputMaybe; + /** Input list of product variants to create. */ + readonly variants?: InputMaybe>; + /** Weight of the Product. */ + readonly weight?: InputMaybe; +}; + +/** + * Deletes products. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type ProductBulkDelete = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; +}; + +export type ProductBulkResult = { + /** List of errors occurred on create attempt. */ + readonly errors?: Maybe>; + /** Product data. */ + readonly product?: Maybe; +}; + +/** + * Creates/updates translations for products. + * + * 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. + */ +export type ProductBulkTranslate = { + /** Returns how many translations were created/updated. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** List of the translations. */ + readonly results: ReadonlyArray; +}; + +export type ProductBulkTranslateError = { + /** The error code. */ + readonly code: ProductTranslateErrorCode; + /** The error message. */ + readonly message?: Maybe; + /** Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly path?: Maybe; +}; + +export type ProductBulkTranslateInput = { + /** External reference of an product. */ + readonly externalReference?: InputMaybe; + /** Product ID. */ + readonly id?: InputMaybe; + /** Translation language code. */ + readonly languageCode: LanguageCodeEnum; + /** Translation fields. */ + readonly translationFields: TranslationInput; +}; + +export type ProductBulkTranslateResult = { + /** List of errors occurred on translation attempt. */ + readonly errors?: Maybe>; + /** Product translation data. */ + readonly translation?: Maybe; +}; + +/** Represents product channel listing. */ +export type ProductChannelListing = Node & { + /** @deprecated Use the `availableForPurchaseAt` field to fetch the available for purchase date. */ + readonly availableForPurchase?: Maybe; + /** The product available for purchase date time. */ + readonly availableForPurchaseAt?: Maybe; + /** The channel in which the product is listed. */ + readonly channel: Channel; + /** The price of the cheapest variant (including discounts). */ + readonly discountedPrice?: Maybe; + /** The ID of the product channel listing. */ + readonly id: Scalars["ID"]["output"]; + /** 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. */ + readonly isAvailableForPurchase?: Maybe; + /** Indicates if the product is published in the channel. */ + readonly isPublished: Scalars["Boolean"]["output"]; + /** + * Range of margin percentage value. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly margin?: Maybe; + /** Lists the storefront product's pricing, the current price and discounts, only meant for displaying. */ + readonly pricing?: Maybe; + /** @deprecated Use the `publishedAt` field to fetch the publication date. */ + readonly publicationDate?: Maybe; + /** The product publication date time. */ + readonly publishedAt?: Maybe; + /** + * Purchase cost of product. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly purchaseCost?: Maybe; + /** Indicates product visibility in the channel listings. */ + readonly visibleInListings: Scalars["Boolean"]["output"]; +}; + +/** Represents product channel listing. */ +export type ProductChannelListingPricingArgs = { + address?: InputMaybe; +}; + +export type ProductChannelListingAddInput = { + /** List of variants to which the channel should be assigned. */ + readonly addVariants?: InputMaybe>; + /** 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. */ + readonly availableForPurchaseAt?: InputMaybe; + /** + * 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 Use `availableForPurchaseAt` field instead. + */ + readonly availableForPurchaseDate?: InputMaybe; + /** ID of a channel. */ + readonly channelId: Scalars["ID"]["input"]; + /** 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. */ + readonly isAvailableForPurchase?: InputMaybe; + /** Determines if object is visible to customers. */ + readonly isPublished?: InputMaybe; + /** + * Publication date. ISO 8601 standard. + * @deprecated Use `publishedAt` field instead. + */ + readonly publicationDate?: InputMaybe; + /** Publication date time. ISO 8601 standard. */ + readonly publishedAt?: InputMaybe; + /** List of variants from which the channel should be unassigned. */ + readonly removeVariants?: InputMaybe>; + /** Determines if product is visible in product listings (doesn't apply to product collections). */ + readonly visibleInListings?: InputMaybe; +}; + +export type 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. */ + readonly availableForPurchaseAt?: InputMaybe; + /** ID of a channel. */ + readonly channelId: Scalars["ID"]["input"]; + /** 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. */ + readonly isAvailableForPurchase?: InputMaybe; + /** Determines if object is visible to customers. */ + readonly isPublished?: InputMaybe; + /** Publication date time. ISO 8601 standard. */ + readonly publishedAt?: InputMaybe; + /** Determines if product is visible in product listings (doesn't apply to product collections). */ + readonly visibleInListings?: InputMaybe; +}; + +export type ProductChannelListingError = { + /** List of attributes IDs which causes the error. */ + readonly attributes?: Maybe>; + /** List of channels IDs which causes the error. */ + readonly channels?: Maybe>; + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** List of attribute values IDs which causes the error. */ + readonly values?: Maybe>; + /** List of variants IDs which causes the error. */ + readonly variants?: Maybe>; +}; + +/** + * Manage product's availability in channels. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type ProductChannelListingUpdate = { + readonly errors: ReadonlyArray; + /** An updated product instance. */ + readonly product?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly productChannelListingErrors: ReadonlyArray; +}; + +export type ProductChannelListingUpdateInput = { + /** List of channels from which the product should be unassigned. */ + readonly removeChannels?: InputMaybe>; + /** List of channels to which the product should be assigned or updated. */ + readonly updateChannels?: InputMaybe>; +}; + +export type ProductCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type ProductCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: Product; +}; + +/** + * Creates a new product. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type ProductCreate = { + readonly errors: ReadonlyArray; + readonly product?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; +}; + +export type ProductCreateInput = { + /** List of attributes. */ + readonly attributes?: InputMaybe>; + /** ID of the product's category. */ + readonly category?: InputMaybe; + /** + * Determine if taxes are being charged for the product. + * @deprecated Use `Channel.taxConfiguration` to configure whether tax collection is enabled. + */ + readonly chargeTaxes?: InputMaybe; + /** List of IDs of collections that the product belongs to. */ + readonly collections?: InputMaybe>; + /** + * Product description. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: InputMaybe; + /** External ID of this product. */ + readonly externalReference?: InputMaybe; + /** + * Fields required to update the product metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** Product name. */ + readonly name?: InputMaybe; + /** + * Fields required to update the product private metadata. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** ID of the type that product belongs to. */ + readonly productType: Scalars["ID"]["input"]; + /** Defines the product rating value. */ + readonly rating?: InputMaybe; + /** Search engine optimization fields. */ + readonly seo?: InputMaybe; + /** Product slug. */ + readonly slug?: InputMaybe; + /** 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. */ + readonly taxClass?: InputMaybe; + /** + * Tax rate for enabled tax gateway. + * @deprecated 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. + */ + readonly taxCode?: InputMaybe; + /** Weight of the Product. */ + readonly weight?: InputMaybe; +}; + +/** Event sent when new product is created. */ +export type ProductCreated = Event & { + /** The category of the product. */ + readonly category?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The product the event relates to. */ + readonly product?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when new product is created. */ +export type ProductCreatedProductArgs = { + channel?: InputMaybe; +}; + +/** + * Deletes a product. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type ProductDelete = { + readonly errors: ReadonlyArray; + readonly product?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; +}; + +/** Event sent when product is deleted. */ +export type ProductDeleted = Event & { + /** The category of the product. */ + readonly category?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The product the event relates to. */ + readonly product?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when product is deleted. */ +export type ProductDeletedProductArgs = { + channel?: InputMaybe; +}; + +export type ProductError = { + /** List of attributes IDs which causes the error. */ + readonly attributes?: Maybe>; + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** List of attribute values IDs which causes the error. */ + readonly values?: Maybe>; +}; + +export type ProductErrorCode = + | "ALREADY_EXISTS" + | "ATTRIBUTE_ALREADY_ASSIGNED" + | "ATTRIBUTE_CANNOT_BE_ASSIGNED" + | "ATTRIBUTE_VARIANTS_DISABLED" + | "CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT" + | "DUPLICATED_INPUT_ITEM" + | "FILE_SIZE_LIMIT_EXCEEDED" + | "GRAPHQL_ERROR" + | "INVALID" + | "INVALID_FILE_TYPE" + | "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" + | "UNSUPPORTED_MIME_TYPE"; + +/** Event sent when product export is completed. */ +export type ProductExportCompleted = Event & { + /** The export file for products. */ + readonly export?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type ProductFieldEnum = + | "CATEGORY" + | "CHARGE_TAXES" + | "COLLECTIONS" + | "DESCRIPTION" + | "NAME" + | "PRODUCT_MEDIA" + | "PRODUCT_TYPE" + | "PRODUCT_WEIGHT" + | "VARIANT_ID" + | "VARIANT_MEDIA" + | "VARIANT_SKU" + | "VARIANT_WEIGHT"; + +export type ProductFilterInput = { + readonly attributes?: InputMaybe>; + /** Filter by the date of availability for purchase. */ + readonly availableFrom?: InputMaybe; + readonly categories?: InputMaybe>; + /** + * Specifies the channel by which the data should be filtered. + * @deprecated Use root-level channel argument instead. + */ + readonly channel?: InputMaybe; + readonly collections?: InputMaybe>; + /** Filter on whether product is a gift card or not. */ + readonly giftCard?: InputMaybe; + readonly hasCategory?: InputMaybe; + readonly hasPreorderedVariants?: InputMaybe; + readonly ids?: InputMaybe>; + /** Filter by availability for purchase. */ + readonly isAvailable?: InputMaybe; + readonly isPublished?: InputMaybe; + /** Filter by visibility in product listings. */ + readonly isVisibleInListing?: InputMaybe; + readonly metadata?: InputMaybe>; + /** Filter by the lowest variant price after discounts. */ + readonly minimalPrice?: InputMaybe; + readonly price?: InputMaybe; + readonly productTypes?: InputMaybe>; + /** Filter by the publication date. */ + readonly publishedFrom?: InputMaybe; + readonly search?: InputMaybe; + readonly slugs?: InputMaybe>; + /** Filter by variants having specific stock status. */ + readonly stockAvailability?: InputMaybe; + readonly stocks?: InputMaybe; + /** Filter by when was the most recent update. */ + readonly updatedAt?: InputMaybe; +}; + +/** Represents a product image. */ +export type ProductImage = { + /** The alt text of the image. */ + readonly alt?: Maybe; + /** The ID of the image. */ + readonly id: Scalars["ID"]["output"]; + /** 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. */ + readonly sortOrder?: Maybe; + /** The URL of the image. */ + readonly url: Scalars["String"]["output"]; +}; + +/** Represents a product image. */ +export type ProductImageUrlArgs = { + format?: InputMaybe; + size?: InputMaybe; +}; + +export type ProductInput = { + /** List of attributes. */ + readonly attributes?: InputMaybe>; + /** ID of the product's category. */ + readonly category?: InputMaybe; + /** + * Determine if taxes are being charged for the product. + * @deprecated Use `Channel.taxConfiguration` to configure whether tax collection is enabled. + */ + readonly chargeTaxes?: InputMaybe; + /** List of IDs of collections that the product belongs to. */ + readonly collections?: InputMaybe>; + /** + * Product description. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: InputMaybe; + /** External ID of this product. */ + readonly externalReference?: InputMaybe; + /** + * Fields required to update the product metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** Product name. */ + readonly name?: InputMaybe; + /** + * Fields required to update the product private metadata. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** Defines the product rating value. */ + readonly rating?: InputMaybe; + /** Search engine optimization fields. */ + readonly seo?: InputMaybe; + /** Product slug. */ + readonly slug?: InputMaybe; + /** 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. */ + readonly taxClass?: InputMaybe; + /** + * Tax rate for enabled tax gateway. + * @deprecated 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. + */ + readonly taxCode?: InputMaybe; + /** Weight of the Product. */ + readonly weight?: InputMaybe; +}; + +/** Represents a product media. */ +export type ProductMedia = Node & + ObjectWithMetadata & { + /** The alt text of the media. */ + readonly alt: Scalars["String"]["output"]; + /** The unique ID of the product media. */ + readonly id: Scalars["ID"]["output"]; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** The oEmbed data of the media. */ + readonly oembedData: Scalars["JSONString"]["output"]; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** Product id the media refers to. */ + readonly productId?: Maybe; + /** The sort order of the media. */ + readonly sortOrder?: Maybe; + /** The type of the media. */ + readonly type: ProductMediaType; + /** The URL of the media. */ + readonly url: Scalars["String"]["output"]; + }; + +/** Represents a product media. */ +export type ProductMediaMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a product media. */ +export type ProductMediaMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents a product media. */ +export type ProductMediaPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a product media. */ +export type ProductMediaPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents a product media. */ +export type ProductMediaUrlArgs = { + format?: InputMaybe; + size?: InputMaybe; +}; + +/** + * Deletes product media. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type ProductMediaBulkDelete = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; +}; + +/** + * 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. + */ +export type ProductMediaCreate = { + readonly errors: ReadonlyArray; + readonly media?: Maybe; + readonly product?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; +}; + +export type ProductMediaCreateInput = { + /** Alt text for a product media. */ + readonly alt?: InputMaybe; + /** Represents an image file in a multipart request. */ + readonly image?: InputMaybe; + /** Represents an URL to an external media. */ + readonly mediaUrl?: InputMaybe; + /** ID of an product. */ + readonly product: Scalars["ID"]["input"]; +}; + +/** Event sent when new product media is created. */ +export type ProductMediaCreated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The product media the event relates to. */ + readonly productMedia?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Deletes a product media. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type ProductMediaDelete = { + readonly errors: ReadonlyArray; + readonly media?: Maybe; + readonly product?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; +}; + +/** Event sent when product media is deleted. */ +export type ProductMediaDeleted = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The product media the event relates to. */ + readonly productMedia?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Changes ordering of the product media. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type ProductMediaReorder = { + readonly errors: ReadonlyArray; + readonly media?: Maybe>; + readonly product?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; +}; + +export type ProductMediaType = "IMAGE" | "VIDEO"; + +/** + * Updates a product media. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type ProductMediaUpdate = { + readonly errors: ReadonlyArray; + readonly media?: Maybe; + readonly product?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; +}; + +export type ProductMediaUpdateInput = { + /** Alt text for a product media. */ + readonly alt?: InputMaybe; +}; + +/** Event sent when product media is updated. */ +export type ProductMediaUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The product media the event relates to. */ + readonly productMedia?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when product metadata is updated. */ +export type ProductMetadataUpdated = Event & { + /** The category of the product. */ + readonly category?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The product the event relates to. */ + readonly product?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when product metadata is updated. */ +export type ProductMetadataUpdatedProductArgs = { + channel?: InputMaybe; +}; + +export type ProductOrder = { + /** + * Sort product by the selected attribute's values. + * Note: this doesn't take translations into account yet. + */ + readonly attributeId?: InputMaybe; + /** + * Specifies the channel in which to sort the data. + * @deprecated Use root-level channel argument instead. + */ + readonly channel?: InputMaybe; + /** Specifies the direction in which to sort products. */ + readonly direction: OrderDirection; + /** Sort products by the selected field. */ + readonly field?: InputMaybe; +}; + +export type 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. */ + | "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. */ +export type ProductPricingInfo = { + /** The discount amount if in sale (null otherwise). */ + readonly discount?: Maybe; + /** + * The discount amount in the local currency. + * @deprecated Always returns `null`. + */ + readonly discountLocalCurrency?: Maybe; + /** + * The discount amount compared to prior price. Null if product is not on sale or prior price was not provided in VariantChannelListing + * + * Added in Saleor 3.21. + */ + readonly discountPrior?: Maybe; + /** Determines whether displayed prices should include taxes. */ + readonly displayGrossPrices: Scalars["Boolean"]["output"]; + /** Whether it is in sale or not. */ + readonly onSale?: Maybe; + /** The discounted price range of the product variants. */ + readonly priceRange?: Maybe; + /** + * The discounted price range of the product variants in the local currency. + * @deprecated Always returns `null`. + */ + readonly priceRangeLocalCurrency?: Maybe; + /** + * The prior price range of the product variants. + * + * Added in Saleor 3.21. + */ + readonly priceRangePrior?: Maybe; + /** The undiscounted price range of the product variants. */ + readonly priceRangeUndiscounted?: Maybe; +}; + +/** + * Reorder product attribute values. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type ProductReorderAttributeValues = { + readonly errors: ReadonlyArray; + /** Product from which attribute values are reordered. */ + readonly product?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; +}; + +export type ProductStockFilterInput = { + readonly quantity?: InputMaybe; + readonly warehouseIds?: InputMaybe>; +}; + +/** Represents product's original translatable fields and related translations. */ +export type ProductTranslatableContent = Node & { + /** List of product attribute values that can be translated. */ + readonly attributeValues: ReadonlyArray; + /** + * Product's description to translate. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: Maybe; + /** + * Description of the product. + * + * Rich text format. For reference see https://editorjs.io/ + * @deprecated Use the `description` field instead. + */ + readonly descriptionJson?: Maybe; + /** The ID of the product translatable content. */ + readonly id: Scalars["ID"]["output"]; + /** Product's name to translate. */ + readonly name: Scalars["String"]["output"]; + /** + * Represents an individual item for sale in the storefront. + * @deprecated Get model fields from the root level queries. + */ + readonly product?: Maybe; + /** The ID of the product to translate. */ + readonly productId: Scalars["ID"]["output"]; + /** SEO description to translate. */ + readonly seoDescription?: Maybe; + /** SEO title to translate. */ + readonly seoTitle?: Maybe; + /** + * Slug to translate. + * + * Added in Saleor 3.21. + */ + readonly slug?: Maybe; + /** Returns translated product fields for the given language code. */ + readonly translation?: Maybe; +}; + +/** Represents product's original translatable fields and related translations. */ +export type ProductTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * Creates/updates translations for a product. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ +export type ProductTranslate = { + readonly errors: ReadonlyArray; + readonly product?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly translationErrors: ReadonlyArray; +}; + +export type ProductTranslateErrorCode = "GRAPHQL_ERROR" | "INVALID" | "NOT_FOUND" | "REQUIRED"; + +/** Represents product translations. */ +export type ProductTranslation = Node & { + /** + * Translated description of the product. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: Maybe; + /** + * Translated description of the product. + * + * Rich text format. For reference see https://editorjs.io/ + * @deprecated Use the `description` field instead. + */ + readonly descriptionJson?: Maybe; + /** The ID of the product translation. */ + readonly id: Scalars["ID"]["output"]; + /** Translation language. */ + readonly language: LanguageDisplay; + /** Translated product name. */ + readonly name?: Maybe; + /** Translated SEO description. */ + readonly seoDescription?: Maybe; + /** Translated SEO title. */ + readonly seoTitle?: Maybe; + /** + * Translated product slug. + * + * Added in Saleor 3.21. + */ + readonly slug?: Maybe; + /** Represents the product fields to translate. */ + readonly translatableContent?: Maybe; +}; + +/** Represents a type of product. It defines what attributes are available to products of this type. */ +export type ProductType = Node & + ObjectWithMetadata & { + /** Variant attributes of that product type with attached variant selection. */ + readonly assignedVariantAttributes?: Maybe>; + /** + * List of attributes which can be assigned to this product type. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly availableAttributes?: Maybe; + /** + * Whether the product type has variants. + * @deprecated This is a leftover from the past Simple/Configurable product distinction. Products can have multiple variants regardless of this setting. + */ + readonly hasVariants: Scalars["Boolean"]["output"]; + /** The ID of the product type. */ + readonly id: Scalars["ID"]["output"]; + /** + * Whether the product type is digital - doesn't have any effect, it's present for backward-compatibility. + * @deprecated Will be removed in v3.24.0, use metadata or attributes instead. + */ + readonly isDigital: Scalars["Boolean"]["output"]; + /** Whether shipping is required for this product type. */ + readonly isShippingRequired: Scalars["Boolean"]["output"]; + /** The product type kind. */ + readonly kind: ProductTypeKindEnum; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** Name of the product type. */ + readonly name: Scalars["String"]["output"]; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** Product attributes of that product type. */ + readonly productAttributes?: Maybe>; + /** + * List of products of this type. + * @deprecated Use the top-level `products` query with the `productTypes` filter. + */ + readonly products?: Maybe; + /** Slug of the product type. */ + readonly slug: Scalars["String"]["output"]; + /** + * 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. + */ + readonly taxClass?: Maybe; + /** + * A type of tax. Assigned by enabled tax gateway + * @deprecated Use `taxClass` field instead. + */ + readonly taxType?: Maybe; + /** + * Variant attributes of that product type. + * @deprecated Use `assignedVariantAttributes` instead. + */ + readonly variantAttributes?: Maybe>; + /** Weight of the product type. */ + readonly weight?: Maybe; + }; + +/** Represents a type of product. It defines what attributes are available to products of this type. */ +export type ProductTypeAssignedVariantAttributesArgs = { + variantSelection?: InputMaybe; +}; + +/** Represents a type of product. It defines what attributes are available to products of this type. */ +export type ProductTypeAvailableAttributesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + search?: InputMaybe; + where?: InputMaybe; +}; + +/** Represents a type of product. It defines what attributes are available to products of this type. */ +export type ProductTypeMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a type of product. It defines what attributes are available to products of this type. */ +export type ProductTypeMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents a type of product. It defines what attributes are available to products of this type. */ +export type ProductTypePrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a type of product. It defines what attributes are available to products of this type. */ +export type ProductTypePrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents a type of product. It defines what attributes are available to products of this type. */ +export type ProductTypeProductsArgs = { + after?: InputMaybe; + before?: InputMaybe; + channel?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +/** Represents a type of product. It defines what attributes are available to products of this type. */ +export type ProductTypeVariantAttributesArgs = { + variantSelection?: InputMaybe; +}; + +/** + * Deletes product types. + * + * Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. + */ +export type ProductTypeBulkDelete = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; +}; + +export type ProductTypeConfigurable = "CONFIGURABLE" | "SIMPLE"; + +export type ProductTypeCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type ProductTypeCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: ProductType; +}; + +/** + * Creates a new product type. + * + * Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. + */ +export type ProductTypeCreate = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; + readonly productType?: Maybe; +}; + +/** + * Deletes a product type. + * + * Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. + */ +export type ProductTypeDelete = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; + readonly productType?: Maybe; +}; + +export type ProductTypeEnum = "DIGITAL" | "SHIPPABLE"; + +export type ProductTypeFilterInput = { + /** @deprecated The field has no effect on the API behavior. This is a leftover from the past Simple/Configurable product distinction. Products can have multiple variants regardless of this setting. */ + readonly configurable?: InputMaybe; + readonly ids?: InputMaybe>; + readonly kind?: InputMaybe; + readonly metadata?: InputMaybe>; + readonly productType?: InputMaybe; + readonly search?: InputMaybe; + readonly slugs?: InputMaybe>; +}; + +export type 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. + * @deprecated The field has no effect on the API behavior. This is a leftover from the past Simple/Configurable product distinction. Products can have multiple variants regardless of this setting. + */ + readonly hasVariants?: InputMaybe; + /** Determines if products are digital - doesn't have any effect, it's present for backward-compatibility. */ + readonly isDigital?: InputMaybe; + /** Determines if shipping is required for products of this variant. */ + readonly isShippingRequired?: InputMaybe; + /** The product type kind. */ + readonly kind?: InputMaybe; + /** Name of the product type. */ + readonly name?: InputMaybe; + /** List of attributes shared among all product variants. */ + readonly productAttributes?: InputMaybe>; + /** Product type slug. */ + readonly slug?: InputMaybe; + /** 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. */ + readonly taxClass?: InputMaybe; + /** + * Tax rate for enabled tax gateway. + * @deprecated 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. + */ + readonly taxCode?: InputMaybe; + /** List of attributes used to distinguish between different variants of a product. */ + readonly variantAttributes?: InputMaybe>; + /** Weight of the ProductType items. */ + readonly weight?: InputMaybe; +}; + +export type ProductTypeKindEnum = "GIFT_CARD" | "NORMAL"; + +/** + * Reorder the attributes of a product type. + * + * Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. + */ +export type ProductTypeReorderAttributes = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; + /** Product type from which attributes are reordered. */ + readonly productType?: Maybe; +}; + +export type ProductTypeSortField = + /** Sort products by type. */ + | "DIGITAL" + /** Sort products by name. */ + | "NAME" + /** Sort products by shipping. */ + | "SHIPPING_REQUIRED"; + +export type ProductTypeSortingInput = { + /** Specifies the direction in which to sort product types. */ + readonly direction: OrderDirection; + /** Sort product types by the selected field. */ + readonly field: ProductTypeSortField; +}; + +/** + * Updates an existing product type. + * + * Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. + */ +export type ProductTypeUpdate = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; + readonly productType?: Maybe; +}; + +/** + * Updates an existing product. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type ProductUpdate = { + readonly errors: ReadonlyArray; + readonly product?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; +}; + +/** Event sent when product is updated. */ +export type ProductUpdated = Event & { + /** The category of the product. */ + readonly category?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The product the event relates to. */ + readonly product?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when product is updated. */ +export type ProductUpdatedProductArgs = { + channel?: InputMaybe; +}; + +/** Represents a version of a product such as different size or color. */ +export type ProductVariant = Node & + ObjectWithAttributes & + ObjectWithMetadata & { + /** + * Get a single attribute attached to product by attribute slug. + * + * Added in Saleor 3.22. + */ + readonly assignedAttribute?: Maybe; + /** + * List of attributes assigned to this variant. + * + * Added in Saleor 3.22. + */ + readonly assignedAttributes: ReadonlyArray; + /** + * List of attributes assigned to this variant. + * @deprecated Use the `assignedAttributes` field instead. + */ + readonly attributes: ReadonlyArray; + /** Channel given to retrieve this product variant. Also used by federation gateway to resolve this object in a federated query. */ + readonly channel?: Maybe; + /** + * List of price information in channels for the product. + * + * Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. + */ + readonly channelListings?: Maybe>; + /** The date and time when the product variant was created. */ + readonly created: Scalars["DateTime"]["output"]; + /** External ID of this product. */ + readonly externalReference?: Maybe; + /** The ID of the product variant. */ + readonly id: Scalars["ID"]["output"]; + /** + * List of images for the product variant. + * @deprecated Use the `media` field instead. + */ + readonly images?: Maybe>; + /** Gross margin percentage value. */ + readonly margin?: Maybe; + /** List of media for the product variant. */ + readonly media?: Maybe>; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** The name of the product variant. */ + readonly name: Scalars["String"]["output"]; + /** Preorder data for product variant. */ + readonly preorder?: Maybe; + /** Lists the storefront variant's pricing, the current price and discounts, only meant for displaying. */ + readonly pricing?: Maybe; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** The product to which the variant belongs. */ + readonly 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. */ + readonly quantityAvailable?: Maybe; + /** The maximum quantity of this variant that a customer can purchase. */ + readonly quantityLimitPerCustomer?: Maybe; + /** + * Total quantity ordered. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly quantityOrdered?: Maybe; + /** + * 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. + */ + readonly revenue?: Maybe; + /** The SKU (stock keeping unit) of the product variant. */ + readonly sku?: Maybe; + /** + * Stocks for the product variant. + * + * Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS. + */ + readonly stocks?: Maybe>; + /** 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. */ + readonly trackInventory: Scalars["Boolean"]["output"]; + /** Returns translated product variant fields for the given language code. */ + readonly translation?: Maybe; + /** The date and time when the product variant was last updated. */ + readonly updatedAt: Scalars["DateTime"]["output"]; + /** The weight of the product variant. */ + readonly weight?: Maybe; + }; + +/** Represents a version of a product such as different size or color. */ +export type ProductVariantAssignedAttributeArgs = { + slug: Scalars["String"]["input"]; +}; + +/** Represents a version of a product such as different size or color. */ +export type ProductVariantAssignedAttributesArgs = { + limit?: InputMaybe; +}; + +/** Represents a version of a product such as different size or color. */ +export type ProductVariantAttributesArgs = { + variantSelection?: InputMaybe; +}; + +/** Represents a version of a product such as different size or color. */ +export type ProductVariantMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a version of a product such as different size or color. */ +export type ProductVariantMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents a version of a product such as different size or color. */ +export type ProductVariantPricingArgs = { + address?: InputMaybe; +}; + +/** Represents a version of a product such as different size or color. */ +export type ProductVariantPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a version of a product such as different size or color. */ +export type ProductVariantPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents a version of a product such as different size or color. */ +export type ProductVariantQuantityAvailableArgs = { + address?: InputMaybe; + countryCode?: InputMaybe; +}; + +/** Represents a version of a product such as different size or color. */ +export type ProductVariantRevenueArgs = { + period?: InputMaybe; +}; + +/** Represents a version of a product such as different size or color. */ +export type ProductVariantStocksArgs = { + address?: InputMaybe; + countryCode?: InputMaybe; +}; + +/** Represents a version of a product such as different size or color. */ +export type ProductVariantTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** Event sent when product variant is back in stock. */ +export type ProductVariantBackInStock = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The product variant the event relates to. */ + readonly productVariant?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; + /** Look up a warehouse. */ + readonly warehouse?: Maybe; +}; + +/** Event sent when product variant is back in stock. */ +export type ProductVariantBackInStockProductVariantArgs = { + channel?: InputMaybe; +}; + +/** + * Event sent when a product variant becomes available again across click-and-collect warehouses in a channel. + * + * Note: Only triggered when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + * + * Added in Saleor 3.23. + */ +export type ProductVariantBackInStockForClickAndCollect = Event & { + /** The channel the stock availability changed in. */ + readonly channel: Channel; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The product variant the event relates to. */ + readonly productVariant: ProductVariant; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Event sent when a product variant becomes available again across non click-and-collect warehouses in a channel. + * + * Note: Only triggered when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + * + * Added in Saleor 3.23. + */ +export type ProductVariantBackInStockInChannel = Event & { + /** The channel the stock availability changed in. */ + readonly channel: Channel; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The product variant the event relates to. */ + readonly productVariant: ProductVariant; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Creates product variants for a given product. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type ProductVariantBulkCreate = { + /** @deprecated Use `errors` field instead. */ + readonly bulkProductErrors: ReadonlyArray; + /** Returns how many objects were created. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** List of the created variants. */ + readonly productVariants: ReadonlyArray; + /** List of the created variants. */ + readonly results: ReadonlyArray; +}; + +export type ProductVariantBulkCreateInput = { + /** List of attributes specific to this variant. */ + readonly attributes: ReadonlyArray; + /** List of prices assigned to channels. */ + readonly channelListings?: InputMaybe>; + /** External ID of this product variant. */ + readonly externalReference?: InputMaybe; + /** + * Fields required to update the product variant metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** Variant name. */ + readonly name?: InputMaybe; + /** Determines if variant is in preorder. */ + readonly preorder?: InputMaybe; + /** + * Fields required to update the product variant private metadata. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** Determines maximum quantity of `ProductVariant`,that can be bought in a single checkout. */ + readonly quantityLimitPerCustomer?: InputMaybe; + /** Stock keeping unit. */ + readonly sku?: InputMaybe; + /** Stocks of a product available for sale. */ + readonly stocks?: InputMaybe>; + /** 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. */ + readonly trackInventory?: InputMaybe; + /** Weight of the Product Variant. */ + readonly weight?: InputMaybe; +}; + +/** + * Deletes product variants. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type ProductVariantBulkDelete = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; +}; + +export type ProductVariantBulkError = { + /** List of attributes IDs which causes the error. */ + readonly attributes?: Maybe>; + /** List of channel listings IDs which causes the error. */ + readonly channelListings?: Maybe>; + /** List of channel IDs which causes the error. */ + readonly channels?: Maybe>; + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly path?: Maybe; + /** List of stocks IDs which causes the error. */ + readonly stocks?: Maybe>; + /** List of attribute values IDs which causes the error. */ + readonly values?: Maybe>; + /** List of warehouse IDs which causes the error. */ + readonly warehouses?: Maybe>; +}; + +export type 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"; + +export type ProductVariantBulkResult = { + /** List of errors occurred on create attempt. */ + readonly errors?: Maybe>; + /** Product variant data. */ + readonly productVariant?: Maybe; +}; + +/** + * Creates/updates translations for product variants. + * + * 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. + */ +export type ProductVariantBulkTranslate = { + /** Returns how many translations were created/updated. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** List of the translations. */ + readonly results: ReadonlyArray; +}; + +export type ProductVariantBulkTranslateError = { + /** The error code. */ + readonly code: ProductVariantTranslateErrorCode; + /** The error message. */ + readonly message?: Maybe; + /** Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly path?: Maybe; +}; + +export type ProductVariantBulkTranslateInput = { + /** External reference of a product variant. */ + readonly externalReference?: InputMaybe; + /** Product variant ID. */ + readonly id?: InputMaybe; + /** Translation language code. */ + readonly languageCode: LanguageCodeEnum; + /** Translation fields. */ + readonly translationFields: NameTranslationInput; +}; + +export type ProductVariantBulkTranslateResult = { + /** List of errors occurred on translation attempt. */ + readonly errors?: Maybe>; + /** Product variant translation data. */ + readonly translation?: Maybe; +}; + +/** + * Updates multiple product variants. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type ProductVariantBulkUpdate = { + /** Returns how many objects were updated. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** List of the updated variants. */ + readonly results: ReadonlyArray; +}; + +/** Input fields to update product variants. */ +export type ProductVariantBulkUpdateInput = { + /** List of attributes specific to this variant. */ + readonly attributes?: InputMaybe>; + /** Channel listings input. */ + readonly channelListings?: InputMaybe; + /** External ID of this product variant. */ + readonly externalReference?: InputMaybe; + /** ID of the product variant to update. */ + readonly id: Scalars["ID"]["input"]; + /** + * Fields required to update the product variant metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** Variant name. */ + readonly name?: InputMaybe; + /** Determines if variant is in preorder. */ + readonly preorder?: InputMaybe; + /** + * Fields required to update the product variant private metadata. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** Determines maximum quantity of `ProductVariant`,that can be bought in a single checkout. */ + readonly quantityLimitPerCustomer?: InputMaybe; + /** Stock keeping unit. */ + readonly sku?: InputMaybe; + /** Stocks input. */ + readonly stocks?: InputMaybe; + /** 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. */ + readonly trackInventory?: InputMaybe; + /** Weight of the Product Variant. */ + readonly weight?: InputMaybe; +}; + +/** Represents product variant channel listing. */ +export type ProductVariantChannelListing = Node & { + /** The channel to which the variant listing belongs. */ + readonly channel: Channel; + /** Cost price of the variant. */ + readonly costPrice?: Maybe; + /** The ID of the variant channel listing. */ + readonly id: Scalars["ID"]["output"]; + /** + * Gross margin percentage value. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly margin?: Maybe; + /** Preorder variant data. */ + readonly preorderThreshold?: Maybe; + /** The price of the variant. */ + readonly price?: Maybe; + /** + * Previous price of the variant in channel. Useful for providing promotion information required by customer protection laws such as EU Omnibus directive. + * + * Warning: This field is not updated automatically. Use Channel Listings mutation to update it manually. + * + * Added in Saleor 3.21. + */ + readonly priorPrice?: Maybe; +}; + +export type ProductVariantChannelListingAddInput = { + /** ID of a channel. */ + readonly channelId: Scalars["ID"]["input"]; + /** Cost price of the variant in channel. */ + readonly costPrice?: InputMaybe; + /** The threshold for preorder variant in channel. */ + readonly preorderThreshold?: InputMaybe; + /** Price of the particular variant in channel. */ + readonly price: Scalars["PositiveDecimal"]["input"]; + /** + * Previous price of the variant in channel. Useful for providing promotion information required by customer protection laws such as EU Omnibus directive. + * + * Added in Saleor 3.21. + */ + readonly priorPrice?: InputMaybe; +}; + +/** + * Manage product variant prices in channels. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type ProductVariantChannelListingUpdate = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly productChannelListingErrors: ReadonlyArray; + /** An updated product variant instance. */ + readonly variant?: Maybe; +}; + +export type ProductVariantChannelListingUpdateInput = { + /** List of channels to create variant channel listings. */ + readonly create?: InputMaybe>; + /** List of channel listings to remove. */ + readonly remove?: InputMaybe>; + /** List of channel listings to update. */ + readonly update?: InputMaybe>; +}; + +export type ProductVariantCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type ProductVariantCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: ProductVariant; +}; + +/** + * Creates a new variant for a product. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type ProductVariantCreate = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; + readonly productVariant?: Maybe; +}; + +export type ProductVariantCreateInput = { + /** List of attributes specific to this variant. */ + readonly attributes: ReadonlyArray; + /** External ID of this product variant. */ + readonly externalReference?: InputMaybe; + /** + * Fields required to update the product variant metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** Variant name. */ + readonly name?: InputMaybe; + /** Determines if variant is in preorder. */ + readonly preorder?: InputMaybe; + /** + * Fields required to update the product variant private metadata. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** Product ID of which type is the variant. */ + readonly product: Scalars["ID"]["input"]; + /** Determines maximum quantity of `ProductVariant`,that can be bought in a single checkout. */ + readonly quantityLimitPerCustomer?: InputMaybe; + /** Stock keeping unit. */ + readonly sku?: InputMaybe; + /** Stocks of a product available for sale. */ + readonly stocks?: InputMaybe>; + /** 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. */ + readonly trackInventory?: InputMaybe; + /** Weight of the Product Variant. */ + readonly weight?: InputMaybe; +}; + +/** Event sent when new product variant is created. */ +export type ProductVariantCreated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The product variant the event relates to. */ + readonly productVariant?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when new product variant is created. */ +export type ProductVariantCreatedProductVariantArgs = { + channel?: InputMaybe; +}; + +/** + * Deletes a product variant. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type ProductVariantDelete = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; + readonly productVariant?: Maybe; +}; + +/** Event sent when product variant is deleted. */ +export type ProductVariantDeleted = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The product variant the event relates to. */ + readonly productVariant?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when product variant is deleted. */ +export type ProductVariantDeletedProductVariantArgs = { + channel?: InputMaybe; +}; + +/** + * Event sent when product variant discounted price is recalculated. + * + * Added in Saleor 3.22. + */ +export type ProductVariantDiscountedPriceUpdated = Event & { + /** The channel where the price changed. */ + readonly channel: Channel; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The new discounted price. */ + readonly newPrice: Money; + /** The previous discounted price. */ + readonly previousPrice: Money; + /** The product variant the event relates to. */ + readonly productVariant: ProductVariant; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type ProductVariantFilterInput = { + readonly isPreorder?: InputMaybe; + readonly metadata?: InputMaybe>; + readonly search?: InputMaybe; + readonly sku?: InputMaybe>; + readonly updatedAt?: InputMaybe; +}; + +export type ProductVariantInput = { + /** List of attributes specific to this variant. */ + readonly attributes?: InputMaybe>; + /** External ID of this product variant. */ + readonly externalReference?: InputMaybe; + /** + * Fields required to update the product variant metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** Variant name. */ + readonly name?: InputMaybe; + /** Determines if variant is in preorder. */ + readonly preorder?: InputMaybe; + /** + * Fields required to update the product variant private metadata. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** Determines maximum quantity of `ProductVariant`,that can be bought in a single checkout. */ + readonly quantityLimitPerCustomer?: InputMaybe; + /** Stock keeping unit. */ + readonly sku?: InputMaybe; + /** 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. */ + readonly trackInventory?: InputMaybe; + /** Weight of the Product Variant. */ + readonly weight?: InputMaybe; +}; + +/** Event sent when product variant metadata is updated. */ +export type ProductVariantMetadataUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The product variant the event relates to. */ + readonly productVariant?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when product variant metadata is updated. */ +export type ProductVariantMetadataUpdatedProductVariantArgs = { + channel?: InputMaybe; +}; + +/** Event sent when product variant is out of stock. */ +export type ProductVariantOutOfStock = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The product variant the event relates to. */ + readonly productVariant?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; + /** Look up a warehouse. */ + readonly warehouse?: Maybe; +}; + +/** Event sent when product variant is out of stock. */ +export type ProductVariantOutOfStockProductVariantArgs = { + channel?: InputMaybe; +}; + +/** + * Event sent when a product variant becomes out of stock across all click-and-collect warehouses in a channel. + * + * Note: Only triggered when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + * + * Added in Saleor 3.23. + */ +export type ProductVariantOutOfStockForClickAndCollect = Event & { + /** The channel the stock availability changed in. */ + readonly channel: Channel; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The product variant the event relates to. */ + readonly productVariant: ProductVariant; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Event sent when a product variant becomes out of stock across all non click-and-collect warehouses in a channel. + * + * Note: Only triggered when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + * + * Added in Saleor 3.23. + */ +export type ProductVariantOutOfStockInChannel = Event & { + /** The channel the stock availability changed in. */ + readonly channel: Channel; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The product variant the event relates to. */ + readonly productVariant: ProductVariant; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Deactivates product variant preorder. It changes all preorder allocation into regular allocation. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type ProductVariantPreorderDeactivate = { + readonly errors: ReadonlyArray; + /** Product variant with ended preorder. */ + readonly productVariant?: Maybe; +}; + +/** + * 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. + */ +export type ProductVariantReorder = { + readonly errors: ReadonlyArray; + readonly product?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; +}; + +/** + * Reorder product variant attribute values. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type ProductVariantReorderAttributeValues = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; + /** Product variant from which attribute values are reordered. */ + readonly productVariant?: Maybe; +}; + +/** + * Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type ProductVariantSetDefault = { + readonly errors: ReadonlyArray; + readonly product?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; +}; + +export type ProductVariantSortField = + /** Sort product variants by last modification date. */ + "LAST_MODIFIED_AT"; + +export type ProductVariantSortingInput = { + /** Specifies the direction in which to sort productVariants. */ + readonly direction: OrderDirection; + /** Sort productVariants by the selected field. */ + readonly field: ProductVariantSortField; +}; + +/** Event sent when product variant stock is updated. */ +export type ProductVariantStockUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The product variant the event relates to. */ + readonly productVariant?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; + /** Look up a warehouse. */ + readonly warehouse?: Maybe; +}; + +/** Event sent when product variant stock is updated. */ +export type ProductVariantStockUpdatedProductVariantArgs = { + channel?: InputMaybe; +}; + +/** + * Creates stocks for product variant. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + * + * Triggers the following webhook events: + * - PRODUCT_VARIANT_BACK_IN_STOCK (async): A product variant stock is created in a warehouse. + * - PRODUCT_VARIANT_BACK_IN_STOCK_IN_CHANNEL (async): A product variant is back in stock in a channel (non click-and-collect warehouses). + * + * Note: Triggered only when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + * - PRODUCT_VARIANT_BACK_IN_STOCK_FOR_CLICK_AND_COLLECT (async): A product variant is back in stock in a channel (click-and-collect warehouses). + * + * Note: Triggered only when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + */ +export type ProductVariantStocksCreate = { + /** @deprecated Use `errors` field instead. */ + readonly bulkStockErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** Updated product variant. */ + readonly productVariant?: Maybe; +}; + +/** + * Deletes stocks from product variant. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + * + * Triggers the following webhook events: + * - PRODUCT_VARIANT_OUT_OF_STOCK (async): A product variant stock is deleted from a warehouse. + * - PRODUCT_VARIANT_OUT_OF_STOCK_IN_CHANNEL (async): A product variant is out of stock in a channel (non click-and-collect warehouses). + * + * Note: Triggered only when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + * - PRODUCT_VARIANT_OUT_OF_STOCK_FOR_CLICK_AND_COLLECT (async): A product variant is out of stock in a channel (click-and-collect warehouses). + * + * Note: Triggered only when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + */ +export type ProductVariantStocksDelete = { + readonly errors: ReadonlyArray; + /** Updated product variant. */ + readonly productVariant?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly stockErrors: ReadonlyArray; +}; + +/** + * Updates stocks for product variant. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + * + * Triggers the following webhook events: + * - PRODUCT_VARIANT_STOCK_UPDATED (async): A product variant stock is updated. + * - PRODUCT_VARIANT_BACK_IN_STOCK (async): A product variant stock transitioned from no availability to available quantity. + * - PRODUCT_VARIANT_OUT_OF_STOCK (async): A product variant stock transitioned from available quantity to no availability. + * - PRODUCT_VARIANT_BACK_IN_STOCK_IN_CHANNEL (async): A product variant is back in stock in a channel (non click-and-collect warehouses). + * + * Note: Triggered only when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + * - PRODUCT_VARIANT_OUT_OF_STOCK_IN_CHANNEL (async): A product variant is out of stock in a channel (non click-and-collect warehouses). + * + * Note: Triggered only when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + * - PRODUCT_VARIANT_BACK_IN_STOCK_FOR_CLICK_AND_COLLECT (async): A product variant is back in stock in a channel (click-and-collect warehouses). + * + * Note: Triggered only when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + * - PRODUCT_VARIANT_OUT_OF_STOCK_FOR_CLICK_AND_COLLECT (async): A product variant is out of stock in a channel (click-and-collect warehouses). + * + * Note: Triggered only when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + */ +export type ProductVariantStocksUpdate = { + /** @deprecated Use `errors` field instead. */ + readonly bulkStockErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** Updated product variant. */ + readonly productVariant?: Maybe; +}; + +export type ProductVariantStocksUpdateInput = { + /** List of warehouses to create stocks. */ + readonly create?: InputMaybe>; + /** List of stocks to remove. */ + readonly remove?: InputMaybe>; + /** List of stocks to update. */ + readonly update?: InputMaybe>; +}; + +/** Represents product variant's original translatable fields and related translations. */ +export type ProductVariantTranslatableContent = Node & { + /** List of product variant attribute values that can be translated. */ + readonly attributeValues: ReadonlyArray; + /** The ID of the product variant translatable content. */ + readonly id: Scalars["ID"]["output"]; + /** Name of the product variant to translate. */ + readonly name: Scalars["String"]["output"]; + /** + * Represents a version of a product such as different size or color. + * @deprecated Get model fields from the root level queries. + */ + readonly productVariant?: Maybe; + /** The ID of the product variant to translate. */ + readonly productVariantId: Scalars["ID"]["output"]; + /** Returns translated product variant fields for the given language code. */ + readonly translation?: Maybe; +}; + +/** Represents product variant's original translatable fields and related translations. */ +export type ProductVariantTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * Creates/updates translations for a product variant. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ +export type ProductVariantTranslate = { + readonly errors: ReadonlyArray; + readonly productVariant?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly translationErrors: ReadonlyArray; +}; + +export type ProductVariantTranslateErrorCode = + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND" + | "REQUIRED"; + +/** Represents product variant translations. */ +export type ProductVariantTranslation = Node & { + /** The ID of the product variant translation. */ + readonly id: Scalars["ID"]["output"]; + /** Translation language. */ + readonly language: LanguageDisplay; + /** Translated product variant name. */ + readonly name: Scalars["String"]["output"]; + /** Represents the product variant fields to translate. */ + readonly translatableContent?: Maybe; +}; + +/** + * Updates an existing variant for product. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type ProductVariantUpdate = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; + readonly productVariant?: Maybe; +}; + +/** Event sent when product variant is updated. */ +export type ProductVariantUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The product variant the event relates to. */ + readonly productVariant?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when product variant is updated. */ +export type ProductVariantUpdatedProductVariantArgs = { + channel?: InputMaybe; +}; + +export type ProductVariantWhereInput = { + /** List of conditions that must be met. */ + readonly AND?: InputMaybe>; + /** A list of conditions of which at least one must be met. */ + readonly OR?: InputMaybe>; + /** + * Filter by attributes associated with the variant. + * + * Added in Saleor 3.22. + */ + readonly attributes?: InputMaybe>; + readonly ids?: InputMaybe>; + readonly metadata?: InputMaybe>; + /** Filter by product SKU. */ + readonly sku?: InputMaybe; + /** Filter by when was the most recent update. */ + readonly updatedAt?: InputMaybe; +}; + +export type ProductWhereInput = { + /** List of conditions that must be met. */ + readonly AND?: InputMaybe>; + /** A list of conditions of which at least one must be met. */ + readonly OR?: InputMaybe>; + /** Filter by attributes associated with the product. */ + readonly attributes?: InputMaybe>; + /** Filter by the date of availability for purchase. */ + readonly availableFrom?: InputMaybe; + /** Filter by product category. */ + readonly category?: InputMaybe; + /** Filter by collection. */ + readonly collection?: InputMaybe; + /** Filter on whether product is a gift card or not. */ + readonly giftCard?: InputMaybe; + /** Filter by product with category assigned. */ + readonly hasCategory?: InputMaybe; + /** Filter by product with preordered variants. */ + readonly hasPreorderedVariants?: InputMaybe; + readonly ids?: InputMaybe>; + /** Filter by availability for purchase. */ + readonly isAvailable?: InputMaybe; + /** Filter by public visibility. */ + readonly isPublished?: InputMaybe; + /** Filter by visibility on the channel. */ + readonly isVisibleInListing?: InputMaybe; + readonly metadata?: InputMaybe>; + /** Filter by the lowest variant price after discounts. */ + readonly minimalPrice?: InputMaybe; + /** Filter by product name. */ + readonly name?: InputMaybe; + /** Filter by product variant price. */ + readonly price?: InputMaybe; + /** Filter by product type. */ + readonly productType?: InputMaybe; + /** Filter by the publication date. */ + readonly publishedFrom?: InputMaybe; + /** Filter by product slug. */ + readonly slug?: InputMaybe; + /** Filter by variants having specific stock status. */ + readonly stockAvailability?: InputMaybe; + /** Filter by stock of the product variant. */ + readonly stocks?: InputMaybe; + /** Filter by when was the most recent update. */ + readonly updatedAt?: InputMaybe; +}; + +/** Represents the promotion that allow creating discounts based on given conditions, and is visible to all the customers. */ +export type Promotion = Node & + ObjectWithMetadata & { + /** Date time of promotion creation. */ + readonly createdAt: Scalars["DateTime"]["output"]; + /** Description of the promotion. */ + readonly description?: Maybe; + /** End date of the promotion. */ + readonly endDate?: Maybe; + /** The list of events associated with the promotion. */ + readonly events?: Maybe>; + readonly id: Scalars["ID"]["output"]; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** Name of the promotion. */ + readonly name: Scalars["String"]["output"]; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** The list of promotion rules. */ + readonly rules?: Maybe>; + /** Start date of the promotion. */ + readonly startDate: Scalars["DateTime"]["output"]; + /** Returns translated promotion fields for the given language code. */ + readonly translation?: Maybe; + /** + * 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. + */ + readonly type?: Maybe; + /** Date time of last update of promotion. */ + readonly updatedAt: Scalars["DateTime"]["output"]; + }; + +/** Represents the promotion that allow creating discounts based on given conditions, and is visible to all the customers. */ +export type PromotionMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents the promotion that allow creating discounts based on given conditions, and is visible to all the customers. */ +export type PromotionMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents the promotion that allow creating discounts based on given conditions, and is visible to all the customers. */ +export type PromotionPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents the promotion that allow creating discounts based on given conditions, and is visible to all the customers. */ +export type PromotionPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents the promotion that allow creating discounts based on given conditions, and is visible to all the customers. */ +export type PromotionTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * Deletes promotions. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - PROMOTION_DELETED (async): A promotion was deleted. + */ +export type PromotionBulkDelete = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; +}; + +export type PromotionCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type PromotionCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: Promotion; +}; + +/** + * Creates a new promotion. + * + * 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. + */ +export type PromotionCreate = { + readonly errors: ReadonlyArray; + readonly promotion?: Maybe; +}; + +export type PromotionCreateError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** Limit of gifts assigned to promotion rule. */ + readonly giftsLimit?: Maybe; + /** Number of gifts defined for this promotion rule exceeding the limit. */ + readonly giftsLimitExceedBy?: Maybe; + /** Index of an input list item that caused the error. */ + readonly index?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** Limit of rules with orderPredicate defined. */ + readonly rulesLimit?: Maybe; + /** Number of rules with orderPredicate defined exceeding the limit. */ + readonly rulesLimitExceedBy?: Maybe; +}; + +export type PromotionCreateErrorCode = + | "GIFTS_NUMBER_LIMIT" + | "GRAPHQL_ERROR" + | "INVALID" + | "INVALID_GIFT_TYPE" + | "INVALID_PRECISION" + | "MISSING_CHANNELS" + | "MULTIPLE_CURRENCIES_NOT_ALLOWED" + | "NOT_FOUND" + | "REQUIRED" + | "RULES_NUMBER_LIMIT"; + +export type PromotionCreateInput = { + /** Promotion description. */ + readonly description?: InputMaybe; + /** The end date of the promotion in ISO 8601 format. */ + readonly endDate?: InputMaybe; + /** Promotion name. */ + readonly name: Scalars["String"]["input"]; + /** List of promotion rules. */ + readonly rules?: InputMaybe>; + /** The start date of the promotion in ISO 8601 format. */ + readonly startDate?: InputMaybe; + /** + * 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. + */ + readonly type: PromotionTypeEnum; +}; + +/** Event sent when new promotion is created. */ +export type PromotionCreated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The promotion the event relates to. */ + readonly promotion?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** History log of the promotion created event. */ +export type PromotionCreatedEvent = Node & + PromotionEventInterface & { + /** + * User or App that created the promotion event. + * + * Requires one of the following permissions: MANAGE_STAFF, MANAGE_APPS, OWNER. + */ + readonly createdBy?: Maybe; + /** Date when event happened. */ + readonly date: Scalars["DateTime"]["output"]; + readonly id: Scalars["ID"]["output"]; + /** Promotion event type. */ + readonly type: PromotionEventsEnum; + }; + +/** + * Deletes a promotion. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - PROMOTION_DELETED (async): A promotion was deleted. + */ +export type PromotionDelete = { + readonly errors: ReadonlyArray; + readonly promotion?: Maybe; +}; + +export type PromotionDeleteError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type PromotionDeleteErrorCode = "GRAPHQL_ERROR" | "NOT_FOUND"; + +/** Event sent when promotion is deleted. */ +export type PromotionDeleted = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The promotion the event relates to. */ + readonly promotion?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** The event informs about the end of the promotion. */ +export type PromotionEnded = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The promotion the event relates to. */ + readonly promotion?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** History log of the promotion ended event. */ +export type PromotionEndedEvent = Node & + PromotionEventInterface & { + /** + * User or App that created the promotion event. + * + * Requires one of the following permissions: MANAGE_STAFF, MANAGE_APPS, OWNER. + */ + readonly createdBy?: Maybe; + /** Date when event happened. */ + readonly date: Scalars["DateTime"]["output"]; + readonly id: Scalars["ID"]["output"]; + /** Promotion event type. */ + readonly type: PromotionEventsEnum; + }; + +export type PromotionEvent = + | PromotionCreatedEvent + | PromotionEndedEvent + | PromotionRuleCreatedEvent + | PromotionRuleDeletedEvent + | PromotionRuleUpdatedEvent + | PromotionStartedEvent + | PromotionUpdatedEvent; + +export type PromotionEventInterface = { + /** + * User or App that created the promotion event. + * + * Requires one of the following permissions: MANAGE_STAFF, MANAGE_APPS, OWNER. + */ + readonly createdBy?: Maybe; + /** Date when event happened. */ + readonly date: Scalars["DateTime"]["output"]; + readonly id: Scalars["ID"]["output"]; + /** Promotion event type. */ + readonly type: PromotionEventsEnum; +}; + +export type 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. */ +export type PromotionRule = Node & { + /** The catalogue predicate that must be met to apply the rule reward. */ + readonly cataloguePredicate?: Maybe; + /** + * List of channels where the rule applies. + * + * Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. + */ + readonly channels?: Maybe>; + /** Description of the promotion rule. */ + readonly description?: Maybe; + /** + * 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. + */ + readonly giftIds?: Maybe>; + /** + * 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. + */ + readonly giftsLimit?: Maybe; + readonly id: Scalars["ID"]["output"]; + /** Name of the promotion rule. */ + readonly name?: Maybe; + /** + * 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. + */ + readonly orderPredicate?: Maybe; + /** + * 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. + */ + readonly predicateType?: Maybe; + /** Promotion to which the rule belongs. */ + readonly promotion?: Maybe; + /** + * 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. + */ + readonly rewardType?: Maybe; + /** + * 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. + */ + readonly rewardValue?: Maybe; + /** The type of reward value of the promotion rule. */ + readonly rewardValueType?: Maybe; + /** Returns translated promotion rule fields for the given language code. */ + readonly translation?: Maybe; +}; + +/** Represents the promotion rule that specifies the conditions that must be met to apply the promotion discount. */ +export type PromotionRuleTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * Creates a new promotion rule. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - PROMOTION_RULE_CREATED (async): A promotion rule was created. + */ +export type PromotionRuleCreate = { + readonly errors: ReadonlyArray; + readonly promotionRule?: Maybe; +}; + +export type PromotionRuleCreateError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** Limit of gifts assigned to promotion rule. */ + readonly giftsLimit?: Maybe; + /** Number of gifts defined for this promotion rule exceeding the limit. */ + readonly giftsLimitExceedBy?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** Limit of rules with orderPredicate defined. */ + readonly rulesLimit?: Maybe; + /** Number of rules with orderPredicate defined exceeding the limit. */ + readonly rulesLimitExceedBy?: Maybe; +}; + +export type PromotionRuleCreateErrorCode = + | "GIFTS_NUMBER_LIMIT" + | "GRAPHQL_ERROR" + | "INVALID" + | "INVALID_GIFT_TYPE" + | "INVALID_PRECISION" + | "MISSING_CHANNELS" + | "MULTIPLE_CURRENCIES_NOT_ALLOWED" + | "NOT_FOUND" + | "REQUIRED" + | "RULES_NUMBER_LIMIT"; + +export type PromotionRuleCreateInput = { + /** Defines the conditions on the catalogue level that must be met for the reward to be applied. */ + readonly cataloguePredicate?: InputMaybe; + /** List of channel ids to which the rule should apply to. */ + readonly channels?: InputMaybe>; + /** Promotion rule description. */ + readonly description?: InputMaybe; + /** + * 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. + */ + readonly gifts?: InputMaybe>; + /** Promotion rule name. */ + readonly name?: InputMaybe; + /** + * 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. + */ + readonly orderPredicate?: InputMaybe; + /** The ID of the promotion that rule belongs to. */ + readonly promotion: Scalars["ID"]["input"]; + /** + * 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. + */ + readonly rewardType?: InputMaybe; + /** Defines the discount value. Required when catalogue predicate is provided. */ + readonly rewardValue?: InputMaybe; + /** Defines the promotion rule reward value type. Must be provided together with reward value. */ + readonly rewardValueType?: InputMaybe; +}; + +/** Event sent when new promotion rule is created. */ +export type PromotionRuleCreated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The promotion rule the event relates to. */ + readonly promotionRule?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** History log of the promotion rule created event. */ +export type PromotionRuleCreatedEvent = Node & + PromotionEventInterface & + PromotionRuleEventInterface & { + /** + * User or App that created the promotion event. + * + * Requires one of the following permissions: MANAGE_STAFF, MANAGE_APPS, OWNER. + */ + readonly createdBy?: Maybe; + /** Date when event happened. */ + readonly date: Scalars["DateTime"]["output"]; + readonly id: Scalars["ID"]["output"]; + /** The rule ID associated with the promotion event. */ + readonly ruleId?: Maybe; + /** Promotion event type. */ + readonly type: PromotionEventsEnum; + }; + +/** + * Deletes a promotion rule. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - PROMOTION_RULE_DELETED (async): A promotion rule was deleted. + */ +export type PromotionRuleDelete = { + readonly errors: ReadonlyArray; + readonly promotionRule?: Maybe; +}; + +export type PromotionRuleDeleteError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type PromotionRuleDeleteErrorCode = "GRAPHQL_ERROR" | "NOT_FOUND"; + +/** Event sent when new promotion rule is deleted. */ +export type PromotionRuleDeleted = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The promotion rule the event relates to. */ + readonly promotionRule?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** History log of the promotion rule created event. */ +export type PromotionRuleDeletedEvent = Node & + PromotionEventInterface & + PromotionRuleEventInterface & { + /** + * User or App that created the promotion event. + * + * Requires one of the following permissions: MANAGE_STAFF, MANAGE_APPS, OWNER. + */ + readonly createdBy?: Maybe; + /** Date when event happened. */ + readonly date: Scalars["DateTime"]["output"]; + readonly id: Scalars["ID"]["output"]; + /** The rule ID associated with the promotion event. */ + readonly ruleId?: Maybe; + /** Promotion event type. */ + readonly type: PromotionEventsEnum; + }; + +/** History log of the promotion event related to rule. */ +export type PromotionRuleEventInterface = { + /** The rule ID associated with the promotion event. */ + readonly ruleId?: Maybe; +}; + +export type PromotionRuleInput = { + /** Defines the conditions on the catalogue level that must be met for the reward to be applied. */ + readonly cataloguePredicate?: InputMaybe; + /** List of channel ids to which the rule should apply to. */ + readonly channels?: InputMaybe>; + /** Promotion rule description. */ + readonly description?: InputMaybe; + /** + * 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. + */ + readonly gifts?: InputMaybe>; + /** Promotion rule name. */ + readonly name?: InputMaybe; + /** + * 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. + */ + readonly orderPredicate?: InputMaybe; + /** + * 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. + */ + readonly rewardType?: InputMaybe; + /** Defines the discount value. Required when catalogue predicate is provided. */ + readonly rewardValue?: InputMaybe; + /** Defines the promotion rule reward value type. Must be provided together with reward value. */ + readonly rewardValueType?: InputMaybe; +}; + +/** Represents promotion rule's original translatable fields and related translations. */ +export type PromotionRuleTranslatableContent = Node & { + /** + * Description of the promotion rule. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: Maybe; + /** ID of the promotion rule translatable content. */ + readonly id: Scalars["ID"]["output"]; + /** Name of the promotion rule. */ + readonly name?: Maybe; + /** ID of the promotion rule to translate. */ + readonly promotionRuleId: Scalars["ID"]["output"]; + /** Returns translated promotion rule fields for the given language code. */ + readonly translation?: Maybe; +}; + +/** Represents promotion rule's original translatable fields and related translations. */ +export type PromotionRuleTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * Creates/updates translations for a promotion rule. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ +export type PromotionRuleTranslate = { + readonly errors: ReadonlyArray; + readonly promotionRule?: Maybe; +}; + +/** Represents promotion rule translations. */ +export type PromotionRuleTranslation = Node & { + /** + * Translated description of the promotion rule. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: Maybe; + /** ID of the promotion rule translation. */ + readonly id: Scalars["ID"]["output"]; + /** Translation language. */ + readonly language: LanguageDisplay; + /** Translated name of the promotion rule. */ + readonly name?: Maybe; + /** Represents the promotion rule fields to translate. */ + readonly translatableContent?: Maybe; +}; + +export type PromotionRuleTranslationInput = { + /** + * Translated promotion description. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: InputMaybe; + readonly name?: InputMaybe; +}; + +/** + * Updates an existing promotion rule. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - PROMOTION_RULE_UPDATED (async): A promotion rule was updated. + */ +export type PromotionRuleUpdate = { + readonly errors: ReadonlyArray; + readonly promotionRule?: Maybe; +}; + +export type PromotionRuleUpdateError = { + /** List of channel IDs which causes the error. */ + readonly channels?: Maybe>; + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** Limit of gifts assigned to promotion rule. */ + readonly giftsLimit?: Maybe; + /** Number of gifts defined for this promotion rule exceeding the limit. */ + readonly giftsLimitExceedBy?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type PromotionRuleUpdateErrorCode = + | "DUPLICATED_INPUT_ITEM" + | "GIFTS_NUMBER_LIMIT" + | "GRAPHQL_ERROR" + | "INVALID" + | "INVALID_GIFT_TYPE" + | "INVALID_PRECISION" + | "MISSING_CHANNELS" + | "MULTIPLE_CURRENCIES_NOT_ALLOWED" + | "NOT_FOUND" + | "REQUIRED"; + +export type PromotionRuleUpdateInput = { + /** List of channel ids to add. */ + readonly addChannels?: InputMaybe>; + /** + * 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. + */ + readonly addGifts?: InputMaybe>; + /** Defines the conditions on the catalogue level that must be met for the reward to be applied. */ + readonly cataloguePredicate?: InputMaybe; + /** Promotion rule description. */ + readonly description?: InputMaybe; + /** Promotion rule name. */ + readonly name?: InputMaybe; + /** + * 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. + */ + readonly orderPredicate?: InputMaybe; + /** List of channel ids to remove. */ + readonly removeChannels?: InputMaybe>; + /** + * 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. + */ + readonly removeGifts?: InputMaybe>; + /** + * 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. + */ + readonly rewardType?: InputMaybe; + /** Defines the discount value. Required when catalogue predicate is provided. */ + readonly rewardValue?: InputMaybe; + /** Defines the promotion rule reward value type. Must be provided together with reward value. */ + readonly rewardValueType?: InputMaybe; +}; + +/** Event sent when new promotion rule is updated. */ +export type PromotionRuleUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The promotion rule the event relates to. */ + readonly promotionRule?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** History log of the promotion rule created event. */ +export type PromotionRuleUpdatedEvent = Node & + PromotionEventInterface & + PromotionRuleEventInterface & { + /** + * User or App that created the promotion event. + * + * Requires one of the following permissions: MANAGE_STAFF, MANAGE_APPS, OWNER. + */ + readonly createdBy?: Maybe; + /** Date when event happened. */ + readonly date: Scalars["DateTime"]["output"]; + readonly id: Scalars["ID"]["output"]; + /** The rule ID associated with the promotion event. */ + readonly ruleId?: Maybe; + /** Promotion event type. */ + readonly type: PromotionEventsEnum; + }; + +export type PromotionSortField = + /** Sort promotions by creation date. */ + | "CREATED_AT" + /** Sort promotions by end date. */ + | "END_DATE" + /** Sort promotions by name. */ + | "NAME" + /** Sort promotions by start date. */ + | "START_DATE"; + +export type PromotionSortingInput = { + /** Specifies the direction in which to sort promotions. */ + readonly direction: OrderDirection; + /** Sort promotions by the selected field. */ + readonly field: PromotionSortField; +}; + +/** The event informs about the start of the promotion. */ +export type PromotionStarted = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The promotion the event relates to. */ + readonly promotion?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** History log of the promotion started event. */ +export type PromotionStartedEvent = Node & + PromotionEventInterface & { + /** + * User or App that created the promotion event. + * + * Requires one of the following permissions: MANAGE_STAFF, MANAGE_APPS, OWNER. + */ + readonly createdBy?: Maybe; + /** Date when event happened. */ + readonly date: Scalars["DateTime"]["output"]; + readonly id: Scalars["ID"]["output"]; + /** Promotion event type. */ + readonly type: PromotionEventsEnum; + }; + +/** Represents promotion's original translatable fields and related translations. */ +export type PromotionTranslatableContent = Node & { + /** + * Description of the promotion. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: Maybe; + /** ID of the promotion translatable content. */ + readonly id: Scalars["ID"]["output"]; + /** Name of the promotion. */ + readonly name: Scalars["String"]["output"]; + /** ID of the promotion to translate. */ + readonly promotionId: Scalars["ID"]["output"]; + /** Returns translated promotion fields for the given language code. */ + readonly translation?: Maybe; +}; + +/** Represents promotion's original translatable fields and related translations. */ +export type PromotionTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * Creates/updates translations for a promotion. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ +export type PromotionTranslate = { + readonly errors: ReadonlyArray; + readonly promotion?: Maybe; +}; + +/** Represents promotion translations. */ +export type PromotionTranslation = Node & { + /** + * Translated description of the promotion. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: Maybe; + /** ID of the promotion translation. */ + readonly id: Scalars["ID"]["output"]; + /** Translation language. */ + readonly language: LanguageDisplay; + /** Translated name of the promotion. */ + readonly name?: Maybe; + /** Represents the promotion fields to translate. */ + readonly translatableContent?: Maybe; +}; + +export type PromotionTranslationInput = { + /** + * Translated promotion description. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: InputMaybe; + readonly name?: InputMaybe; +}; + +export type PromotionTypeEnum = "CATALOGUE" | "ORDER"; + +export type PromotionTypeEnumFilterInput = { + /** The value equal to. */ + readonly eq?: InputMaybe; + /** The value included in. */ + readonly oneOf?: InputMaybe>; +}; + +/** + * Updates an existing promotion. + * + * 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. + */ +export type PromotionUpdate = { + readonly errors: ReadonlyArray; + readonly promotion?: Maybe; +}; + +export type PromotionUpdateError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type PromotionUpdateErrorCode = "GRAPHQL_ERROR" | "INVALID" | "NOT_FOUND" | "REQUIRED"; + +export type PromotionUpdateInput = { + /** Promotion description. */ + readonly description?: InputMaybe; + /** The end date of the promotion in ISO 8601 format. */ + readonly endDate?: InputMaybe; + /** Promotion name. */ + readonly name?: InputMaybe; + /** The start date of the promotion in ISO 8601 format. */ + readonly startDate?: InputMaybe; +}; + +/** Event sent when promotion is updated. */ +export type PromotionUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The promotion the event relates to. */ + readonly promotion?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** History log of the promotion updated event. */ +export type PromotionUpdatedEvent = Node & + PromotionEventInterface & { + /** + * User or App that created the promotion event. + * + * Requires one of the following permissions: MANAGE_STAFF, MANAGE_APPS, OWNER. + */ + readonly createdBy?: Maybe; + /** Date when event happened. */ + readonly date: Scalars["DateTime"]["output"]; + readonly id: Scalars["ID"]["output"]; + /** Promotion event type. */ + readonly type: PromotionEventsEnum; + }; + +export type PromotionWhereInput = { + /** List of conditions that must be met. */ + readonly AND?: InputMaybe>; + /** A list of conditions of which at least one must be met. */ + readonly OR?: InputMaybe>; + /** Filter promotions by end date. */ + readonly endDate?: InputMaybe; + readonly ids?: InputMaybe>; + readonly isOldSale?: InputMaybe; + readonly metadata?: InputMaybe>; + /** Filter by promotion name. */ + readonly name?: InputMaybe; + /** Filter promotions by start date. */ + readonly startDate?: InputMaybe; + readonly type?: InputMaybe; +}; + +export type PublishableChannelListingInput = { + /** ID of a channel. */ + readonly channelId: Scalars["ID"]["input"]; + /** Determines if object is visible to customers. */ + readonly isPublished?: InputMaybe; + /** + * Publication date. ISO 8601 standard. + * @deprecated Use `publishedAt` field instead. + */ + readonly publicationDate?: InputMaybe; + /** Publication date time. ISO 8601 standard. */ + readonly publishedAt?: InputMaybe; +}; + +export type Query = { + readonly _entities?: Maybe>>; + readonly _service?: Maybe<_Service>; + /** + * Look up an address by ID. + * + * Requires one of the following permissions: MANAGE_USERS, OWNER. + */ + readonly address?: Maybe
; + /** Returns address validation rules. */ + readonly addressValidationRules?: Maybe; + /** + * 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. + */ + readonly app?: Maybe; + /** + * Look up an app extension by ID. + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. + */ + readonly appExtension?: Maybe; + /** + * List of all extensions. + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. + */ + readonly appExtensions?: Maybe; + /** + * List of the apps. + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER, MANAGE_APPS. + */ + readonly apps?: Maybe; + /** + * List of all apps installations + * + * Requires one of the following permissions: MANAGE_APPS. + */ + readonly appsInstallations: ReadonlyArray; + /** Look up an attribute by ID, slug or external reference. */ + readonly attribute?: Maybe; + /** List of the shop's attributes. */ + readonly attributes?: Maybe; + /** List of the shop's categories. */ + readonly categories?: Maybe; + /** Look up a category by ID or slug. */ + readonly category?: Maybe; + /** Look up a channel by ID or slug. */ + readonly channel?: Maybe; + /** + * List of all channels. + * + * Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. + */ + readonly channels?: Maybe>; + /** + * 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. + */ + readonly checkout?: Maybe; + /** + * List of checkout lines. The query will not initiate any external requests, including fetching external shipping methods, filtering available shipping methods, or performing external tax calculations. + * + * Requires one of the following permissions: MANAGE_CHECKOUTS. + */ + readonly checkoutLines?: Maybe; + /** + * List of checkouts. The query will not initiate any external requests, including fetching external shipping methods, filtering available shipping methods, or performing external tax calculations. + * + * Requires one of the following permissions: MANAGE_CHECKOUTS, HANDLE_PAYMENTS. + */ + readonly checkouts?: Maybe; + /** Look up a collection by ID or slug. If slugLanguageCode is provided, category will be fetched by slug translation. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS. */ + readonly collection?: Maybe; + /** List of the shop's collections. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS. */ + readonly collections?: Maybe; + /** + * 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. + */ + readonly customers?: Maybe; + /** + * List of draft orders. The query will not initiate any external requests, including filtering available shipping methods, or performing external tax calculations. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly draftOrders?: Maybe; + /** + * Look up a export file by ID. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly exportFile?: Maybe; + /** + * List of export files. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly exportFiles?: Maybe; + /** + * Look up a gift card by ID. + * + * Requires one of the following permissions: MANAGE_GIFT_CARD. + */ + readonly giftCard?: Maybe; + /** + * List of gift card currencies. + * + * Requires one of the following permissions: MANAGE_GIFT_CARD. + */ + readonly giftCardCurrencies: ReadonlyArray; + /** + * Gift card related settings from site settings. + * + * Requires one of the following permissions: MANAGE_GIFT_CARD. + */ + readonly giftCardSettings: GiftCardSettings; + /** + * List of gift card tags. + * + * Requires one of the following permissions: MANAGE_GIFT_CARD. + */ + readonly giftCardTags?: Maybe; + /** + * List of gift cards. + * + * Requires one of the following permissions: MANAGE_GIFT_CARD. + */ + readonly giftCards?: Maybe; + /** + * List of activity events to display on homepage (at the moment it only contains order-events). + * + * Requires one of the following permissions: MANAGE_ORDERS. + * @deprecated Field no longer supported + */ + readonly homepageEvents?: Maybe; + /** Return the currently authenticated user. */ + readonly me?: Maybe; + /** Look up a navigation menu by ID or name. */ + readonly menu?: Maybe; + /** Look up a menu item by ID. */ + readonly menuItem?: Maybe; + /** List of the storefronts's menu items. */ + readonly menuItems?: Maybe; + /** List of the storefront's menus. */ + readonly menus?: Maybe; + /** Look up an order by ID or external reference. */ + readonly order?: Maybe; + /** + * Look up an order by token. + * @deprecated Field no longer supported + */ + readonly orderByToken?: Maybe; + /** + * Order related settings from site settings. Returns `orderSettings` for the first `channel` in alphabetical order. + * + * Requires one of the following permissions: MANAGE_ORDERS. + * @deprecated Use the `channel` query to fetch the `orderSettings` field instead. + */ + readonly orderSettings?: Maybe; + /** + * List of orders. The query will not initiate any external requests, including filtering available shipping methods, or performing external tax calculations. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly orders?: Maybe; + /** + * Return the total sales amount from a specific period. + * + * Requires one of the following permissions: MANAGE_ORDERS. + * @deprecated Field no longer supported + */ + readonly ordersTotal?: Maybe; + /** Look up a page by ID or slug. */ + readonly page?: Maybe; + /** Look up a page type by ID. */ + readonly pageType?: Maybe; + /** List of the page types. */ + readonly pageTypes?: Maybe; + /** List of the shop's pages. */ + readonly pages?: Maybe; + /** + * Look up a payment by ID. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly payment?: Maybe; + /** + * List of payments. + * + * Requires one of the following permissions: MANAGE_ORDERS. + */ + readonly payments?: Maybe; + /** + * Look up permission group by ID. + * + * Requires one of the following permissions: MANAGE_STAFF. + */ + readonly permissionGroup?: Maybe; + /** + * List of permission groups. + * + * Requires one of the following permissions: MANAGE_STAFF. + */ + readonly permissionGroups?: Maybe; + /** + * Look up a plugin by ID. + * + * Requires one of the following permissions: MANAGE_PLUGINS. + */ + readonly plugin?: Maybe; + /** + * List of plugins. + * + * Requires one of the following permissions: MANAGE_PLUGINS. + */ + readonly plugins?: Maybe; + /** Look up a product by ID. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS. */ + readonly product?: Maybe; + /** Look up a product type by ID. */ + readonly productType?: Maybe; + /** List of the shop's product types. */ + readonly productTypes?: Maybe; + /** 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. */ + readonly productVariant?: Maybe; + /** List of product variants. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS. */ + readonly productVariants?: Maybe; + /** List of the shop's products. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS. */ + readonly products?: Maybe; + /** + * Look up a promotion by ID. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + */ + readonly promotion?: Maybe; + /** + * List of the promotions. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + */ + readonly promotions?: Maybe; + /** Refunds related settings. Returns `RefundSettings` configuration, global for the entire shop. */ + readonly refundSettings: RefundSettings; + /** + * List of top selling products. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + * @deprecated Field no longer supported + */ + readonly reportProductSales?: Maybe; + /** + * Look up a sale by ID. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * @deprecated Use the `promotion` query instead. + */ + readonly sale?: Maybe; + /** + * List of the shop's sales. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * @deprecated Use the `promotions` query instead. + */ + readonly sales?: Maybe; + /** + * Look up a shipping zone by ID. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ + readonly shippingZone?: Maybe; + /** + * List of the shop's shipping zones. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ + readonly shippingZones?: Maybe; + /** Return information about the shop. */ + readonly shop: Shop; + /** + * List of the shop's staff users. + * + * Requires one of the following permissions: MANAGE_STAFF. + */ + readonly staffUsers?: Maybe; + /** + * Look up a stock by ID + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly stock?: Maybe; + /** + * List of stocks. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ + readonly stocks?: Maybe; + /** + * Look up a tax class. + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. + */ + readonly taxClass?: Maybe; + /** + * List of tax classes. + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. + */ + readonly taxClasses?: Maybe; + /** + * Look up a tax configuration. + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. + */ + readonly taxConfiguration?: Maybe; + /** + * List of tax configurations. + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. + */ + readonly taxConfigurations?: Maybe; + /** + * Tax class rates grouped by country. + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. + */ + readonly taxCountryConfiguration?: Maybe; + /** \n\nRequires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. */ + readonly taxCountryConfigurations?: Maybe>; + /** + * List of all tax rates available from tax gateway. + * @deprecated Use `taxClasses` field instead. + */ + readonly taxTypes?: Maybe>; + /** + * Look up a transaction by ID. + * + * Requires one of the following permissions: HANDLE_PAYMENTS, MANAGE_ORDERS. + */ + readonly transaction?: Maybe; + /** + * List of transactions. For apps with `MANAGE_ORDERS` permission, returns all transactions. For apps with just `HANDLE_PAYMENTS` permission, returns only transactions created by that app. For staff users, returns transactions from orders and checkouts in channels they have access to. + * + * Added in Saleor 3.22. + * + * Requires one of the following permissions: HANDLE_PAYMENTS, MANAGE_ORDERS. + */ + readonly transactions?: Maybe; + /** + * Lookup a translatable item by ID. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ + readonly translation?: Maybe; + /** + * Returns a list of all translatable items of a given kind. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ + readonly translations?: Maybe; + /** + * Look up a user by ID or email address. + * + * Requires one of the following permissions: MANAGE_STAFF, MANAGE_USERS, MANAGE_ORDERS. + */ + readonly user?: Maybe; + /** + * Look up a voucher by ID. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + */ + readonly voucher?: Maybe; + /** + * List of the shop's vouchers. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + */ + readonly vouchers?: Maybe; + /** + * Look up a warehouse by ID. + * + * Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS, MANAGE_SHIPPING. + */ + readonly warehouse?: Maybe; + /** + * List of warehouses. + * + * Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS, MANAGE_SHIPPING. + */ + readonly warehouses?: Maybe; + /** Look up a webhook by ID. Requires one of the following permissions: MANAGE_APPS, OWNER. */ + readonly webhook?: Maybe; + /** + * List of all available webhook events. + * + * Requires one of the following permissions: MANAGE_APPS. + * @deprecated Use `WebhookEventTypeAsyncEnum` and `WebhookEventTypeSyncEnum` to get available event types. + */ + readonly webhookEvents?: Maybe>; + /** 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. */ + readonly webhookSamplePayload?: Maybe; +}; + +export type Query_EntitiesArgs = { + representations: ReadonlyArray; +}; + +export type QueryAddressArgs = { + id: Scalars["ID"]["input"]; +}; + +export type QueryAddressValidationRulesArgs = { + city?: InputMaybe; + cityArea?: InputMaybe; + countryArea?: InputMaybe; + countryCode: CountryCode; +}; + +export type QueryAppArgs = { + id?: InputMaybe; +}; + +export type QueryAppExtensionArgs = { + id: Scalars["ID"]["input"]; +}; + +export type QueryAppExtensionsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +export type QueryAppsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sortBy?: InputMaybe; +}; + +export type QueryAttributeArgs = { + externalReference?: InputMaybe; + id?: InputMaybe; + slug?: InputMaybe; +}; + +export type QueryAttributesArgs = { + after?: InputMaybe; + before?: InputMaybe; + channel?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + search?: InputMaybe; + sortBy?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryCategoriesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + level?: InputMaybe; + sortBy?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryCategoryArgs = { + id?: InputMaybe; + slug?: InputMaybe; + slugLanguageCode?: InputMaybe; +}; + +export type QueryChannelArgs = { + id?: InputMaybe; + slug?: InputMaybe; +}; + +export type QueryCheckoutArgs = { + id?: InputMaybe; + token?: InputMaybe; +}; + +export type QueryCheckoutLinesArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +export type QueryCheckoutsArgs = { + after?: InputMaybe; + before?: InputMaybe; + channel?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sortBy?: InputMaybe; +}; + +export type QueryCollectionArgs = { + channel?: InputMaybe; + id?: InputMaybe; + slug?: InputMaybe; + slugLanguageCode?: InputMaybe; +}; + +export type QueryCollectionsArgs = { + after?: InputMaybe; + before?: InputMaybe; + channel?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sortBy?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryCustomersArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + search?: InputMaybe; + sortBy?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryDraftOrdersArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + search?: InputMaybe; + sortBy?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryExportFileArgs = { + id: Scalars["ID"]["input"]; +}; + +export type QueryExportFilesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sortBy?: InputMaybe; +}; + +export type QueryGiftCardArgs = { + id: Scalars["ID"]["input"]; +}; + +export type QueryGiftCardTagsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +export type QueryGiftCardsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + search?: InputMaybe; + sortBy?: InputMaybe; +}; + +export type QueryHomepageEventsArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +export type QueryMenuArgs = { + channel?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + slug?: InputMaybe; +}; + +export type QueryMenuItemArgs = { + channel?: InputMaybe; + id: Scalars["ID"]["input"]; +}; + +export type QueryMenuItemsArgs = { + after?: InputMaybe; + before?: InputMaybe; + channel?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sortBy?: InputMaybe; +}; + +export type QueryMenusArgs = { + after?: InputMaybe; + before?: InputMaybe; + channel?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sortBy?: InputMaybe; +}; + +export type QueryOrderArgs = { + externalReference?: InputMaybe; + id?: InputMaybe; +}; + +export type QueryOrderByTokenArgs = { + token: Scalars["UUID"]["input"]; +}; + +export type QueryOrdersArgs = { + after?: InputMaybe; + before?: InputMaybe; + channel?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + search?: InputMaybe; + sortBy?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryOrdersTotalArgs = { + channel?: InputMaybe; + period?: InputMaybe; +}; + +export type QueryPageArgs = { + channel?: InputMaybe; + id?: InputMaybe; + slug?: InputMaybe; + slugLanguageCode?: InputMaybe; +}; + +export type QueryPageTypeArgs = { + id: Scalars["ID"]["input"]; +}; + +export type QueryPageTypesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sortBy?: InputMaybe; +}; + +export type QueryPagesArgs = { + after?: InputMaybe; + before?: InputMaybe; + channel?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + search?: InputMaybe; + sortBy?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryPaymentArgs = { + id: Scalars["ID"]["input"]; +}; + +export type QueryPaymentsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +export type QueryPermissionGroupArgs = { + id: Scalars["ID"]["input"]; +}; + +export type QueryPermissionGroupsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sortBy?: InputMaybe; +}; + +export type QueryPluginArgs = { + id: Scalars["ID"]["input"]; +}; + +export type QueryPluginsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sortBy?: InputMaybe; +}; + +export type QueryProductArgs = { + channel?: InputMaybe; + externalReference?: InputMaybe; + id?: InputMaybe; + slug?: InputMaybe; + slugLanguageCode?: InputMaybe; +}; + +export type QueryProductTypeArgs = { + id: Scalars["ID"]["input"]; +}; + +export type QueryProductTypesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sortBy?: InputMaybe; +}; + +export type QueryProductVariantArgs = { + channel?: InputMaybe; + externalReference?: InputMaybe; + id?: InputMaybe; + sku?: InputMaybe; +}; + +export type QueryProductVariantsArgs = { + after?: InputMaybe; + before?: InputMaybe; + channel?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + ids?: InputMaybe>; + last?: InputMaybe; + search?: InputMaybe; + sortBy?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryProductsArgs = { + after?: InputMaybe; + before?: InputMaybe; + channel?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + search?: InputMaybe; + sortBy?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryPromotionArgs = { + id: Scalars["ID"]["input"]; +}; + +export type QueryPromotionsArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sortBy?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryReportProductSalesArgs = { + after?: InputMaybe; + before?: InputMaybe; + channel: Scalars["String"]["input"]; + first?: InputMaybe; + last?: InputMaybe; + period: ReportingPeriod; +}; + +export type QuerySaleArgs = { + channel?: InputMaybe; + id: Scalars["ID"]["input"]; +}; + +export type QuerySalesArgs = { + after?: InputMaybe; + before?: InputMaybe; + channel?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + query?: InputMaybe; + sortBy?: InputMaybe; +}; + +export type QueryShippingZoneArgs = { + channel?: InputMaybe; + id: Scalars["ID"]["input"]; +}; + +export type QueryShippingZonesArgs = { + after?: InputMaybe; + before?: InputMaybe; + channel?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +export type QueryStaffUsersArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sortBy?: InputMaybe; +}; + +export type QueryStockArgs = { + id: Scalars["ID"]["input"]; +}; + +export type QueryStocksArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +export type QueryTaxClassArgs = { + id: Scalars["ID"]["input"]; +}; + +export type QueryTaxClassesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sortBy?: InputMaybe; +}; + +export type QueryTaxConfigurationArgs = { + id: Scalars["ID"]["input"]; +}; + +export type QueryTaxConfigurationsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +export type QueryTaxCountryConfigurationArgs = { + countryCode: CountryCode; +}; + +export type QueryTransactionArgs = { + id?: InputMaybe; + token?: InputMaybe; +}; + +export type QueryTransactionsArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sortBy?: InputMaybe; + where?: InputMaybe; +}; + +export type QueryTranslationArgs = { + id: Scalars["ID"]["input"]; + kind: TranslatableKinds; +}; + +export type QueryTranslationsArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + kind: TranslatableKinds; + last?: InputMaybe; +}; + +export type QueryUserArgs = { + email?: InputMaybe; + externalReference?: InputMaybe; + id?: InputMaybe; +}; + +export type QueryVoucherArgs = { + channel?: InputMaybe; + id: Scalars["ID"]["input"]; +}; + +export type QueryVouchersArgs = { + after?: InputMaybe; + before?: InputMaybe; + channel?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + query?: InputMaybe; + sortBy?: InputMaybe; +}; + +export type QueryWarehouseArgs = { + externalReference?: InputMaybe; + id?: InputMaybe; +}; + +export type QueryWarehousesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sortBy?: InputMaybe; +}; + +export type QueryWebhookArgs = { + id: Scalars["ID"]["input"]; +}; + +export type QueryWebhookSamplePayloadArgs = { + eventType: WebhookSampleEventTypeEnum; +}; + +/** Represents a reduced VAT rate for a particular type of goods. */ +export type ReducedRate = { + /** Reduced VAT rate in percent. */ + readonly rate: Scalars["Float"]["output"]; + /** A type of goods. */ + readonly rateType: Scalars["String"]["output"]; +}; + +/** + * The reference types (product or page type) that are used to narrow down the choices of reference objects. + * ProductType applicable for reference attribute with `PRODUCT` or `PRODUCT_VARIANT` entity type. + * PageType applicable for reference attribute with `PAGE` entity type. + */ +export type ReferenceType = PageType | ProductType; + +/** 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. */ +export type RefreshToken = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** JWT token, required to authenticate. */ + readonly token?: Maybe; + /** A user instance. */ + readonly user?: Maybe; +}; + +/** + * Updates RefundSettings. The `Page` (Model) Type will be cleared from `reasonReferenceType`. When it's cleared, passing reason reference to refund mutations is no longer accepted and will raise error. + * + * Added in Saleor 3.22. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ +export type RefundReasonReferenceTypeClear = { + readonly errors: ReadonlyArray; + /** Refund settings. */ + readonly refundSettings: RefundSettings; + /** @deprecated Use `errors` field instead. */ + readonly refundSettingsErrors: ReadonlyArray; +}; + +export type RefundReasonReferenceTypeClearError = { + /** Failed to clear refund reason reference type */ + readonly code: RefundSettingsErrorCode; + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +/** + * Refund related settings from site settings. + * + * Added in Saleor 3.22. + */ +export type RefundSettings = { + /** Model type used for refund reasons. */ + readonly reasonReferenceType?: Maybe; +}; + +export type RefundSettingsErrorCode = "GRAPHQL_ERROR" | "INVALID" | "REQUIRED"; + +/** + * Update refund settings across all channels. + * + * Added in Saleor 3.22. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ +export type RefundSettingsUpdate = { + readonly errors: ReadonlyArray; + /** Refund settings. */ + readonly refundSettings?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly refundSettingsErrors: ReadonlyArray; +}; + +export type RefundSettingsUpdateError = { + /** Failed to update Refund Settings */ + readonly code: RefundSettingsErrorCode; + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type RefundSettingsUpdateInput = { + /** + * The ID of a model type, that will be used to reference refund reasons. All models with of this type will be accepted as refund reasons. + * + * Added in Saleor 3.22. + */ + readonly refundReasonReferenceType: Scalars["ID"]["input"]; +}; + +export type ReorderInput = { + /** The ID of the item to move. */ + readonly id: Scalars["ID"]["input"]; + /** 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. */ + readonly sortOrder?: InputMaybe; +}; + +export type 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. + */ +export type RequestEmailChange = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** A user instance. */ + readonly user?: Maybe; +}; + +/** + * 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. + */ +export type RequestPasswordReset = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +export type RewardTypeEnum = "GIFT" | "SUBTOTAL_DISCOUNT"; + +export type 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. Use `Promotion` type instead. + */ +export type Sale = Node & + ObjectWithMetadata & { + /** List of categories this sale applies to. */ + readonly categories?: Maybe; + /** + * List of channels available for the sale. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + */ + readonly channelListings?: Maybe>; + /** + * List of collections this sale applies to. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + */ + readonly collections?: Maybe; + /** The date and time when the sale was created. */ + readonly created: Scalars["DateTime"]["output"]; + /** Currency code for sale. */ + readonly currency?: Maybe; + /** Sale value. */ + readonly discountValue?: Maybe; + /** The end date and time of the sale. */ + readonly endDate?: Maybe; + /** The ID of the sale. */ + readonly id: Scalars["ID"]["output"]; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** The name of the sale. */ + readonly name: Scalars["String"]["output"]; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** + * List of products this sale applies to. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + */ + readonly products?: Maybe; + /** The start date and time of the sale. */ + readonly startDate: Scalars["DateTime"]["output"]; + /** Returns translated sale fields for the given language code. */ + readonly translation?: Maybe; + /** Type of the sale, fixed or percentage. */ + readonly type: SaleType; + /** The date and time when the sale was updated. */ + readonly updatedAt: Scalars["DateTime"]["output"]; + /** + * List of product variants this sale applies to. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + */ + readonly variants?: Maybe; + }; + +/** + * Sales allow creating discounts for categories, collections or products and are visible to all the customers. + * + * DEPRECATED: this type will be removed. Use `Promotion` type instead. + */ +export type SaleCategoriesArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +/** + * Sales allow creating discounts for categories, collections or products and are visible to all the customers. + * + * DEPRECATED: this type will be removed. Use `Promotion` type instead. + */ +export type SaleCollectionsArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +/** + * Sales allow creating discounts for categories, collections or products and are visible to all the customers. + * + * DEPRECATED: this type will be removed. Use `Promotion` type instead. + */ +export type SaleMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** + * Sales allow creating discounts for categories, collections or products and are visible to all the customers. + * + * DEPRECATED: this type will be removed. Use `Promotion` type instead. + */ +export type SaleMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** + * Sales allow creating discounts for categories, collections or products and are visible to all the customers. + * + * DEPRECATED: this type will be removed. Use `Promotion` type instead. + */ +export type SalePrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** + * Sales allow creating discounts for categories, collections or products and are visible to all the customers. + * + * DEPRECATED: this type will be removed. Use `Promotion` type instead. + */ +export type SalePrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** + * Sales allow creating discounts for categories, collections or products and are visible to all the customers. + * + * DEPRECATED: this type will be removed. Use `Promotion` type instead. + */ +export type SaleProductsArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +/** + * Sales allow creating discounts for categories, collections or products and are visible to all the customers. + * + * DEPRECATED: this type will be removed. Use `Promotion` type instead. + */ +export type SaleTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * Sales allow creating discounts for categories, collections or products and are visible to all the customers. + * + * DEPRECATED: this type will be removed. Use `Promotion` type instead. + */ +export type SaleVariantsArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +/** + * Adds products, categories, collections to a sale. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - SALE_UPDATED (async): A sale was updated. + */ +export type SaleAddCatalogues = { + /** @deprecated Use `errors` field instead. */ + readonly discountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** Sale of which catalogue IDs will be modified. */ + readonly sale?: Maybe; +}; + +/** + * Deletes sales. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - SALE_DELETED (async): A sale was deleted. + */ +export type SaleBulkDelete = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + /** @deprecated Use `errors` field instead. */ + readonly discountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** + * Represents sale channel listing. + * + * DEPRECATED: this type will be removed. Use `PromotionRule` type instead. + */ +export type SaleChannelListing = Node & { + /** The channel in which the sale is available. */ + readonly channel: Channel; + /** The currency in which the discount value is specified. */ + readonly currency: Scalars["String"]["output"]; + /** The value of the discount applied to the sale in the channel. */ + readonly discountValue: Scalars["Float"]["output"]; + /** The ID of the channel listing. */ + readonly id: Scalars["ID"]["output"]; +}; + +export type SaleChannelListingAddInput = { + /** ID of a channel. */ + readonly channelId: Scalars["ID"]["input"]; + /** The value of the discount. */ + readonly discountValue: Scalars["PositiveDecimal"]["input"]; +}; + +export type SaleChannelListingInput = { + /** List of channels to which the sale should be assigned. */ + readonly addChannels?: InputMaybe>; + /** List of channels from which the sale should be unassigned. */ + readonly removeChannels?: InputMaybe>; +}; + +/** + * Manage sale's availability in channels. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + */ +export type SaleChannelListingUpdate = { + /** @deprecated Use `errors` field instead. */ + readonly discountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** An updated sale instance. */ + readonly sale?: Maybe; +}; + +export type SaleCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type SaleCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: Sale; +}; + +/** + * Creates a new sale. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - SALE_CREATED (async): A sale was created. + */ +export type SaleCreate = { + /** @deprecated Use `errors` field instead. */ + readonly discountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + readonly sale?: Maybe; +}; + +/** + * Event sent when new sale is created. + * + * DEPRECATED: this event will be removed. Use `PromotionCreated` event instead. + */ +export type SaleCreated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The sale the event relates to. */ + readonly sale?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Event sent when new sale is created. + * + * DEPRECATED: this event will be removed. Use `PromotionCreated` event instead. + */ +export type SaleCreatedSaleArgs = { + channel?: InputMaybe; +}; + +/** + * Deletes a sale. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - SALE_DELETED (async): A sale was deleted. + */ +export type SaleDelete = { + /** @deprecated Use `errors` field instead. */ + readonly discountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + readonly sale?: Maybe; +}; + +/** + * Event sent when sale is deleted. + * + * DEPRECATED: this event will be removed. Use `PromotionDeleted` event instead. + */ +export type SaleDeleted = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The sale the event relates to. */ + readonly sale?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Event sent when sale is deleted. + * + * DEPRECATED: this event will be removed. Use `PromotionDeleted` event instead. + */ +export type SaleDeletedSaleArgs = { + channel?: InputMaybe; +}; + +export type SaleFilterInput = { + readonly metadata?: InputMaybe>; + readonly saleType?: InputMaybe; + readonly search?: InputMaybe; + readonly started?: InputMaybe; + readonly status?: InputMaybe>; + readonly updatedAt?: InputMaybe; +}; + +export type SaleInput = { + /** Categories related to the discount. */ + readonly categories?: InputMaybe>; + /** Collections related to the discount. */ + readonly collections?: InputMaybe>; + /** End date of the voucher in ISO 8601 format. */ + readonly endDate?: InputMaybe; + /** Voucher name. */ + readonly name?: InputMaybe; + /** Products related to the discount. */ + readonly products?: InputMaybe>; + /** Start date of the voucher in ISO 8601 format. */ + readonly startDate?: InputMaybe; + /** Fixed or percentage. */ + readonly type?: InputMaybe; + /** Value of the voucher. */ + readonly value?: InputMaybe; + readonly variants?: InputMaybe>; +}; + +/** + * Removes products, categories, collections from a sale. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - SALE_UPDATED (async): A sale was updated. + */ +export type SaleRemoveCatalogues = { + /** @deprecated Use `errors` field instead. */ + readonly discountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** Sale of which catalogue IDs will be modified. */ + readonly sale?: Maybe; +}; + +export type SaleSortField = + /** Sort sales by creation date. */ + | "CREATED_AT" + /** Sort sales by end date. */ + | "END_DATE" + /** Sort sales by last modification date. */ + | "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"; + +export type SaleSortingInput = { + /** + * Specifies the channel in which to sort the data. + * @deprecated Use root-level channel argument instead. + */ + readonly channel?: InputMaybe; + /** Specifies the direction in which to sort sales. */ + readonly direction: OrderDirection; + /** Sort sales by the selected field. */ + readonly field: SaleSortField; +}; + +/** + * The event informs about the start or end of the sale. + * + * DEPRECATED: this event will be removed. Use `PromotionStarted` and `PromotionEnded` events instead. + */ +export type SaleToggle = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The sale the event relates to. */ + readonly sale?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * The event informs about the start or end of the sale. + * + * DEPRECATED: this event will be removed. Use `PromotionStarted` and `PromotionEnded` events instead. + */ +export type SaleToggleSaleArgs = { + channel?: InputMaybe; +}; + +/** + * Represents sale's original translatable fields and related translations. + * + * DEPRECATED: this type will be removed. Use `PromotionTranslatableContent` instead. + */ +export type SaleTranslatableContent = Node & { + /** The ID of the sale translatable content. */ + readonly id: Scalars["ID"]["output"]; + /** Name of the sale to translate. */ + readonly name: Scalars["String"]["output"]; + /** + * Sales allow creating discounts for categories, collections or products and are visible to all the customers. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * @deprecated Get model fields from the root level queries. + */ + readonly sale?: Maybe; + /** The ID of the sale to translate. */ + readonly saleId: Scalars["ID"]["output"]; + /** Returns translated sale fields for the given language code. */ + readonly translation?: Maybe; +}; + +/** + * Represents sale's original translatable fields and related translations. + * + * DEPRECATED: this type will be removed. Use `PromotionTranslatableContent` instead. + */ +export type SaleTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * Creates/updates translations for a sale. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ +export type SaleTranslate = { + readonly errors: ReadonlyArray; + readonly sale?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly translationErrors: ReadonlyArray; +}; + +/** + * Represents sale translations. + * + * DEPRECATED: this type will be removed. Use `PromotionTranslation` instead. + */ +export type SaleTranslation = Node & { + /** The ID of the sale translation. */ + readonly id: Scalars["ID"]["output"]; + /** Translation language. */ + readonly language: LanguageDisplay; + /** Translated name of sale. */ + readonly name?: Maybe; + /** Represents the sale fields to translate. */ + readonly translatableContent?: Maybe; +}; + +export type SaleType = "FIXED" | "PERCENTAGE"; + +/** + * Updates a sale. + * + * 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. + */ +export type SaleUpdate = { + /** @deprecated Use `errors` field instead. */ + readonly discountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + readonly sale?: Maybe; +}; + +/** + * Event sent when sale is updated. + * + * DEPRECATED: this event will be removed. Use `PromotionUpdated` event instead. + */ +export type SaleUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The sale the event relates to. */ + readonly sale?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Event sent when sale is updated. + * + * DEPRECATED: this event will be removed. Use `PromotionUpdated` event instead. + */ +export type SaleUpdatedSaleArgs = { + channel?: InputMaybe; +}; + +/** Represents an assigned attribute to an object. */ +export type SelectedAttribute = { + /** Name of an attribute displayed in the interface. */ + readonly attribute: Attribute; + /** Values of an attribute. */ + readonly values: ReadonlyArray; +}; + +/** + * Sends a notification confirmation. + * + * 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. + */ +export type SendConfirmationEmail = { + readonly errors: ReadonlyArray; +}; + +export type SendConfirmationEmailError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type SendConfirmationEmailErrorCode = + | "ACCOUNT_CONFIRMED" + | "CONFIRMATION_ALREADY_REQUESTED" + | "INVALID" + | "MISSING_CHANNEL_SLUG"; + +export type SeoInput = { + /** SEO description. */ + readonly description?: InputMaybe; + /** SEO title. */ + readonly title?: InputMaybe; +}; + +/** Sets the user's password from the token sent by email using the RequestPasswordReset mutation. */ +export type SetPassword = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + /** CSRF token required to re-generate access token. */ + readonly csrfToken?: Maybe; + readonly errors: ReadonlyArray; + /** JWT refresh token, required to re-generate access token. */ + readonly refreshToken?: Maybe; + /** JWT token, required to authenticate. */ + readonly token?: Maybe; + /** A user instance. */ + readonly user?: Maybe; +}; + +export type ShippingError = { + /** List of channels IDs which causes the error. */ + readonly channels?: Maybe>; + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** List of warehouse IDs which causes the error. */ + readonly warehouses?: Maybe>; +}; + +export type ShippingErrorCode = + | "ALREADY_EXISTS" + | "DUPLICATED_INPUT_ITEM" + | "GRAPHQL_ERROR" + | "INVALID" + | "MAX_LESS_THAN_MIN" + | "NOT_FOUND" + | "REQUIRED" + | "UNIQUE"; + +/** List shipping methods for checkout. */ +export type ShippingListMethodsForCheckout = Event & { + /** The checkout the event relates to. */ + readonly checkout?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Shipping methods that can be used with this checkout. */ + readonly shippingMethods?: Maybe>; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Shipping methods that can be used as means of shipping for orders and checkouts. */ +export type ShippingMethod = Node & + ObjectWithMetadata & { + /** Describes if this shipping method is active and can be selected. */ + readonly active: Scalars["Boolean"]["output"]; + /** + * Shipping method description. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: Maybe; + /** Unique ID of ShippingMethod available for Order. */ + readonly id: Scalars["ID"]["output"]; + /** Maximum delivery days for this shipping method. */ + readonly maximumDeliveryDays?: Maybe; + /** + * Maximum order price for this shipping method. + * @deprecated Field no longer supported + */ + readonly maximumOrderPrice?: Maybe; + /** + * Maximum order weight for this shipping method. + * @deprecated Field no longer supported + */ + readonly maximumOrderWeight?: Maybe; + /** Message connected to this shipping method. */ + readonly message?: Maybe; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** Minimum delivery days for this shipping method. */ + readonly minimumDeliveryDays?: Maybe; + /** + * Minimal order price for this shipping method. + * @deprecated Field no longer supported + */ + readonly minimumOrderPrice?: Maybe; + /** + * Minimum order weight for this shipping method. + * @deprecated Field no longer supported + */ + readonly minimumOrderWeight?: Maybe; + /** Shipping method name. */ + readonly name: Scalars["String"]["output"]; + /** The price of selected shipping method. */ + readonly price: Money; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** Returns translated shipping method fields for the given language code. */ + readonly translation?: Maybe; + /** + * Type of the shipping method. + * @deprecated Field no longer supported + */ + readonly type?: Maybe; + }; + +/** Shipping methods that can be used as means of shipping for orders and checkouts. */ +export type ShippingMethodMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Shipping methods that can be used as means of shipping for orders and checkouts. */ +export type ShippingMethodMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Shipping methods that can be used as means of shipping for orders and checkouts. */ +export type ShippingMethodPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Shipping methods that can be used as means of shipping for orders and checkouts. */ +export type ShippingMethodPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Shipping methods that can be used as means of shipping for orders and checkouts. */ +export type ShippingMethodTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** Represents shipping method channel listing. */ +export type ShippingMethodChannelListing = Node & { + /** The channel associated with the shipping method channel listing. */ + readonly channel: Channel; + /** The ID of shipping method channel listing. */ + readonly id: Scalars["ID"]["output"]; + /** Maximum order price. */ + readonly maximumOrderPrice?: Maybe; + /** Minimum order price. */ + readonly minimumOrderPrice?: Maybe; + /** Price of the shipping method in the associated channel. */ + readonly price?: Maybe; +}; + +export type ShippingMethodChannelListingAddInput = { + /** ID of a channel. */ + readonly channelId: Scalars["ID"]["input"]; + /** Maximum order price to use this shipping method. */ + readonly maximumOrderPrice?: InputMaybe; + /** Minimum order price to use this shipping method. */ + readonly minimumOrderPrice?: InputMaybe; + /** Shipping price of the shipping method in this channel. */ + readonly price?: InputMaybe; +}; + +export type ShippingMethodChannelListingInput = { + /** List of channels to which the shipping method should be assigned. */ + readonly addChannels?: InputMaybe>; + /** List of channels from which the shipping method should be unassigned. */ + readonly removeChannels?: InputMaybe>; +}; + +/** + * Manage shipping method's availability in channels. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ +export type ShippingMethodChannelListingUpdate = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly shippingErrors: ReadonlyArray; + /** An updated shipping method instance. */ + readonly shippingMethod?: Maybe; +}; + +/** Represents shipping method postal code rule. */ +export type ShippingMethodPostalCodeRule = Node & { + /** End address range. */ + readonly end?: Maybe; + /** The ID of the object. */ + readonly id: Scalars["ID"]["output"]; + /** Inclusion type of the postal code rule. */ + readonly inclusionType?: Maybe; + /** Start address range. */ + readonly start?: Maybe; +}; + +/** Represents shipping method's original translatable fields and related translations. */ +export type ShippingMethodTranslatableContent = Node & { + /** + * Shipping method description to translate. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: Maybe; + /** The ID of the shipping method translatable content. */ + readonly id: Scalars["ID"]["output"]; + /** Shipping method name to translate. */ + readonly name: Scalars["String"]["output"]; + /** + * 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. + * @deprecated Get model fields from the root level queries. + */ + readonly shippingMethod?: Maybe; + /** The ID of the shipping method to translate. */ + readonly shippingMethodId: Scalars["ID"]["output"]; + /** Returns translated shipping method fields for the given language code. */ + readonly translation?: Maybe; +}; + +/** Represents shipping method's original translatable fields and related translations. */ +export type ShippingMethodTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** Represents shipping method translations. */ +export type ShippingMethodTranslation = Node & { + /** + * Translated description of the shipping method. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: Maybe; + /** The ID of the shipping method translation. */ + readonly id: Scalars["ID"]["output"]; + /** Translation language. */ + readonly language: LanguageDisplay; + /** Translated shipping method name. */ + readonly name?: Maybe; + /** Represents the shipping method fields to translate. */ + readonly translatableContent?: Maybe; +}; + +/** Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. */ +export type ShippingMethodType = Node & + ObjectWithMetadata & { + /** + * List of channels available for the method. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ + readonly channelListings?: Maybe>; + /** + * Shipping method description. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: Maybe; + /** + * List of excluded products for the shipping method. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ + readonly excludedProducts?: Maybe; + /** Shipping method ID. */ + readonly id: Scalars["ID"]["output"]; + /** Maximum number of days for delivery. */ + readonly maximumDeliveryDays?: Maybe; + /** The price of the cheapest variant (including discounts). */ + readonly maximumOrderPrice?: Maybe; + /** Maximum order weight to use this shipping method. */ + readonly maximumOrderWeight?: Maybe; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** Minimal number of days for delivery. */ + readonly minimumDeliveryDays?: Maybe; + /** The price of the cheapest variant (including discounts). */ + readonly minimumOrderPrice?: Maybe; + /** Minimum order weight to use this shipping method. */ + readonly minimumOrderWeight?: Maybe; + /** Shipping method name. */ + readonly name: Scalars["String"]["output"]; + /** Postal code ranges rule of exclusion or inclusion of the shipping method. */ + readonly postalCodeRules?: Maybe>; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** + * Tax class assigned to this shipping method. + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. + */ + readonly taxClass?: Maybe; + /** Returns translated shipping method fields for the given language code. */ + readonly translation?: Maybe; + /** Type of the shipping method. */ + readonly type?: Maybe; + }; + +/** Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. */ +export type ShippingMethodTypeExcludedProductsArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +/** Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. */ +export type ShippingMethodTypeMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. */ +export type ShippingMethodTypeMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. */ +export type ShippingMethodTypePrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. */ +export type ShippingMethodTypePrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. */ +export type ShippingMethodTypeTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +export type ShippingMethodTypeEnum = "PRICE" | "WEIGHT"; + +/** List of shipping methods available for the country. */ +export type ShippingMethodsPerCountry = { + /** The country code. */ + readonly countryCode: CountryCode; + /** List of available shipping methods. */ + readonly shippingMethods?: Maybe>; +}; + +export type ShippingPostalCodeRulesCreateInputRange = { + /** End range of the postal code. */ + readonly end?: InputMaybe; + /** Start range of the postal code. */ + readonly start: Scalars["String"]["input"]; +}; + +/** + * Deletes shipping prices. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ +export type ShippingPriceBulkDelete = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly shippingErrors: ReadonlyArray; +}; + +/** + * Creates a new shipping price. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ +export type ShippingPriceCreate = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly shippingErrors: ReadonlyArray; + readonly shippingMethod?: Maybe; + /** A shipping zone to which the shipping method belongs. */ + readonly shippingZone?: Maybe; +}; + +/** Event sent when new shipping price is created. */ +export type ShippingPriceCreated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The shipping method the event relates to. */ + readonly shippingMethod?: Maybe; + /** The shipping zone the shipping method belongs to. */ + readonly shippingZone?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when new shipping price is created. */ +export type ShippingPriceCreatedShippingMethodArgs = { + channel?: InputMaybe; +}; + +/** Event sent when new shipping price is created. */ +export type ShippingPriceCreatedShippingZoneArgs = { + channel?: InputMaybe; +}; + +/** + * Deletes a shipping price. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ +export type ShippingPriceDelete = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly shippingErrors: ReadonlyArray; + /** A shipping method to delete. */ + readonly shippingMethod?: Maybe; + /** A shipping zone to which the shipping method belongs. */ + readonly shippingZone?: Maybe; +}; + +/** Event sent when shipping price is deleted. */ +export type ShippingPriceDeleted = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The shipping method the event relates to. */ + readonly shippingMethod?: Maybe; + /** The shipping zone the shipping method belongs to. */ + readonly shippingZone?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when shipping price is deleted. */ +export type ShippingPriceDeletedShippingMethodArgs = { + channel?: InputMaybe; +}; + +/** Event sent when shipping price is deleted. */ +export type ShippingPriceDeletedShippingZoneArgs = { + channel?: InputMaybe; +}; + +/** + * Exclude products from shipping price. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ +export type ShippingPriceExcludeProducts = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly shippingErrors: ReadonlyArray; + /** A shipping method with new list of excluded products. */ + readonly shippingMethod?: Maybe; +}; + +export type ShippingPriceExcludeProductsInput = { + /** List of products which will be excluded. */ + readonly products: ReadonlyArray; +}; + +export type ShippingPriceInput = { + /** Postal code rules to add. */ + readonly addPostalCodeRules?: InputMaybe>; + /** Postal code rules to delete. */ + readonly deletePostalCodeRules?: InputMaybe>; + /** Shipping method description. */ + readonly description?: InputMaybe; + /** Inclusion type for currently assigned postal code rules. */ + readonly inclusionType?: InputMaybe; + /** Maximum number of days for delivery. */ + readonly maximumDeliveryDays?: InputMaybe; + /** Maximum order weight to use this shipping method. */ + readonly maximumOrderWeight?: InputMaybe; + /** Minimal number of days for delivery. */ + readonly minimumDeliveryDays?: InputMaybe; + /** Minimum order weight to use this shipping method. */ + readonly minimumOrderWeight?: InputMaybe; + /** Name of the shipping method. */ + readonly name?: InputMaybe; + /** Shipping zone this method belongs to. */ + readonly shippingZone?: InputMaybe; + /** ID of a tax class to assign to this shipping method. If not provided, the default tax class will be used. */ + readonly taxClass?: InputMaybe; + /** Shipping type: price or weight based. */ + readonly type?: InputMaybe; +}; + +/** + * Remove product from excluded list for shipping price. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ +export type ShippingPriceRemoveProductFromExclude = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly shippingErrors: ReadonlyArray; + /** A shipping method with new list of excluded products. */ + readonly shippingMethod?: Maybe; +}; + +/** + * Creates/updates translations for a shipping method. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ +export type ShippingPriceTranslate = { + readonly errors: ReadonlyArray; + readonly shippingMethod?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly translationErrors: ReadonlyArray; +}; + +export type ShippingPriceTranslationInput = { + /** + * Translated shipping method description. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: InputMaybe; + readonly name?: InputMaybe; +}; + +/** + * Updates a new shipping price. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ +export type ShippingPriceUpdate = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly shippingErrors: ReadonlyArray; + readonly shippingMethod?: Maybe; + /** A shipping zone to which the shipping method belongs. */ + readonly shippingZone?: Maybe; +}; + +/** Event sent when shipping price is updated. */ +export type ShippingPriceUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The shipping method the event relates to. */ + readonly shippingMethod?: Maybe; + /** The shipping zone the shipping method belongs to. */ + readonly shippingZone?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when shipping price is updated. */ +export type ShippingPriceUpdatedShippingMethodArgs = { + channel?: InputMaybe; +}; + +/** Event sent when shipping price is updated. */ +export type ShippingPriceUpdatedShippingZoneArgs = { + channel?: InputMaybe; +}; + +/** 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. */ +export type ShippingZone = Node & + ObjectWithMetadata & { + /** List of channels for shipping zone. */ + readonly channels: ReadonlyArray; + /** List of countries available for the method. */ + readonly countries: ReadonlyArray; + /** Indicates if the shipping zone is default one. */ + readonly default: Scalars["Boolean"]["output"]; + /** Description of a shipping zone. */ + readonly description?: Maybe; + /** The ID of shipping zone. */ + readonly id: Scalars["ID"]["output"]; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** Shipping zone name. */ + readonly name: Scalars["String"]["output"]; + /** Lowest and highest prices for the shipping. */ + readonly priceRange?: Maybe; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** List of shipping methods available for orders shipped to countries within this shipping zone. */ + readonly shippingMethods?: Maybe>; + /** List of warehouses for shipping zone. */ + readonly warehouses: ReadonlyArray; + }; + +/** 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. */ +export type ShippingZoneMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** 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. */ +export type ShippingZoneMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** 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. */ +export type ShippingZonePrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** 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. */ +export type ShippingZonePrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** + * Deletes shipping zones. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ +export type ShippingZoneBulkDelete = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly shippingErrors: ReadonlyArray; +}; + +export type ShippingZoneCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type ShippingZoneCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: ShippingZone; +}; + +/** + * Creates a new shipping zone. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ +export type ShippingZoneCreate = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly shippingErrors: ReadonlyArray; + readonly shippingZone?: Maybe; +}; + +export type ShippingZoneCreateInput = { + /** List of channels to assign to the shipping zone. */ + readonly addChannels?: InputMaybe>; + /** List of warehouses to assign to a shipping zone */ + readonly addWarehouses?: InputMaybe>; + /** List of countries in this shipping zone. */ + readonly countries?: InputMaybe>; + /** Default shipping zone will be used for countries not covered by other zones. */ + readonly default?: InputMaybe; + /** Description of the shipping zone. */ + readonly description?: InputMaybe; + /** Shipping zone's name. Visible only to the staff. */ + readonly name?: InputMaybe; +}; + +/** Event sent when new shipping zone is created. */ +export type ShippingZoneCreated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The shipping zone the event relates to. */ + readonly shippingZone?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when new shipping zone is created. */ +export type ShippingZoneCreatedShippingZoneArgs = { + channel?: InputMaybe; +}; + +/** + * Deletes a shipping zone. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ +export type ShippingZoneDelete = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly shippingErrors: ReadonlyArray; + readonly shippingZone?: Maybe; +}; + +/** Event sent when shipping zone is deleted. */ +export type ShippingZoneDeleted = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The shipping zone the event relates to. */ + readonly shippingZone?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when shipping zone is deleted. */ +export type ShippingZoneDeletedShippingZoneArgs = { + channel?: InputMaybe; +}; + +export type ShippingZoneFilterInput = { + readonly channels?: InputMaybe>; + readonly search?: InputMaybe; +}; + +/** Event sent when shipping zone metadata is updated. */ +export type ShippingZoneMetadataUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The shipping zone the event relates to. */ + readonly shippingZone?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when shipping zone metadata is updated. */ +export type ShippingZoneMetadataUpdatedShippingZoneArgs = { + channel?: InputMaybe; +}; + +/** + * Updates a new shipping zone. + * + * Requires one of the following permissions: MANAGE_SHIPPING. + */ +export type ShippingZoneUpdate = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly shippingErrors: ReadonlyArray; + readonly shippingZone?: Maybe; +}; + +export type ShippingZoneUpdateInput = { + /** List of channels to assign to the shipping zone. */ + readonly addChannels?: InputMaybe>; + /** List of warehouses to assign to a shipping zone */ + readonly addWarehouses?: InputMaybe>; + /** List of countries in this shipping zone. */ + readonly countries?: InputMaybe>; + /** Default shipping zone will be used for countries not covered by other zones. */ + readonly default?: InputMaybe; + /** Description of the shipping zone. */ + readonly description?: InputMaybe; + /** Shipping zone's name. Visible only to the staff. */ + readonly name?: InputMaybe; + /** List of channels to unassign from the shipping zone. */ + readonly removeChannels?: InputMaybe>; + /** List of warehouses to unassign from a shipping zone */ + readonly removeWarehouses?: InputMaybe>; +}; + +/** Event sent when shipping zone is updated. */ +export type ShippingZoneUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The shipping zone the event relates to. */ + readonly shippingZone?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when shipping zone is updated. */ +export type ShippingZoneUpdatedShippingZoneArgs = { + channel?: InputMaybe; +}; + +/** Represents a shop resource containing general shop data and configuration. */ +export type Shop = ObjectWithMetadata & { + /** + * Determines if user can login without confirmation when `enableAccountConfirmation` is enabled. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + readonly allowLoginWithoutConfirmation?: Maybe; + /** List of available external authentications. */ + readonly availableExternalAuthentications: ReadonlyArray; + /** List of available payment gateways. */ + readonly availablePaymentGateways: ReadonlyArray; + /** Shipping methods that are available for the shop. */ + readonly availableShippingMethods?: Maybe>; + /** + * 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. + */ + readonly availableTaxApps: ReadonlyArray; + /** + * List of all currencies supported by shop's channels. + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. + */ + readonly channelCurrencies: ReadonlyArray; + /** + * Charge taxes on shipping. + * @deprecated 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. + */ + readonly chargeTaxesOnShipping: Scalars["Boolean"]["output"]; + /** Company address. */ + readonly companyAddress?: Maybe
; + /** List of countries available in the shop. */ + readonly countries: ReadonlyArray; + /** URL of a view where customers can set their password. */ + readonly customerSetPasswordUrl?: Maybe; + /** Shop's default country. */ + readonly defaultCountry?: Maybe; + /** + * Default shop's email sender's address. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + readonly defaultMailSenderAddress?: Maybe; + /** + * Default shop's email sender's name. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + readonly defaultMailSenderName?: Maybe; + /** Default weight unit. */ + readonly defaultWeightUnit?: Maybe; + /** Shop's description. */ + readonly description?: Maybe; + /** + * Display prices with tax in store. + * @deprecated Use `Channel.taxConfiguration` to determine whether to display gross or net prices. + */ + readonly displayGrossPrices: Scalars["Boolean"]["output"]; + /** Shop's domain data. */ + readonly domain: Domain; + /** + * Determines if account confirmation by email is enabled. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + readonly enableAccountConfirmationByEmail?: Maybe; + /** Allow to approve fulfillments which are unpaid. */ + readonly fulfillmentAllowUnpaid: Scalars["Boolean"]["output"]; + /** Automatically approve all new fulfillments. */ + readonly fulfillmentAutoApprove: Scalars["Boolean"]["output"]; + /** Header text. */ + readonly headerText?: Maybe; + /** ID of the shop. */ + readonly id: Scalars["ID"]["output"]; + /** + * Include taxes in prices. + * @deprecated Use `Channel.taxConfiguration.pricesEnteredWithTax` to determine whether prices are entered with tax. + */ + readonly includeTaxesInPrices: Scalars["Boolean"]["output"]; + /** List of the shops's supported languages. */ + readonly languages: ReadonlyArray; + /** + * Default number of maximum line quantity in single checkout (per single checkout line). + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + readonly limitQuantityPerCheckout?: Maybe; + /** + * Resource limitations and current usage if any set for a shop + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + * @deprecated Field no longer supported + */ + readonly limits: LimitInfo; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** Shop's name. */ + readonly name: Scalars["String"]["output"]; + /** + * Controls whether password-based authentication is allowed. + * + * Added in Saleor 3.23. + */ + readonly passwordLoginMode: PasswordLoginModeEnum; + /** List of available permissions. */ + readonly permissions: ReadonlyArray; + /** List of possible phone prefixes. */ + readonly phonePrefixes: ReadonlyArray; + /** + * When enabled, address fields that are not valid for a given country (according to Google's i18n address data) will be preserved instead of being removed during validation. Validation errors are still returned. + * + * Added in Saleor 3.22. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + readonly preserveAllAddressFields: Scalars["Boolean"]["output"]; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** + * Default number of minutes stock will be reserved for anonymous checkout or null when stock reservation is disabled. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + readonly reserveStockDurationAnonymousUser?: Maybe; + /** + * Default number of minutes stock will be reserved for authenticated checkout or null when stock reservation is disabled. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + readonly reserveStockDurationAuthenticatedUser?: Maybe; + /** Minor Saleor API version. */ + readonly schemaVersion: Scalars["String"]["output"]; + /** + * List of staff notification recipients. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + readonly staffNotificationRecipients?: Maybe>; + /** This field is used as a default value for `ProductVariant.trackInventory`. */ + readonly trackInventoryByDefault?: Maybe; + /** Returns translated shop fields for the given language code. */ + readonly translation?: Maybe; + /** + * When enabled, stock availability is filtered by shipping zones and the destination address (legacy behavior). When disabled, stock availability is determined only by the direct warehouse-channel link, ignoring shipping zones. + * + * Added in Saleor 3.23. + */ + readonly useLegacyShippingZoneStockAvailability: Scalars["Boolean"]["output"]; + /** + * Use legacy update webhook emission. When enabled, update webhooks (e.g. `customerUpdated`,`productVariantUpdated`) are sent even when only metadata changes. When disabled, update webhooks are not sent for metadata-only changes; only metadata-specific webhooks (e.g., `customerMetadataUpdated`, `productVariantMetadataUpdated`) are sent. + * + * Added in Saleor 3.22. + * @deprecated Field no longer supported + */ + readonly useLegacyUpdateWebhookEmission?: Maybe; + /** + * Saleor API version. + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. + */ + readonly version: Scalars["String"]["output"]; +}; + +/** Represents a shop resource containing general shop data and configuration. */ +export type ShopAvailablePaymentGatewaysArgs = { + channel?: InputMaybe; + currency?: InputMaybe; +}; + +/** Represents a shop resource containing general shop data and configuration. */ +export type ShopAvailableShippingMethodsArgs = { + address?: InputMaybe; + channel: Scalars["String"]["input"]; +}; + +/** Represents a shop resource containing general shop data and configuration. */ +export type ShopCountriesArgs = { + filter?: InputMaybe; + languageCode?: InputMaybe; +}; + +/** Represents a shop resource containing general shop data and configuration. */ +export type ShopMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a shop resource containing general shop data and configuration. */ +export type ShopMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents a shop resource containing general shop data and configuration. */ +export type ShopPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a shop resource containing general shop data and configuration. */ +export type ShopPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents a shop resource containing general shop data and configuration. */ +export type ShopTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * 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. + */ +export type ShopAddressUpdate = { + readonly errors: ReadonlyArray; + /** Updated shop. */ + readonly shop?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly shopErrors: ReadonlyArray; +}; + +/** + * Updates site domain of the shop. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ +export type ShopDomainUpdate = { + readonly errors: ReadonlyArray; + /** Updated shop. */ + readonly shop?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly shopErrors: ReadonlyArray; +}; + +export type ShopError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type ShopErrorCode = + | "ALREADY_EXISTS" + | "CANNOT_FETCH_TAX_RATES" + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND" + | "PASSWORD_AUTH_RESTRICTION" + | "REQUIRED" + | "UNIQUE"; + +/** + * Fetch tax rates. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ +export type ShopFetchTaxRates = { + readonly errors: ReadonlyArray; + /** Updated shop. */ + readonly shop?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly shopErrors: ReadonlyArray; +}; + +/** Event sent when shop metadata is updated. */ +export type ShopMetadataUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Shop data. */ + readonly shop?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type ShopSettingsInput = { + /** Enable possibility to login without account confirmation. */ + readonly allowLoginWithoutConfirmation?: InputMaybe; + /** + * Charge taxes on shipping. + * @deprecated To enable taxes for a shipping method, assign a tax class to the shipping method with `shippingPriceCreate` or `shippingPriceUpdate` mutations. + */ + readonly chargeTaxesOnShipping?: InputMaybe; + /** URL of a view where customers can set their password. */ + readonly customerSetPasswordUrl?: InputMaybe; + /** Default email sender's address. */ + readonly defaultMailSenderAddress?: InputMaybe; + /** Default email sender's name. */ + readonly defaultMailSenderName?: InputMaybe; + /** Default weight unit. */ + readonly defaultWeightUnit?: InputMaybe; + /** SEO description. */ + readonly description?: InputMaybe; + /** + * Display prices with tax in store. + * @deprecated Use `taxConfigurationUpdate` mutation to configure this setting per channel or country. + */ + readonly displayGrossPrices?: InputMaybe; + /** Enable automatic account confirmation by email. */ + readonly enableAccountConfirmationByEmail?: InputMaybe; + /** Enable ability to approve fulfillments which are unpaid. */ + readonly fulfillmentAllowUnpaid?: InputMaybe; + /** Enable automatic approval of all new fulfillments. */ + readonly fulfillmentAutoApprove?: InputMaybe; + /** Header text. */ + readonly headerText?: InputMaybe; + /** + * Include taxes in prices. + * @deprecated Use `taxConfigurationUpdate` mutation to configure this setting per channel or country. + */ + readonly includeTaxesInPrices?: InputMaybe; + /** Default number of maximum line quantity in single checkout. Minimum possible value is 1, default value is 50. */ + readonly limitQuantityPerCheckout?: InputMaybe; + /** + * Shop public metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** + * Controls whether password-based authentication is allowed. + * + * Added in Saleor 3.23. + */ + readonly passwordLoginMode?: InputMaybe; + /** + * When enabled, address fields that are not valid for a given country (according to Google's i18n address data) will be preserved instead of being removed during validation. Validation errors are still returned. + * + * Added in Saleor 3.22. + */ + readonly preserveAllAddressFields?: InputMaybe; + /** + * Shop private metadata. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** Default number of minutes stock will be reserved for anonymous checkout. Enter 0 or null to disable. */ + readonly reserveStockDurationAnonymousUser?: InputMaybe; + /** Default number of minutes stock will be reserved for authenticated checkout. Enter 0 or null to disable. */ + readonly reserveStockDurationAuthenticatedUser?: InputMaybe; + /** This field is used as a default value for `ProductVariant.trackInventory`. */ + readonly trackInventoryByDefault?: InputMaybe; + /** + * When enabled, stock availability is filtered by shipping zones and the destination address (legacy behavior). When disabled, stock availability is determined only by the direct warehouse-channel link, ignoring shipping zones. + * + * Added in Saleor 3.23. + */ + readonly useLegacyShippingZoneStockAvailability?: InputMaybe; + /** + * Use legacy update webhook emission. When enabled, update webhooks (e.g. `customerUpdated`,`productVariantUpdated`) are sent even when only metadata changes. When disabled, update webhooks are not sent for metadata-only changes; only metadata-specific webhooks (e.g., `customerMetadataUpdated`, `productVariantMetadataUpdated`) are sent. + * + * Added in Saleor 3.22. + * @deprecated Field no longer supported + */ + readonly useLegacyUpdateWebhookEmission?: InputMaybe; +}; + +/** + * Creates/updates translations for shop settings. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ +export type ShopSettingsTranslate = { + readonly errors: ReadonlyArray; + /** Updated shop settings. */ + readonly shop?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly translationErrors: ReadonlyArray; +}; + +export type ShopSettingsTranslationInput = { + readonly description?: InputMaybe; + readonly headerText?: InputMaybe; +}; + +/** + * 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. + */ +export type ShopSettingsUpdate = { + readonly errors: ReadonlyArray; + /** Updated shop. */ + readonly shop?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly shopErrors: ReadonlyArray; +}; + +/** Represents shop translations. */ +export type ShopTranslation = Node & { + /** Translated description of sale. */ + readonly description: Scalars["String"]["output"]; + /** Translated header text of sale. */ + readonly headerText: Scalars["String"]["output"]; + /** The ID of the shop translation. */ + readonly id: Scalars["ID"]["output"]; + /** Translation language. */ + readonly language: LanguageDisplay; +}; + +export type SiteDomainInput = { + /** Domain name for shop. */ + readonly domain?: InputMaybe; + /** Shop site name. */ + readonly name?: InputMaybe; +}; + +/** + * 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. + */ +export type StaffBulkDelete = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly staffErrors: ReadonlyArray; +}; + +/** + * 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. + */ +export type StaffCreate = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly staffErrors: ReadonlyArray; + readonly user?: Maybe; +}; + +/** Fields required to create a staff user. */ +export type StaffCreateInput = { + /** List of permission group IDs to which user should be assigned. */ + readonly addGroups?: InputMaybe>; + /** The unique email address of the user. */ + readonly email?: InputMaybe; + /** Given name. */ + readonly firstName?: InputMaybe; + /** User account is active. */ + readonly isActive?: InputMaybe; + /** Family name. */ + readonly lastName?: InputMaybe; + /** + * Fields required to update the user metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** A note about the user. */ + readonly note?: InputMaybe; + /** + * Fields required to update the user private metadata. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** URL of a view where users should be redirected to set the password. URL in RFC 1808 format. */ + readonly redirectUrl?: InputMaybe; +}; + +/** Event sent when new staff user is created. */ +export type StaffCreated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The user the event relates to. */ + readonly user?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * 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. + */ +export type StaffDelete = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly staffErrors: ReadonlyArray; + readonly user?: Maybe; +}; + +/** Event sent when staff user is deleted. */ +export type StaffDeleted = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The user the event relates to. */ + readonly user?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type StaffError = { + /** A type of address that causes the error. */ + readonly addressType?: Maybe; + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** List of permission group IDs which cause the error. */ + readonly groups?: Maybe>; + /** The error message. */ + readonly message?: Maybe; + /** List of permissions which causes the error. */ + readonly permissions?: Maybe>; + /** List of user IDs which causes the error. */ + readonly users?: Maybe>; +}; + +/** Represents status of a staff account. */ +export type 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. */ +export type StaffNotificationRecipient = Node & { + /** Determines if a notification active. */ + readonly active?: Maybe; + /** Returns email address of a user subscribed to email notifications. */ + readonly email?: Maybe; + /** The ID of the staff notification recipient. */ + readonly id: Scalars["ID"]["output"]; + /** Returns a user subscribed to email notifications. */ + readonly user?: Maybe; +}; + +/** + * Creates a new staff notification recipient. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ +export type StaffNotificationRecipientCreate = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly shopErrors: ReadonlyArray; + readonly staffNotificationRecipient?: Maybe; +}; + +/** + * Deletes staff notification recipient. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ +export type StaffNotificationRecipientDelete = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly shopErrors: ReadonlyArray; + readonly staffNotificationRecipient?: Maybe; +}; + +export type StaffNotificationRecipientInput = { + /** Determines if a notification active. */ + readonly active?: InputMaybe; + /** Email address of a user subscribed to email notifications. */ + readonly email?: InputMaybe; + /** The ID of the user subscribed to email notifications.. */ + readonly user?: InputMaybe; +}; + +/** + * Updates a staff notification recipient. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ +export type StaffNotificationRecipientUpdate = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly shopErrors: ReadonlyArray; + readonly staffNotificationRecipient?: Maybe; +}; + +/** Event sent when setting a new password for staff is requested. */ +export type StaffSetPasswordRequested = Event & { + /** The channel data. */ + readonly channel?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The URL to redirect the user after he accepts the request. */ + readonly redirectUrl?: Maybe; + /** Shop data. */ + readonly shop?: Maybe; + /** The token required to confirm request. */ + readonly token?: Maybe; + /** The user the event relates to. */ + readonly user?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * 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. + */ +export type StaffUpdate = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly staffErrors: ReadonlyArray; + readonly user?: Maybe; +}; + +/** Fields required to update a staff user. */ +export type StaffUpdateInput = { + /** List of permission group IDs to which user should be assigned. */ + readonly addGroups?: InputMaybe>; + /** The unique email address of the user. */ + readonly email?: InputMaybe; + /** Given name. */ + readonly firstName?: InputMaybe; + /** User account is active. */ + readonly isActive?: InputMaybe; + /** Family name. */ + readonly lastName?: InputMaybe; + /** + * Fields required to update the user metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** A note about the user. */ + readonly note?: InputMaybe; + /** + * Fields required to update the user private metadata. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** List of permission group IDs from which user should be unassigned. */ + readonly removeGroups?: InputMaybe>; +}; + +/** Event sent when staff user is updated. */ +export type StaffUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The user the event relates to. */ + readonly user?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type StaffUserInput = { + readonly ids?: InputMaybe>; + readonly search?: InputMaybe; + readonly status?: InputMaybe; +}; + +/** Represents stock. */ +export type Stock = Node & { + /** The ID of stock. */ + readonly id: Scalars["ID"]["output"]; + /** Information about the product variant. */ + readonly 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. + */ + readonly quantity: Scalars["Int"]["output"]; + /** + * Quantity allocated for orders. + * + * Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS. + */ + readonly quantityAllocated: Scalars["Int"]["output"]; + /** + * Quantity reserved for checkouts. + * + * Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS. + */ + readonly quantityReserved: Scalars["Int"]["output"]; + /** The warehouse associated with the stock. */ + readonly warehouse: Warehouse; +}; + +export type StockAvailability = "IN_STOCK" | "OUT_OF_STOCK"; + +export type StockBulkResult = { + /** List of errors occurred on create or update attempt. */ + readonly errors?: Maybe>; + /** Stock data. */ + readonly stock?: Maybe; +}; + +/** + * 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. + * + * 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. + */ +export type StockBulkUpdate = { + /** Returns how many objects were updated. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; + /** List of the updated stocks. */ + readonly results: ReadonlyArray; +}; + +export type StockBulkUpdateError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type StockBulkUpdateErrorCode = "GRAPHQL_ERROR" | "INVALID" | "NOT_FOUND" | "REQUIRED"; + +export type StockBulkUpdateInput = { + /** Quantity of items available for sell. */ + readonly quantity: Scalars["Int"]["input"]; + /** Variant external reference. */ + readonly variantExternalReference?: InputMaybe; + /** Variant ID. */ + readonly variantId?: InputMaybe; + /** Warehouse external reference. */ + readonly warehouseExternalReference?: InputMaybe; + /** Warehouse ID. */ + readonly warehouseId?: InputMaybe; +}; + +export type StockCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type StockCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: Stock; +}; + +export type StockError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type StockErrorCode = + | "ALREADY_EXISTS" + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND" + | "REQUIRED" + | "UNIQUE"; + +export type StockFilterInput = { + readonly quantity?: InputMaybe; + readonly search?: InputMaybe; +}; + +export type StockInput = { + /** Quantity of items available for sell. */ + readonly quantity: Scalars["Int"]["input"]; + /** Warehouse in which stock is located. */ + readonly warehouse: Scalars["ID"]["input"]; +}; + +/** Represents the channel stock settings. */ +export type StockSettings = { + /** Allocation strategy defines the preference of warehouses for allocations and reservations. */ + readonly allocationStrategy: AllocationStrategyEnum; +}; + +export type StockSettingsInput = { + /** Allocation strategy options. Strategy defines the preference of warehouses for allocations and reservations. */ + readonly allocationStrategy: AllocationStrategyEnum; +}; + +export type StockUpdateInput = { + /** Quantity of items available for sell. */ + readonly quantity: Scalars["Int"]["input"]; + /** Stock. */ + readonly stock: Scalars["ID"]["input"]; +}; + +/** + * 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. + */ +export type StockUpdatePolicyEnum = "FORCE" | "SKIP" | "UPDATE"; + +/** Enum representing the type of a payment storage in a gateway. */ +export type 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. */ +export type StoredPaymentMethod = { + /** Stored credit card details if available. */ + readonly creditCardInfo?: Maybe; + /** JSON data returned by Payment Provider app for this payment method. */ + readonly data?: Maybe; + /** Payment gateway that stores this payment method. */ + readonly gateway: PaymentGateway; + /** Stored payment method ID. */ + readonly id: Scalars["ID"]["output"]; + /** Payment method name. Example: last 4 digits of credit card, obfuscated email, etc. */ + readonly name?: Maybe; + /** ID of stored payment method used to make payment actions. Note: method ID is unique only within the payment gateway. */ + readonly paymentMethodId: Scalars["String"]["output"]; + readonly supportedPaymentFlows?: Maybe>; + /** Type of the payment method. Example: credit card, wallet, etc. */ + readonly type: Scalars["String"]["output"]; +}; + +/** Event sent when user requests to delete a payment method. */ +export type StoredPaymentMethodDeleteRequested = Event & { + /** Channel related to the requested delete action. */ + readonly channel: Channel; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The ID of the payment method that should be deleted by the payment gateway. */ + readonly paymentMethodId: Scalars["String"]["output"]; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The user for which the app should proceed with payment method delete request. */ + readonly user: User; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Request to delete a stored payment method on payment provider side. + * + * 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. + */ +export type StoredPaymentMethodRequestDelete = { + readonly errors: ReadonlyArray; + /** The result of deleting a stored payment method. */ + readonly result: StoredPaymentMethodRequestDeleteResult; +}; + +export type 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. + */ +export type StoredPaymentMethodRequestDeleteResult = + | "FAILED_TO_DELETE" + | "FAILED_TO_DELIVER" + | "SUCCESSFULLY_DELETED"; + +/** Define the filtering options for string fields. */ +export type StringFilterInput = { + /** The value equal to. */ + readonly eq?: InputMaybe; + /** The value included in. */ + readonly oneOf?: InputMaybe>; +}; + +export type Subscription = { + /** + * Event sent when new checkout is created. + * + * Added in Saleor 3.21. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + readonly checkoutCreated?: Maybe; + /** + * Event sent when checkout is fully authorized. + * + * Added in Saleor 3.21. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + readonly checkoutFullyAuthorized?: Maybe; + /** + * Event sent when checkout is fully-paid. + * + * Added in Saleor 3.21. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + readonly checkoutFullyPaid?: Maybe; + /** + * Event sent when checkout metadata is updated. + * + * Added in Saleor 3.21. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + readonly checkoutMetadataUpdated?: Maybe; + /** + * Event sent when checkout is updated. + * + * Added in Saleor 3.21. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + readonly checkoutUpdated?: Maybe; + /** + * 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. + */ + readonly draftOrderCreated?: Maybe; + /** + * 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. + */ + readonly draftOrderDeleted?: Maybe; + /** + * 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. + */ + readonly draftOrderUpdated?: Maybe; + /** Look up subscription event. */ + readonly event?: Maybe; + /** + * 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. + */ + readonly orderBulkCreated?: Maybe; + /** + * 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. + */ + readonly orderCancelled?: Maybe; + /** + * 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. + */ + readonly orderConfirmed?: Maybe; + /** + * 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. + */ + readonly orderCreated?: Maybe; + /** + * 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. + */ + readonly orderExpired?: Maybe; + /** + * 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. + */ + readonly orderFulfilled?: Maybe; + /** + * 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. + */ + readonly orderFullyPaid?: Maybe; + /** + * 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. + */ + readonly orderFullyRefunded?: Maybe; + /** + * 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. + */ + readonly orderMetadataUpdated?: Maybe; + /** + * 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. + */ + readonly orderPaid?: Maybe; + /** + * 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. + */ + readonly orderRefunded?: Maybe; + /** + * 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. + */ + readonly orderUpdated?: Maybe; + /** + * Event sent when a product variant becomes available again across click-and-collect warehouses in a channel. + * + * Note: Only triggered when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + * + * Added in Saleor 3.23. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + readonly productVariantBackInStockForClickAndCollect?: Maybe; + /** + * Event sent when a product variant becomes available again across non click-and-collect warehouses in a channel. + * + * Note: Only triggered when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + * + * Added in Saleor 3.23. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + readonly productVariantBackInStockInChannel?: Maybe; + /** + * Event sent when product variant discounted price is recalculated. + * + * Added in Saleor 3.22. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + readonly productVariantDiscountedPriceUpdated?: Maybe; + /** + * Event sent when a product variant becomes out of stock across all click-and-collect warehouses in a channel. + * + * Note: Only triggered when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + * + * Added in Saleor 3.23. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + readonly productVariantOutOfStockForClickAndCollect?: Maybe; + /** + * Event sent when a product variant becomes out of stock across all non click-and-collect warehouses in a channel. + * + * Note: Only triggered when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + * + * Added in Saleor 3.23. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + readonly productVariantOutOfStockInChannel?: Maybe; +}; + +export type SubscriptionCheckoutCreatedArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionCheckoutFullyAuthorizedArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionCheckoutFullyPaidArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionCheckoutMetadataUpdatedArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionCheckoutUpdatedArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionDraftOrderCreatedArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionDraftOrderDeletedArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionDraftOrderUpdatedArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionOrderBulkCreatedArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionOrderCancelledArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionOrderConfirmedArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionOrderCreatedArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionOrderExpiredArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionOrderFulfilledArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionOrderFullyPaidArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionOrderFullyRefundedArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionOrderMetadataUpdatedArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionOrderPaidArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionOrderRefundedArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionOrderUpdatedArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionProductVariantBackInStockForClickAndCollectArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionProductVariantBackInStockInChannelArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionProductVariantDiscountedPriceUpdatedArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionProductVariantOutOfStockForClickAndCollectArgs = { + channels?: InputMaybe>; +}; + +export type SubscriptionProductVariantOutOfStockInChannelArgs = { + channels?: InputMaybe>; +}; + +export type 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. */ +export type TaxClass = Node & + ObjectWithMetadata & { + /** Country-specific tax rates for this tax class. */ + readonly countries: ReadonlyArray; + /** The ID of the object. */ + readonly id: Scalars["ID"]["output"]; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** Name of the tax class. */ + readonly name: Scalars["String"]["output"]; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + }; + +/** 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. */ +export type TaxClassMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** 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. */ +export type TaxClassMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** 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. */ +export type TaxClassPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** 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. */ +export type TaxClassPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +export type TaxClassCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type TaxClassCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly 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. */ +export type TaxClassCountryRate = { + /** Country in which this tax rate applies. */ + readonly country: CountryDisplay; + /** Tax rate value. */ + readonly rate: Scalars["Float"]["output"]; + /** Related tax class. */ + readonly taxClass?: Maybe; +}; + +/** + * Creates a tax class. + * + * Requires one of the following permissions: MANAGE_TAXES. + */ +export type TaxClassCreate = { + readonly errors: ReadonlyArray; + readonly taxClass?: Maybe; +}; + +export type TaxClassCreateError = { + /** The error code. */ + readonly code: TaxClassCreateErrorCode; + /** List of country codes for which the configuration is invalid. */ + readonly countryCodes: ReadonlyArray; + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type TaxClassCreateErrorCode = "GRAPHQL_ERROR" | "INVALID" | "NOT_FOUND"; + +export type TaxClassCreateInput = { + /** List of country-specific tax rates to create for this tax class. */ + readonly createCountryRates?: InputMaybe>; + /** Name of the tax class. */ + readonly name: Scalars["String"]["input"]; +}; + +/** + * Deletes 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. + * + * Requires one of the following permissions: MANAGE_TAXES. + */ +export type TaxClassDelete = { + readonly errors: ReadonlyArray; + readonly taxClass?: Maybe; +}; + +export type TaxClassDeleteError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type TaxClassDeleteErrorCode = "GRAPHQL_ERROR" | "INVALID" | "NOT_FOUND"; + +export type TaxClassFilterInput = { + readonly countries?: InputMaybe>; + readonly ids?: InputMaybe>; + readonly metadata?: InputMaybe>; +}; + +export type TaxClassRateInput = { + /** Tax rate value. */ + readonly rate?: InputMaybe; + /** ID of a tax class for which to update the tax rate */ + readonly taxClassId?: InputMaybe; +}; + +export type TaxClassSortField = + /** Sort tax classes by name. */ + "NAME"; + +export type TaxClassSortingInput = { + /** Specifies the direction in which to sort tax classes. */ + readonly direction: OrderDirection; + /** Sort tax classes by the selected field. */ + readonly field: TaxClassSortField; +}; + +/** + * Updates a tax class. + * + * Requires one of the following permissions: MANAGE_TAXES. + */ +export type TaxClassUpdate = { + readonly errors: ReadonlyArray; + readonly taxClass?: Maybe; +}; + +export type TaxClassUpdateError = { + /** The error code. */ + readonly code: TaxClassUpdateErrorCode; + /** List of country codes for which the configuration is invalid. */ + readonly countryCodes: ReadonlyArray; + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type TaxClassUpdateErrorCode = + | "DUPLICATED_INPUT_ITEM" + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND"; + +export type TaxClassUpdateInput = { + /** Name of the tax class. */ + readonly name?: InputMaybe; + /** List of country codes for which to remove the tax class rates. Note: It removes all rates for given country code. */ + readonly removeCountryRates?: InputMaybe>; + /** List of country-specific tax rates to create or update for this tax class. */ + readonly updateCountryRates?: InputMaybe>; +}; + +/** Channel-specific tax configuration. */ +export type TaxConfiguration = Node & + ObjectWithMetadata & { + /** A channel to which the tax configuration applies to. */ + readonly channel: Channel; + /** Determines whether taxes are charged in the given channel. */ + readonly chargeTaxes: Scalars["Boolean"]["output"]; + /** List of country-specific exceptions in tax configuration. */ + readonly countries: ReadonlyArray; + /** Determines whether displayed prices should include taxes. */ + readonly displayGrossPrices: Scalars["Boolean"]["output"]; + /** The ID of the object. */ + readonly id: Scalars["ID"]["output"]; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** Determines whether prices are entered with the tax included. */ + readonly pricesEnteredWithTax: Scalars["Boolean"]["output"]; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** + * 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. + */ + readonly taxAppId?: Maybe; + /** 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. */ + readonly taxCalculationStrategy?: Maybe; + /** + * Determines whether to use weighted tax for shipping. When set to true, the tax rate for shipping will be calculated based on the weighted average of tax rates from the order or checkout lines. + * + * Added in Saleor 3.21. + */ + readonly useWeightedTaxForShipping?: Maybe; + }; + +/** Channel-specific tax configuration. */ +export type TaxConfigurationMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Channel-specific tax configuration. */ +export type TaxConfigurationMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Channel-specific tax configuration. */ +export type TaxConfigurationPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Channel-specific tax configuration. */ +export type TaxConfigurationPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +export type TaxConfigurationCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type TaxConfigurationCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: TaxConfiguration; +}; + +export type TaxConfigurationFilterInput = { + readonly ids?: InputMaybe>; + readonly metadata?: InputMaybe>; +}; + +/** Country-specific exceptions of a channel's tax configuration. */ +export type TaxConfigurationPerCountry = { + /** Determines whether taxes are charged in this country. */ + readonly chargeTaxes: Scalars["Boolean"]["output"]; + /** Country in which this configuration applies. */ + readonly country: CountryDisplay; + /** Determines whether displayed prices should include taxes for this country. */ + readonly displayGrossPrices: Scalars["Boolean"]["output"]; + /** + * 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. + */ + readonly taxAppId?: Maybe; + /** 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. */ + readonly taxCalculationStrategy?: Maybe; + /** + * Determines whether to use weighted tax for shipping. When set to true, the tax rate for shipping will be calculated based on the weighted average of tax rates from the order or checkout lines. + * + * Added in Saleor 3.21. + */ + readonly useWeightedTaxForShipping?: Maybe; +}; + +export type TaxConfigurationPerCountryInput = { + /** Determines whether taxes are charged in this country. */ + readonly chargeTaxes: Scalars["Boolean"]["input"]; + /** Country in which this configuration applies. */ + readonly countryCode: CountryCode; + /** Determines whether displayed prices should include taxes for this country. */ + readonly displayGrossPrices: Scalars["Boolean"]["input"]; + /** + * 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. + */ + readonly taxAppId?: InputMaybe; + /** 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. */ + readonly taxCalculationStrategy?: InputMaybe; + /** + * Determines whether to use weighted tax for shipping. When set to true, the tax rate for shipping will be calculated based on the weighted average of tax rates from the order or checkout lines. Default value is `False`.Can be used only with `taxCalculationStrategy` set to `FLAT_RATES`. + * + * Added in Saleor 3.21. + */ + readonly useWeightedTaxForShipping?: InputMaybe; +}; + +/** + * Updates tax configuration for a channel. + * + * Requires one of the following permissions: MANAGE_TAXES. + */ +export type TaxConfigurationUpdate = { + readonly errors: ReadonlyArray; + readonly taxConfiguration?: Maybe; +}; + +export type TaxConfigurationUpdateError = { + /** The error code. */ + readonly code: TaxConfigurationUpdateErrorCode; + /** List of country codes for which the configuration is invalid. */ + readonly countryCodes: ReadonlyArray; + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type TaxConfigurationUpdateErrorCode = + | "DUPLICATED_INPUT_ITEM" + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND"; + +export type TaxConfigurationUpdateInput = { + /** Determines whether taxes are charged in the given channel. */ + readonly chargeTaxes?: InputMaybe; + /** Determines whether displayed prices should include taxes. */ + readonly displayGrossPrices?: InputMaybe; + /** Determines whether prices are entered with the tax included. */ + readonly pricesEnteredWithTax?: InputMaybe; + /** List of country codes for which to remove the tax configuration. */ + readonly removeCountriesConfiguration?: InputMaybe>; + /** + * 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. + */ + readonly taxAppId?: InputMaybe; + /** 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. */ + readonly taxCalculationStrategy?: InputMaybe; + /** List of tax country configurations to create or update (identified by a country code). */ + readonly updateCountriesConfiguration?: InputMaybe< + ReadonlyArray + >; + /** + * Determines whether to use weighted tax for shipping. When set to true, the tax rate for shipping will be calculated based on the weighted average of tax rates from the order or checkout lines. Default value is `False`.Can be used only with `taxCalculationStrategy` set to `FLAT_RATES`. + * + * Added in Saleor 3.21. + */ + readonly useWeightedTaxForShipping?: InputMaybe; +}; + +/** Tax class rates grouped by country. */ +export type TaxCountryConfiguration = { + /** A country for which tax class rates are grouped. */ + readonly country: CountryDisplay; + /** List of tax class rates. */ + readonly taxClassCountryRates: ReadonlyArray; +}; + +/** + * Remove all tax class rates for a specific country. + * + * Requires one of the following permissions: MANAGE_TAXES. + */ +export type TaxCountryConfigurationDelete = { + readonly errors: ReadonlyArray; + /** Updated tax class rates grouped by a country. */ + readonly taxCountryConfiguration?: Maybe; +}; + +export type TaxCountryConfigurationDeleteError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type TaxCountryConfigurationDeleteErrorCode = "GRAPHQL_ERROR" | "INVALID" | "NOT_FOUND"; + +/** + * Updates tax class rates for a specific country. + * + * Requires one of the following permissions: MANAGE_TAXES. + */ +export type TaxCountryConfigurationUpdate = { + readonly errors: ReadonlyArray; + /** Updated tax class rates grouped by a country. */ + readonly taxCountryConfiguration?: Maybe; +}; + +export type TaxCountryConfigurationUpdateError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** List of tax class IDs for which the update failed. */ + readonly taxClassIds: ReadonlyArray; +}; + +export type 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. + * + * Requires one of the following permissions: MANAGE_TAXES. + */ +export type TaxExemptionManage = { + readonly errors: ReadonlyArray; + readonly taxableObject?: Maybe; +}; + +export type TaxExemptionManageError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type TaxExemptionManageErrorCode = + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_EDITABLE_ORDER" + | "NOT_FOUND"; + +export type TaxSourceLine = CheckoutLine | OrderLine; + +export type TaxSourceObject = Checkout | Order; + +/** Representation of tax types fetched from tax gateway. */ +export type TaxType = { + /** Description of the tax type. */ + readonly description?: Maybe; + /** External tax code used to identify given tax group. */ + readonly taxCode?: Maybe; +}; + +/** Taxable object. */ +export type TaxableObject = { + /** The address data. */ + readonly address?: Maybe
; + readonly channel: Channel; + /** The currency of the object. */ + readonly currency: Scalars["String"]["output"]; + /** List of discounts. */ + readonly discounts: ReadonlyArray; + /** List of lines assigned to the object. */ + readonly lines: ReadonlyArray; + /** Determines if prices contain entered tax.. */ + readonly pricesEnteredWithTax: Scalars["Boolean"]["output"]; + /** The price of shipping method, includes shipping voucher discount if applied. */ + readonly shippingPrice: Money; + /** The source object related to this tax object. */ + readonly sourceObject: TaxSourceObject; +}; + +/** Taxable object discount. */ +export type TaxableObjectDiscount = { + /** The amount of the discount. */ + readonly amount: Money; + /** The name of the discount. */ + readonly name?: Maybe; + /** Indicates which part of the order the discount should affect: SUBTOTAL or SHIPPING. */ + readonly type: TaxableObjectDiscountTypeEnum; +}; + +/** Indicates which part of the order the discount should affect: SUBTOTAL or SHIPPING. */ +export type TaxableObjectDiscountTypeEnum = "SHIPPING" | "SUBTOTAL"; + +export type TaxableObjectLine = { + /** Determines if taxes are being charged for the product. */ + readonly chargeTaxes: Scalars["Boolean"]["output"]; + /** The product name. */ + readonly productName: Scalars["String"]["output"]; + /** The product sku. */ + readonly productSku?: Maybe; + /** Number of items. */ + readonly quantity: Scalars["Int"]["output"]; + /** The source line related to this tax line. */ + readonly 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. */ + readonly 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. */ + readonly unitPrice: Money; + /** The variant name. */ + readonly variantName: Scalars["String"]["output"]; +}; + +/** Represents a monetary value with taxes. In cases where taxes were not applied, net and gross values will be equal. */ +export type TaxedMoney = { + /** Currency code. */ + readonly currency: Scalars["String"]["output"]; + /** Amount of money including taxes. */ + readonly gross: Money; + /** Amount of money without taxes. */ + readonly net: Money; + /** Amount of taxes. */ + readonly tax: Money; +}; + +export type TaxedMoneyInput = { + /** Gross value of an item. */ + readonly gross: Scalars["PositiveDecimal"]["input"]; + /** Net value of an item. */ + readonly net: Scalars["PositiveDecimal"]["input"]; +}; + +/** Represents a range of monetary values. */ +export type TaxedMoneyRange = { + /** Lower bound of a price range. */ + readonly start?: Maybe; + /** Upper bound of a price range. */ + readonly stop?: Maybe; +}; + +/** Event sent when thumbnail is created. */ +export type ThumbnailCreated = Event & { + /** Thumbnail id. */ + readonly id?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** Original media url. */ + readonly mediaUrl?: Maybe; + /** Object the thumbnail refers to. */ + readonly objectId?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Thumbnail url. */ + readonly url?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type ThumbnailFormatEnum = "AVIF" | "ORIGINAL" | "WEBP"; + +export type TimePeriod = { + /** The length of the period. */ + readonly amount: Scalars["Int"]["output"]; + /** The type of the period. */ + readonly type: TimePeriodTypeEnum; +}; + +export type TimePeriodInputType = { + /** The length of the period. */ + readonly amount: Scalars["Int"]["input"]; + /** The type of the period. */ + readonly type: TimePeriodTypeEnum; +}; + +export type 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) + */ +export type TokenizedPaymentFlowEnum = "INTERACTIVE"; + +/** An object representing a single payment. */ +export type Transaction = Node & { + /** Total amount of the transaction. */ + readonly amount?: Maybe; + /** Date and time at which transaction was created. */ + readonly created: Scalars["DateTime"]["output"]; + /** Error associated with transaction, if any. */ + readonly error?: Maybe; + /** + * Response returned by payment gateway. + * @deprecated This field is a part of a legacy Payments API. Please use apps instead. + */ + readonly gatewayResponse: Scalars["JSONString"]["output"]; + /** ID of the transaction. */ + readonly id: Scalars["ID"]["output"]; + /** Determines if the transaction was successful. */ + readonly isSuccess: Scalars["Boolean"]["output"]; + /** Determines the type of transaction. */ + readonly kind: TransactionKind; + /** Determines the payment associated with a transaction. */ + readonly payment: Payment; + /** Unique token associated with a transaction. */ + readonly token: Scalars["String"]["output"]; +}; + +export type TransactionAction = { + /** Determines the action type. */ + readonly actionType: TransactionActionEnum; + /** Transaction request amount. */ + readonly amount: Scalars["PositiveDecimal"]["output"]; + /** Currency code. */ + readonly currency: Scalars["String"]["output"]; +}; + +/** + * 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. + */ +export type TransactionActionEnum = "CANCEL" | "CHARGE" | "REFUND"; + +/** Event sent when transaction cancelation is requested. */ +export type TransactionCancelationRequested = Event & { + /** Requested action data. */ + readonly action: TransactionAction; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Look up a transaction. */ + readonly transaction?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when transaction charge is requested. */ +export type TransactionChargeRequested = Event & { + /** Requested action data. */ + readonly action: TransactionAction; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Look up a transaction. */ + readonly transaction?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type TransactionCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type TransactionCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: TransactionItem; +}; + +/** + * Creates transaction for checkout or order. + * + * Requires one of the following permissions: HANDLE_PAYMENTS. + */ +export type TransactionCreate = { + readonly errors: ReadonlyArray; + readonly transaction?: Maybe; +}; + +export type TransactionCreateError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type TransactionCreateErrorCode = + | "GRAPHQL_ERROR" + | "INCORRECT_CURRENCY" + | "INVALID" + | "METADATA_KEY_REQUIRED" + | "NOT_FOUND" + | "UNIQUE"; + +export type TransactionCreateInput = { + /** Amount authorized by this transaction. */ + readonly amountAuthorized?: InputMaybe; + /** Amount canceled by this transaction. */ + readonly amountCanceled?: InputMaybe; + /** Amount charged by this transaction. */ + readonly amountCharged?: InputMaybe; + /** Amount refunded by this transaction. */ + readonly amountRefunded?: InputMaybe; + /** List of all possible actions for the transaction */ + readonly availableActions?: InputMaybe>; + /** The url that will allow to redirect user to payment provider page with transaction event details. */ + readonly externalUrl?: InputMaybe; + /** The message of the transaction. */ + readonly message?: InputMaybe; + /** + * Payment public metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** Payment name of the transaction. */ + readonly name?: InputMaybe; + /** + * Details of the payment method used for the transaction. + * + * Added in Saleor 3.22. + */ + readonly paymentMethodDetails?: InputMaybe; + /** + * Payment private metadata. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** PSP Reference of the transaction. */ + readonly pspReference?: InputMaybe; +}; + +/** Represents transaction's event. */ +export type TransactionEvent = Node & { + /** The amount related to this event. */ + readonly amount: Money; + /** Date and time at which a transaction event was created. */ + readonly createdAt: Scalars["DateTime"]["output"]; + /** User or App that created the transaction event. */ + readonly createdBy?: Maybe; + /** The url that will allow to redirect user to payment provider page with transaction details. */ + readonly externalUrl: Scalars["String"]["output"]; + /** The ID of the object. */ + readonly id: Scalars["ID"]["output"]; + /** Idempotency key assigned to the event. */ + readonly idempotencyKey?: Maybe; + /** Message related to the transaction's event. */ + readonly message: Scalars["String"]["output"]; + /** PSP reference of transaction. */ + readonly pspReference: Scalars["String"]["output"]; + /** + * Reason model of the transaction refund. + * + * Added in Saleor 3.22. + */ + readonly reasonReference?: Maybe; + /** The type of action related to this event. */ + readonly type?: Maybe; +}; + +/** + * Filter input for transaction events data. + * + * Added in Saleor 3.23. + */ +export type TransactionEventFilterInput = { + /** + * Filter transaction events by created at date. + * + * Added in Saleor 3.23. + */ + readonly createdAt?: InputMaybe; + /** + * Filter transaction events by type. + * + * Added in Saleor 3.23. + */ + readonly type?: InputMaybe; +}; + +export type TransactionEventInput = { + /** The message related to the event. */ + readonly message?: InputMaybe; + /** PSP Reference related to this action. */ + readonly pspReference?: InputMaybe; +}; + +/** + * Report the event for the transaction. + * + * 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. + */ +export type TransactionEventReport = { + /** Defines if the reported event hasn't been processed earlier. */ + readonly alreadyProcessed?: Maybe; + readonly errors: ReadonlyArray; + /** The transaction related to the reported event. */ + readonly transaction?: Maybe; + /** The event assigned to this report. if `alreadyProcessed` is set to `true`, the previously processed event will be returned. */ + readonly transactionEvent?: Maybe; +}; + +export type TransactionEventReportError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type 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. + */ +export type 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"; + +export type TransactionEventTypeEnumFilterInput = { + /** The value equal to. */ + readonly eq?: InputMaybe; + /** The value included in. */ + readonly oneOf?: InputMaybe>; +}; + +/** Filter input for transactions. */ +export type TransactionFilterInput = { + /** Filter by metadata fields of transactions. */ + readonly metadata?: InputMaybe; + /** Filter by payment method details used to pay for the order. */ + readonly paymentMethodDetails?: InputMaybe; + /** + * Filter by PSP reference of transactions. + * + * Added in Saleor 3.22. + */ + readonly pspReference?: InputMaybe; +}; + +/** + * Determine the transaction flow strategy. + * + * AUTHORIZATION - the processed transaction should be only authorized + * CHARGE - the processed transaction should be charged. + */ +export type 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. */ +export type TransactionInitialize = { + /** The JSON data required to finalize the payment. */ + readonly data?: Maybe; + readonly errors: ReadonlyArray; + /** The initialized transaction. */ + readonly transaction?: Maybe; + /** The event created for the initialized transaction. */ + readonly transactionEvent?: Maybe; +}; + +export type TransactionInitializeError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type TransactionInitializeErrorCode = + | "CHECKOUT_COMPLETION_IN_PROGRESS" + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND" + | "UNIQUE"; + +/** Event sent when user starts processing the payment. */ +export type TransactionInitializeSession = Event & { + /** Action to proceed for the transaction */ + readonly 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. */ + readonly customerIpAddress?: Maybe; + /** Payment gateway data in JSON format, received from storefront. */ + readonly data?: Maybe; + /** Idempotency key assigned to the transaction initialize. */ + readonly idempotencyKey: Scalars["String"]["output"]; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** Merchant reference assigned to this payment. */ + readonly merchantReference: Scalars["String"]["output"]; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Checkout or order */ + readonly sourceObject: OrderOrCheckout; + /** Look up a transaction. */ + readonly transaction: TransactionItem; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Represents a payment transaction. */ +export type TransactionItem = Node & + ObjectWithMetadata & { + /** List of actions that can be performed in the current state of a payment. */ + readonly actions: ReadonlyArray; + /** Total amount of ongoing authorization requests for the transaction. */ + readonly authorizePendingAmount: Money; + /** Total amount authorized for this payment. */ + readonly authorizedAmount: Money; + /** Total amount of ongoing cancel requests for the transaction. */ + readonly cancelPendingAmount: Money; + /** Total amount canceled for this payment. */ + readonly canceledAmount: Money; + /** Total amount of ongoing charge requests for the transaction. */ + readonly chargePendingAmount: Money; + /** Total amount charged for this payment. */ + readonly chargedAmount: Money; + /** The related checkout. */ + readonly checkout?: Maybe; + /** Date and time at which payment transaction was created. */ + readonly createdAt: Scalars["DateTime"]["output"]; + /** User or App that created the transaction. */ + readonly createdBy?: Maybe; + /** List of all transaction's events. */ + readonly events: ReadonlyArray; + /** The url that will allow to redirect user to payment provider page with transaction details. */ + readonly externalUrl: Scalars["String"]["output"]; + /** The ID of the object. */ + readonly id: Scalars["ID"]["output"]; + /** Message related to the transaction. */ + readonly message: Scalars["String"]["output"]; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** Date and time at which payment transaction was modified. */ + readonly modifiedAt: Scalars["DateTime"]["output"]; + /** Name of the transaction. */ + readonly name: Scalars["String"]["output"]; + /** The related order. */ + readonly order?: Maybe; + /** + * The payment method used for this transaction. + * + * Added in Saleor 3.22. + */ + readonly paymentMethodDetails?: Maybe; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** PSP reference of transaction. */ + readonly pspReference: Scalars["String"]["output"]; + /** + * Reason of the refund. + * + * Added in Saleor 3.22. + */ + readonly reason?: Maybe; + /** + * Reason `Page` (Model) for refund. + * + * Added in Saleor 3.22. + */ + readonly reasonReference?: Maybe; + /** Total amount of ongoing refund requests for the transaction. */ + readonly refundPendingAmount: Money; + /** Total amount refunded for this payment. */ + readonly refundedAmount: Money; + /** The transaction token. */ + readonly token: Scalars["UUID"]["output"]; + }; + +/** Represents a payment transaction. */ +export type TransactionItemMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a payment transaction. */ +export type TransactionItemMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents a payment transaction. */ +export type TransactionItemPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents a payment transaction. */ +export type TransactionItemPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Event sent when transaction item metadata is updated. */ +export type TransactionItemMetadataUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Look up a transaction. */ + readonly transaction?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type 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`. */ +export type TransactionProcess = { + /** The json data required to finalize the payment. */ + readonly data?: Maybe; + readonly errors: ReadonlyArray; + /** The processed transaction. */ + readonly transaction?: Maybe; + /** The event created for the processed transaction. */ + readonly transactionEvent?: Maybe; +}; + +export type TransactionProcessAction = { + readonly actionType: TransactionFlowStrategyEnum; + /** Transaction amount to process. */ + readonly amount: Scalars["PositiveDecimal"]["output"]; + /** Currency of the amount. */ + readonly currency: Scalars["String"]["output"]; +}; + +export type TransactionProcessError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type 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. */ +export type TransactionProcessSession = Event & { + /** Action to proceed for the transaction */ + readonly 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. */ + readonly customerIpAddress?: Maybe; + /** Payment gateway data in JSON format, received from storefront. */ + readonly data?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** Merchant reference assigned to this payment. */ + readonly merchantReference: Scalars["String"]["output"]; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Checkout or order */ + readonly sourceObject: OrderOrCheckout; + /** Look up a transaction. */ + readonly transaction: TransactionItem; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Event sent when transaction refund is requested. */ +export type TransactionRefundRequested = Event & { + /** Requested action data. */ + readonly action: TransactionAction; + /** + * Granted refund related to refund request. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + readonly grantedRefund?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Look up a transaction. */ + readonly transaction?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Request an action for payment transaction. + * + * Requires one of the following permissions: HANDLE_PAYMENTS. + */ +export type TransactionRequestAction = { + readonly errors: ReadonlyArray; + readonly transaction?: Maybe; +}; + +export type TransactionRequestActionError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type TransactionRequestActionErrorCode = + | "GRAPHQL_ERROR" + | "INVALID" + | "MISSING_TRANSACTION_ACTION_REQUEST_WEBHOOK" + | "NOT_FOUND" + | "REQUIRED"; + +/** + * Request a refund for payment transaction based on granted refund. + * + * Requires one of the following permissions: HANDLE_PAYMENTS. + */ +export type TransactionRequestRefundForGrantedRefund = { + readonly errors: ReadonlyArray; + readonly transaction?: Maybe; +}; + +export type TransactionRequestRefundForGrantedRefundError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type TransactionRequestRefundForGrantedRefundErrorCode = + | "AMOUNT_GREATER_THAN_AVAILABLE" + | "GRAPHQL_ERROR" + | "INVALID" + | "MISSING_TRANSACTION_ACTION_REQUEST_WEBHOOK" + | "NOT_FOUND" + | "REFUND_ALREADY_PROCESSED" + | "REFUND_IS_PENDING"; + +export type TransactionSortField = + /** + * Sort transactions by creation date. + * + * Added in Saleor 3.23. + */ + | "CREATED_AT" + /** + * Sort transactions by modification date. + * + * Added in Saleor 3.23. + */ + | "MODIFIED_AT"; + +export type TransactionSortingInput = { + /** Specifies the direction in which to sort transactions. */ + readonly direction: OrderDirection; + /** Sort transactions by the selected field. */ + readonly field: TransactionSortField; +}; + +/** + * Update transaction. + * + * 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. + */ +export type TransactionUpdate = { + readonly errors: ReadonlyArray; + readonly transaction?: Maybe; +}; + +export type TransactionUpdateError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type TransactionUpdateErrorCode = + | "GRAPHQL_ERROR" + | "INCORRECT_CURRENCY" + | "INVALID" + | "METADATA_KEY_REQUIRED" + | "NOT_FOUND" + | "UNIQUE"; + +export type TransactionUpdateInput = { + /** Amount authorized by this transaction. */ + readonly amountAuthorized?: InputMaybe; + /** Amount canceled by this transaction. */ + readonly amountCanceled?: InputMaybe; + /** Amount charged by this transaction. */ + readonly amountCharged?: InputMaybe; + /** Amount refunded by this transaction. */ + readonly amountRefunded?: InputMaybe; + /** List of all possible actions for the transaction */ + readonly availableActions?: InputMaybe>; + /** The url that will allow to redirect user to payment provider page with transaction event details. */ + readonly externalUrl?: InputMaybe; + /** The message of the transaction. */ + readonly message?: InputMaybe; + /** + * Payment public metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** Payment name of the transaction. */ + readonly name?: InputMaybe; + /** + * Details of the payment method used for the transaction. + * + * Added in Saleor 3.22. + */ + readonly paymentMethodDetails?: InputMaybe; + /** + * Payment private metadata. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** PSP Reference of the transaction. */ + readonly pspReference?: InputMaybe; +}; + +export type TransactionWhereInput = { + /** List of conditions that must be met. */ + readonly AND?: InputMaybe>; + /** A list of conditions of which at least one must be met. */ + readonly OR?: InputMaybe>; + /** Filter by app identifier. */ + readonly appIdentifier?: InputMaybe; + /** + * Filter transactions by created at date. + * + * Added in Saleor 3.23. + */ + readonly createdAt?: InputMaybe; + /** + * Filter by transaction events. Each list item represents conditions that must be satisfied by a single event. The filter matches transactions that have related events meeting all specified groups of conditions. + * + * Added in Saleor 3.23. + */ + readonly events?: InputMaybe>; + readonly ids?: InputMaybe>; + /** + * Filter transactions by modified at date. + * + * Added in Saleor 3.23. + */ + readonly modifiedAt?: InputMaybe; + /** Filter by PSP reference. */ + readonly pspReference?: InputMaybe; +}; + +export type TranslatableItem = + | AttributeTranslatableContent + | AttributeValueTranslatableContent + | CategoryTranslatableContent + | CollectionTranslatableContent + | MenuItemTranslatableContent + | PageTranslatableContent + | ProductTranslatableContent + | ProductVariantTranslatableContent + | PromotionRuleTranslatableContent + | PromotionTranslatableContent + | SaleTranslatableContent + | ShippingMethodTranslatableContent + | VoucherTranslatableContent; + +export type TranslatableItemConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type TranslatableItemEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: TranslatableItem; +}; + +export type 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. */ +export type TranslationCreated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The translation the event relates to. */ + readonly translation?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +export type TranslationError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type TranslationErrorCode = + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND" + | "REQUIRED" + | "UNIQUE"; + +export type TranslationInput = { + /** + * Translated description. + * + * Rich text format. For reference see https://editorjs.io/ + */ + readonly description?: InputMaybe; + readonly name?: InputMaybe; + readonly seoDescription?: InputMaybe; + readonly seoTitle?: InputMaybe; + readonly slug?: InputMaybe; +}; + +export type TranslationTypes = + | AttributeTranslation + | AttributeValueTranslation + | CategoryTranslation + | CollectionTranslation + | MenuItemTranslation + | PageTranslation + | ProductTranslation + | ProductVariantTranslation + | PromotionRuleTranslation + | PromotionTranslation + | SaleTranslation + | ShippingMethodTranslation + | VoucherTranslation; + +/** Event sent when translation is updated. */ +export type TranslationUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** The translation the event relates to. */ + readonly translation?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** Define the filtering options for string fields. */ +export type UuidFilterInput = { + /** The value equal to. */ + readonly eq?: InputMaybe; + /** The value included in. */ + readonly oneOf?: InputMaybe>; +}; + +export type UpdateInvoiceInput = { + /** + * Fields required to update the invoice metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** Invoice number */ + readonly number?: InputMaybe; + /** + * Fields required to update the invoice private metadata. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** URL of an invoice to download. */ + readonly url?: InputMaybe; +}; + +/** + * Updates metadata of an object.Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ +export type UpdateMetadata = { + readonly errors: ReadonlyArray; + readonly item?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly metadataErrors: ReadonlyArray; +}; + +/** + * Updates private metadata of an object. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ +export type UpdatePrivateMetadata = { + readonly errors: ReadonlyArray; + readonly item?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly metadataErrors: ReadonlyArray; +}; + +export type UploadError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type UploadErrorCode = "GRAPHQL_ERROR" | "INVALID_FILE_TYPE" | "UNSUPPORTED_MIME_TYPE"; + +/** Represents user data. */ +export type User = 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. */ + readonly accessibleChannels?: Maybe>; + /** List of all user's addresses. */ + readonly addresses: ReadonlyArray
; + /** The avatar of the user. */ + readonly avatar?: Maybe; + /** + * Returns the last open checkout of this user. + * @deprecated Use the `checkoutTokens` field to fetch the user checkouts. + */ + readonly checkout?: Maybe; + /** Returns the checkout ID's assigned to this user. */ + readonly checkoutIds?: Maybe>; + /** + * Returns the checkout UUID's assigned to this user. + * @deprecated Use `checkoutIds` instead. + */ + readonly checkoutTokens?: Maybe>; + /** Returns checkouts assigned to this user. The query will not initiate any external requests, including fetching external shipping methods, filtering available shipping methods, or performing external tax calculations. */ + readonly checkouts?: Maybe; + /** The data when the user create account. */ + readonly dateJoined: Scalars["DateTime"]["output"]; + /** The default billing address of the user. */ + readonly defaultBillingAddress?: Maybe
; + /** The default shipping address of the user. */ + readonly defaultShippingAddress?: Maybe
; + /** List of user's permission groups which user can manage. */ + readonly editableGroups?: Maybe>; + /** The email address of the user. */ + readonly email: Scalars["String"]["output"]; + /** + * List of events associated with the user. + * + * Requires one of the following permissions: MANAGE_USERS, MANAGE_STAFF. + */ + readonly events?: Maybe>; + /** External ID of this user. */ + readonly externalReference?: Maybe; + /** The given name of the address. */ + readonly firstName: Scalars["String"]["output"]; + /** List of the user gift cards. */ + readonly giftCards?: Maybe; + /** The ID of the user. */ + readonly id: Scalars["ID"]["output"]; + /** Determine if the user is active. */ + readonly isActive: Scalars["Boolean"]["output"]; + /** Determines if user has confirmed email. */ + readonly isConfirmed: Scalars["Boolean"]["output"]; + /** Determine if the user is a staff admin. */ + readonly isStaff: Scalars["Boolean"]["output"]; + /** User language code. */ + readonly languageCode: LanguageCodeEnum; + /** The date when the user last time log in to the system. */ + readonly lastLogin?: Maybe; + /** The family name of the address. */ + readonly lastName: Scalars["String"]["output"]; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** + * A note about the customer. + * + * Requires one of the following permissions: MANAGE_USERS, MANAGE_STAFF. + */ + readonly note?: Maybe; + /** List of user's orders. The query will not initiate any external requests, including filtering available shipping methods, or performing external tax calculations. Requires one of the following permissions: MANAGE_STAFF, OWNER. */ + readonly orders?: Maybe; + /** List of user's permission groups. */ + readonly permissionGroups?: Maybe>; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** Determine if user have restricted access to channels. False if at least one user group has `restrictedAccessToChannels` set to False. */ + readonly restrictedAccessToChannels: Scalars["Boolean"]["output"]; + /** 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. */ + readonly storedPaymentMethods?: Maybe>; + /** List of stored payment sources. The field returns a list of payment sources stored for payment plugins. */ + readonly storedPaymentSources?: Maybe>; + /** The data when the user last update the account information. */ + readonly updatedAt: Scalars["DateTime"]["output"]; + /** List of user's permissions. */ + readonly userPermissions?: Maybe>; + }; + +/** Represents user data. */ +export type UserAvatarArgs = { + format?: InputMaybe; + size?: InputMaybe; +}; + +/** Represents user data. */ +export type UserCheckoutIdsArgs = { + channel?: InputMaybe; +}; + +/** Represents user data. */ +export type UserCheckoutTokensArgs = { + channel?: InputMaybe; +}; + +/** Represents user data. */ +export type UserCheckoutsArgs = { + after?: InputMaybe; + before?: InputMaybe; + channel?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +/** Represents user data. */ +export type UserGiftCardsArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +/** Represents user data. */ +export type UserMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents user data. */ +export type UserMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents user data. */ +export type UserOrdersArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + where?: InputMaybe; +}; + +/** Represents user data. */ +export type UserPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents user data. */ +export type UserPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents user data. */ +export type UserStoredPaymentMethodsArgs = { + channel: Scalars["String"]["input"]; +}; + +/** Represents user data. */ +export type UserStoredPaymentSourcesArgs = { + channel?: InputMaybe; +}; + +/** + * Deletes a user avatar. Only for staff members. + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + */ +export type UserAvatarDelete = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** An updated user instance. */ + readonly user?: Maybe; +}; + +/** + * 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. + */ +export type UserAvatarUpdate = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** An updated user instance. */ + readonly user?: Maybe; +}; + +/** + * Activate or deactivate users. + * + * Requires one of the following permissions: MANAGE_USERS. + */ +export type UserBulkSetActive = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; +}; + +export type UserCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type UserCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: User; +}; + +export type UserCreateInput = { + /** Slug of a channel which will be used for notify user. Optional when only one channel exists. */ + readonly channel?: InputMaybe; + /** Billing address of the customer. */ + readonly defaultBillingAddress?: InputMaybe; + /** Shipping address of the customer. */ + readonly defaultShippingAddress?: InputMaybe; + /** The unique email address of the user. */ + readonly email?: InputMaybe; + /** External ID of the customer. */ + readonly externalReference?: InputMaybe; + /** Given name. */ + readonly firstName?: InputMaybe; + /** User account is active. */ + readonly isActive?: InputMaybe; + /** + * User account is confirmed. + * @deprecated The user will be always set as unconfirmed. The confirmation will take place when the user sets the password. + */ + readonly isConfirmed?: InputMaybe; + /** User language code. */ + readonly languageCode?: InputMaybe; + /** Family name. */ + readonly lastName?: InputMaybe; + /** + * Fields required to update the user metadata. Can be read by any API client authorized to read the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly metadata?: InputMaybe>; + /** A note about the user. */ + readonly note?: InputMaybe; + /** + * Fields required to update the user private metadata. Requires permissions to modify and to read the metadata of the object it's attached to. + * + * Warning: never store sensitive information, including financial data such as credit card details. + */ + readonly privateMetadata?: InputMaybe>; + /** URL of a view where users should be redirected to set the password. URL in RFC 1808 format. */ + readonly redirectUrl?: InputMaybe; +}; + +export type UserOrApp = App | User; + +/** Represents user's permissions. */ +export type UserPermission = { + /** Internal code for permission. */ + readonly code: PermissionEnum; + /** Describe action(s) allowed to do by permission. */ + readonly name: Scalars["String"]["output"]; + /** List of user permission groups which contains this permission. */ + readonly sourcePermissionGroups?: Maybe>; +}; + +/** Represents user's permissions. */ +export type UserPermissionSourcePermissionGroupsArgs = { + userId: Scalars["ID"]["input"]; +}; + +export type 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" + /** Sort users by rank. Note: This option is available only with the `search` filter. */ + | "RANK"; + +export type UserSortingInput = { + /** Specifies the direction in which to sort users. */ + readonly direction: OrderDirection; + /** Sort users by the selected field. */ + readonly field: UserSortField; +}; + +/** Represents a VAT rate for a country. */ +export type Vat = { + /** Country code. */ + readonly countryCode: Scalars["String"]["output"]; + /** Country's VAT rate exceptions for specific types of goods. */ + readonly reducedRates: ReadonlyArray; + /** Standard VAT rate in percent. */ + readonly standardRate?: Maybe; +}; + +export type VariantAttributeScope = "ALL" | "NOT_VARIANT_SELECTION" | "VARIANT_SELECTION"; + +/** + * Assign an media to a product variant. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type VariantMediaAssign = { + readonly errors: ReadonlyArray; + readonly media?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; + readonly productVariant?: Maybe; +}; + +/** + * Unassign an media from a product variant. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type VariantMediaUnassign = { + readonly errors: ReadonlyArray; + readonly media?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly productErrors: ReadonlyArray; + readonly productVariant?: Maybe; +}; + +/** Represents availability of a variant in the storefront. */ +export type VariantPricingInfo = { + /** The discount amount if in sale (null otherwise). */ + readonly discount?: Maybe; + /** + * The discount amount in the local currency. + * @deprecated Always returns `null`. + */ + readonly discountLocalCurrency?: Maybe; + /** + * The discount amount compared to prior price. Null if product is not on sale or prior price was not provided in VariantChannelListing + * + * Added in Saleor 3.21. + */ + readonly discountPrior?: Maybe; + /** Whether it is in sale or not. */ + readonly onSale?: Maybe; + /** The price, with any discount subtracted. */ + readonly price?: Maybe; + /** + * The discounted price in the local currency. + * @deprecated Always returns `null`. + */ + readonly priceLocalCurrency?: Maybe; + /** + * The price prior to discount. + * + * Added in Saleor 3.21. + */ + readonly pricePrior?: Maybe; + /** The price without any discount. */ + readonly priceUndiscounted?: Maybe; +}; + +/** Verify JWT token. */ +export type VerifyToken = { + /** @deprecated Use `errors` field instead. */ + readonly accountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** Determine if token is valid or not. */ + readonly isValid: Scalars["Boolean"]["output"]; + /** JWT payload. */ + readonly payload?: Maybe; + /** User assigned to token. */ + readonly user?: Maybe; +}; + +export type 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. */ +export type Voucher = Node & + ObjectWithMetadata & { + /** Determine if the voucher usage should be limited to one use per customer. */ + readonly applyOncePerCustomer: Scalars["Boolean"]["output"]; + /** 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. */ + readonly applyOncePerOrder: Scalars["Boolean"]["output"]; + /** List of categories this voucher applies to. */ + readonly categories?: Maybe; + /** + * List of availability in channels for the voucher. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + */ + readonly channelListings?: Maybe>; + /** The code of the voucher. */ + readonly code?: Maybe; + /** + * List of codes available for this voucher. + * + * Added in Saleor 3.18. + */ + readonly codes?: Maybe; + /** + * List of collections this voucher applies to. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + */ + readonly collections?: Maybe; + /** List of countries available for the shipping voucher. */ + readonly countries?: Maybe>; + /** Currency code for voucher. */ + readonly currency?: Maybe; + /** Voucher value. */ + readonly discountValue?: Maybe; + /** Determines a type of discount for voucher - value or percentage */ + readonly discountValueType: DiscountValueTypeEnum; + /** The end date and time of voucher. */ + readonly endDate?: Maybe; + /** The ID of the voucher. */ + readonly id: Scalars["ID"]["output"]; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** Determine minimum quantity of items for checkout. */ + readonly minCheckoutItemsQuantity?: Maybe; + /** Minimum order value to apply voucher. */ + readonly minSpent?: Maybe; + /** The name of the voucher. */ + readonly name?: Maybe; + /** Determine if the voucher is available only for staff members. */ + readonly onlyForStaff: Scalars["Boolean"]["output"]; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** + * List of products this voucher applies to. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + */ + readonly products?: Maybe; + /** + * 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. + */ + readonly singleUse: Scalars["Boolean"]["output"]; + /** The start date and time of voucher. */ + readonly startDate: Scalars["DateTime"]["output"]; + /** Returns translated voucher fields for the given language code. */ + readonly translation?: Maybe; + /** Determines a type of voucher. */ + readonly type: VoucherTypeEnum; + /** The number of times a voucher can be used. */ + readonly usageLimit?: Maybe; + /** Usage count of the voucher. */ + readonly used: Scalars["Int"]["output"]; + /** + * List of product variants this voucher applies to. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + */ + readonly variants?: Maybe; + }; + +/** Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. */ +export type VoucherCategoriesArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +/** Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. */ +export type VoucherCodesArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +/** Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. */ +export type VoucherCollectionsArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +/** Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. */ +export type VoucherMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. */ +export type VoucherMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. */ +export type VoucherPrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. */ +export type VoucherPrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. */ +export type VoucherProductsArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +/** Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. */ +export type VoucherTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. */ +export type VoucherVariantsArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +/** + * 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. + */ +export type VoucherAddCatalogues = { + /** @deprecated Use `errors` field instead. */ + readonly discountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** Voucher of which catalogue IDs will be modified. */ + readonly voucher?: Maybe; +}; + +/** + * Deletes vouchers. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - VOUCHER_DELETED (async): A voucher was deleted. + */ +export type VoucherBulkDelete = { + /** Returns how many objects were affected. */ + readonly count: Scalars["Int"]["output"]; + /** @deprecated Use `errors` field instead. */ + readonly discountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; +}; + +/** Represents voucher channel listing. */ +export type VoucherChannelListing = Node & { + /** The channel in which voucher can be applied. */ + readonly channel: Channel; + /** Currency code for voucher in a channel. */ + readonly currency: Scalars["String"]["output"]; + /** The value of the discount on voucher in a channel. */ + readonly discountValue: Scalars["Float"]["output"]; + /** The ID of channel listing. */ + readonly id: Scalars["ID"]["output"]; + /** Minimum order value for voucher to apply in channel. */ + readonly minSpent?: Maybe; +}; + +export type VoucherChannelListingAddInput = { + /** ID of a channel. */ + readonly channelId: Scalars["ID"]["input"]; + /** Value of the voucher. */ + readonly discountValue?: InputMaybe; + /** Min purchase amount required to apply the voucher. */ + readonly minAmountSpent?: InputMaybe; +}; + +export type VoucherChannelListingInput = { + /** List of channels to which the voucher should be assigned. */ + readonly addChannels?: InputMaybe>; + /** List of channels from which the voucher should be unassigned. */ + readonly removeChannels?: InputMaybe>; +}; + +/** + * 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. + */ +export type VoucherChannelListingUpdate = { + /** @deprecated Use `errors` field instead. */ + readonly discountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** An updated voucher instance. */ + readonly voucher?: Maybe; +}; + +/** + * 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. + */ +export type VoucherCode = { + /** Code to use the voucher. */ + readonly code?: Maybe; + /** Date time of code creation. */ + readonly createdAt: Scalars["DateTime"]["output"]; + /** The ID of the voucher code. */ + readonly id: Scalars["ID"]["output"]; + /** Whether a code is active or not. */ + readonly isActive?: Maybe; + /** Number of times a code has been used. */ + readonly used?: Maybe; +}; + +/** + * 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. + */ +export type VoucherCodeBulkDelete = { + /** Returns how many codes were deleted. */ + readonly count: Scalars["Int"]["output"]; + readonly errors: ReadonlyArray; +}; + +export type VoucherCodeBulkDeleteError = { + /** The error code. */ + readonly code: VoucherCodeBulkDeleteErrorCode; + /** The error message. */ + readonly message?: Maybe; + /** Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly path?: Maybe; + /** List of voucher codes which causes the error. */ + readonly voucherCodes?: Maybe>; +}; + +export type VoucherCodeBulkDeleteErrorCode = "GRAPHQL_ERROR" | "INVALID" | "NOT_FOUND"; + +export type VoucherCodeCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type VoucherCodeCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: VoucherCode; +}; + +/** + * Event sent when voucher code export is completed. + * + * Added in Saleor 3.18. + */ +export type VoucherCodeExportCompleted = Event & { + /** The export file for voucher codes. */ + readonly export?: Maybe; + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; +}; + +/** + * Event sent when new voucher codes were created. + * + * Added in Saleor 3.19. + */ +export type VoucherCodesCreated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; + /** The voucher codes the event relates to. */ + readonly voucherCodes?: Maybe>; +}; + +/** + * Event sent when voucher codes were deleted. + * + * Added in Saleor 3.19. + */ +export type VoucherCodesDeleted = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; + /** The voucher codes the event relates to. */ + readonly voucherCodes?: Maybe>; +}; + +export type VoucherCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type VoucherCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly 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. + */ +export type VoucherCreate = { + /** @deprecated Use `errors` field instead. */ + readonly discountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + readonly voucher?: Maybe; +}; + +/** Event sent when new voucher is created. */ +export type VoucherCreated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; + /** The voucher the event relates to. */ + readonly voucher?: Maybe; +}; + +/** Event sent when new voucher is created. */ +export type VoucherCreatedVoucherArgs = { + channel?: InputMaybe; +}; + +/** + * Deletes a voucher. + * + * Requires one of the following permissions: MANAGE_DISCOUNTS. + * + * Triggers the following webhook events: + * - VOUCHER_DELETED (async): A voucher was deleted. + */ +export type VoucherDelete = { + /** @deprecated Use `errors` field instead. */ + readonly discountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + readonly voucher?: Maybe; +}; + +/** Event sent when voucher is deleted. */ +export type VoucherDeleted = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; + /** The voucher the event relates to. */ + readonly voucher?: Maybe; +}; + +/** Event sent when voucher is deleted. */ +export type VoucherDeletedVoucherArgs = { + channel?: InputMaybe; +}; + +export type VoucherDiscountType = "FIXED" | "PERCENTAGE" | "SHIPPING"; + +export type VoucherFilterInput = { + readonly discountType?: InputMaybe>; + readonly ids?: InputMaybe>; + readonly metadata?: InputMaybe>; + readonly search?: InputMaybe; + readonly started?: InputMaybe; + readonly status?: InputMaybe>; + readonly timesUsed?: InputMaybe; +}; + +export type 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. + */ + readonly addCodes?: InputMaybe>; + /** Voucher should be applied once per customer. */ + readonly applyOncePerCustomer?: InputMaybe; + /** Voucher should be applied to the cheapest item or entire order. */ + readonly applyOncePerOrder?: InputMaybe; + /** Categories discounted by the voucher. */ + readonly categories?: InputMaybe>; + /** + * Code to use the voucher. + * @deprecated Use `addCodes` instead. + */ + readonly code?: InputMaybe; + /** Collections discounted by the voucher. */ + readonly collections?: InputMaybe>; + /** Country codes that can be used with the shipping voucher. */ + readonly countries?: InputMaybe>; + /** Choices: fixed or percentage. */ + readonly discountValueType?: InputMaybe; + /** End date of the voucher in ISO 8601 format. */ + readonly endDate?: InputMaybe; + /** Minimal quantity of checkout items required to apply the voucher. */ + readonly minCheckoutItemsQuantity?: InputMaybe; + /** Voucher name. */ + readonly name?: InputMaybe; + /** Voucher can be used only by staff user. */ + readonly onlyForStaff?: InputMaybe; + /** Products discounted by the voucher. */ + readonly products?: InputMaybe>; + /** + * 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. + */ + readonly singleUse?: InputMaybe; + /** Start date of the voucher in ISO 8601 format. */ + readonly startDate?: InputMaybe; + /** Voucher type: PRODUCT, CATEGORY SHIPPING or ENTIRE_ORDER. */ + readonly type?: InputMaybe; + /** Limit number of times this voucher can be used in total. */ + readonly usageLimit?: InputMaybe; + /** Variants discounted by the voucher. */ + readonly variants?: InputMaybe>; +}; + +/** Event sent when voucher metadata is updated. */ +export type VoucherMetadataUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; + /** The voucher the event relates to. */ + readonly voucher?: Maybe; +}; + +/** Event sent when voucher metadata is updated. */ +export type VoucherMetadataUpdatedVoucherArgs = { + channel?: InputMaybe; +}; + +/** + * 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. + */ +export type VoucherRemoveCatalogues = { + /** @deprecated Use `errors` field instead. */ + readonly discountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + /** Voucher of which catalogue IDs will be modified. */ + readonly voucher?: Maybe; +}; + +export type VoucherSortField = + /** Sort vouchers by code. */ + | "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"; + +export type VoucherSortingInput = { + /** + * Specifies the channel in which to sort the data. + * @deprecated Use root-level channel argument instead. + */ + readonly channel?: InputMaybe; + /** Specifies the direction in which to sort vouchers. */ + readonly direction: OrderDirection; + /** Sort vouchers by the selected field. */ + readonly field: VoucherSortField; +}; + +/** Represents voucher's original translatable fields and related translations. */ +export type VoucherTranslatableContent = Node & { + /** The ID of the voucher translatable content. */ + readonly id: Scalars["ID"]["output"]; + /** Voucher name to translate. */ + readonly name?: Maybe; + /** Returns translated voucher fields for the given language code. */ + readonly translation?: Maybe; + /** + * 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. + * @deprecated Get model fields from the root level queries. + */ + readonly voucher?: Maybe; + /** The ID of the voucher to translate. */ + readonly voucherId: Scalars["ID"]["output"]; +}; + +/** Represents voucher's original translatable fields and related translations. */ +export type VoucherTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum; +}; + +/** + * Creates/updates translations for a voucher. + * + * Requires one of the following permissions: MANAGE_TRANSLATIONS. + */ +export type VoucherTranslate = { + readonly errors: ReadonlyArray; + /** @deprecated Use `errors` field instead. */ + readonly translationErrors: ReadonlyArray; + readonly voucher?: Maybe; +}; + +/** Represents voucher translations. */ +export type VoucherTranslation = Node & { + /** The ID of the voucher translation. */ + readonly id: Scalars["ID"]["output"]; + /** Translation language. */ + readonly language: LanguageDisplay; + /** Translated voucher name. */ + readonly name?: Maybe; + /** Represents the voucher fields to translate. */ + readonly translatableContent?: Maybe; +}; + +export type 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. + */ +export type VoucherUpdate = { + /** @deprecated Use `errors` field instead. */ + readonly discountErrors: ReadonlyArray; + readonly errors: ReadonlyArray; + readonly voucher?: Maybe; +}; + +/** Event sent when voucher is updated. */ +export type VoucherUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; + /** The voucher the event relates to. */ + readonly voucher?: Maybe; +}; + +/** Event sent when voucher is updated. */ +export type VoucherUpdatedVoucherArgs = { + channel?: InputMaybe; +}; + +/** Represents warehouse. */ +export type Warehouse = Node & + ObjectWithMetadata & { + /** Address of the warehouse. */ + readonly address: Address; + /** Click and collect options: local, all or disabled. */ + readonly clickAndCollectOption: WarehouseClickAndCollectOptionEnum; + /** + * Warehouse company name. + * @deprecated Use `Address.companyName` instead. + */ + readonly companyName: Scalars["String"]["output"]; + /** Warehouse email. */ + readonly email: Scalars["String"]["output"]; + /** External ID of this warehouse. */ + readonly externalReference?: Maybe; + /** The ID of the warehouse. */ + readonly id: Scalars["ID"]["output"]; + /** Determine if the warehouse is private. */ + readonly isPrivate: Scalars["Boolean"]["output"]; + /** List of public metadata items. Can be accessed without permissions. */ + readonly metadata: ReadonlyArray; + /** + * A single key from public metadata. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly metafield?: Maybe; + /** Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly metafields?: Maybe; + /** Warehouse name. */ + readonly name: Scalars["String"]["output"]; + /** List of private metadata items. Requires staff permissions to access. */ + readonly privateMetadata: ReadonlyArray; + /** + * A single key from private metadata. Requires staff permissions to access. + * + * Tip: Use GraphQL aliases to fetch multiple keys. + */ + readonly privateMetafield?: Maybe; + /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ + readonly privateMetafields?: Maybe; + /** Shipping zones supported by the warehouse. */ + readonly shippingZones: ShippingZoneCountableConnection; + /** Warehouse slug. */ + readonly slug: Scalars["String"]["output"]; + /** + * Stocks that belong to this warehouse. + * + * Added in Saleor 3.20. + * + * Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS. + */ + readonly stocks?: Maybe; + }; + +/** Represents warehouse. */ +export type WarehouseMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents warehouse. */ +export type WarehouseMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents warehouse. */ +export type WarehousePrivateMetafieldArgs = { + key: Scalars["String"]["input"]; +}; + +/** Represents warehouse. */ +export type WarehousePrivateMetafieldsArgs = { + keys?: InputMaybe>; +}; + +/** Represents warehouse. */ +export type WarehouseShippingZonesArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +/** Represents warehouse. */ +export type WarehouseStocksArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +export type WarehouseClickAndCollectOptionEnum = "ALL" | "DISABLED" | "LOCAL"; + +export type WarehouseCountableConnection = { + readonly edges: ReadonlyArray; + /** Pagination data for this connection. */ + readonly pageInfo: PageInfo; + /** A total count of items in the collection. */ + readonly totalCount?: Maybe; +}; + +export type WarehouseCountableEdge = { + /** A cursor for use in pagination. */ + readonly cursor: Scalars["String"]["output"]; + /** The item at the end of the edge. */ + readonly node: Warehouse; +}; + +/** + * Creates a new warehouse. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type WarehouseCreate = { + readonly errors: ReadonlyArray; + readonly warehouse?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly warehouseErrors: ReadonlyArray; +}; + +export type WarehouseCreateInput = { + /** Address of the warehouse. */ + readonly address: AddressInput; + /** The email address of the warehouse. */ + readonly email?: InputMaybe; + /** External ID of the warehouse. */ + readonly externalReference?: InputMaybe; + /** Warehouse name. */ + readonly name: Scalars["String"]["input"]; + /** + * Shipping zones supported by the warehouse. + * @deprecated Providing the zone ids will raise a ValidationError. + */ + readonly shippingZones?: InputMaybe>; + /** Warehouse slug. */ + readonly slug?: InputMaybe; +}; + +/** Event sent when new warehouse is created. */ +export type WarehouseCreated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; + /** The warehouse the event relates to. */ + readonly warehouse?: Maybe; +}; + +/** + * Deletes selected warehouse. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + * + * Triggers the following webhook events: + * - WAREHOUSE_DELETED (async): A warehouse is deleted. + * - PRODUCT_VARIANT_OUT_OF_STOCK (async): A product variant stock is removed together with the deleted warehouse. + * - PRODUCT_VARIANT_OUT_OF_STOCK_IN_CHANNEL (async): A product variant is out of stock in a channel (non click-and-collect warehouses). + * + * Note: Triggered only when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + * - PRODUCT_VARIANT_OUT_OF_STOCK_FOR_CLICK_AND_COLLECT (async): A product variant is out of stock in a channel (click-and-collect warehouses). + * + * Note: Triggered only when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + */ +export type WarehouseDelete = { + readonly errors: ReadonlyArray; + readonly warehouse?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly warehouseErrors: ReadonlyArray; +}; + +/** Event sent when warehouse is deleted. */ +export type WarehouseDeleted = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; + /** The warehouse the event relates to. */ + readonly warehouse?: Maybe; +}; + +export type WarehouseError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; + /** List of shipping zones IDs which causes the error. */ + readonly shippingZones?: Maybe>; +}; + +export type WarehouseErrorCode = + | "ALREADY_EXISTS" + | "GRAPHQL_ERROR" + | "INVALID" + | "NOT_FOUND" + | "REQUIRED" + | "UNIQUE"; + +export type WarehouseFilterInput = { + readonly channels?: InputMaybe>; + readonly clickAndCollectOption?: InputMaybe; + readonly ids?: InputMaybe>; + readonly isPrivate?: InputMaybe; + readonly metadata?: InputMaybe>; + readonly search?: InputMaybe; + readonly slugs?: InputMaybe>; +}; + +/** Event sent when warehouse metadata is updated. */ +export type WarehouseMetadataUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; + /** The warehouse the event relates to. */ + readonly warehouse?: Maybe; +}; + +/** + * Add shipping zone to given warehouse. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type WarehouseShippingZoneAssign = { + readonly errors: ReadonlyArray; + readonly warehouse?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly warehouseErrors: ReadonlyArray; +}; + +/** + * Remove shipping zone from given warehouse. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type WarehouseShippingZoneUnassign = { + readonly errors: ReadonlyArray; + readonly warehouse?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly warehouseErrors: ReadonlyArray; +}; + +export type WarehouseSortField = + /** Sort warehouses by name. */ + "NAME"; + +export type WarehouseSortingInput = { + /** Specifies the direction in which to sort warehouses. */ + readonly direction: OrderDirection; + /** Sort warehouses by the selected field. */ + readonly field: WarehouseSortField; +}; + +/** + * Updates given warehouse. + * + * Requires one of the following permissions: MANAGE_PRODUCTS. + */ +export type WarehouseUpdate = { + readonly errors: ReadonlyArray; + readonly warehouse?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly warehouseErrors: ReadonlyArray; +}; + +export type WarehouseUpdateInput = { + /** Address of the warehouse. */ + readonly address?: InputMaybe; + /** Click and collect options: local, all or disabled. */ + readonly clickAndCollectOption?: InputMaybe; + /** The email address of the warehouse. */ + readonly email?: InputMaybe; + /** External ID of the warehouse. */ + readonly externalReference?: InputMaybe; + /** Visibility of warehouse stocks. */ + readonly isPrivate?: InputMaybe; + /** Warehouse name. */ + readonly name?: InputMaybe; + /** Warehouse slug. */ + readonly slug?: InputMaybe; +}; + +/** Event sent when warehouse is updated. */ +export type WarehouseUpdated = Event & { + /** Time of the event. */ + readonly issuedAt?: Maybe; + /** The user or application that triggered the event. */ + readonly issuingPrincipal?: Maybe; + /** The application receiving the webhook. */ + readonly recipient?: Maybe; + /** Saleor version that triggered the event. */ + readonly version?: Maybe; + /** The warehouse the event relates to. */ + readonly warehouse?: Maybe; +}; + +/** Webhook. */ +export type Webhook = Node & { + /** The app associated with Webhook. */ + readonly app: App; + /** List of asynchronous webhook events. */ + readonly asyncEvents: ReadonlyArray; + /** Custom headers, which will be added to HTTP request. */ + readonly customHeaders?: Maybe; + /** Event deliveries. */ + readonly eventDeliveries?: Maybe; + /** + * List of webhook events. + * @deprecated Use `asyncEvents` or `syncEvents` instead. + */ + readonly events: ReadonlyArray; + /** The ID of webhook. */ + readonly id: Scalars["ID"]["output"]; + /** Informs if webhook is activated. */ + readonly isActive: Scalars["Boolean"]["output"]; + /** The name of webhook. */ + readonly name?: Maybe; + /** + * Used to create a hash signature for each payload. + * @deprecated As of Saleor 3.5, webhook payloads default to signing using a verifiable JWS. + */ + readonly secretKey?: Maybe; + /** Used to define payloads for specific events. */ + readonly subscriptionQuery?: Maybe; + /** List of synchronous webhook events. */ + readonly syncEvents: ReadonlyArray; + /** Target URL for webhook. */ + readonly targetUrl: Scalars["String"]["output"]; +}; + +/** Webhook. */ +export type WebhookEventDeliveriesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sortBy?: InputMaybe; +}; + +/** + * Creates a new webhook subscription. + * + * Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP. + */ +export type WebhookCreate = { + readonly errors: ReadonlyArray; + readonly webhook?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly webhookErrors: ReadonlyArray; +}; + +export type WebhookCreateInput = { + /** ID of the app to which webhook belongs. */ + readonly app?: InputMaybe; + /** The asynchronous events that webhook wants to subscribe. */ + readonly asyncEvents?: InputMaybe>; + /** 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. */ + readonly customHeaders?: InputMaybe; + /** + * The events that webhook wants to subscribe. + * @deprecated Use `asyncEvents` or `syncEvents` instead. + */ + readonly events?: InputMaybe>; + /** Determine if webhook will be set active or not. */ + readonly isActive?: InputMaybe; + /** The name of the webhook. */ + readonly name?: InputMaybe; + /** Subscription query used to define a webhook payload. */ + readonly query?: InputMaybe; + /** + * The secret key used to create a hash signature with each payload. + * @deprecated As of Saleor 3.5, webhook payloads default to signing using a verifiable JWS. + */ + readonly secretKey?: InputMaybe; + /** The synchronous events that webhook wants to subscribe. */ + readonly syncEvents?: InputMaybe>; + /** The url to receive the payload. */ + readonly targetUrl?: InputMaybe; +}; + +/** + * Deletes 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. + */ +export type WebhookDelete = { + readonly errors: ReadonlyArray; + readonly webhook?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly webhookErrors: ReadonlyArray; +}; + +/** + * 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. + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + */ +export type WebhookDryRun = { + readonly errors: ReadonlyArray; + /** JSON payload, that would be sent out to webhook's target URL. */ + readonly payload?: Maybe; +}; + +export type WebhookDryRunError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type WebhookDryRunErrorCode = + | "GRAPHQL_ERROR" + | "INVALID_ID" + | "MISSING_EVENT" + | "MISSING_PERMISSION" + | "MISSING_SUBSCRIPTION" + | "NOT_FOUND" + | "SYNTAX" + | "TYPE_NOT_SUPPORTED" + | "UNABLE_TO_PARSE"; + +export type WebhookError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type 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. */ +export type WebhookEvent = { + /** Internal name of the event type. */ + readonly eventType: WebhookEventTypeEnum; + /** Display name of the event. */ + readonly name: Scalars["String"]["output"]; +}; + +/** Asynchronous webhook event. */ +export type WebhookEventAsync = { + /** Internal name of the event type. */ + readonly eventType: WebhookEventTypeAsyncEnum; + /** Display name of the event. */ + readonly name: Scalars["String"]["output"]; +}; + +/** Synchronous webhook event. */ +export type WebhookEventSync = { + /** Internal name of the event type. */ + readonly eventType: WebhookEventTypeSyncEnum; + /** Display name of the event. */ + readonly name: Scalars["String"]["output"]; +}; + +/** Enum determining type of webhook. */ +export type 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. */ + | "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" + /** + * A checkout was fully authorized (its `authorizeStatus` is `FULL`). + * + * This event is emitted only for checkouts whose payments are processed through the Transaction API. + */ + | "CHECKOUT_FULLY_AUTHORIZED" + /** + * A checkout was fully paid (its `chargeStatus` is `FULL` or `OVERCHARGED`). This event is not sent if payments are only authorized but not fully charged. + * + * This event is emitted only for checkouts whose payments are processed through the Transaction API. + */ + | "CHECKOUT_FULLY_PAID" + /** A checkout metadata is updated. */ + | "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. */ + | "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. */ + | "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. */ + | "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. */ + | "GIFT_CARD_EXPORT_COMPLETED" + /** A gift card metadata is updated. */ + | "GIFT_CARD_METADATA_UPDATED" + /** A gift card has been sent. */ + | "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. */ + | "NOTIFY_USER" + /** An observability event is created. */ + | "OBSERVABILITY" + /** Orders are imported. */ + | "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. */ + | "ORDER_FULLY_REFUNDED" + /** An order metadata is updated. */ + | "ORDER_METADATA_UPDATED" + /** Payment has been made. The order may be partially or fully paid. */ + | "ORDER_PAID" + /** The order received a refund. The order may be partially or fully refunded. */ + | "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. */ + | "PRODUCT_EXPORT_COMPLETED" + /** A new product media is created. */ + | "PRODUCT_MEDIA_CREATED" + /** A product media is deleted. */ + | "PRODUCT_MEDIA_DELETED" + /** A product media is updated. */ + | "PRODUCT_MEDIA_UPDATED" + /** A product metadata is updated. */ + | "PRODUCT_METADATA_UPDATED" + /** A product is updated. */ + | "PRODUCT_UPDATED" + /** A product variant is back in stock. */ + | "PRODUCT_VARIANT_BACK_IN_STOCK" + /** + * A product variant becomes available again across click-and-collect warehouses in a channel. + * + * Note: Only triggered when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + */ + | "PRODUCT_VARIANT_BACK_IN_STOCK_FOR_CLICK_AND_COLLECT" + /** + * A product variant becomes available again across non click-and-collect warehouses in a channel. + * + * Note: Only triggered when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + */ + | "PRODUCT_VARIANT_BACK_IN_STOCK_IN_CHANNEL" + /** 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" + | "PRODUCT_VARIANT_DISCOUNTED_PRICE_UPDATED" + /** A product variant metadata is updated. */ + | "PRODUCT_VARIANT_METADATA_UPDATED" + /** A product variant is out of stock. */ + | "PRODUCT_VARIANT_OUT_OF_STOCK" + /** + * A product variant becomes out of stock across all click-and-collect warehouses in a channel. + * + * Note: Only triggered when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + */ + | "PRODUCT_VARIANT_OUT_OF_STOCK_FOR_CLICK_AND_COLLECT" + /** + * A product variant becomes out of stock across all non click-and-collect warehouses in a channel. + * + * Note: Only triggered when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + */ + | "PRODUCT_VARIANT_OUT_OF_STOCK_IN_CHANNEL" + /** 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. */ + | "SHIPPING_ZONE_METADATA_UPDATED" + /** A shipping zone is updated. */ + | "SHIPPING_ZONE_UPDATED" + /** Shop metadata is updated. */ + | "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. */ + | "THUMBNAIL_CREATED" + /** Transaction item metadata is updated. */ + | "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. */ + | "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. */ + | "WAREHOUSE_METADATA_UPDATED" + /** A warehouse is updated. */ + | "WAREHOUSE_UPDATED"; + +/** Enum determining type of webhook. */ +export type 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. */ + | "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. */ + | "CHECKOUT_CALCULATE_TAXES" + /** A new checkout is created. */ + | "CHECKOUT_CREATED" + /** Filter shipping methods for checkout. */ + | "CHECKOUT_FILTER_SHIPPING_METHODS" + /** + * A checkout was fully authorized (its `authorizeStatus` is `FULL`). + * + * This event is emitted only for checkouts whose payments are processed through the Transaction API. + */ + | "CHECKOUT_FULLY_AUTHORIZED" + /** + * A checkout was fully paid (its `chargeStatus` is `FULL` or `OVERCHARGED`). This event is not sent if payments are only authorized but not fully charged. + * + * This event is emitted only for checkouts whose payments are processed through the Transaction API. + */ + | "CHECKOUT_FULLY_PAID" + /** A checkout metadata is updated. */ + | "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. */ + | "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. */ + | "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. */ + | "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. */ + | "GIFT_CARD_EXPORT_COMPLETED" + /** A gift card metadata is updated. */ + | "GIFT_CARD_METADATA_UPDATED" + /** A gift card has been sent. */ + | "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. */ + | "NOTIFY_USER" + /** An observability event is created. */ + | "OBSERVABILITY" + /** Orders are imported. */ + | "ORDER_BULK_CREATED" + /** Event called for order tax calculation. */ + | "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. */ + | "ORDER_FULLY_REFUNDED" + /** An order metadata is updated. */ + | "ORDER_METADATA_UPDATED" + /** Payment has been made. The order may be partially or fully paid. */ + | "ORDER_PAID" + /** The order received a refund. The order may be partially or fully refunded. */ + | "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. */ + | "PRODUCT_EXPORT_COMPLETED" + /** A new product media is created. */ + | "PRODUCT_MEDIA_CREATED" + /** A product media is deleted. */ + | "PRODUCT_MEDIA_DELETED" + /** A product media is updated. */ + | "PRODUCT_MEDIA_UPDATED" + /** A product metadata is updated. */ + | "PRODUCT_METADATA_UPDATED" + /** A product is updated. */ + | "PRODUCT_UPDATED" + /** A product variant is back in stock. */ + | "PRODUCT_VARIANT_BACK_IN_STOCK" + /** + * A product variant becomes available again across click-and-collect warehouses in a channel. + * + * Note: Only triggered when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + */ + | "PRODUCT_VARIANT_BACK_IN_STOCK_FOR_CLICK_AND_COLLECT" + /** + * A product variant becomes available again across non click-and-collect warehouses in a channel. + * + * Note: Only triggered when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + */ + | "PRODUCT_VARIANT_BACK_IN_STOCK_IN_CHANNEL" + /** 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" + | "PRODUCT_VARIANT_DISCOUNTED_PRICE_UPDATED" + /** A product variant metadata is updated. */ + | "PRODUCT_VARIANT_METADATA_UPDATED" + /** A product variant is out of stock. */ + | "PRODUCT_VARIANT_OUT_OF_STOCK" + /** + * A product variant becomes out of stock across all click-and-collect warehouses in a channel. + * + * Note: Only triggered when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + */ + | "PRODUCT_VARIANT_OUT_OF_STOCK_FOR_CLICK_AND_COLLECT" + /** + * A product variant becomes out of stock across all non click-and-collect warehouses in a channel. + * + * Note: Only triggered when the `useLegacyShippingZoneStockAvailability` shop setting is disabled. + */ + | "PRODUCT_VARIANT_OUT_OF_STOCK_IN_CHANNEL" + /** 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. */ + | "SHIPPING_ZONE_METADATA_UPDATED" + /** A shipping zone is updated. */ + | "SHIPPING_ZONE_UPDATED" + /** Shop metadata is updated. */ + | "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. */ + | "THUMBNAIL_CREATED" + /** Event called when cancel has been requested for transaction. */ + | "TRANSACTION_CANCELATION_REQUESTED" + /** Event called when charge has been requested for transaction. */ + | "TRANSACTION_CHARGE_REQUESTED" + | "TRANSACTION_INITIALIZE_SESSION" + /** Transaction item metadata is updated. */ + | "TRANSACTION_ITEM_METADATA_UPDATED" + | "TRANSACTION_PROCESS_SESSION" + /** Event called when refund has been requested for transaction. */ + | "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. */ + | "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. */ + | "WAREHOUSE_METADATA_UPDATED" + /** A warehouse is updated. */ + | "WAREHOUSE_UPDATED"; + +/** Enum determining type of webhook. */ +export type WebhookEventTypeSyncEnum = + /** Event called for checkout tax calculation. */ + | "CHECKOUT_CALCULATE_TAXES" + /** Filter shipping methods for checkout. */ + | "CHECKOUT_FILTER_SHIPPING_METHODS" + | "LIST_STORED_PAYMENT_METHODS" + /** Event called for order tax calculation. */ + | "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. */ + | "TRANSACTION_CANCELATION_REQUESTED" + /** Event called when charge has been requested for transaction. */ + | "TRANSACTION_CHARGE_REQUESTED" + | "TRANSACTION_INITIALIZE_SESSION" + | "TRANSACTION_PROCESS_SESSION" + /** Event called when refund has been requested for transaction. */ + | "TRANSACTION_REFUND_REQUESTED"; + +export type 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_AUTHORIZED" + | "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_BACK_IN_STOCK_FOR_CLICK_AND_COLLECT" + | "PRODUCT_VARIANT_BACK_IN_STOCK_IN_CHANNEL" + | "PRODUCT_VARIANT_CREATED" + | "PRODUCT_VARIANT_DELETED" + | "PRODUCT_VARIANT_DISCOUNTED_PRICE_UPDATED" + | "PRODUCT_VARIANT_METADATA_UPDATED" + | "PRODUCT_VARIANT_OUT_OF_STOCK" + | "PRODUCT_VARIANT_OUT_OF_STOCK_FOR_CLICK_AND_COLLECT" + | "PRODUCT_VARIANT_OUT_OF_STOCK_IN_CHANNEL" + | "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. + * + * Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + */ +export type WebhookTrigger = { + readonly delivery?: Maybe; + readonly errors: ReadonlyArray; +}; + +export type WebhookTriggerError = { + /** The error code. */ + readonly 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. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type 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. + */ +export type WebhookUpdate = { + readonly errors: ReadonlyArray; + readonly webhook?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly webhookErrors: ReadonlyArray; +}; + +export type WebhookUpdateInput = { + /** ID of the app to which webhook belongs. */ + readonly app?: InputMaybe; + /** The asynchronous events that webhook wants to subscribe. */ + readonly asyncEvents?: InputMaybe>; + /** 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. */ + readonly customHeaders?: InputMaybe; + /** + * The events that webhook wants to subscribe. + * @deprecated Use `asyncEvents` or `syncEvents` instead. + */ + readonly events?: InputMaybe>; + /** Determine if webhook will be set active or not. */ + readonly isActive?: InputMaybe; + /** The new name of the webhook. */ + readonly name?: InputMaybe; + /** Subscription query used to define a webhook payload. */ + readonly query?: InputMaybe; + /** + * Use to create a hash signature with each payload. + * @deprecated As of Saleor 3.5, webhook payloads default to signing using a verifiable JWS. + */ + readonly secretKey?: InputMaybe; + /** The synchronous events that webhook wants to subscribe. */ + readonly syncEvents?: InputMaybe>; + /** The url to receive the payload. */ + readonly targetUrl?: InputMaybe; +}; + +/** Represents weight value in a specific weight unit. */ +export type Weight = { + /** Weight unit. */ + readonly unit: WeightUnitsEnum; + /** Weight value. Returns a value with maximal three decimal places */ + readonly value: Scalars["Float"]["output"]; +}; + +export type WeightUnitsEnum = "G" | "KG" | "LB" | "OZ" | "TONNE"; + +/** _Entity union as defined by Federation spec. */ +export type _Entity = + | Address + | App + | Category + | Collection + | Group + | Order + | PageType + | Product + | ProductMedia + | ProductType + | ProductVariant + | User; + +/** _Service manifest as defined by Federation spec. */ +export type _Service = { + readonly sdl?: Maybe; +}; + +export type UpdateUserMetadataMutationVariables = Exact<{ + id: Scalars["ID"]["input"]; + input: ReadonlyArray | MetadataInput; +}>; + +export type UpdateUserMetadataMutation = { + readonly updateMetadata?: { + readonly errors: ReadonlyArray<{ + readonly field?: string | null; + readonly message?: string | null; + readonly code: MetadataErrorCode; + }>; + } | null; +}; + +export type MeQueryVariables = Exact<{ [key: string]: never }>; + +export type MeQuery = { + readonly me?: { + readonly id: string; + readonly dateJoined: string; + readonly metadata: ReadonlyArray<{ readonly key: string; readonly value: string }>; + readonly userPermissions?: ReadonlyArray<{ readonly code: PermissionEnum }> | null; + } | null; +}; + +export const UntypedUpdateUserMetadataDocument = gql` + mutation UpdateUserMetadata($id: ID!, $input: [MetadataInput!]!) { + updateMetadata(id: $id, input: $input) { + errors { + field + message + code + } + } + } +`; +export const UntypedMeDocument = gql` + query Me { + me { + id + dateJoined + metadata { + key + value + } + userPermissions { + code + } + } + } +`; + +export const UpdateUserMetadataDocument = { + kind: "Document", + definitions: [ + { + kind: "OperationDefinition", + operation: "mutation", + name: { kind: "Name", value: "UpdateUserMetadata" }, + variableDefinitions: [ + { + kind: "VariableDefinition", + variable: { kind: "Variable", name: { kind: "Name", value: "id" } }, + type: { + kind: "NonNullType", + type: { kind: "NamedType", name: { kind: "Name", value: "ID" } }, + }, + }, + { + kind: "VariableDefinition", + variable: { kind: "Variable", name: { kind: "Name", value: "input" } }, + type: { + kind: "NonNullType", + type: { + kind: "ListType", + type: { + kind: "NonNullType", + type: { kind: "NamedType", name: { kind: "Name", value: "MetadataInput" } }, + }, + }, + }, + }, + ], + selectionSet: { + kind: "SelectionSet", + selections: [ + { + kind: "Field", + name: { kind: "Name", value: "updateMetadata" }, + arguments: [ + { + kind: "Argument", + name: { kind: "Name", value: "id" }, + value: { kind: "Variable", name: { kind: "Name", value: "id" } }, + }, + { + kind: "Argument", + name: { kind: "Name", value: "input" }, + value: { kind: "Variable", name: { kind: "Name", value: "input" } }, + }, + ], + selectionSet: { + kind: "SelectionSet", + selections: [ + { + kind: "Field", + name: { kind: "Name", value: "errors" }, + selectionSet: { + kind: "SelectionSet", + selections: [ + { kind: "Field", name: { kind: "Name", value: "field" } }, + { kind: "Field", name: { kind: "Name", value: "message" } }, + { kind: "Field", name: { kind: "Name", value: "code" } }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const MeDocument = { + kind: "Document", + definitions: [ + { + kind: "OperationDefinition", + operation: "query", + name: { kind: "Name", value: "Me" }, + selectionSet: { + kind: "SelectionSet", + selections: [ + { + kind: "Field", + name: { kind: "Name", value: "me" }, + selectionSet: { + kind: "SelectionSet", + selections: [ + { kind: "Field", name: { kind: "Name", value: "id" } }, + { kind: "Field", name: { kind: "Name", value: "dateJoined" } }, + { + kind: "Field", + name: { kind: "Name", value: "metadata" }, + selectionSet: { + kind: "SelectionSet", + selections: [ + { kind: "Field", name: { kind: "Name", value: "key" } }, + { kind: "Field", name: { kind: "Name", value: "value" } }, + ], + }, + }, + { + kind: "Field", + name: { kind: "Name", value: "userPermissions" }, + selectionSet: { + kind: "SelectionSet", + selections: [{ kind: "Field", name: { kind: "Name", value: "code" } }], + }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; diff --git a/apps/onboarding/graphql.config.ts b/apps/onboarding/graphql.config.ts new file mode 100644 index 000000000..d2ce30d88 --- /dev/null +++ b/apps/onboarding/graphql.config.ts @@ -0,0 +1,7 @@ +import type { IGraphQLConfig } from "graphql-config"; + +const config: IGraphQLConfig = { + schema: "graphql/schema.graphql", +}; + +export default config; diff --git a/apps/onboarding/graphql/mutations/update-user-metadata.graphql b/apps/onboarding/graphql/mutations/update-user-metadata.graphql new file mode 100644 index 000000000..926e3260c --- /dev/null +++ b/apps/onboarding/graphql/mutations/update-user-metadata.graphql @@ -0,0 +1,9 @@ +mutation UpdateUserMetadata($id: ID!, $input: [MetadataInput!]!) { + updateMetadata(id: $id, input: $input) { + errors { + field + message + code + } + } +} diff --git a/apps/onboarding/graphql/queries/me.graphql b/apps/onboarding/graphql/queries/me.graphql new file mode 100644 index 000000000..4b951ddf6 --- /dev/null +++ b/apps/onboarding/graphql/queries/me.graphql @@ -0,0 +1,13 @@ +query Me { + me { + id + dateJoined + metadata { + key + value + } + userPermissions { + code + } + } +} diff --git a/apps/onboarding/graphql/schema.graphql b/apps/onboarding/graphql/schema.graphql new file mode 120000 index 000000000..8664876df --- /dev/null +++ b/apps/onboarding/graphql/schema.graphql @@ -0,0 +1 @@ +../../../schema.graphql \ No newline at end of file diff --git a/apps/onboarding/lint-staged.config.js b/apps/onboarding/lint-staged.config.js new file mode 100644 index 000000000..065d7bc36 --- /dev/null +++ b/apps/onboarding/lint-staged.config.js @@ -0,0 +1,9 @@ +import baseConfig from "../../lint-staged.config.js"; + +/** + * @type {import('lint-staged').Configuration} + */ +export default { + ...baseConfig, + "*.{jsx,tsx,ts,js,graphql}": ["eslint --cache --fix", "prettier --write"], +}; diff --git a/apps/onboarding/next-env.d.ts b/apps/onboarding/next-env.d.ts new file mode 100644 index 000000000..3cd7048ed --- /dev/null +++ b/apps/onboarding/next-env.d.ts @@ -0,0 +1,6 @@ +/// +/// +/// + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/apps/onboarding/next.config.ts b/apps/onboarding/next.config.ts new file mode 100644 index 000000000..824216ab9 --- /dev/null +++ b/apps/onboarding/next.config.ts @@ -0,0 +1,21 @@ +import { withSentryConfig } from "@sentry/nextjs"; +import { type NextConfig } from "next"; + +const nextConfig: NextConfig = { + reactStrictMode: true, + transpilePackages: ["@saleor/apps-shared"], + experimental: { + optimizePackageImports: ["@sentry/nextjs", "@sentry/node"], + }, + bundlePagesRouterDependencies: true, +}; + +// Make sure to export sentry config as the last one - https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#apply-instrumentation-to-your-app +export default withSentryConfig(nextConfig, { + org: process.env.SENTRY_ORG, + project: process.env.SENTRY_PROJECT, + silent: true, + disableLogger: true, + widenClientFileUpload: true, + tunnelRoute: "/monitoring", +}); diff --git a/apps/onboarding/package.json b/apps/onboarding/package.json new file mode 100644 index 000000000..51018c41a --- /dev/null +++ b/apps/onboarding/package.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://json.schemastore.org/package.json", + "name": "saleor-app-onboarding", + "version": "0.0.1", + "private": true, + "type": "module", + "scripts": { + "build": "next build", + "check-types": "tsc", + "dev": "NODE_OPTIONS='--inspect' next dev", + "generate": "graphql-codegen", + "lint": "eslint .", + "lint:fix": "eslint --fix .", + "start": "next start", + "test": "vitest", + "test:ci": "vitest run --coverage" + }, + "dependencies": { + "@saleor/app-sdk": "link:../../node_modules/@saleor/app-sdk", + "@saleor/apps-shared": "workspace:*", + "@saleor/macaw-ui": "catalog:", + "@sentry/nextjs": "catalog:", + "@t3-oss/env-nextjs": "catalog:", + "next": "catalog:", + "react": "catalog:", + "react-dom": "catalog:", + "urql": "catalog:", + "usehooks-ts": "catalog:", + "zod": "catalog:", + "zod-validation-error": "catalog:" + }, + "devDependencies": { + "@graphql-codegen/cli": "catalog:", + "@graphql-codegen/introspection": "catalog:", + "@graphql-codegen/typed-document-node": "catalog:", + "@graphql-codegen/typescript-operations": "catalog:", + "@graphql-codegen/typescript-urql": "catalog:", + "@graphql-typed-document-node/core": "catalog:", + "@saleor/eslint-config-apps": "workspace:*", + "@saleor/typescript-config-apps": "workspace:*", + "@testing-library/dom": "10.4.0", + "@testing-library/react": "16.2.0", + "@total-typescript/ts-reset": "0.6.1", + "@types/node": "catalog:", + "@types/react": "18.2.5", + "@types/react-dom": "18.2.5", + "@vitejs/plugin-react": "catalog:", + "@vitest/coverage-v8": "catalog:", + "eslint": "catalog:", + "eslint-plugin-n": "catalog:", + "graphql": "catalog:", + "graphql-config": "5.0.3", + "graphql-tag": "catalog:", + "tsx": "catalog:", + "typescript": "catalog:", + "vite": "catalog:", + "vite-tsconfig-paths": "catalog:", + "vitest": "catalog:" + } +} diff --git a/apps/onboarding/public/logo.png b/apps/onboarding/public/logo.png new file mode 100644 index 000000000..5d159c6fd Binary files /dev/null and b/apps/onboarding/public/logo.png differ diff --git a/apps/onboarding/reset.d.ts b/apps/onboarding/reset.d.ts new file mode 100644 index 000000000..a3d4a031b --- /dev/null +++ b/apps/onboarding/reset.d.ts @@ -0,0 +1 @@ +import "@total-typescript/ts-reset"; diff --git a/apps/onboarding/sentry.client.config.ts b/apps/onboarding/sentry.client.config.ts new file mode 100644 index 000000000..ba3a508d0 --- /dev/null +++ b/apps/onboarding/sentry.client.config.ts @@ -0,0 +1,10 @@ +import * as Sentry from "@sentry/nextjs"; + +import { env } from "@/lib/env"; + +Sentry.init({ + dsn: env.NEXT_PUBLIC_SENTRY_DSN, + environment: env.ENV, + // we don't follow OTEL guide from Sentry as we use Sentry just for error tracking + skipOpenTelemetrySetup: true, +}); diff --git a/apps/onboarding/src/app/api/manifest/route.ts b/apps/onboarding/src/app/api/manifest/route.ts new file mode 100644 index 000000000..f3a053125 --- /dev/null +++ b/apps/onboarding/src/app/api/manifest/route.ts @@ -0,0 +1,51 @@ +import { createManifestHandler } from "@saleor/app-sdk/handlers/next-app-router"; +import { type AppManifest } from "@saleor/app-sdk/types"; + +import { env } from "@/lib/env"; +import packageJson from "@/package.json"; + +const handler = createManifestHandler({ + async manifestFactory({ appBaseUrl }) { + const iframeBaseUrl = env.APP_IFRAME_BASE_URL ?? appBaseUrl; + const apiBaseUrl = env.APP_API_BASE_URL ?? appBaseUrl; + + // todo update manifest we dont need tokenTargetUrl and appUrl + const manifest: AppManifest = { + // todo we can remove it later + appUrl: iframeBaseUrl, + about: + "Saleor Onboarding App — guides new users through the first steps of using Saleor Dashboard.", + author: "Saleor Commerce", + brand: { + logo: { + default: `${apiBaseUrl}/logo.png`, + }, + }, + dataPrivacyUrl: "https://saleor.io/legal/privacy/", + extensions: [ + { + label: "Onboarding", + mount: "HOMEPAGE_WIDGETS", + target: "WIDGET", + url: new URL("/", iframeBaseUrl).toString(), + permissions: [], + options: { + homeWidgetTarget: { method: "GET", fullscreen: true }, + }, + }, + ], + homepageUrl: "https://github.com/saleor/apps", + id: env.MANIFEST_APP_ID, + name: env.APP_NAME, + permissions: [], + requiredSaleorVersion: ">=3.23 <4", + supportUrl: "https://saleor.io/discord", + version: packageJson.version, + webhooks: [], + }; + + return manifest; + }, +}); + +export const GET = handler; diff --git a/apps/onboarding/src/app/api/register/route.ts b/apps/onboarding/src/app/api/register/route.ts new file mode 100644 index 000000000..55a38547c --- /dev/null +++ b/apps/onboarding/src/app/api/register/route.ts @@ -0,0 +1,9 @@ +import { createAppRegisterHandler } from "@saleor/app-sdk/handlers/next-app-router"; + +import { saleorApp } from "@/lib/saleor-app"; + +const handler = createAppRegisterHandler({ + apl: saleorApp.apl, +}); + +export const POST = handler; diff --git a/apps/onboarding/src/instrumentation.ts b/apps/onboarding/src/instrumentation.ts new file mode 100644 index 000000000..ff8d93c1a --- /dev/null +++ b/apps/onboarding/src/instrumentation.ts @@ -0,0 +1,15 @@ +import type { Instrumentation } from "next"; + +export const register = async () => { + if (process.env.NEXT_RUNTIME === "nodejs" && process.env.NEXT_PUBLIC_SENTRY_DSN) { + await import("./instrumentations/sentry-node"); + } +}; + +export const onRequestError: Instrumentation.onRequestError = async (...args) => { + if (process.env.NEXT_PUBLIC_SENTRY_DSN) { + const { captureRequestError } = await import("@sentry/nextjs"); + + captureRequestError(...args); + } +}; diff --git a/apps/onboarding/src/instrumentations/sentry-node.ts b/apps/onboarding/src/instrumentations/sentry-node.ts new file mode 100644 index 000000000..2ea53c6bc --- /dev/null +++ b/apps/onboarding/src/instrumentations/sentry-node.ts @@ -0,0 +1,9 @@ +import * as Sentry from "@sentry/nextjs"; + +import { env } from "@/lib/env"; + +Sentry.init({ + dsn: env.NEXT_PUBLIC_SENTRY_DSN, + environment: env.ENV, + skipOpenTelemetrySetup: true, +}); diff --git a/apps/onboarding/src/lib/env.ts b/apps/onboarding/src/lib/env.ts new file mode 100644 index 000000000..26a4f0b1e --- /dev/null +++ b/apps/onboarding/src/lib/env.ts @@ -0,0 +1,39 @@ +import { createEnv } from "@t3-oss/env-nextjs"; +import { z } from "zod"; +import { fromError } from "zod-validation-error"; + +export const env = createEnv({ + client: { + NEXT_PUBLIC_SENTRY_DSN: z.string().optional(), + }, + server: { + APP_API_BASE_URL: z.string().optional(), + APP_IFRAME_BASE_URL: z.string().optional(), + APP_LOG_LEVEL: z.enum(["fatal", "error", "warn", "info", "debug", "trace"]).default("info"), + APP_NAME: z.string().default("Onboarding"), + MANIFEST_APP_ID: z.string().default("saleor.app.onboarding"), + PORT: z.coerce.number().default(3000), + }, + shared: { + NODE_ENV: z.enum(["development", "production", "test"]).default("development"), + ENV: z.enum(["local", "development", "staging", "production"]).default("local"), + }, + // We use the manual destruction here so env variables are validated by turbo.json env list + runtimeEnv: { + APP_API_BASE_URL: process.env.APP_API_BASE_URL, + APP_IFRAME_BASE_URL: process.env.APP_IFRAME_BASE_URL, + APP_LOG_LEVEL: process.env.APP_LOG_LEVEL, + APP_NAME: process.env.APP_NAME, + ENV: process.env.ENV, + MANIFEST_APP_ID: process.env.MANIFEST_APP_ID, + NEXT_PUBLIC_SENTRY_DSN: process.env.NEXT_PUBLIC_SENTRY_DSN, + NODE_ENV: process.env.NODE_ENV, + PORT: process.env.PORT, + }, + isServer: typeof window === "undefined" || process.env.NODE_ENV === "test", + onValidationError(issues) { + const validationError = fromError(issues); + + throw new Error(`Invalid environment variables: ${validationError.toString()}`); + }, +}); diff --git a/apps/onboarding/src/lib/saleor-app.ts b/apps/onboarding/src/lib/saleor-app.ts new file mode 100644 index 000000000..c9d77dd63 --- /dev/null +++ b/apps/onboarding/src/lib/saleor-app.ts @@ -0,0 +1,35 @@ +import { type APL, type AuthData } from "@saleor/app-sdk/APL"; +import { SaleorApp } from "@saleor/app-sdk/saleor-app"; + +/** + * No-op APL: install requests succeed but auth credentials are intentionally dropped. + * + * This app is purely client-side — every GraphQL call uses the staff user's JWT issued by + * AppBridge, so the app server never needs the per-tenant token. We still need an APL to + * satisfy the SDK contract for the register handler. + */ +class NoopAPL implements APL { + async get(_saleorApiUrl: string): Promise { + return undefined; + } + + async set(_authData: AuthData): Promise {} + + async delete(_saleorApiUrl: string): Promise {} + + async getAll(): Promise { + return []; + } + + async isReady(): Promise<{ ready: true } | { ready: false; error: Error }> { + return { ready: true }; + } + + async isConfigured(): Promise<{ configured: true } | { configured: false; error: Error }> { + return { configured: true }; + } +} + +export const saleorApp = new SaleorApp({ + apl: new NoopAPL(), +}); diff --git a/apps/onboarding/src/modules/graphql/graphql-provider.tsx b/apps/onboarding/src/modules/graphql/graphql-provider.tsx new file mode 100644 index 000000000..cddceaecc --- /dev/null +++ b/apps/onboarding/src/modules/graphql/graphql-provider.tsx @@ -0,0 +1,30 @@ +import { useAppBridge } from "@saleor/app-sdk/app-bridge"; +import { createGraphQLClient } from "@saleor/apps-shared/create-graphql-client"; +import { type PropsWithChildren, useMemo } from "react"; +import { Provider } from "urql"; + +/** + * Local GraphQL provider that uses the onboarding app's urql instance. + * + * pnpm resolves @saleor/apps-shared with graphql@16.11.0 (transitively from graphql-ws) + * but onboarding pins graphql@16.7.1 (catalog). The two urql copies created from those + * resolutions have separate React contexts, so apps-shared/graphql-provider's + * does not satisfy useQuery() called from this app. Wrapping with the local urql here + * keeps Provider and useQuery on the same context. + */ +export function GraphQLProvider({ children }: PropsWithChildren) { + const { appBridgeState } = useAppBridge(); + + const client = useMemo(() => { + if (!appBridgeState?.saleorApiUrl) return null; + + return createGraphQLClient({ + saleorApiUrl: appBridgeState.saleorApiUrl, + token: appBridgeState.token, + }); + }, [appBridgeState?.saleorApiUrl, appBridgeState?.token]); + + if (!client) return null; + + return {children}; +} diff --git a/apps/onboarding/src/modules/onboarding/components/buttons/check-graphql-button.tsx b/apps/onboarding/src/modules/onboarding/components/buttons/check-graphql-button.tsx new file mode 100644 index 000000000..3a0fc2121 --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/components/buttons/check-graphql-button.tsx @@ -0,0 +1,26 @@ +"use client"; + +import { useAppBridge } from "@saleor/app-sdk/app-bridge"; +import { Button } from "@saleor/macaw-ui"; + +import { type PrimaryActionProps } from "./types"; + +export const CheckGraphQLButton = ({ onClick }: PrimaryActionProps) => { + const { appBridgeState } = useAppBridge(); + const saleorApiUrl = appBridgeState?.saleorApiUrl; + + return ( + + ); +}; diff --git a/apps/onboarding/src/modules/onboarding/components/buttons/create-product-button.tsx b/apps/onboarding/src/modules/onboarding/components/buttons/create-product-button.tsx new file mode 100644 index 000000000..b298ffa49 --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/components/buttons/create-product-button.tsx @@ -0,0 +1,14 @@ +"use client"; + +import { PermissionGatedRedirectButton } from "./permission-gated-redirect-button"; +import { type PrimaryActionProps } from "./types"; + +export const CreateProductButton = ({ onClick }: PrimaryActionProps) => ( + +); diff --git a/apps/onboarding/src/modules/onboarding/components/buttons/extensions-button.tsx b/apps/onboarding/src/modules/onboarding/components/buttons/extensions-button.tsx new file mode 100644 index 000000000..9962e400e --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/components/buttons/extensions-button.tsx @@ -0,0 +1,20 @@ +import { Button } from "@saleor/macaw-ui"; + +import { useAppRedirect } from "../../hooks/use-app-redirect"; +import { type PrimaryActionProps } from "./types"; + +export const ExtensionsButton = ({ onClick }: PrimaryActionProps) => { + const redirect = useAppRedirect(); + + return ( + + ); +}; diff --git a/apps/onboarding/src/modules/onboarding/components/buttons/invite-staff-button.tsx b/apps/onboarding/src/modules/onboarding/components/buttons/invite-staff-button.tsx new file mode 100644 index 000000000..a947f8592 --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/components/buttons/invite-staff-button.tsx @@ -0,0 +1,14 @@ +"use client"; + +import { PermissionGatedRedirectButton } from "./permission-gated-redirect-button"; +import { type PrimaryActionProps } from "./types"; + +export const InviteStaffButton = ({ onClick }: PrimaryActionProps) => ( + +); diff --git a/apps/onboarding/src/modules/onboarding/components/buttons/orders-button.tsx b/apps/onboarding/src/modules/onboarding/components/buttons/orders-button.tsx new file mode 100644 index 000000000..7edc02fc5 --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/components/buttons/orders-button.tsx @@ -0,0 +1,14 @@ +"use client"; + +import { PermissionGatedRedirectButton } from "./permission-gated-redirect-button"; +import { type PrimaryActionProps } from "./types"; + +export const OrdersButton = ({ onClick }: PrimaryActionProps) => ( + +); diff --git a/apps/onboarding/src/modules/onboarding/components/buttons/permission-gated-redirect-button.tsx b/apps/onboarding/src/modules/onboarding/components/buttons/permission-gated-redirect-button.tsx new file mode 100644 index 000000000..8cdc1bfc8 --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/components/buttons/permission-gated-redirect-button.tsx @@ -0,0 +1,52 @@ +import { useAppBridge } from "@saleor/app-sdk/app-bridge"; +import { Button, Tooltip } from "@saleor/macaw-ui"; + +import { useAppRedirect } from "../../hooks/use-app-redirect"; +import { FakeDisabledButton } from "../fake-disabled-button"; + +type Props = { + label: string; + to: string; + permission: string; + missingPermissionTooltip: string; + onClick?: () => void; +}; + +export const PermissionGatedRedirectButton = ({ + label, + to, + permission, + missingPermissionTooltip, + onClick, +}: Props) => { + const { appBridgeState } = useAppBridge(); + + const redirect = useAppRedirect(); + const hasPermission = appBridgeState?.user?.permissions.includes(permission); + + if (!hasPermission) { + return ( + + + {label} + + + + {missingPermissionTooltip} + + + ); + } + + return ( + + ); +}; diff --git a/apps/onboarding/src/modules/onboarding/components/buttons/types.ts b/apps/onboarding/src/modules/onboarding/components/buttons/types.ts new file mode 100644 index 000000000..d8939695d --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/components/buttons/types.ts @@ -0,0 +1,3 @@ +export interface PrimaryActionProps { + onClick?: () => void; +} diff --git a/apps/onboarding/src/modules/onboarding/components/dashboard-card.tsx b/apps/onboarding/src/modules/onboarding/components/dashboard-card.tsx new file mode 100644 index 000000000..755a70cc2 --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/components/dashboard-card.tsx @@ -0,0 +1,27 @@ +"use client"; + +import { Box, type BoxProps } from "@saleor/macaw-ui"; +import { type ReactNode } from "react"; + +/** + * Minimal replica of the dashboard's DashboardCard compound. The dashboard package isn't + * available in the apps repo so we wrap macaw-ui's Box with the same Root/Header/Content + * sub-components used by the WelcomePageOnboarding accordion. + */ +const Root = ({ children, ...props }: BoxProps & { children: ReactNode }) => ( + + {children} + +); + +const Header = ({ children, ...props }: BoxProps & { children: ReactNode }) => ( + + {children} + +); + +const Content = ({ children, ...props }: BoxProps & { children: ReactNode }) => ( + {children} +); + +export const DashboardCard = Object.assign(Root, { Header, Content }); diff --git a/apps/onboarding/src/modules/onboarding/components/fake-disabled-button.tsx b/apps/onboarding/src/modules/onboarding/components/fake-disabled-button.tsx new file mode 100644 index 000000000..632933960 --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/components/fake-disabled-button.tsx @@ -0,0 +1,35 @@ +"use client"; + +import { Button, type ButtonProps, vars } from "@saleor/macaw-ui"; +import { forwardRef, useState } from "react"; + +export const FakeDisabledButton = forwardRef( + ({ children, ...props }, ref) => { + const [isHovered, setIsHovered] = useState(false); + + return ( + + ); + }, +); + +FakeDisabledButton.displayName = "FakeDisabledButton"; diff --git a/apps/onboarding/src/modules/onboarding/components/step-icon.tsx b/apps/onboarding/src/modules/onboarding/components/step-icon.tsx new file mode 100644 index 000000000..9c5054677 --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/components/step-icon.tsx @@ -0,0 +1,35 @@ +"use client"; + +import { Box } from "@saleor/macaw-ui"; + +const Check = ( + + + + +); + +const Circle = ( + + + +); + +export function StepIcon({ isComplete }: { isComplete: boolean }) { + return ( + + {isComplete ? Check : Circle} + + ); +} diff --git a/apps/onboarding/src/modules/onboarding/hooks/use-app-redirect.ts b/apps/onboarding/src/modules/onboarding/hooks/use-app-redirect.ts new file mode 100644 index 000000000..060c91100 --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/hooks/use-app-redirect.ts @@ -0,0 +1,18 @@ +"use client"; + +import { actions, useAppBridge } from "@saleor/app-sdk/app-bridge"; +import { useCallback } from "react"; + +/** + * Wrap AppBridge's Redirect action so widget buttons can navigate the dashboard's outer route. + */ +export const useAppRedirect = () => { + const { appBridge } = useAppBridge(); + + return useCallback( + (to: string) => { + void appBridge?.dispatch(actions.Redirect({ to })); + }, + [appBridge], + ); +}; diff --git a/apps/onboarding/src/modules/onboarding/hooks/use-onboarding-data.tsx b/apps/onboarding/src/modules/onboarding/hooks/use-onboarding-data.tsx new file mode 100644 index 000000000..d3fc8f4da --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/hooks/use-onboarding-data.tsx @@ -0,0 +1,161 @@ +"use client"; + +import { Button } from "@saleor/macaw-ui"; +import { type ReactNode } from "react"; + +import { CheckGraphQLButton } from "../components/buttons/check-graphql-button"; +import { CreateProductButton } from "../components/buttons/create-product-button"; +import { ExtensionsButton } from "../components/buttons/extensions-button"; +import { InviteStaffButton } from "../components/buttons/invite-staff-button"; +import { OrdersButton } from "../components/buttons/orders-button"; +import { useOnboarding } from "../onboarding-context/onboarding-context"; +import { type OnboardingStepsIDs } from "../onboarding-context/types"; + +export interface OnboardingStepData { + id: OnboardingStepsIDs; + title: string; + description: string; + actions: ReactNode; + isCompleted: boolean; +} + +const buildSteps = ({ + isStepCompleted, + onStepComplete, +}: { + isStepCompleted: (step: OnboardingStepsIDs) => boolean; + onStepComplete: (step: OnboardingStepsIDs) => void; +}): OnboardingStepData[] => [ + { + id: "get-started", + title: "Welcome to Saleor!", + description: + "We'll guide you through the main features so you can start customizing your store. Explore products, orders, collections, customers, and discounts to get familiar with key functions and concepts.", + isCompleted: isStepCompleted("get-started"), + actions: !isStepCompleted("get-started") ? ( + + ) : null, + }, + { + id: "create-product", + title: "Create a new product", + description: + "Go to all products from where you can create a new product and view it in all product list. View the product in GraphQL", + isCompleted: isStepCompleted("create-product"), + actions: ( + <> + + {!isStepCompleted("create-product") && ( + + )} + + ), + }, + { + id: "explore-orders", + title: "Explore orders", + description: + "Go to all orders where you can create an fulfilment and refund and review corresponding statuses. View the order in GraphQL", + isCompleted: isStepCompleted("explore-orders"), + actions: ( + <> + + {!isStepCompleted("explore-orders") && ( + + )} + + ), + }, + { + id: "graphql-playground", + title: "Check our GraphQL playground & make an API call", + description: + "Saleor includes a GraphQL Playground, an interactive GraphQL editor, allowing access to your Saleor instance's API through the web browser. The Playground lets you quickly familiarize yourself with the API, perform example operations, and send your first queries and mutations.", + isCompleted: isStepCompleted("graphql-playground"), + actions: ( + <> + + {!isStepCompleted("graphql-playground") && ( + + )} + + ), + }, + { + id: "view-extensions", + title: "Discover extension capabilities", + description: + "Review the central hub for managing all available extensions. Here, you can easily oversee your extensions and enhance Saleor with custom solutions using webhooks and APIs.", + isCompleted: isStepCompleted("view-extensions"), + actions: ( + <> + + {!isStepCompleted("view-extensions") && ( + + )} + + ), + }, + { + id: "invite-staff", + title: "Invite staff members", + description: + "Invite team members and assign permissions on Product Information Management (PIM), Order Management System (OMS), Promotions engine, Extensions (apps, plugins)", + isCompleted: isStepCompleted("invite-staff"), + actions: ( + <> + + {!isStepCompleted("invite-staff") && ( + + )} + + ), + }, +]; + +export const useOnboardingData = () => { + const { markOnboardingStepAsCompleted, onboardingState } = useOnboarding(); + + const steps = buildSteps({ + isStepCompleted: (step) => onboardingState.stepsCompleted.includes(step), + onStepComplete: (step) => markOnboardingStepAsCompleted(step), + }); + + return { steps }; +}; diff --git a/apps/onboarding/src/modules/onboarding/onboarding-context/initial-onboarding-state.ts b/apps/onboarding/src/modules/onboarding/onboarding-context/initial-onboarding-state.ts new file mode 100644 index 000000000..4ba808221 --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/onboarding-context/initial-onboarding-state.ts @@ -0,0 +1,20 @@ +import { type OnboardingState, type OnboardingStep } from "./types"; + +// We store state in metadata for all steps even those that are not shown to the user. +export const initialOnboardingSteps: OnboardingStep[] = [ + { id: "get-started", completed: false, expanded: undefined }, + { id: "create-product", completed: false, expanded: undefined }, + { id: "explore-orders", completed: false, expanded: undefined }, + { id: "graphql-playground", completed: false, expanded: undefined }, + { id: "view-extensions", completed: false, expanded: undefined }, + { id: "invite-staff", completed: false, expanded: undefined }, +]; + +// Matches dashboard's count: view-extensions and view-webhooks are mutually exclusive. +export const TOTAL_STEPS_COUNT = initialOnboardingSteps.length - 1; + +export const getInitialOnboardingState = (): OnboardingState => ({ + onboardingExpanded: true, + stepsCompleted: [], + stepsExpanded: {} as OnboardingState["stepsExpanded"], +}); diff --git a/apps/onboarding/src/modules/onboarding/onboarding-context/onboarding-context.tsx b/apps/onboarding/src/modules/onboarding/onboarding-context/onboarding-context.tsx new file mode 100644 index 000000000..5e6b4e2ff --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/onboarding-context/onboarding-context.tsx @@ -0,0 +1,126 @@ +"use client"; + +import { createContext, useContext, useEffect, useRef, useState } from "react"; + +import { + getInitialOnboardingState, + initialOnboardingSteps, + TOTAL_STEPS_COUNT, +} from "./initial-onboarding-state"; +import { + type OnboardingContextType, + type OnboardingProviderProps, + type OnboardingState, + type OnboardingStepsIDs, +} from "./types"; +import { useExpandedOnboardingId } from "./use-expanded-onboarding-id"; +import { useOnboardingStorage, useUserData } from "./use-onboarding-storage"; +import { handleStateChangeAfterStepCompleted, handleStateChangeAfterToggle } from "./utils"; + +const OnboardingContext = createContext(null); + +export const OnboardingProvider = ({ children }: OnboardingProviderProps) => { + const [onboardingState, setOnboardingState] = useState({ + onboardingExpanded: true, + stepsCompleted: [], + stepsExpanded: {} as OnboardingState["stepsExpanded"], + }); + const loaded = useRef(false); + const { user, isUserLoading } = useUserData(); + const storageService = useOnboardingStorage(user); + + useEffect(() => { + if (loaded.current || isUserLoading) return; + + const stateFromMetadata = storageService.getOnboardingState(); + + if (!stateFromMetadata) { + setOnboardingState(getInitialOnboardingState()); + } else { + setOnboardingState(stateFromMetadata); + } + + loaded.current = true; + }, [isUserLoading, storageService]); + + useEffect(() => { + if (loaded.current) { + storageService.saveOnboardingState(onboardingState); + } + }, [onboardingState, storageService]); + + const validCompletedStepsCount = onboardingState.stepsCompleted.length; + const isOnboardingCompleted = validCompletedStepsCount >= TOTAL_STEPS_COUNT; + + const extendedStepId = useExpandedOnboardingId( + onboardingState, + loaded.current, + initialOnboardingSteps, + ); + + const markOnboardingStepAsCompleted = (id: OnboardingStepsIDs) => { + if (onboardingState.stepsCompleted.includes(id)) return; + + setOnboardingState((prev) => handleStateChangeAfterStepCompleted(prev, id)); + }; + + const markAllAsCompleted = () => { + setOnboardingState((prev) => ({ + ...prev, + stepsCompleted: initialOnboardingSteps.map((step) => step.id), + stepsExpanded: {} as OnboardingState["stepsExpanded"], + })); + }; + + /* + * When the accordion is collapsed we get an empty string as id; we still need the previously + * expanded id so we know which step to toggle off. + */ + const toggleExpandedOnboardingStep = (id: string, currentExpandedId: OnboardingStepsIDs | "") => { + const expandedId = id || currentExpandedId; + + setOnboardingState((prev) => + handleStateChangeAfterToggle(prev, expandedId as OnboardingStepsIDs, id), + ); + }; + + const toggleOnboarding = (value: boolean) => { + setOnboardingState((prev) => { + const newState = { ...prev, onboardingExpanded: value }; + + storageService.saveOnboardingState(newState); + + return newState; + }); + }; + + return ( + + {children} + + ); +}; + +export const useOnboarding = () => { + const context = useContext(OnboardingContext); + + if (context === null) { + throw new Error("useOnboarding must be used within an OnboardingProvider"); + } + + return context; +}; diff --git a/apps/onboarding/src/modules/onboarding/onboarding-context/types.ts b/apps/onboarding/src/modules/onboarding/onboarding-context/types.ts new file mode 100644 index 000000000..71167aaf2 --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/onboarding-context/types.ts @@ -0,0 +1,44 @@ +import type * as React from "react"; + +export type OnboardingStepsIDs = + | "get-started" + | "create-product" + | "explore-orders" + | "graphql-playground" + | "view-extensions" + | "invite-staff"; + +export type OnboardingStep = { + id: OnboardingStepsIDs; + completed: boolean; + expanded: boolean | undefined; +}; + +export type OnboardingState = { + stepsCompleted: OnboardingStepsIDs[]; + stepsExpanded: Record; + onboardingExpanded: boolean; +}; + +export interface StorageService { + getOnboardingState(): OnboardingState | undefined; + saveOnboardingState(onboardingState: OnboardingState): void; +} + +export interface OnboardingContextType { + isOnboardingCompleted: boolean; + loading: boolean; + extendedStepId: OnboardingStepsIDs | ""; + onboardingState: OnboardingState; + userPermissions: string[]; + markOnboardingStepAsCompleted: (id: OnboardingStepsIDs) => void; + markAllAsCompleted: () => void; + toggleExpandedOnboardingStep: (id: string, currentExpandedId: OnboardingStepsIDs | "") => void; + toggleOnboarding: (value: boolean) => void; + validCompletedStepsCount: number; + visibleSteps: OnboardingStep[]; +} + +export interface OnboardingProviderProps { + children: React.ReactNode; +} diff --git a/apps/onboarding/src/modules/onboarding/onboarding-context/use-expanded-onboarding-id.test.ts b/apps/onboarding/src/modules/onboarding/onboarding-context/use-expanded-onboarding-id.test.ts new file mode 100644 index 000000000..6a67e0dad --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/onboarding-context/use-expanded-onboarding-id.test.ts @@ -0,0 +1,138 @@ +import { renderHook } from "@testing-library/react"; +import { describe, expect, it } from "vitest"; + +import { type OnboardingState, type OnboardingStep } from "./types"; +import { useExpandedOnboardingId } from "./use-expanded-onboarding-id"; + +describe("useExpandedOnboardingId", () => { + it("should return first expanded step on init if exists", () => { + const onboardingState = { + stepsCompleted: ["get-started"], + stepsExpanded: { "create-product": true }, + } as OnboardingState; + const visibleSteps: OnboardingStep[] = [ + { id: "get-started", completed: true, expanded: undefined }, + { id: "create-product", completed: false, expanded: true }, + { id: "explore-orders", completed: false, expanded: undefined }, + { id: "graphql-playground", completed: false, expanded: undefined }, + { id: "view-extensions", completed: false, expanded: undefined }, + { id: "invite-staff", completed: false, expanded: undefined }, + ]; + + const { result } = renderHook(() => + useExpandedOnboardingId(onboardingState, true, visibleSteps), + ); + + expect(result.current).toBe("create-product"); + }); + + it("should return first not completed step when no one with expanded state", () => { + const onboardingState = { + stepsCompleted: ["get-started", "create-product"], + stepsExpanded: { "get-started": false }, + } as OnboardingState; + const visibleSteps: OnboardingStep[] = [ + { id: "get-started", completed: true, expanded: false }, + { id: "create-product", completed: true, expanded: undefined }, + { id: "explore-orders", completed: false, expanded: undefined }, + { id: "graphql-playground", completed: false, expanded: undefined }, + { id: "view-extensions", completed: false, expanded: undefined }, + { id: "invite-staff", completed: false, expanded: undefined }, + ]; + + const { result } = renderHook(() => + useExpandedOnboardingId(onboardingState, true, visibleSteps), + ); + + expect(result.current).toBe("explore-orders"); + }); + + it("should return empty string when all steps are collapsed", () => { + const onboardingState = { + onboardingExpanded: true, + stepsCompleted: [], + stepsExpanded: { + "get-started": false, + "create-product": false, + "explore-orders": false, + "graphql-playground": false, + "view-extensions": false, + "invite-staff": false, + }, + } as OnboardingState; + const visibleSteps: OnboardingStep[] = [ + { id: "get-started", completed: false, expanded: false }, + { id: "create-product", completed: false, expanded: false }, + { id: "explore-orders", completed: false, expanded: false }, + { id: "graphql-playground", completed: false, expanded: false }, + { id: "view-extensions", completed: false, expanded: false }, + { id: "invite-staff", completed: false, expanded: false }, + ]; + + const { result } = renderHook(() => + useExpandedOnboardingId(onboardingState, true, visibleSteps), + ); + + expect(result.current).toBe(""); + }); + + it("should return first not completed step after step completed", () => { + const onboardingState = { + onboardingExpanded: true, + stepsCompleted: [], + stepsExpanded: { "get-started": false }, + } as unknown as OnboardingState; + const onboardingStateChanged = { + onboardingExpanded: true, + stepsCompleted: ["create-product"], + stepsExpanded: { "get-started": false }, + } as OnboardingState; + const visibleSteps: OnboardingStep[] = [ + { id: "get-started", completed: false, expanded: false }, + { id: "create-product", completed: false, expanded: undefined }, + { id: "explore-orders", completed: false, expanded: undefined }, + { id: "graphql-playground", completed: false, expanded: undefined }, + { id: "view-extensions", completed: false, expanded: undefined }, + { id: "invite-staff", completed: false, expanded: undefined }, + ]; + + const { rerender, result } = renderHook( + ({ state }) => useExpandedOnboardingId(state, true, visibleSteps), + { initialProps: { state: onboardingState } }, + ); + + rerender({ state: onboardingStateChanged }); + + expect(result.current).toBe("explore-orders"); + }); + + it("should return first expanded step after expand step toggle", () => { + const onboardingState = { + onboardingExpanded: true, + stepsCompleted: ["get-started", "create-product"], + stepsExpanded: { "get-started": false }, + } as unknown as OnboardingState; + const onboardingStateChanged = { + onboardingExpanded: true, + stepsCompleted: ["get-started", "create-product"], + stepsExpanded: { "get-started": false, "explore-orders": true }, + } as OnboardingState; + const visibleSteps: OnboardingStep[] = [ + { id: "get-started", completed: true, expanded: false }, + { id: "create-product", completed: true, expanded: undefined }, + { id: "explore-orders", completed: false, expanded: undefined }, + { id: "graphql-playground", completed: false, expanded: undefined }, + { id: "view-extensions", completed: false, expanded: undefined }, + { id: "invite-staff", completed: false, expanded: undefined }, + ]; + + const { rerender, result } = renderHook( + ({ state }) => useExpandedOnboardingId(state, true, visibleSteps), + { initialProps: { state: onboardingState } }, + ); + + rerender({ state: onboardingStateChanged }); + + expect(result.current).toBe("explore-orders"); + }); +}); diff --git a/apps/onboarding/src/modules/onboarding/onboarding-context/use-expanded-onboarding-id.ts b/apps/onboarding/src/modules/onboarding/onboarding-context/use-expanded-onboarding-id.ts new file mode 100644 index 000000000..53db3a5c1 --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/onboarding-context/use-expanded-onboarding-id.ts @@ -0,0 +1,51 @@ +import { useEffect, useRef, useState } from "react"; + +import { type OnboardingState, type OnboardingStep, type OnboardingStepsIDs } from "./types"; +import { + getFirstExpanderStepId, + getFirstNotCompletedAndNotExpandedStep, + getNextStepToExpand, +} from "./utils"; + +export const useExpandedOnboardingId = ( + onboardingState: OnboardingState, + loaded: boolean, + visibleSteps: OnboardingStep[], +) => { + const hasBeenCalled = useRef(false); + const [expandedStepId, setExpandedStepId] = useState(""); + + useEffect(() => { + if (hasBeenCalled.current) { + const firstExpandedStepId = getFirstExpanderStepId(onboardingState); + + if (firstExpandedStepId) { + setExpandedStepId(firstExpandedStepId); + } else { + setExpandedStepId(getFirstNotCompletedAndNotExpandedStep(onboardingState, visibleSteps)); + } + } + }, [onboardingState.stepsExpanded, visibleSteps]); + + useEffect(() => { + if (hasBeenCalled.current) { + setExpandedStepId(getNextStepToExpand(onboardingState, visibleSteps)); + } + }, [onboardingState.stepsCompleted, visibleSteps]); + + useEffect(() => { + if (loaded && !hasBeenCalled.current) { + hasBeenCalled.current = true; + + const firstExpandedStep = getFirstExpanderStepId(onboardingState); + + if (firstExpandedStep) { + setExpandedStepId(firstExpandedStep); + } else { + setExpandedStepId(getFirstNotCompletedAndNotExpandedStep(onboardingState, visibleSteps)); + } + } + }, [loaded, onboardingState, visibleSteps]); + + return expandedStepId; +}; diff --git a/apps/onboarding/src/modules/onboarding/onboarding-context/use-onboarding-storage.ts b/apps/onboarding/src/modules/onboarding/onboarding-context/use-onboarding-storage.ts new file mode 100644 index 000000000..a9615638a --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/onboarding-context/use-onboarding-storage.ts @@ -0,0 +1,94 @@ +import { useCallback, useEffect, useMemo, useRef } from "react"; +import { useMutation, useQuery } from "urql"; + +import { MeDocument, UpdateUserMetadataDocument } from "@/generated/graphql"; + +import { type OnboardingState, type StorageService } from "./types"; +import { METADATA_KEY, type MetadataInput, prepareUserMetadata } from "./utils"; + +export type OnboardingUser = { + id: string; + metadata: ReadonlyArray; + userPermissions: ReadonlyArray; +}; + +export const useUserData = (): { user: OnboardingUser | null; isUserLoading: boolean } => { + const [{ data, fetching }] = useQuery({ query: MeDocument }); + + // Memoize so the user reference is stable across renders when the underlying data hasn't changed. + const user = useMemo(() => { + if (!data?.me) return null; + + return { + id: data.me.id, + metadata: data.me.metadata, + userPermissions: (data.me.userPermissions ?? []).map((p) => p.code), + }; + }, [data?.me]); + + return { user, isUserLoading: fetching }; +}; + +export const useOnboardingStorage = (user: OnboardingUser | null): StorageService => { + const [, saveMetadata] = useMutation(UpdateUserMetadataDocument); + + /* + * Keep the latest user/saveMetadata accessible from a single, stable debounced fn + * so re-renders don't spawn parallel timers. + */ + const userRef = useRef(user); + const saveMetadataRef = useRef(saveMetadata); + const timerRef = useRef | null>(null); + + useEffect(() => { + userRef.current = user; + saveMetadataRef.current = saveMetadata; + }); + + useEffect( + () => () => { + if (timerRef.current) clearTimeout(timerRef.current); + }, + [], + ); + + const getOnboardingState: StorageService["getOnboardingState"] = useCallback(() => { + try { + const metadata = userRef.current?.metadata.find((m) => m.key === METADATA_KEY); + + if (!metadata) return undefined; + + return JSON.parse(metadata.value) as OnboardingState; + } catch { + return undefined; + } + }, []); + + const saveOnboardingState: StorageService["saveOnboardingState"] = useCallback( + (onboardingState: OnboardingState) => { + if (timerRef.current) clearTimeout(timerRef.current); + + timerRef.current = setTimeout(() => { + const currentUser = userRef.current; + + if (!currentUser) return; + + const userMetadata = prepareUserMetadata(currentUser.metadata, onboardingState); + + /* + * Self-metadata writes can fail for staff without MANAGE_STAFF; widget keeps working + * in-memory but state will not persist for those users. + */ + saveMetadataRef.current({ id: currentUser.id, input: userMetadata }).catch(() => { + // intentionally swallowed — widget continues to work without persistence + }); + }, 1000); + }, + [], + ); + + return useMemo( + () => ({ getOnboardingState, saveOnboardingState }), + [getOnboardingState, saveOnboardingState], + ); +}; diff --git a/apps/onboarding/src/modules/onboarding/onboarding-context/utils.test.ts b/apps/onboarding/src/modules/onboarding/onboarding-context/utils.test.ts new file mode 100644 index 000000000..4d9e26859 --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/onboarding-context/utils.test.ts @@ -0,0 +1,263 @@ +import { describe, expect, it } from "vitest"; + +import { type OnboardingState, type OnboardingStep, type OnboardingStepsIDs } from "./types"; +import { + getFirstExpanderStepId, + getFirstNotCompletedAndNotExpandedStep, + getNextStepToExpand, + handleStateChangeAfterStepCompleted, + handleStateChangeAfterToggle, + METADATA_KEY, + type MetadataInput, + prepareUserMetadata, +} from "./utils"; + +describe("handleStateChangeAfterStepCompleted", () => { + it("should add the step to the completed steps", () => { + const state = { + onboardingExpanded: true, + stepsCompleted: [], + stepsExpanded: {}, + } as unknown as OnboardingState; + + const newState = handleStateChangeAfterStepCompleted(state, "get-started"); + + expect(newState.stepsCompleted).toStrictEqual(["get-started"]); + }); + + it("should add the step to the completed steps and add get-started if not already there", () => { + const state = { + onboardingExpanded: true, + stepsCompleted: [], + stepsExpanded: {}, + } as unknown as OnboardingState; + + const newState = handleStateChangeAfterStepCompleted(state, "create-product"); + + expect(newState.stepsCompleted).toStrictEqual(["get-started", "create-product"]); + }); + + it("should remove the step from stepsExpanded if it was expanded", () => { + const state = { + onboardingExpanded: true, + stepsCompleted: [], + stepsExpanded: { "create-product": true }, + } as unknown as OnboardingState; + + const newState = handleStateChangeAfterStepCompleted(state, "create-product"); + + expect(newState.stepsCompleted).toStrictEqual(["get-started", "create-product"]); + expect(newState.stepsExpanded["create-product"]).toBeUndefined(); + }); +}); + +describe("handleStateChangeAfterToggle", () => { + it("should set the expanded step id", () => { + const state = { + onboardingExpanded: true, + stepsCompleted: [], + stepsExpanded: {}, + } as unknown as OnboardingState; + + const newState = handleStateChangeAfterToggle(state, "get-started", "get-started"); + + expect(newState.stepsExpanded).toStrictEqual({ "get-started": true }); + }); + + it("should toggle expanded step", () => { + const state = { + onboardingExpanded: true, + stepsCompleted: [], + stepsExpanded: { "get-started": true }, + } as unknown as OnboardingState; + + const newState = handleStateChangeAfterToggle(state, "get-started", ""); + + expect(newState.stepsExpanded).toStrictEqual({ "get-started": false }); + }); + + it("should set the expanded step id and remove the previous one", () => { + const state = { + onboardingExpanded: true, + stepsCompleted: [], + stepsExpanded: { "get-started": true, "invite-staff": false }, + } as unknown as OnboardingState; + + const newState = handleStateChangeAfterToggle(state, "create-product", "create-product"); + + expect(newState.stepsExpanded).toStrictEqual({ "create-product": true, "invite-staff": false }); + }); + + it("should clear other expanded steps when a new step is expanded", () => { + const state = { + onboardingExpanded: true, + stepsCompleted: [], + stepsExpanded: { "get-started": true, "explore-orders": true }, + } as unknown as OnboardingState; + + const newState = handleStateChangeAfterToggle(state, "create-product", "create-product"); + + expect(newState.stepsExpanded).toStrictEqual({ "create-product": true }); + }); +}); + +describe("getFirstExpanderStepId", () => { + it("should return the first expanded step id", () => { + const onboardingState = { + stepsCompleted: ["get-started"], + stepsExpanded: { "create-product": true }, + } as OnboardingState; + + expect(getFirstExpanderStepId(onboardingState)).toBe("create-product"); + }); + + it("should return empty string when no step is expanded", () => { + const onboardingState = { + stepsCompleted: ["get-started", "create-product"], + stepsExpanded: { "get-started": false }, + } as OnboardingState; + + expect(getFirstExpanderStepId(onboardingState)).toBe(""); + }); +}); + +describe("getFirstNotCompletedAndNotExpandedStep", () => { + it("should return the first not completed and not expanded step", () => { + const onboardingState = { + stepsCompleted: ["get-started"], + stepsExpanded: { "create-product": false }, + } as OnboardingState; + const visibleSteps: OnboardingStep[] = [ + { id: "get-started", completed: true, expanded: undefined }, + { id: "create-product", completed: false, expanded: false }, + { id: "explore-orders", completed: false, expanded: undefined }, + { id: "graphql-playground", completed: false, expanded: undefined }, + { id: "view-extensions", completed: false, expanded: undefined }, + { id: "invite-staff", completed: false, expanded: undefined }, + ]; + + expect(getFirstNotCompletedAndNotExpandedStep(onboardingState, visibleSteps)).toStrictEqual( + "explore-orders", + ); + }); + + it("should return empty string when all steps are completed", () => { + const onboardingState = { + stepsCompleted: [ + "get-started", + "create-product", + "explore-orders", + "graphql-playground", + "view-extensions", + "invite-staff", + ], + stepsExpanded: {}, + } as OnboardingState; + const visibleSteps: OnboardingStep[] = [ + { id: "get-started", completed: true, expanded: undefined }, + { id: "create-product", completed: true, expanded: undefined }, + { id: "explore-orders", completed: true, expanded: undefined }, + { id: "graphql-playground", completed: true, expanded: undefined }, + { id: "view-extensions", completed: true, expanded: undefined }, + { id: "invite-staff", completed: true, expanded: undefined }, + ]; + + expect(getFirstNotCompletedAndNotExpandedStep(onboardingState, visibleSteps)).toStrictEqual(""); + }); +}); + +describe("getNextStepToExpand", () => { + it("should return the first step after last completed", () => { + const onboardingState = { + stepsCompleted: ["create-product"], + stepsExpanded: {}, + } as OnboardingState; + const visibleSteps: OnboardingStep[] = [ + { id: "get-started", completed: true, expanded: undefined }, + { id: "create-product", completed: true, expanded: undefined }, + { id: "explore-orders", completed: false, expanded: undefined }, + { id: "graphql-playground", completed: false, expanded: undefined }, + { id: "view-extensions", completed: false, expanded: undefined }, + { id: "invite-staff", completed: false, expanded: undefined }, + ]; + + expect(getNextStepToExpand(onboardingState, visibleSteps)).toStrictEqual("explore-orders"); + }); + + it("should return empty string when no next step after last completed", () => { + const onboardingState = { + stepsCompleted: ["invite-staff"], + stepsExpanded: {}, + } as OnboardingState; + const visibleSteps: OnboardingStep[] = [ + { id: "get-started", completed: true, expanded: undefined }, + { id: "create-product", completed: true, expanded: undefined }, + { id: "explore-orders", completed: true, expanded: undefined }, + { id: "graphql-playground", completed: true, expanded: undefined }, + { id: "view-extensions", completed: true, expanded: undefined }, + { id: "invite-staff", completed: true, expanded: undefined }, + ]; + + expect(getNextStepToExpand(onboardingState, visibleSteps)).toStrictEqual(""); + }); + + it("should return empty string if lastCompletedStepId is not in visibleSteps", () => { + const onboardingState = { + stepsCompleted: ["non-existent-step" as OnboardingStepsIDs], + stepsExpanded: {}, + } as OnboardingState; + const visibleSteps: OnboardingStep[] = [ + { id: "get-started", completed: true, expanded: undefined }, + { id: "create-product", completed: true, expanded: undefined }, + ]; + + expect(getNextStepToExpand(onboardingState, visibleSteps)).toStrictEqual(""); + }); +}); + +describe("prepareUserMetadata", () => { + const onboardingState: OnboardingState = { + onboardingExpanded: true, + stepsCompleted: ["get-started"], + stepsExpanded: { "create-product": true } as unknown as Record, + }; + const onboardingStateString = JSON.stringify(onboardingState); + + it("should add onboarding metadata if metadata is undefined", () => { + const result = prepareUserMetadata(undefined, onboardingState); + + expect(result).toStrictEqual([{ key: METADATA_KEY, value: onboardingStateString }]); + }); + + it("should add onboarding metadata if key is not present", () => { + const metadata: MetadataInput[] = [{ key: "otherKey", value: "otherValue" }]; + + const result = prepareUserMetadata(metadata, onboardingState); + + expect(result).toStrictEqual([ + { key: "otherKey", value: "otherValue" }, + { key: METADATA_KEY, value: onboardingStateString }, + ]); + }); + + it("should update onboarding metadata if key is present", () => { + const metadata: MetadataInput[] = [ + { key: "otherKey", value: "otherValue" }, + { key: METADATA_KEY, value: "oldValue" }, + ]; + + const result = prepareUserMetadata(metadata, onboardingState); + + expect(result).toStrictEqual([ + { key: "otherKey", value: "otherValue" }, + { key: METADATA_KEY, value: onboardingStateString }, + ]); + expect(result.findIndex((m) => m.key === METADATA_KEY)).toBe(1); + }); + + it("should handle empty initial metadata array", () => { + const result = prepareUserMetadata([], onboardingState); + + expect(result).toStrictEqual([{ key: METADATA_KEY, value: onboardingStateString }]); + }); +}); diff --git a/apps/onboarding/src/modules/onboarding/onboarding-context/utils.ts b/apps/onboarding/src/modules/onboarding/onboarding-context/utils.ts new file mode 100644 index 000000000..4f9dc975b --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/onboarding-context/utils.ts @@ -0,0 +1,132 @@ +import { type OnboardingState, type OnboardingStep, type OnboardingStepsIDs } from "./types"; + +export type MetadataInput = { key: string; value: string }; + +const cloneMetadata = (data: MetadataInput): MetadataInput => ({ + key: data.key, + value: data.value, +}); + +const byKey = (keyToFind: string) => (metadataItem: { key: string }) => + metadataItem.key === keyToFind; + +const isEntryValueTrue = ([_id, value]: [string, boolean]): boolean => value; + +const toStepWithClientState = + (state: OnboardingState) => + (step: OnboardingStep): OnboardingStep => ({ + ...step, + completed: state.stepsCompleted.includes(step.id), + expanded: state.stepsExpanded[step.id], + }); + +const isStepNotCompletedAndNotCollapsed = (step: { + completed: boolean; + expanded: boolean | undefined; +}): boolean => !step.completed && step.expanded !== false; + +const byStepId = + (idToFind: OnboardingStepsIDs) => + (step: { id: OnboardingStepsIDs }): boolean => + step.id === idToFind; + +export const handleStateChangeAfterStepCompleted = ( + state: OnboardingState, + id: OnboardingStepsIDs, +): OnboardingState => { + const newCompletedSteps = [...state.stepsCompleted]; + const stepsExpanded = { ...state.stepsExpanded }; + + if (!newCompletedSteps.includes("get-started") && id !== "get-started") { + newCompletedSteps.push("get-started"); + } + + newCompletedSteps.push(id); + + if (stepsExpanded[id]) { + delete stepsExpanded[id]; + } + + return { + ...state, + stepsExpanded, + stepsCompleted: newCompletedSteps, + }; +}; + +export const handleStateChangeAfterToggle = ( + state: OnboardingState, + expandedId: OnboardingStepsIDs, + id: string, +): OnboardingState => { + const stepsExpanded = { ...state.stepsExpanded }; + + for (const key in stepsExpanded) { + if (stepsExpanded[key as OnboardingStepsIDs]) { + delete stepsExpanded[key as OnboardingStepsIDs]; + } + } + + stepsExpanded[expandedId as OnboardingStepsIDs] = id !== ""; + + return { + ...state, + stepsExpanded, + }; +}; + +export const getFirstExpanderStepId = (onboardingState: OnboardingState) => { + const stepsExpandedEntries = Object.entries(onboardingState.stepsExpanded); + + return (stepsExpandedEntries.find(isEntryValueTrue)?.[0] ?? "") as OnboardingStepsIDs; +}; + +export const getFirstNotCompletedAndNotExpandedStep = ( + onboardingState: OnboardingState, + visibleSteps: OnboardingStep[], +): OnboardingStepsIDs | "" => { + const stepsWithState = visibleSteps.map(toStepWithClientState(onboardingState)); + + return stepsWithState.find(isStepNotCompletedAndNotCollapsed)?.id ?? ""; +}; + +export const getNextStepToExpand = ( + onboardingState: OnboardingState, + visibleSteps: OnboardingStep[], +): OnboardingStepsIDs | "" => { + const lastCompletedStepId = + onboardingState.stepsCompleted[onboardingState.stepsCompleted.length - 1]; + + const stepsWithState = visibleSteps.map(toStepWithClientState(onboardingState)); + + const stepIndex = stepsWithState.findIndex(byStepId(lastCompletedStepId)); + + if (stepIndex === -1 || stepIndex === stepsWithState.length - 1) { + return ""; + } + + return stepsWithState.slice(stepIndex + 1).find(isStepNotCompletedAndNotCollapsed)?.id ?? ""; +}; + +/* + * Drop-in compatible with the dashboard's built-in onboarding key — completing a step here + * reflects in the dashboard widget and vice versa. + */ +export const METADATA_KEY = "onboarding"; + +export const prepareUserMetadata = ( + metadata: ReadonlyArray | undefined, + onboardingState: OnboardingState, +): MetadataInput[] => { + const userMetadata: MetadataInput[] = metadata?.map(cloneMetadata) ?? []; + const metadataValue = JSON.stringify(onboardingState); + const metadataIndex = userMetadata.findIndex(byKey(METADATA_KEY)); + + if (metadataIndex !== -1) { + userMetadata[metadataIndex] = { key: METADATA_KEY, value: metadataValue }; + } else { + userMetadata.push({ key: METADATA_KEY, value: metadataValue }); + } + + return userMetadata; +}; diff --git a/apps/onboarding/src/modules/onboarding/welcome-page-onboarding-accordion.tsx b/apps/onboarding/src/modules/onboarding/welcome-page-onboarding-accordion.tsx new file mode 100644 index 000000000..0f9f5b97b --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/welcome-page-onboarding-accordion.tsx @@ -0,0 +1,78 @@ +"use client"; + +import { Accordion, Box, ChervonDownIcon, Skeleton, Text } from "@saleor/macaw-ui"; + +import { StepIcon } from "./components/step-icon"; +import { useOnboardingData } from "./hooks/use-onboarding-data"; +import { useOnboarding } from "./onboarding-context/onboarding-context"; + +export const WelcomePageOnboardingAccordion = () => { + const { toggleExpandedOnboardingStep, extendedStepId, loading } = useOnboarding(); + const { steps } = useOnboardingData(); + + if (loading) { + return ( + + + + + + ); + } + + return ( + { + toggleExpandedOnboardingStep(value, extendedStepId); + }} + > + {steps.map((step) => ( + + + + + + + {step.title} + + + + + + + + + + + {step.description} + {step.actions ? ( + + {step.actions} + + ) : null} + + + + ))} + + ); +}; diff --git a/apps/onboarding/src/modules/onboarding/welcome-page-onboarding.tsx b/apps/onboarding/src/modules/onboarding/welcome-page-onboarding.tsx new file mode 100644 index 000000000..be4bcf62f --- /dev/null +++ b/apps/onboarding/src/modules/onboarding/welcome-page-onboarding.tsx @@ -0,0 +1,92 @@ +"use client"; + +import { Accordion, Box, Button, ChervonDownIcon, Text } from "@saleor/macaw-ui"; + +import { DashboardCard } from "./components/dashboard-card"; +import { useOnboarding } from "./onboarding-context/onboarding-context"; +import { WelcomePageOnboardingAccordion } from "./welcome-page-onboarding-accordion"; + +type TitleProps = { + isOnboardingCompleted: boolean; + status: { done: number; total: number }; +}; + +export const WelcomePageOnboarding = () => { + const { + markAllAsCompleted, + isOnboardingCompleted, + toggleOnboarding, + onboardingState, + validCompletedStepsCount, + visibleSteps, + } = useOnboarding(); + + const isOnboardingExpanded = onboardingState.onboardingExpanded; + const status = { done: validCompletedStepsCount, total: visibleSteps.length }; + + return ( + + toggleOnboarding(value === "onboarding")} + > + + + + + + {!isOnboardingCompleted && ( + <Button + variant="secondary" + onClick={markAllAsCompleted} + data-test-id="mark-as-done" + > + Mark all as done + </Button> + )} + </Box> + <Accordion.Trigger> + <Button + display="flex" + alignItems="center" + transition="ease" + __transform={isOnboardingExpanded ? "rotate(180deg)" : "none"} + backgroundColor={{ hover: "transparent", active: "transparent" }} + variant="tertiary" + size="small" + data-test-id="onboarding-accordion-trigger" + > + <ChervonDownIcon /> + </Button> + </Accordion.Trigger> + </DashboardCard.Header> + + <Accordion.Content> + <DashboardCard.Content padding={6} paddingTop={0}> + <WelcomePageOnboardingAccordion /> + </DashboardCard.Content> + </Accordion.Content> + </Accordion.Item> + </Accordion> + </DashboardCard> + ); +}; + +const Title = ({ isOnboardingCompleted, status }: TitleProps) => { + if (isOnboardingCompleted) { + return <Text size={7}>Onboarding completed 🎉</Text>; + } + + return ( + <Text size={7}> + Let’s Get Started ({status.done}/{status.total}) + </Text> + ); +}; diff --git a/apps/onboarding/src/pages/_app.tsx b/apps/onboarding/src/pages/_app.tsx new file mode 100644 index 000000000..a64147bc2 --- /dev/null +++ b/apps/onboarding/src/pages/_app.tsx @@ -0,0 +1,43 @@ +import "@saleor/macaw-ui/style"; + +import { AppBridge, AppBridgeProvider } from "@saleor/app-sdk/app-bridge"; +import { RoutePropagator } from "@saleor/app-sdk/app-bridge/next"; +import { IframeProtectedFallback } from "@saleor/apps-shared/iframe-protected-fallback"; +import { IframeProtectedWrapper } from "@saleor/apps-shared/iframe-protected-wrapper"; +import { NoSSRWrapper } from "@saleor/apps-shared/no-ssr-wrapper"; +import { ThemeSynchronizer } from "@saleor/apps-shared/theme-synchronizer"; +import { Box, ThemeProvider } from "@saleor/macaw-ui"; +import { type AppProps } from "next/app"; + +import { GraphQLProvider } from "@/modules/graphql/graphql-provider"; + +/** + * Ensure instance is a singleton. + * TODO: This is React 18 issue, consider hiding this workaround inside app-sdk + */ +export const appBridgeInstance = typeof window !== "undefined" ? new AppBridge() : undefined; + +function NextApp({ Component, pageProps }: AppProps) { + return ( + <NoSSRWrapper> + <ThemeProvider> + <IframeProtectedWrapper + allowedPathNames={["/"]} + fallback={<IframeProtectedFallback appName="Saleor Onboarding App" />} + > + <AppBridgeProvider appBridgeInstance={appBridgeInstance}> + <GraphQLProvider> + <ThemeSynchronizer /> + <RoutePropagator /> + <Box padding={6}> + <Component {...pageProps} /> + </Box> + </GraphQLProvider> + </AppBridgeProvider> + </IframeProtectedWrapper> + </ThemeProvider> + </NoSSRWrapper> + ); +} + +export default NextApp; diff --git a/apps/onboarding/src/pages/_error.tsx b/apps/onboarding/src/pages/_error.tsx new file mode 100644 index 000000000..7cf94bbe5 --- /dev/null +++ b/apps/onboarding/src/pages/_error.tsx @@ -0,0 +1,17 @@ +import * as Sentry from "@sentry/nextjs"; +import type { NextPage } from "next"; +import type { ErrorProps } from "next/error"; +import Error from "next/error"; + +// eslint-disable-next-line react/prop-types +const CustomErrorComponent: NextPage<ErrorProps> = ({ statusCode }) => { + return <Error statusCode={statusCode} />; +}; + +CustomErrorComponent.getInitialProps = async (contextData) => { + await Sentry.captureUnderscoreErrorException(contextData); + + return Error.getInitialProps(contextData); +}; + +export default CustomErrorComponent; diff --git a/apps/onboarding/src/pages/index.tsx b/apps/onboarding/src/pages/index.tsx new file mode 100644 index 000000000..62ef60ce1 --- /dev/null +++ b/apps/onboarding/src/pages/index.tsx @@ -0,0 +1,14 @@ +import { type NextPage } from "next"; + +import { OnboardingProvider } from "@/modules/onboarding/onboarding-context/onboarding-context"; +import { WelcomePageOnboarding } from "@/modules/onboarding/welcome-page-onboarding"; + +const IndexPage: NextPage = () => { + return ( + <OnboardingProvider> + <WelcomePageOnboarding /> + </OnboardingProvider> + ); +}; + +export default IndexPage; diff --git a/apps/onboarding/tsconfig.json b/apps/onboarding/tsconfig.json new file mode 100644 index 000000000..8d60366eb --- /dev/null +++ b/apps/onboarding/tsconfig.json @@ -0,0 +1,28 @@ +{ + "extends": "@saleor/typescript-config-apps/base.json", + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@/*": ["./src/*"], + "@/generated/*": ["generated/*"], + "@/package.json": ["package.json"] + }, + "plugins": [ + { + "name": "next" + } + ], + "strictNullChecks": true, + "erasableSyntaxOnly": true + }, + "include": [ + "**/*.ts", + "**/*.tsx", + "codegen.ts", + "next-env.d.ts", + "next.config.ts", + "reset.d.ts", + ".next/types/**/*.ts" + ], + "exclude": ["node_modules"] +} diff --git a/apps/onboarding/turbo.json b/apps/onboarding/turbo.json new file mode 100644 index 000000000..59f55187c --- /dev/null +++ b/apps/onboarding/turbo.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://turbo.build/schema.v2.json", + "extends": ["//"], + "tasks": { + "deploy": { + "env": [ + "APP_API_BASE_URL", + "APP_IFRAME_BASE_URL", + "APP_LOG_LEVEL", + "APP_NAME", + "MANIFEST_APP_ID", + "NEXT_PUBLIC_SENTRY_DSN", + "SENTRY_AUTH_TOKEN", + "SENTRY_PROJECT" + ] + } + } +} diff --git a/apps/onboarding/vercel.json b/apps/onboarding/vercel.json new file mode 100644 index 000000000..093ca7222 --- /dev/null +++ b/apps/onboarding/vercel.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://openapi.vercel.sh/vercel.json", + "regions": ["dub1", "iad1"] +} diff --git a/apps/onboarding/vitest.config.ts b/apps/onboarding/vitest.config.ts new file mode 100644 index 000000000..af7049a12 --- /dev/null +++ b/apps/onboarding/vitest.config.ts @@ -0,0 +1,25 @@ +import react from "@vitejs/plugin-react"; +import tsconfigPaths from "vite-tsconfig-paths"; +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + plugins: [react(), tsconfigPaths()], + test: { + css: false, + mockReset: true, + restoreMocks: true, + workspace: [ + { + extends: true, + test: { + sequence: { + shuffle: true, + }, + include: ["src/**/*.test.ts", "src/**/*.test.tsx"], + name: "unit", + environment: "jsdom", + }, + }, + ], + }, +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 77c9ff6e0..2de93a64f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1137,6 +1137,124 @@ importers: specifier: 'catalog:' version: 3.1.1(@types/node@24.1.0)(jiti@2.4.2)(jsdom@20.0.3)(msw@2.10.2(@types/node@24.1.0)(typescript@5.8.2))(terser@5.18.0)(tsx@4.19.3)(yaml@2.7.0) + apps/onboarding: + dependencies: + '@saleor/app-sdk': + specifier: link:../../node_modules/@saleor/app-sdk + version: link:../../node_modules/@saleor/app-sdk + '@saleor/apps-shared': + specifier: workspace:* + version: link:../../packages/shared + '@saleor/macaw-ui': + specifier: 'catalog:' + version: 1.3.1(@types/react-dom@18.2.5)(@types/react@18.2.5)(@vanilla-extract/css@1.14.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@sentry/nextjs': + specifier: 'catalog:' + version: 9.8.0(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(next@15.2.8(@babel/core@7.28.6)(@opentelemetry/api@1.9.0)(@playwright/test@1.52.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0)(webpack@5.82.1) + '@t3-oss/env-nextjs': + specifier: 'catalog:' + version: 0.11.1(typescript@5.8.2)(zod@3.21.4) + next: + specifier: 'catalog:' + version: 15.2.8(@babel/core@7.28.6)(@opentelemetry/api@1.9.0)(@playwright/test@1.52.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + react: + specifier: 'catalog:' + version: 18.2.0 + react-dom: + specifier: 'catalog:' + version: 18.2.0(react@18.2.0) + urql: + specifier: 'catalog:' + version: 4.0.4(graphql@16.7.1)(react@18.2.0) + usehooks-ts: + specifier: 'catalog:' + version: 2.9.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + zod: + specifier: 'catalog:' + version: 3.21.4 + zod-validation-error: + specifier: 'catalog:' + version: 3.4.0(zod@3.21.4) + devDependencies: + '@graphql-codegen/cli': + specifier: 'catalog:' + version: 5.0.2(@types/node@24.1.0)(enquirer@2.4.1)(graphql@16.7.1)(typescript@5.8.2) + '@graphql-codegen/introspection': + specifier: 'catalog:' + version: 4.0.3(graphql@16.7.1) + '@graphql-codegen/typed-document-node': + specifier: 'catalog:' + version: 5.0.5(graphql@16.7.1) + '@graphql-codegen/typescript-operations': + specifier: 'catalog:' + version: 4.1.3(graphql@16.7.1) + '@graphql-codegen/typescript-urql': + specifier: 'catalog:' + version: 4.0.0(graphql-tag@2.12.6(graphql@16.7.1))(graphql@16.7.1) + '@graphql-typed-document-node/core': + specifier: 'catalog:' + version: 3.2.0(graphql@16.7.1) + '@saleor/eslint-config-apps': + specifier: workspace:* + version: link:../../packages/eslint-config + '@saleor/typescript-config-apps': + specifier: workspace:* + version: link:../../packages/typescript-config + '@testing-library/dom': + specifier: 10.4.0 + version: 10.4.0 + '@testing-library/react': + specifier: 16.2.0 + version: 16.2.0(@testing-library/dom@10.4.0)(@types/react-dom@18.2.5)(@types/react@18.2.5)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@total-typescript/ts-reset': + specifier: 0.6.1 + version: 0.6.1 + '@types/node': + specifier: 'catalog:' + version: 24.1.0 + '@types/react': + specifier: 18.2.5 + version: 18.2.5 + '@types/react-dom': + specifier: 18.2.5 + version: 18.2.5 + '@vitejs/plugin-react': + specifier: 'catalog:' + version: 4.7.0(vite@6.2.4(@types/node@24.1.0)(jiti@2.4.2)(terser@5.18.0)(tsx@4.19.3)(yaml@2.7.0)) + '@vitest/coverage-v8': + specifier: 'catalog:' + version: 3.1.1(vitest@3.1.1(@types/node@24.1.0)(jiti@2.4.2)(jsdom@20.0.3)(msw@2.10.2(@types/node@24.1.0)(typescript@5.8.2))(terser@5.18.0)(tsx@4.19.3)(yaml@2.7.0)) + eslint: + specifier: 'catalog:' + version: 9.23.0(jiti@2.4.2) + eslint-plugin-n: + specifier: 'catalog:' + version: 17.16.2(eslint@9.23.0(jiti@2.4.2)) + graphql: + specifier: 'catalog:' + version: 16.7.1 + graphql-config: + specifier: 5.0.3 + version: 5.0.3(@types/node@24.1.0)(graphql@16.7.1)(typescript@5.8.2) + graphql-tag: + specifier: 'catalog:' + version: 2.12.6(graphql@16.7.1) + tsx: + specifier: 'catalog:' + version: 4.19.3 + typescript: + specifier: 'catalog:' + version: 5.8.2 + vite: + specifier: 'catalog:' + version: 6.2.4(@types/node@24.1.0)(jiti@2.4.2)(terser@5.18.0)(tsx@4.19.3)(yaml@2.7.0) + vite-tsconfig-paths: + specifier: 'catalog:' + version: 5.1.4(typescript@5.8.2)(vite@6.2.4(@types/node@24.1.0)(jiti@2.4.2)(terser@5.18.0)(tsx@4.19.3)(yaml@2.7.0)) + vitest: + specifier: 'catalog:' + version: 3.1.1(@types/node@24.1.0)(jiti@2.4.2)(jsdom@20.0.3)(msw@2.10.2(@types/node@24.1.0)(typescript@5.8.2))(terser@5.18.0)(tsx@4.19.3)(yaml@2.7.0) + apps/products-feed: dependencies: '@aws-sdk/client-dynamodb': @@ -4419,22 +4537,12 @@ packages: cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.5.1': - resolution: {integrity: sha512-soEIOALTfTK6EjmKMMoLugwaP0rzkad90iIWd1hMO9ARkSAyjfMfkRRhLvD5qH7vvM0Cg72pieUfR6yh6XxC4w==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/eslint-utils@4.9.1': resolution: {integrity: sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.12.1': - resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint-community/regexpp@4.12.2': resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} @@ -6579,9 +6687,6 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@22.13.10': - resolution: {integrity: sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==} - '@types/node@24.1.0': resolution: {integrity: sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==} @@ -11607,9 +11712,6 @@ packages: resolution: {integrity: sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==} engines: {node: '>=0.10.0'} - undici-types@6.20.0: - resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} - undici-types@7.8.0: resolution: {integrity: sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==} @@ -11729,6 +11831,7 @@ packages: uuid@9.0.1: resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} + deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028). hasBin: true v8-compile-cache-lib@3.0.1: @@ -12179,10 +12282,10 @@ snapshots: '@ardatan/relay-compiler@12.0.0(graphql@16.7.1)': dependencies: '@babel/core': 7.28.6 - '@babel/generator': 7.27.0 + '@babel/generator': 7.28.6 '@babel/parser': 7.28.6 '@babel/runtime': 7.25.6 - '@babel/traverse': 7.27.0 + '@babel/traverse': 7.28.6 '@babel/types': 7.28.6 babel-preset-fbjs: 3.4.0(@babel/core@7.28.6) chalk: 4.1.2 @@ -13396,7 +13499,7 @@ snapshots: '@babel/helper-function-name@7.23.0': dependencies: - '@babel/template': 7.27.0 + '@babel/template': 7.28.6 '@babel/types': 7.28.6 '@babel/helper-globals@7.28.0': {} @@ -13432,15 +13535,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.26.0(@babel/core@7.28.6)': - dependencies: - '@babel/core': 7.28.6 - '@babel/helper-module-imports': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 - '@babel/traverse': 7.27.0 - transitivePeerDependencies: - - supports-color - '@babel/helper-module-transforms@7.28.6(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 @@ -13470,8 +13564,8 @@ snapshots: '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-member-expression-to-functions': 7.22.5 '@babel/helper-optimise-call-expression': 7.22.5 - '@babel/template': 7.27.0 - '@babel/traverse': 7.27.0 + '@babel/template': 7.28.6 + '@babel/traverse': 7.28.6 '@babel/types': 7.28.6 transitivePeerDependencies: - supports-color @@ -13522,72 +13616,72 @@ snapshots: dependencies: '@babel/core': 7.28.6 '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.28.6) - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 transitivePeerDependencies: - supports-color '@babel/plugin-proposal-object-rest-spread@7.20.7(@babel/core@7.28.6)': dependencies: - '@babel/compat-data': 7.26.8 + '@babel/compat-data': 7.28.6 '@babel/core': 7.28.6 - '@babel/helper-compilation-targets': 7.27.0 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-compilation-targets': 7.28.6 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.28.6) '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.28.6) '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-flow@7.23.3(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 - '@babel/plugin-syntax-import-assertions@7.23.3(@babel/core@7.26.10)': + '@babel/plugin-syntax-import-assertions@7.23.3(@babel/core@7.28.6)': dependencies: - '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/core': 7.28.6 + '@babel/helper-plugin-utils': 7.28.6 - '@babel/plugin-syntax-import-assertions@7.26.0(@babel/core@7.26.10)': + '@babel/plugin-syntax-import-assertions@7.26.0(@babel/core@7.28.6)': dependencies: - '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/core': 7.28.6 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-jsx@7.23.3(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-transform-arrow-functions@7.23.3(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-transform-block-scoped-functions@7.23.3(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-transform-block-scoping@7.23.4(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-transform-classes@7.23.8(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-compilation-targets': 7.27.0 + '@babel/helper-compilation-targets': 7.28.6 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-function-name': 7.23.0 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 '@babel/helper-replace-supers': 7.22.20(@babel/core@7.28.6) '@babel/helper-split-export-declaration': 7.22.6 globals: 11.12.0 @@ -13595,48 +13689,48 @@ snapshots: '@babel/plugin-transform-computed-properties@7.23.3(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-plugin-utils': 7.26.5 - '@babel/template': 7.27.0 + '@babel/helper-plugin-utils': 7.28.6 + '@babel/template': 7.28.6 '@babel/plugin-transform-destructuring@7.23.3(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-transform-flow-strip-types@7.23.3(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-flow': 7.23.3(@babel/core@7.28.6) '@babel/plugin-transform-for-of@7.23.6(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/plugin-transform-function-name@7.23.3(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-compilation-targets': 7.27.0 + '@babel/helper-compilation-targets': 7.28.6 '@babel/helper-function-name': 7.23.0 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-transform-literals@7.23.3(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-transform-member-expression-literals@7.23.3(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-transform-modules-commonjs@7.23.3(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-module-transforms': 7.26.0(@babel/core@7.28.6) - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-module-transforms': 7.28.6(@babel/core@7.28.6) + '@babel/helper-plugin-utils': 7.28.6 '@babel/helper-simple-access': 7.22.5 transitivePeerDependencies: - supports-color @@ -13644,28 +13738,28 @@ snapshots: '@babel/plugin-transform-object-super@7.23.3(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 '@babel/helper-replace-supers': 7.22.20(@babel/core@7.28.6) '@babel/plugin-transform-parameters@7.22.5(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-transform-parameters@7.23.3(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-transform-property-literals@7.23.3(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-transform-react-display-name@7.23.3(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-transform-react-jsx-self@7.25.9(@babel/core@7.26.10)': dependencies: @@ -13691,8 +13785,8 @@ snapshots: dependencies: '@babel/core': 7.28.6 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-module-imports': 7.25.9 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-module-imports': 7.28.6 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-jsx': 7.23.3(@babel/core@7.28.6) '@babel/types': 7.28.6 transitivePeerDependencies: @@ -13701,18 +13795,18 @@ snapshots: '@babel/plugin-transform-shorthand-properties@7.23.3(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-transform-spread@7.23.3(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/plugin-transform-template-literals@7.23.3(@babel/core@7.28.6)': dependencies: '@babel/core': 7.28.6 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.28.6 '@babel/runtime@7.23.9': dependencies: @@ -14290,18 +14384,11 @@ snapshots: '@esbuild/win32-x64@0.25.2': optional: true - '@eslint-community/eslint-utils@4.5.1(eslint@9.23.0(jiti@2.4.2))': - dependencies: - eslint: 9.23.0(jiti@2.4.2) - eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.9.1(eslint@9.23.0(jiti@2.4.2))': dependencies: eslint: 9.23.0(jiti@2.4.2) eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.12.1': {} - '@eslint-community/regexpp@4.12.2': {} '@eslint-react/ast@1.40.4(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2)': @@ -14464,9 +14551,9 @@ snapshots: '@graphql-codegen/cli@5.0.2(@types/node@24.1.0)(enquirer@2.4.1)(graphql@16.7.1)(typescript@5.8.2)': dependencies: - '@babel/generator': 7.27.0 - '@babel/template': 7.27.0 - '@babel/types': 7.27.0 + '@babel/generator': 7.28.6 + '@babel/template': 7.28.6 + '@babel/types': 7.28.6 '@graphql-codegen/client-preset': 4.2.3(graphql@16.7.1) '@graphql-codegen/core': 4.0.2(graphql@16.7.1) '@graphql-codegen/plugin-helpers': 5.0.3(graphql@16.7.1) @@ -14512,8 +14599,8 @@ snapshots: '@graphql-codegen/client-preset@4.2.3(graphql@16.7.1)': dependencies: - '@babel/helper-plugin-utils': 7.26.5 - '@babel/template': 7.27.0 + '@babel/helper-plugin-utils': 7.28.6 + '@babel/template': 7.28.6 '@graphql-codegen/add': 5.0.2(graphql@16.7.1) '@graphql-codegen/gql-tag-operations': 4.0.5(graphql@16.7.1) '@graphql-codegen/plugin-helpers': 5.0.3(graphql@16.7.1) @@ -14751,10 +14838,10 @@ snapshots: '@graphql-tools/code-file-loader@8.1.1(graphql@16.11.0)': dependencies: '@graphql-tools/graphql-tag-pluck': 8.3.0(graphql@16.11.0) - '@graphql-tools/utils': 10.0.13(graphql@16.11.0) + '@graphql-tools/utils': 10.8.6(graphql@16.11.0) globby: 11.1.0 graphql: 16.11.0 - tslib: 2.6.2 + tslib: 2.8.1 unixify: 1.0.0 transitivePeerDependencies: - supports-color @@ -14762,10 +14849,10 @@ snapshots: '@graphql-tools/code-file-loader@8.1.1(graphql@16.7.1)': dependencies: '@graphql-tools/graphql-tag-pluck': 8.3.0(graphql@16.7.1) - '@graphql-tools/utils': 10.0.13(graphql@16.7.1) + '@graphql-tools/utils': 10.8.6(graphql@16.7.1) globby: 11.1.0 graphql: 16.7.1 - tslib: 2.6.2 + tslib: 2.8.1 unixify: 1.0.0 transitivePeerDependencies: - supports-color @@ -14920,7 +15007,7 @@ snapshots: '@graphql-tools/graphql-file-loader@8.0.0(graphql@16.11.0)': dependencies: '@graphql-tools/import': 7.0.0(graphql@16.11.0) - '@graphql-tools/utils': 10.0.13(graphql@16.11.0) + '@graphql-tools/utils': 10.8.6(graphql@16.11.0) globby: 11.1.0 graphql: 16.11.0 tslib: 2.8.1 @@ -14929,7 +15016,7 @@ snapshots: '@graphql-tools/graphql-file-loader@8.0.0(graphql@16.7.1)': dependencies: '@graphql-tools/import': 7.0.0(graphql@16.7.1) - '@graphql-tools/utils': 10.0.13(graphql@16.7.1) + '@graphql-tools/utils': 10.8.6(graphql@16.7.1) globby: 11.1.0 graphql: 16.7.1 tslib: 2.8.1 @@ -14937,11 +15024,11 @@ snapshots: '@graphql-tools/graphql-tag-pluck@8.3.0(graphql@16.11.0)': dependencies: - '@babel/core': 7.26.10 - '@babel/parser': 7.27.0 - '@babel/plugin-syntax-import-assertions': 7.23.3(@babel/core@7.26.10) - '@babel/traverse': 7.27.0 - '@babel/types': 7.27.0 + '@babel/core': 7.28.6 + '@babel/parser': 7.28.6 + '@babel/plugin-syntax-import-assertions': 7.23.3(@babel/core@7.28.6) + '@babel/traverse': 7.28.6 + '@babel/types': 7.28.6 '@graphql-tools/utils': 10.8.6(graphql@16.11.0) graphql: 16.11.0 tslib: 2.8.1 @@ -14950,11 +15037,11 @@ snapshots: '@graphql-tools/graphql-tag-pluck@8.3.0(graphql@16.7.1)': dependencies: - '@babel/core': 7.26.10 - '@babel/parser': 7.27.0 - '@babel/plugin-syntax-import-assertions': 7.23.3(@babel/core@7.26.10) - '@babel/traverse': 7.27.0 - '@babel/types': 7.27.0 + '@babel/core': 7.28.6 + '@babel/parser': 7.28.6 + '@babel/plugin-syntax-import-assertions': 7.23.3(@babel/core@7.28.6) + '@babel/traverse': 7.28.6 + '@babel/types': 7.28.6 '@graphql-tools/utils': 10.8.6(graphql@16.7.1) graphql: 16.7.1 tslib: 2.8.1 @@ -14963,11 +15050,11 @@ snapshots: '@graphql-tools/graphql-tag-pluck@8.3.19(graphql@16.11.0)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.28.6 '@babel/parser': 7.27.0 - '@babel/plugin-syntax-import-assertions': 7.26.0(@babel/core@7.26.10) + '@babel/plugin-syntax-import-assertions': 7.26.0(@babel/core@7.28.6) '@babel/traverse': 7.27.0 - '@babel/types': 7.27.0 + '@babel/types': 7.28.6 '@graphql-tools/utils': 10.8.6(graphql@16.11.0) graphql: 16.11.0 tslib: 2.8.1 @@ -14976,11 +15063,11 @@ snapshots: '@graphql-tools/graphql-tag-pluck@8.3.19(graphql@16.7.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.28.6 '@babel/parser': 7.27.0 - '@babel/plugin-syntax-import-assertions': 7.26.0(@babel/core@7.26.10) + '@babel/plugin-syntax-import-assertions': 7.26.0(@babel/core@7.28.6) '@babel/traverse': 7.27.0 - '@babel/types': 7.27.0 + '@babel/types': 7.28.6 '@graphql-tools/utils': 10.8.6(graphql@16.7.1) graphql: 16.7.1 tslib: 2.8.1 @@ -15003,7 +15090,7 @@ snapshots: '@graphql-tools/json-file-loader@8.0.0(graphql@16.11.0)': dependencies: - '@graphql-tools/utils': 10.0.13(graphql@16.11.0) + '@graphql-tools/utils': 10.8.6(graphql@16.11.0) globby: 11.1.0 graphql: 16.11.0 tslib: 2.8.1 @@ -15011,7 +15098,7 @@ snapshots: '@graphql-tools/json-file-loader@8.0.0(graphql@16.7.1)': dependencies: - '@graphql-tools/utils': 10.0.13(graphql@16.7.1) + '@graphql-tools/utils': 10.8.6(graphql@16.7.1) globby: 11.1.0 graphql: 16.7.1 tslib: 2.8.1 @@ -15070,7 +15157,7 @@ snapshots: http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.4 jose: 5.10.0 - js-yaml: 4.1.0 + js-yaml: 4.1.1 json-stable-stringify: 1.1.1 lodash: 4.17.21 scuid: 1.1.0 @@ -15383,8 +15470,8 @@ snapshots: '@jridgewell/remapping@2.3.5': dependencies: - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 '@jridgewell/resolve-uri@3.1.2': {} @@ -17098,7 +17185,7 @@ snapshots: '@testing-library/dom@10.4.0': dependencies: - '@babel/code-frame': 7.26.2 + '@babel/code-frame': 7.28.6 '@babel/runtime': 7.25.6 '@types/aria-query': 5.0.1 aria-query: 5.3.0 @@ -17197,7 +17284,7 @@ snapshots: '@types/connect@3.4.38': dependencies: - '@types/node': 22.13.10 + '@types/node': 24.1.0 '@types/cookie@0.6.0': {} @@ -17243,26 +17330,22 @@ snapshots: '@types/mysql@2.15.26': dependencies: - '@types/node': 22.13.10 + '@types/node': 24.1.0 '@types/node-fetch@2.6.4': dependencies: - '@types/node': 22.13.10 + '@types/node': 24.1.0 form-data: 3.0.4 '@types/node@12.20.55': {} - '@types/node@22.13.10': - dependencies: - undici-types: 6.20.0 - '@types/node@24.1.0': dependencies: undici-types: 7.8.0 '@types/nodemailer@6.4.7': dependencies: - '@types/node': 22.13.10 + '@types/node': 24.1.0 '@types/pg-pool@2.0.6': dependencies: @@ -17270,7 +17353,7 @@ snapshots: '@types/pg@8.6.1': dependencies: - '@types/node': 22.13.10 + '@types/node': 24.1.0 pg-protocol: 1.8.0 pg-types: 2.2.0 @@ -17304,13 +17387,13 @@ snapshots: '@types/tedious@4.0.14': dependencies: - '@types/node': 22.13.10 + '@types/node': 24.1.0 '@types/tough-cookie@4.0.5': {} '@types/ws@8.5.10': dependencies: - '@types/node': 22.13.10 + '@types/node': 24.1.0 '@typescript-eslint/eslint-plugin@8.53.1(@typescript-eslint/parser@8.53.1(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2))(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2)': dependencies: @@ -18698,7 +18781,7 @@ snapshots: cosmiconfig@8.3.6(typescript@5.8.2): dependencies: import-fresh: 3.3.1 - js-yaml: 4.1.0 + js-yaml: 4.1.1 parse-json: 5.2.0 path-type: 4.0.0 optionalDependencies: @@ -19326,8 +19409,8 @@ snapshots: eslint-plugin-es-x@7.8.0(eslint@9.23.0(jiti@2.4.2)): dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.23.0(jiti@2.4.2)) - '@eslint-community/regexpp': 4.12.1 + '@eslint-community/eslint-utils': 4.9.1(eslint@9.23.0(jiti@2.4.2)) + '@eslint-community/regexpp': 4.12.2 eslint: 9.23.0(jiti@2.4.2) eslint-compat-utils: 0.5.1(eslint@9.23.0(jiti@2.4.2)) @@ -19362,7 +19445,7 @@ snapshots: eslint-plugin-n@17.16.2(eslint@9.23.0(jiti@2.4.2)): dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.23.0(jiti@2.4.2)) + '@eslint-community/eslint-utils': 4.9.1(eslint@9.23.0(jiti@2.4.2)) enhanced-resolve: 5.18.1 eslint: 9.23.0(jiti@2.4.2) eslint-plugin-es-x: 7.8.0(eslint@9.23.0(jiti@2.4.2)) @@ -19370,7 +19453,7 @@ snapshots: globals: 15.15.0 ignore: 5.3.2 minimatch: 9.0.5 - semver: 7.7.1 + semver: 7.7.4 eslint-plugin-neverthrow-must-use@0.1.2(@typescript-eslint/parser@8.53.1(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2))(eslint@9.23.0(jiti@2.4.2)): dependencies: @@ -19468,7 +19551,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.6 - debug: 4.4.3 + debug: 4.3.4 escape-string-regexp: 4.0.0 eslint-scope: 8.3.0 eslint-visitor-keys: 4.2.1 @@ -21922,7 +22005,7 @@ snapshots: parse-json@5.2.0: dependencies: - '@babel/code-frame': 7.26.2 + '@babel/code-frame': 7.28.6 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -23264,8 +23347,6 @@ snapshots: unc-path-regex@0.1.2: {} - undici-types@6.20.0: {} - undici-types@7.8.0: {} undici@5.22.1: @@ -23415,7 +23496,7 @@ snapshots: vite-tsconfig-paths@5.1.4(typescript@5.8.2)(vite@6.2.4(@types/node@24.1.0)(jiti@2.4.2)(terser@5.18.0)(tsx@4.19.3)(yaml@2.7.0)): dependencies: - debug: 4.4.0 + debug: 4.3.4 globrex: 0.1.2 tsconfck: 3.1.5(typescript@5.8.2) optionalDependencies: