diff --git a/components/common/UserNav/UserNav.tsx b/components/common/UserNav/UserNav.tsx index 2204345ce..83422a8cf 100644 --- a/components/common/UserNav/UserNav.tsx +++ b/components/common/UserNav/UserNav.tsx @@ -18,8 +18,7 @@ const countItem = (count: number, item: LineItem) => count + item.quantity const UserNav: FC = ({ className }) => { const { data } = useCart() - let customer; - // const { data: customer } = useCustomer() + const { data: customer } = useCustomer() const { toggleSidebar, closeSidebarIfPresent, openModal } = useUI() const itemsCount = data?.lineItems.reduce(countItem, 0) ?? 0 diff --git a/framework/saleor/customer/use-customer.tsx b/framework/saleor/customer/use-customer.tsx index dd77d36ac..43178ecd0 100644 --- a/framework/saleor/customer/use-customer.tsx +++ b/framework/saleor/customer/use-customer.tsx @@ -1,7 +1,7 @@ import useCustomer, { UseCustomer } from '@commerce/customer/use-customer' import { Customer } from '@commerce/types' import { SWRHook } from '@commerce/utils/types' -import { getCustomerQuery, getCSRFToken } from '../utils' +import { getCustomerQuery } from '../utils' export default useCustomer as UseCustomer @@ -12,9 +12,9 @@ export const handler: SWRHook = { async fetcher({ options, fetch }) { const data = await fetch({ ...options, - variables: { customerAccessToken: getCSRFToken() }, + variables: {}, }) - return data.customer ?? null + return data.me ?? null }, useHook: ({ useData }) => (input) => { return useData({ diff --git a/framework/saleor/schema.d.ts b/framework/saleor/schema.d.ts index 13f675509..07fdccf6b 100644 --- a/framework/saleor/schema.d.ts +++ b/framework/saleor/schema.d.ts @@ -13,12 +13,24 @@ export type Scalars = { Boolean: boolean Int: number Float: number + /** + * The `Date` scalar type represents a Date + * value as specified by + * [iso8601](https://en.wikipedia.org/wiki/ISO_8601). + */ + Date: any /** * The `DateTime` scalar type represents a DateTime * value as specified by * [iso8601](https://en.wikipedia.org/wiki/ISO_8601). */ DateTime: any + /** + * The `GenericScalar` scalar type represents a generic + * GraphQL scalar value that could be: + * String, Boolean, Int, Float, List or Object. + */ + GenericScalar: any /** * Allows use of a JSON String for input / output from the GraphQL schema. * @@ -26,706 +38,297 @@ export type Scalars = { * schema (one of the key benefits of GraphQL). */ JSONString: any - UUID: any - /** - * The `Date` scalar type represents a Date - * value as specified by - * [iso8601](https://en.wikipedia.org/wiki/ISO_8601). - */ - Date: any /** * Positive Decimal scalar implementation. * * Should be used in places where value must be positive. */ PositiveDecimal: any - /** Anything */ - _Any: any - WeightScalar: any + UUID: any /** 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: any - /** - * The `GenericScalar` scalar type represents a generic - * GraphQL scalar value that could be: - * String, Boolean, Int, Float, List or Object. - */ - GenericScalar: any + WeightScalar: any + /** Anything */ + _Any: any } -export type Query = { - __typename?: 'Query' - /** Look up a webhook by ID. */ - webhook?: Maybe - /** List of all available webhook events. */ - 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. */ - webhookSamplePayload?: Maybe - /** Look up a warehouse by ID. */ - warehouse?: Maybe - /** List of warehouses. */ - warehouses?: Maybe - /** Returns a list of all translatable items of a given kind. */ - translations?: Maybe - translation?: Maybe - /** Look up a stock by ID */ - stock?: Maybe - /** List of stocks. */ - stocks?: Maybe - /** Return information about the shop. */ - shop: Shop - /** Order related settings from site settings. */ - orderSettings?: Maybe - /** Look up a shipping zone by ID. */ - shippingZone?: Maybe - /** List of the shop's shipping zones. */ - shippingZones?: Maybe - /** Look up digital content by ID. */ - digitalContent?: Maybe - /** List of digital content. */ - digitalContents?: Maybe - /** List of the shop's categories. */ - categories?: Maybe - /** Look up a category by ID or slug. */ - category?: Maybe - /** Look up a collection by ID. */ - collection?: Maybe - /** List of the shop's collections. */ - collections?: Maybe - /** Look up a product by ID. */ - product?: Maybe - /** List of the shop's products. */ - products?: Maybe - /** Look up a product type by ID. */ - productType?: Maybe - /** List of the shop's product types. */ - productTypes?: Maybe - /** Look up a product variant by ID or SKU. */ - productVariant?: Maybe - /** List of product variants. */ - productVariants?: Maybe - /** List of top selling products. */ - reportProductSales?: Maybe - /** Look up a payment by ID. */ - payment?: Maybe - /** List of payments. */ - payments?: Maybe - /** Look up a page by ID or slug. */ - page?: Maybe - /** List of the shop's pages. */ - pages?: Maybe - /** Look up a page type by ID. */ - pageType?: Maybe - /** List of the page types. */ - pageTypes?: Maybe - /** List of activity events to display on homepage (at the moment it only contains order-events). */ - homepageEvents?: Maybe - /** Look up an order by ID. */ - order?: Maybe - /** List of orders. */ - orders?: Maybe - /** List of draft orders. */ - draftOrders?: Maybe - /** Return the total sales amount from a specific period. */ - ordersTotal?: Maybe - /** Look up an order by token. */ - orderByToken?: Maybe - /** Look up a navigation menu by ID or name. */ - menu?: Maybe - /** List of the storefront's menus. */ - menus?: Maybe - /** Look up a menu item by ID. */ - menuItem?: Maybe - /** List of the storefronts's menu items. */ - menuItems?: Maybe - /** Look up a gift card by ID. */ - giftCard?: Maybe - /** List of gift cards. */ - giftCards?: Maybe - /** Look up a plugin by ID. */ - plugin?: Maybe - /** List of plugins. */ - plugins?: Maybe - /** Look up a sale by ID. */ - sale?: Maybe - /** List of the shop's sales. */ - sales?: Maybe - /** Look up a voucher by ID. */ - voucher?: Maybe - /** List of the shop's vouchers. */ - vouchers?: Maybe - /** Look up a export file by ID. */ - exportFile?: Maybe - /** List of export files. */ - exportFiles?: Maybe - /** List of all tax rates available from tax gateway. */ - taxTypes?: Maybe>> - /** Look up a checkout by token and slug of channel. */ - checkout?: Maybe - /** List of checkouts. */ - checkouts?: Maybe - /** Look up a checkout line by ID. */ - checkoutLine?: Maybe - /** List of checkout lines. */ - checkoutLines?: Maybe - /** Look up a channel by ID. */ - channel?: Maybe - /** List of all channels. */ - channels?: Maybe> - /** List of the shop's attributes. */ - attributes?: Maybe - /** Look up an attribute by ID. */ - attribute?: Maybe - /** List of all apps installations */ - appsInstallations: Array - /** List of the apps. */ - apps?: Maybe - /** Look up an app by ID. If ID is not provided, return the currently authenticated app. */ - app?: Maybe - /** Returns address validation rules. */ - addressValidationRules?: Maybe - /** Look up an address by ID. */ - address?: Maybe
- /** List of the shop's customers. */ - customers?: Maybe - /** List of permission groups. */ - permissionGroups?: Maybe - /** Look up permission group by ID. */ - permissionGroup?: Maybe - /** Return the currently authenticated user. */ - me?: Maybe - /** List of the shop's staff users. */ - staffUsers?: Maybe - /** Look up a user by ID or email address. */ +/** Create a new address for the customer. */ +export type AccountAddressCreate = { + __typename?: 'AccountAddressCreate' + /** A user instance for which the address was created. */ user?: Maybe - _entities?: Maybe>> - _service?: Maybe<_Service> + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array + address?: Maybe
} -export type QueryWebhookArgs = { +/** Delete an address of the logged-in user. */ +export type AccountAddressDelete = { + __typename?: 'AccountAddressDelete' + /** A user instance for which the address was deleted. */ + user?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array + address?: Maybe
+} + +/** Updates an address of the logged-in user. */ +export type AccountAddressUpdate = { + __typename?: 'AccountAddressUpdate' + /** A user object for which the address was edited. */ + user?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array + address?: Maybe
+} + +/** Remove user account. */ +export type AccountDelete = { + __typename?: 'AccountDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array + user?: Maybe +} + +export type AccountError = { + __typename?: 'AccountError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: AccountErrorCode +} + +/** An enumeration. */ +export enum AccountErrorCode { + ActivateOwnAccount = 'ACTIVATE_OWN_ACCOUNT', + ActivateSuperuserAccount = 'ACTIVATE_SUPERUSER_ACCOUNT', + DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', + DeactivateOwnAccount = 'DEACTIVATE_OWN_ACCOUNT', + DeactivateSuperuserAccount = 'DEACTIVATE_SUPERUSER_ACCOUNT', + DeleteNonStaffUser = 'DELETE_NON_STAFF_USER', + DeleteOwnAccount = 'DELETE_OWN_ACCOUNT', + DeleteStaffAccount = 'DELETE_STAFF_ACCOUNT', + DeleteSuperuserAccount = 'DELETE_SUPERUSER_ACCOUNT', + GraphqlError = 'GRAPHQL_ERROR', + Inactive = 'INACTIVE', + Invalid = 'INVALID', + InvalidPassword = 'INVALID_PASSWORD', + LeftNotManageablePermission = 'LEFT_NOT_MANAGEABLE_PERMISSION', + InvalidCredentials = 'INVALID_CREDENTIALS', + NotFound = 'NOT_FOUND', + OutOfScopeUser = 'OUT_OF_SCOPE_USER', + OutOfScopeGroup = 'OUT_OF_SCOPE_GROUP', + OutOfScopePermission = 'OUT_OF_SCOPE_PERMISSION', + PasswordEntirelyNumeric = 'PASSWORD_ENTIRELY_NUMERIC', + PasswordTooCommon = 'PASSWORD_TOO_COMMON', + PasswordTooShort = 'PASSWORD_TOO_SHORT', + PasswordTooSimilar = 'PASSWORD_TOO_SIMILAR', + Required = 'REQUIRED', + Unique = 'UNIQUE', + JwtSignatureExpired = 'JWT_SIGNATURE_EXPIRED', + JwtInvalidToken = 'JWT_INVALID_TOKEN', + JwtDecodeError = 'JWT_DECODE_ERROR', + JwtMissingToken = 'JWT_MISSING_TOKEN', + JwtInvalidCsrfToken = 'JWT_INVALID_CSRF_TOKEN', +} + +export type AccountInput = { + /** Given name. */ + firstName?: Maybe + /** Family name. */ + lastName?: Maybe + /** Billing address of the customer. */ + defaultBillingAddress?: Maybe + /** Shipping address of the customer. */ + defaultShippingAddress?: Maybe + /** User language code. */ + languageCode?: Maybe +} + +/** Register a new user. */ +export type AccountRegister = { + __typename?: 'AccountRegister' + /** Informs whether users need to confirm their email address. */ + requiresConfirmation?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array + user?: Maybe +} + +export type AccountRegisterInput = { + /** The email address of the user. */ + email: Scalars['String'] + /** Password. */ + password: Scalars['String'] + /** Base of frontend URL that will be needed to create confirmation URL. */ + redirectUrl?: Maybe + /** User language code. */ + languageCode?: Maybe + /** User public metadata. */ + metadata?: Maybe> +} + +/** Sends an email with the account removal link for the logged-in user. */ +export type AccountRequestDeletion = { + __typename?: 'AccountRequestDeletion' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array +} + +/** Sets a default address for the authenticated user. */ +export type AccountSetDefaultAddress = { + __typename?: 'AccountSetDefaultAddress' + /** An updated user instance. */ + user?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array +} + +/** Updates the account of the logged-in user. */ +export type AccountUpdate = { + __typename?: 'AccountUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array + user?: Maybe +} + +/** Represents user address data. */ +export type Address = Node & { + __typename?: 'Address' + /** The ID of the object. */ id: Scalars['ID'] + firstName: Scalars['String'] + lastName: Scalars['String'] + companyName: Scalars['String'] + streetAddress1: Scalars['String'] + streetAddress2: Scalars['String'] + city: Scalars['String'] + cityArea: Scalars['String'] + postalCode: Scalars['String'] + /** Shop's default country. */ + country: CountryDisplay + countryArea: Scalars['String'] + phone?: Maybe + /** Address is user's default shipping address. */ + isDefaultShippingAddress?: Maybe + /** Address is user's default billing address. */ + isDefaultBillingAddress?: Maybe } -export type QueryWebhookSamplePayloadArgs = { - eventType: WebhookSampleEventTypeEnum +/** Creates user address. */ +export type AddressCreate = { + __typename?: 'AddressCreate' + /** A user instance for which the address was created. */ + user?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array + address?: Maybe
} -export type QueryWarehouseArgs = { - id: Scalars['ID'] +/** Deletes an address. */ +export type AddressDelete = { + __typename?: 'AddressDelete' + /** A user instance for which the address was deleted. */ + user?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array + address?: Maybe
} -export type QueryWarehousesArgs = { - filter?: Maybe - sortBy?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryTranslationsArgs = { - kind: TranslatableKinds - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryTranslationArgs = { - id: Scalars['ID'] - kind: TranslatableKinds -} - -export type QueryStockArgs = { - id: Scalars['ID'] -} - -export type QueryStocksArgs = { - filter?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryShippingZoneArgs = { - id: Scalars['ID'] - channel?: Maybe -} - -export type QueryShippingZonesArgs = { - filter?: Maybe - channel?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryDigitalContentArgs = { - id: Scalars['ID'] -} - -export type QueryDigitalContentsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryCategoriesArgs = { - filter?: Maybe - sortBy?: Maybe - level?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryCategoryArgs = { - id?: Maybe - slug?: Maybe -} - -export type QueryCollectionArgs = { - id?: Maybe - slug?: Maybe - channel?: Maybe -} - -export type QueryCollectionsArgs = { - filter?: Maybe - sortBy?: Maybe - channel?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryProductArgs = { - id?: Maybe - slug?: Maybe - channel?: Maybe -} - -export type QueryProductsArgs = { - filter?: Maybe - sortBy?: Maybe - stockAvailability?: Maybe - channel?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryProductTypeArgs = { - id: Scalars['ID'] -} - -export type QueryProductTypesArgs = { - filter?: Maybe - sortBy?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryProductVariantArgs = { - id?: Maybe - sku?: Maybe - channel?: Maybe -} - -export type QueryProductVariantsArgs = { - ids?: Maybe>> - channel?: Maybe - filter?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryReportProductSalesArgs = { - period: ReportingPeriod - channel: Scalars['String'] - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryPaymentArgs = { - id: Scalars['ID'] -} - -export type QueryPaymentsArgs = { - filter?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryPageArgs = { - id?: Maybe - slug?: Maybe -} - -export type QueryPagesArgs = { - sortBy?: Maybe - filter?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryPageTypeArgs = { - id: Scalars['ID'] -} - -export type QueryPageTypesArgs = { - sortBy?: Maybe - filter?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryHomepageEventsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryOrderArgs = { - id: Scalars['ID'] -} - -export type QueryOrdersArgs = { - sortBy?: Maybe - filter?: Maybe - created?: Maybe - status?: Maybe - channel?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryDraftOrdersArgs = { - sortBy?: Maybe - filter?: Maybe - created?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryOrdersTotalArgs = { - period?: Maybe - channel?: Maybe -} - -export type QueryOrderByTokenArgs = { - token: Scalars['UUID'] -} - -export type QueryMenuArgs = { - channel?: Maybe - id?: Maybe - name?: Maybe - slug?: Maybe -} - -export type QueryMenusArgs = { - channel?: Maybe - sortBy?: Maybe - filter?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryMenuItemArgs = { - id: Scalars['ID'] - channel?: Maybe -} - -export type QueryMenuItemsArgs = { - channel?: Maybe - sortBy?: Maybe - filter?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryGiftCardArgs = { - id: Scalars['ID'] -} - -export type QueryGiftCardsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryPluginArgs = { - id: Scalars['ID'] -} - -export type QueryPluginsArgs = { - filter?: Maybe - sortBy?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QuerySaleArgs = { - id: Scalars['ID'] - channel?: Maybe -} - -export type QuerySalesArgs = { - filter?: Maybe - sortBy?: Maybe - query?: Maybe - channel?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryVoucherArgs = { - id: Scalars['ID'] - channel?: Maybe -} - -export type QueryVouchersArgs = { - filter?: Maybe - sortBy?: Maybe - query?: Maybe - channel?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryExportFileArgs = { - id: Scalars['ID'] -} - -export type QueryExportFilesArgs = { - filter?: Maybe - sortBy?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryCheckoutArgs = { - token?: Maybe -} - -export type QueryCheckoutsArgs = { - channel?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryCheckoutLineArgs = { - id?: Maybe -} - -export type QueryCheckoutLinesArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryChannelArgs = { - id?: Maybe -} - -export type QueryAttributesArgs = { - filter?: Maybe - sortBy?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryAttributeArgs = { - id?: Maybe - slug?: Maybe -} - -export type QueryAppsArgs = { - filter?: Maybe - sortBy?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryAppArgs = { - id?: Maybe -} - -export type QueryAddressValidationRulesArgs = { - countryCode: CountryCode - countryArea?: Maybe +export type AddressInput = { + /** Given name. */ + firstName?: Maybe + /** Family name. */ + lastName?: Maybe + /** Company or organization. */ + companyName?: Maybe + /** Address. */ + streetAddress1?: Maybe + /** Address. */ + streetAddress2?: Maybe + /** City. */ city?: Maybe + /** District. */ cityArea?: Maybe + /** Postal code. */ + postalCode?: Maybe + /** Country. */ + country?: Maybe + /** State or province. */ + countryArea?: Maybe + /** Phone number. */ + phone?: Maybe } -export type QueryAddressArgs = { - id: Scalars['ID'] +/** Sets a default address for the given user. */ +export type AddressSetDefault = { + __typename?: 'AddressSetDefault' + /** An updated user instance. */ + user?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array } -export type QueryCustomersArgs = { - filter?: Maybe - sortBy?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe +/** An enumeration. */ +export enum AddressTypeEnum { + Billing = 'BILLING', + Shipping = 'SHIPPING', } -export type QueryPermissionGroupsArgs = { - filter?: Maybe - sortBy?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe +/** Updates an address. */ +export type AddressUpdate = { + __typename?: 'AddressUpdate' + /** A user object for which the address was edited. */ + user?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array + address?: Maybe
} -export type QueryPermissionGroupArgs = { - id: Scalars['ID'] +export type AddressValidationData = { + __typename?: 'AddressValidationData' + countryCode?: Maybe + countryName?: Maybe + addressFormat?: Maybe + addressLatinFormat?: Maybe + allowedFields?: Maybe>> + requiredFields?: Maybe>> + upperFields?: Maybe>> + countryAreaType?: Maybe + countryAreaChoices?: Maybe>> + cityType?: Maybe + cityChoices?: Maybe>> + cityAreaType?: Maybe + cityAreaChoices?: Maybe>> + postalCodeType?: Maybe + postalCodeMatchers?: Maybe>> + postalCodeExamples?: Maybe>> + postalCodePrefix?: Maybe } -export type QueryStaffUsersArgs = { - filter?: Maybe - sortBy?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryUserArgs = { - id?: Maybe - email?: Maybe -} - -export type Query_EntitiesArgs = { - representations?: Maybe>> -} - -/** Webhook. */ -export type Webhook = Node & { - __typename?: 'Webhook' - name: Scalars['String'] - targetUrl: Scalars['String'] - isActive: Scalars['Boolean'] - secretKey?: Maybe +/** Represents allocation. */ +export type Allocation = Node & { + __typename?: 'Allocation' /** The ID of the object. */ id: Scalars['ID'] - /** List of webhook events. */ - events: Array - app: App -} - -/** An object with an ID */ -export type Node = { - /** The ID of the object. */ - id: Scalars['ID'] -} - -/** Webhook event. */ -export type WebhookEvent = { - __typename?: 'WebhookEvent' - /** Internal name of the event type. */ - eventType: WebhookEventTypeEnum - /** Display name of the event. */ - name: Scalars['String'] -} - -/** Enum determining type of webhook. */ -export enum WebhookEventTypeEnum { - /** All the events. */ - AnyEvents = 'ANY_EVENTS', - /** A new order is placed. */ - OrderCreated = 'ORDER_CREATED', - /** 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. */ - OrderConfirmed = 'ORDER_CONFIRMED', - /** Payment is made and an order is fully paid. */ - OrderFullyPaid = 'ORDER_FULLY_PAID', - /** An order is updated; triggered for all changes related to an order; covers all other order webhooks, except for ORDER_CREATED. */ - OrderUpdated = 'ORDER_UPDATED', - /** An order is cancelled. */ - OrderCancelled = 'ORDER_CANCELLED', - /** An order is fulfilled. */ - OrderFulfilled = 'ORDER_FULFILLED', - /** An invoice for order requested. */ - InvoiceRequested = 'INVOICE_REQUESTED', - /** An invoice is deleted. */ - InvoiceDeleted = 'INVOICE_DELETED', - /** Invoice has been sent. */ - InvoiceSent = 'INVOICE_SENT', - /** A new customer account is created. */ - CustomerCreated = 'CUSTOMER_CREATED', - /** A customer account is updated. */ - CustomerUpdated = 'CUSTOMER_UPDATED', - /** A new product is created. */ - ProductCreated = 'PRODUCT_CREATED', - /** A product is updated. */ - ProductUpdated = 'PRODUCT_UPDATED', - /** A product is deleted. */ - ProductDeleted = 'PRODUCT_DELETED', - /** A new product variant is created. */ - ProductVariantCreated = 'PRODUCT_VARIANT_CREATED', - /** A product variant is updated. */ - ProductVariantUpdated = 'PRODUCT_VARIANT_UPDATED', - /** A product variant is deleted. */ - ProductVariantDeleted = 'PRODUCT_VARIANT_DELETED', - /** A new checkout is created. */ - CheckoutCreated = 'CHECKOUT_CREATED', - /** A checkout is updated. It also triggers all updates related to the checkout. */ - CheckoutUpdated = 'CHECKOUT_UPDATED', - /** A new fulfillment is created. */ - FulfillmentCreated = 'FULFILLMENT_CREATED', - /** User notification triggered. */ - NotifyUser = 'NOTIFY_USER', - /** A new page is created. */ - PageCreated = 'PAGE_CREATED', - /** A page is updated. */ - PageUpdated = 'PAGE_UPDATED', - /** A page is deleted. */ - PageDeleted = 'PAGE_DELETED', + /** Quantity allocated for orders. */ + quantity: Scalars['Int'] + /** The warehouse were items were allocated. */ + warehouse: Warehouse } /** Represents app data. */ @@ -772,49 +375,180 @@ export type App = Node & accessToken?: Maybe } -export type ObjectWithMetadata = { - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> +/** Activate the app. */ +export type AppActivate = { + __typename?: 'AppActivate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + appErrors: Array + errors: Array + app?: Maybe } -export type MetadataItem = { - __typename?: 'MetadataItem' - /** Key of a metadata item. */ - key: Scalars['String'] - /** Value of a metadata item. */ - value: Scalars['String'] +export type AppCountableConnection = { + __typename?: 'AppCountableConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe } -/** Represents a permission object in a friendly form. */ -export type Permission = { - __typename?: 'Permission' - /** Internal code for permission. */ - code: PermissionEnum - /** Describe action(s) allowed to do by permission. */ - name: Scalars['String'] +export type AppCountableEdge = { + __typename?: 'AppCountableEdge' + /** The item at the end of the edge. */ + node: App + /** A cursor for use in pagination. */ + cursor: Scalars['String'] +} + +/** Creates a new app. */ +export type AppCreate = { + __typename?: 'AppCreate' + /** The newly created authentication token. */ + authToken?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + appErrors: Array + errors: Array + app?: Maybe +} + +/** Deactivate the app. */ +export type AppDeactivate = { + __typename?: 'AppDeactivate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + appErrors: Array + errors: Array + app?: Maybe +} + +/** Deletes an app. */ +export type AppDelete = { + __typename?: 'AppDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + appErrors: Array + errors: Array + app?: Maybe +} + +/** Delete failed installation. */ +export type AppDeleteFailedInstallation = { + __typename?: 'AppDeleteFailedInstallation' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + appErrors: Array + errors: Array + appInstallation?: Maybe +} + +export type AppError = { + __typename?: 'AppError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: AppErrorCode + /** List of permissions which causes the error. */ + permissions?: Maybe> } /** An enumeration. */ -export enum PermissionEnum { - ManageUsers = 'MANAGE_USERS', - ManageStaff = 'MANAGE_STAFF', - ManageApps = 'MANAGE_APPS', - ManageChannels = 'MANAGE_CHANNELS', - ManageDiscounts = 'MANAGE_DISCOUNTS', - ManagePlugins = 'MANAGE_PLUGINS', - ManageGiftCard = 'MANAGE_GIFT_CARD', - ManageMenus = 'MANAGE_MENUS', - ManageOrders = 'MANAGE_ORDERS', - ManagePages = 'MANAGE_PAGES', - ManagePageTypesAndAttributes = 'MANAGE_PAGE_TYPES_AND_ATTRIBUTES', - ManageProducts = 'MANAGE_PRODUCTS', - ManageProductTypesAndAttributes = 'MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES', - ManageShipping = 'MANAGE_SHIPPING', - ManageSettings = 'MANAGE_SETTINGS', - ManageTranslations = 'MANAGE_TRANSLATIONS', - ManageCheckouts = 'MANAGE_CHECKOUTS', +export enum AppErrorCode { + Forbidden = 'FORBIDDEN', + GraphqlError = 'GRAPHQL_ERROR', + Invalid = 'INVALID', + InvalidStatus = 'INVALID_STATUS', + InvalidPermission = 'INVALID_PERMISSION', + InvalidUrlFormat = 'INVALID_URL_FORMAT', + InvalidManifestFormat = 'INVALID_MANIFEST_FORMAT', + ManifestUrlCantConnect = 'MANIFEST_URL_CANT_CONNECT', + NotFound = 'NOT_FOUND', + Required = 'REQUIRED', + Unique = 'UNIQUE', + OutOfScopeApp = 'OUT_OF_SCOPE_APP', + OutOfScopePermission = 'OUT_OF_SCOPE_PERMISSION', +} + +/** Fetch and validate manifest. */ +export type AppFetchManifest = { + __typename?: 'AppFetchManifest' + manifest?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + appErrors: Array + errors: Array +} + +export type AppFilterInput = { + search?: Maybe + isActive?: Maybe + type?: Maybe +} + +export type AppInput = { + /** Name of the app. */ + name?: Maybe + /** List of permission code names to assign to this app. */ + permissions?: Maybe>> +} + +/** Install new app by using app manifest. */ +export type AppInstall = { + __typename?: 'AppInstall' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + appErrors: Array + errors: Array + appInstallation?: Maybe +} + +export type AppInstallInput = { + /** Name of the app to install. */ + appName?: Maybe + /** Url to app's manifest in JSON format. */ + manifestUrl?: Maybe + /** Determine if app will be set active or not. */ + activateAfterInstallation?: Maybe + /** List of permission code names to assign to this app. */ + permissions?: Maybe>> +} + +/** Represents ongoing installation of app. */ +export type AppInstallation = Node & + Job & { + __typename?: 'AppInstallation' + appName: Scalars['String'] + manifestUrl: Scalars['String'] + /** The ID of the object. */ + id: Scalars['ID'] + /** Job status. */ + status: JobStatusEnum + /** Created date time of job in ISO 8601 format. */ + createdAt: Scalars['DateTime'] + /** Date time of job last update in ISO 8601 format. */ + updatedAt: Scalars['DateTime'] + /** Job message. */ + message?: Maybe + } + +/** Retry failed installation of new app. */ +export type AppRetryInstall = { + __typename?: 'AppRetryInstall' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + appErrors: Array + errors: Array + appInstallation?: Maybe +} + +export enum AppSortField { + /** Sort apps by name. */ + Name = 'NAME', + /** Sort apps by creation date. */ + CreationDate = 'CREATION_DATE', +} + +export type AppSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection + /** Sort apps by the selected field. */ + field: AppSortField } /** Represents token data. */ @@ -828,6 +562,43 @@ export type AppToken = Node & { id: Scalars['ID'] } +/** Creates a new token. */ +export type AppTokenCreate = { + __typename?: 'AppTokenCreate' + /** The newly created authentication token. */ + authToken?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + appErrors: Array + errors: Array + appToken?: Maybe +} + +/** Deletes an authentication token assigned to app. */ +export type AppTokenDelete = { + __typename?: 'AppTokenDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + appErrors: Array + errors: Array + appToken?: Maybe +} + +export type AppTokenInput = { + /** Name of the token. */ + name?: Maybe + /** ID of app. */ + app: Scalars['ID'] +} + +/** Verify provided app token. */ +export type AppTokenVerify = { + __typename?: 'AppTokenVerify' + /** Determine if token is valid or not. */ + valid: Scalars['Boolean'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + appErrors: Array + errors: Array +} + /** Enum determining type of your App. */ export enum AppTypeEnum { /** Local Saleor App. The app is fully manageable from dashboard. You can change assigned permissions, add webhooks, or authentication token */ @@ -836,561 +607,23 @@ export enum AppTypeEnum { Thirdparty = 'THIRDPARTY', } -/** An enumeration. */ -export enum WebhookSampleEventTypeEnum { - OrderCreated = 'ORDER_CREATED', - OrderConfirmed = 'ORDER_CONFIRMED', - OrderFullyPaid = 'ORDER_FULLY_PAID', - OrderUpdated = 'ORDER_UPDATED', - OrderCancelled = 'ORDER_CANCELLED', - OrderFulfilled = 'ORDER_FULFILLED', - InvoiceRequested = 'INVOICE_REQUESTED', - InvoiceDeleted = 'INVOICE_DELETED', - InvoiceSent = 'INVOICE_SENT', - CustomerCreated = 'CUSTOMER_CREATED', - CustomerUpdated = 'CUSTOMER_UPDATED', - ProductCreated = 'PRODUCT_CREATED', - ProductUpdated = 'PRODUCT_UPDATED', - ProductDeleted = 'PRODUCT_DELETED', - ProductVariantCreated = 'PRODUCT_VARIANT_CREATED', - ProductVariantUpdated = 'PRODUCT_VARIANT_UPDATED', - ProductVariantDeleted = 'PRODUCT_VARIANT_DELETED', - CheckoutCreated = 'CHECKOUT_CREATED', - CheckoutUpdated = 'CHECKOUT_UPDATED', - FulfillmentCreated = 'FULFILLMENT_CREATED', - NotifyUser = 'NOTIFY_USER', - PageCreated = 'PAGE_CREATED', - PageUpdated = 'PAGE_UPDATED', - PageDeleted = 'PAGE_DELETED', +/** Updates an existing app. */ +export type AppUpdate = { + __typename?: 'AppUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + appErrors: Array + errors: Array + app?: Maybe } -/** Represents warehouse. */ -export type Warehouse = Node & - ObjectWithMetadata & { - __typename?: 'Warehouse' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - slug: Scalars['String'] - companyName: Scalars['String'] - shippingZones: ShippingZoneCountableConnection - address: Address - email: Scalars['String'] - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - } - -/** Represents warehouse. */ -export type WarehouseShippingZonesArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type ShippingZoneCountableConnection = { - __typename?: 'ShippingZoneCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -/** The Relay compliant `PageInfo` type, containing data necessary to paginate this connection. */ -export type PageInfo = { - __typename?: 'PageInfo' - /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean'] - /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean'] - /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe - /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe -} - -export type ShippingZoneCountableEdge = { - __typename?: 'ShippingZoneCountableEdge' - /** The item at the end of the edge. */ - node: ShippingZone - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Represents a shipping zone in the shop. Zones are the concept used only for grouping shipping methods in the dashboard, and are never exposed to the customers directly. */ -export type ShippingZone = Node & - ObjectWithMetadata & { - __typename?: 'ShippingZone' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - default: Scalars['Boolean'] - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** Lowest and highest prices for the shipping. */ - priceRange?: Maybe - /** List of countries available for the method. */ - countries?: Maybe>> - /** List of shipping methods available for orders shipped to countries within this shipping zone. */ - shippingMethods?: Maybe>> - /** List of warehouses for shipping zone. */ - warehouses: Array - /** List of channels for shipping zone. */ - channels: Array - /** Description of a shipping zone. */ - description?: Maybe - } - -/** Represents a range of amounts of money. */ -export type MoneyRange = { - __typename?: 'MoneyRange' - /** Lower bound of a price range. */ - start?: Maybe - /** Upper bound of a price range. */ - stop?: Maybe -} - -/** Represents amount of money in specific currency. */ -export type Money = { - __typename?: 'Money' - /** Currency code. */ - currency: Scalars['String'] - /** Amount of money. */ - amount: Scalars['Float'] - /** - * Money formatted according to the current locale. - * @deprecated Price formatting according to the current locale should be handled by the frontend client. This field will be removed after 2020-07-31. - */ - localized: Scalars['String'] -} - -export type CountryDisplay = { - __typename?: 'CountryDisplay' - /** Country code. */ - code: Scalars['String'] - /** Country name. */ - country: Scalars['String'] - /** Country tax. */ - vat?: Maybe -} - -/** Represents a VAT rate for a country. */ -export type Vat = { - __typename?: 'VAT' - /** Country code. */ - countryCode: Scalars['String'] - /** Standard VAT rate in percent. */ - standardRate?: Maybe - /** Country's VAT rate exceptions for specific types of goods. */ - reducedRates: Array> -} - -/** Represents a reduced VAT rate for a particular type of goods. */ -export type ReducedRate = { - __typename?: 'ReducedRate' - /** Reduced VAT rate in percent. */ - rate: Scalars['Float'] - /** A type of goods. */ - rateType: TaxRateType -} - -/** An enumeration. */ -export enum TaxRateType { - Accommodation = 'ACCOMMODATION', - AdmissionToCulturalEvents = 'ADMISSION_TO_CULTURAL_EVENTS', - AdmissionToEntertainmentEvents = 'ADMISSION_TO_ENTERTAINMENT_EVENTS', - AdmissionToSportingEvents = 'ADMISSION_TO_SPORTING_EVENTS', - Advertising = 'ADVERTISING', - AgriculturalSupplies = 'AGRICULTURAL_SUPPLIES', - BabyFoodstuffs = 'BABY_FOODSTUFFS', - Bikes = 'BIKES', - Books = 'BOOKS', - ChildrensClothing = 'CHILDRENS_CLOTHING', - DomesticFuel = 'DOMESTIC_FUEL', - DomesticServices = 'DOMESTIC_SERVICES', - EBooks = 'E_BOOKS', - Foodstuffs = 'FOODSTUFFS', - Hotels = 'HOTELS', - Medical = 'MEDICAL', - Newspapers = 'NEWSPAPERS', - PassengerTransport = 'PASSENGER_TRANSPORT', - Pharmaceuticals = 'PHARMACEUTICALS', - PropertyRenovations = 'PROPERTY_RENOVATIONS', - Restaurants = 'RESTAURANTS', - SocialHousing = 'SOCIAL_HOUSING', - Standard = 'STANDARD', - Water = 'WATER', - Wine = 'WINE', -} - -/** Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. */ -export type ShippingMethod = Node & - ObjectWithMetadata & { - __typename?: 'ShippingMethod' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - description?: Maybe - minimumOrderWeight?: Maybe - maximumOrderWeight?: Maybe - maximumDeliveryDays?: Maybe - minimumDeliveryDays?: Maybe - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** Type of the shipping method. */ - type?: Maybe - /** Returns translated shipping method fields for the given language code. */ - translation?: Maybe - /** List of channels available for the method. */ - channelListings?: Maybe> - /** The price of the cheapest variant (including discounts). */ - price?: Maybe - /** The price of the cheapest variant (including discounts). */ - maximumOrderPrice?: Maybe - /** The price of the cheapest variant (including discounts). */ - minimumOrderPrice?: Maybe - /** Postal code ranges rule of exclusion or inclusion of the shipping method. */ - postalCodeRules?: Maybe>> - /** List of excluded products for the shipping method. */ - excludedProducts?: 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 ShippingMethodTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. */ -export type ShippingMethodExcludedProductsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Represents weight value in a specific weight unit. */ -export type Weight = { - __typename?: 'Weight' - /** Weight unit. */ - unit: WeightUnitsEnum - /** Weight value. */ - value: Scalars['Float'] -} - -/** An enumeration. */ -export enum WeightUnitsEnum { - Kg = 'KG', - Lb = 'LB', - Oz = 'OZ', - G = 'G', -} - -/** An enumeration. */ -export enum ShippingMethodTypeEnum { - Price = 'PRICE', - Weight = 'WEIGHT', -} - -export type ShippingMethodTranslation = Node & { - __typename?: 'ShippingMethodTranslation' - /** The ID of the object. */ - id: Scalars['ID'] - name?: Maybe - description?: Maybe - /** Translation language. */ - language: LanguageDisplay -} - -export type LanguageDisplay = { - __typename?: 'LanguageDisplay' - /** ISO 639 representation of the language name. */ - code: LanguageCodeEnum - /** Full name of the language. */ - language: Scalars['String'] -} - -/** An enumeration. */ -export enum LanguageCodeEnum { - Ar = 'AR', - Az = 'AZ', - Bg = 'BG', - Bn = 'BN', - Ca = 'CA', - Cs = 'CS', - Da = 'DA', - De = 'DE', - El = 'EL', - En = 'EN', - Es = 'ES', - EsCo = 'ES_CO', - Et = 'ET', - Fa = 'FA', - Fi = 'FI', - Fr = 'FR', - Hi = 'HI', - Hu = 'HU', - Hy = 'HY', - Id = 'ID', - Is = 'IS', - It = 'IT', - Ja = 'JA', - Ka = 'KA', - Km = 'KM', - Ko = 'KO', - Lt = 'LT', - Mn = 'MN', - My = 'MY', - Nb = 'NB', - Nl = 'NL', - Pl = 'PL', - Pt = 'PT', - PtBr = 'PT_BR', - Ro = 'RO', - Ru = 'RU', - Sk = 'SK', - Sl = 'SL', - Sq = 'SQ', - Sr = 'SR', - Sv = 'SV', - Sw = 'SW', - Ta = 'TA', - Th = 'TH', - Tr = 'TR', - Uk = 'UK', - Vi = 'VI', - ZhHans = 'ZH_HANS', - ZhHant = 'ZH_HANT', -} - -/** Represents shipping method channel listing. */ -export type ShippingMethodChannelListing = Node & { - __typename?: 'ShippingMethodChannelListing' - /** The ID of the object. */ - id: Scalars['ID'] - channel: Channel - minimumOrderPrice?: Maybe - maximumOrderPrice?: Maybe - price?: Maybe -} - -/** Represents channel. */ -export type Channel = Node & { - __typename?: 'Channel' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - isActive: Scalars['Boolean'] - slug: Scalars['String'] - currencyCode: Scalars['String'] - /** Whether a channel has associated orders. */ - hasOrders: Scalars['Boolean'] - /** List of channel shipping zones. */ - shippingZones: Array -} - -/** Represents shipping method postal code rule. */ -export type ShippingMethodPostalCodeRule = Node & { - __typename?: 'ShippingMethodPostalCodeRule' - /** Start address range. */ - start?: Maybe - /** End address range. */ - end?: Maybe - /** Inclusion type of the postal code rule. */ - inclusionType?: Maybe - /** The ID of the object. */ - id: Scalars['ID'] -} - -/** An enumeration. */ -export enum PostalCodeRuleInclusionTypeEnum { - Include = 'INCLUDE', - Exclude = 'EXCLUDE', -} - -export type ProductCountableConnection = { - __typename?: 'ProductCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type ProductCountableEdge = { - __typename?: 'ProductCountableEdge' - /** The item at the end of the edge. */ - node: Product - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Represents an individual item for sale in the storefront. */ -export type Product = Node & - ObjectWithMetadata & { - __typename?: 'Product' - /** The ID of the object. */ - id: Scalars['ID'] - seoTitle?: Maybe - seoDescription?: Maybe - name: Scalars['String'] - description?: Maybe - productType: ProductType - slug: Scalars['String'] - category?: Maybe - updatedAt?: Maybe - chargeTaxes: Scalars['Boolean'] - weight?: Maybe - defaultVariant?: Maybe - rating?: Maybe - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** - * Description of the product (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. - */ - descriptionJson?: Maybe - /** - * The storefront URL for the product. - * @deprecated This field will be removed after 2020-07-31. - */ - url: Scalars['String'] - /** The main thumbnail for a product. */ - thumbnail?: Maybe - /** Lists the storefront product's pricing, the current price and discounts, only meant for displaying. */ - pricing?: Maybe - /** Whether the product is in stock and visible or not. */ - isAvailable?: Maybe - /** A type of tax. Assigned by enabled tax gateway */ - taxType?: Maybe - /** List of attributes assigned to this product. */ - attributes: Array - /** List of availability in channels for the product. */ - channelListings?: Maybe> - /** Get a single product media by ID. */ - mediaById: ProductMedia - /** - * Get a single product image by ID. - * @deprecated Will be removed in Saleor 4.0. Use the `mediaById` field instead. - */ - imageById?: Maybe - /** List of variants for the product. */ - variants?: Maybe>> - /** List of media for the product. */ - media?: Maybe> - /** - * List of images for the product. - * @deprecated Will be removed in Saleor 4.0. Use the `media` field instead. - */ - images?: Maybe>> - /** List of collections for the product. */ - collections?: Maybe>> - /** Returns translated product fields for the given language code. */ - translation?: Maybe - /** Date when product is available for purchase. */ - availableForPurchase?: Maybe - /** Whether the product is available for purchase. */ - isAvailableForPurchase?: Maybe - } - -/** Represents an individual item for sale in the storefront. */ -export type ProductThumbnailArgs = { - size?: Maybe -} - -/** Represents an individual item for sale in the storefront. */ -export type ProductPricingArgs = { - address?: Maybe -} - -/** Represents an individual item for sale in the storefront. */ -export type ProductIsAvailableArgs = { - address?: Maybe -} - -/** Represents an individual item for sale in the storefront. */ -export type ProductMediaByIdArgs = { - id?: Maybe -} - -/** Represents an individual item for sale in the storefront. */ -export type ProductImageByIdArgs = { - id?: Maybe -} - -/** Represents an individual item for sale in the storefront. */ -export type ProductTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Represents a type of product. It defines what attributes are available to products of this type. */ -export type ProductType = Node & - ObjectWithMetadata & { - __typename?: 'ProductType' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - slug: Scalars['String'] - hasVariants: Scalars['Boolean'] - isShippingRequired: Scalars['Boolean'] - isDigital: Scalars['Boolean'] - weight?: Maybe - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** - * List of products of this type. - * @deprecated Use the top-level `products` query with the `productTypes` filter. - */ - products?: Maybe - /** A type of tax. Assigned by enabled tax gateway */ - taxType?: Maybe - /** Variant attributes of that product type. */ - variantAttributes?: Maybe>> - /** Product attributes of that product type. */ - productAttributes?: Maybe>> - availableAttributes?: Maybe - } - -/** Represents a type of product. It defines what attributes are available to products of this type. */ -export type ProductTypeProductsArgs = { - channel?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Represents a type of product. It defines what attributes are available to products of this type. */ -export type ProductTypeVariantAttributesArgs = { - variantSelection?: Maybe -} - -/** Represents a type of product. It defines what attributes are available to products of this type. */ -export type ProductTypeAvailableAttributesArgs = { - filter?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Representation of tax types fetched from tax gateway. */ -export type TaxType = { - __typename?: 'TaxType' - /** Description of the tax type. */ - description?: Maybe - /** External tax code used to identify given tax group. */ - taxCode?: Maybe +/** Assigns storefront's navigation menus. */ +export type AssignNavigation = { + __typename?: 'AssignNavigation' + /** Assigned navigation menu. */ + menu?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + menuErrors: Array + errors: Array } /** Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. */ @@ -1454,23 +687,130 @@ export type AttributeTranslationArgs = { languageCode: LanguageCodeEnum } -export type ProductTypeCountableConnection = { - __typename?: 'ProductTypeCountableConnection' +/** Deletes attributes. */ +export type AttributeBulkDelete = { + __typename?: 'AttributeBulkDelete' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + attributeErrors: Array + errors: Array +} + +export type AttributeCountableConnection = { + __typename?: 'AttributeCountableConnection' /** Pagination data for this connection. */ pageInfo: PageInfo - edges: Array + edges: Array /** A total count of items in the collection. */ totalCount?: Maybe } -export type ProductTypeCountableEdge = { - __typename?: 'ProductTypeCountableEdge' +export type AttributeCountableEdge = { + __typename?: 'AttributeCountableEdge' /** The item at the end of the edge. */ - node: ProductType + node: Attribute /** A cursor for use in pagination. */ cursor: Scalars['String'] } +/** Creates an attribute. */ +export type AttributeCreate = { + __typename?: 'AttributeCreate' + attribute?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + attributeErrors: Array + errors: Array +} + +export type AttributeCreateInput = { + /** The input type to use for entering attribute values in the dashboard. */ + inputType?: Maybe + /** The entity type which can be used as a reference. */ + entityType?: Maybe + /** Name of an attribute displayed in the interface. */ + name: Scalars['String'] + /** Internal representation of an attribute name. */ + slug?: Maybe + /** The attribute type. */ + type: AttributeTypeEnum + /** List of attribute's values. */ + values?: Maybe>> + /** Whether the attribute requires values to be passed or not. */ + valueRequired?: Maybe + /** Whether the attribute is for variants only. */ + isVariantOnly?: Maybe + /** Whether the attribute should be visible or not in storefront. */ + visibleInStorefront?: Maybe + /** Whether the attribute can be filtered in storefront. */ + filterableInStorefront?: Maybe + /** Whether the attribute can be filtered in dashboard. */ + filterableInDashboard?: Maybe + /** The position of the attribute in the storefront navigation (0 by default). */ + storefrontSearchPosition?: Maybe + /** Whether the attribute can be displayed in the admin product list. */ + availableInGrid?: Maybe +} + +/** Deletes an attribute. */ +export type AttributeDelete = { + __typename?: 'AttributeDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + attributeErrors: Array + errors: Array + attribute?: Maybe +} + +/** An enumeration. */ +export enum AttributeEntityTypeEnum { + Page = 'PAGE', + Product = 'PRODUCT', +} + +export type AttributeError = { + __typename?: 'AttributeError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: AttributeErrorCode +} + +/** An enumeration. */ +export enum AttributeErrorCode { + AlreadyExists = 'ALREADY_EXISTS', + GraphqlError = 'GRAPHQL_ERROR', + Invalid = 'INVALID', + NotFound = 'NOT_FOUND', + Required = 'REQUIRED', + Unique = 'UNIQUE', +} + +export type AttributeFilterInput = { + valueRequired?: Maybe + isVariantOnly?: Maybe + visibleInStorefront?: Maybe + filterableInStorefront?: Maybe + filterableInDashboard?: Maybe + availableInGrid?: Maybe + metadata?: Maybe>> + search?: Maybe + ids?: Maybe>> + type?: Maybe + inCollection?: Maybe + inCategory?: Maybe + /** Specifies the channel by which the data should be sorted. */ + channel?: Maybe +} + +export type AttributeInput = { + /** Internal representation of an attribute name. */ + slug: Scalars['String'] + /** Internal representation of a value (unique per attribute). */ + values?: Maybe>> +} + /** An enumeration. */ export enum AttributeInputTypeEnum { Dropdown = 'DROPDOWN', @@ -1480,10 +820,75 @@ export enum AttributeInputTypeEnum { RichText = 'RICH_TEXT', } -/** An enumeration. */ -export enum AttributeEntityTypeEnum { - Page = 'PAGE', - Product = 'PRODUCT', +/** Reorder the values of an attribute. */ +export type AttributeReorderValues = { + __typename?: 'AttributeReorderValues' + /** Attribute from which values are reordered. */ + attribute?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + attributeErrors: Array + errors: Array +} + +export enum AttributeSortField { + /** Sort attributes by name */ + Name = 'NAME', + /** Sort attributes by slug */ + Slug = 'SLUG', + /** Sort attributes by the value required flag */ + ValueRequired = 'VALUE_REQUIRED', + /** Sort attributes by the variant only flag */ + IsVariantOnly = 'IS_VARIANT_ONLY', + /** Sort attributes by visibility in the storefront */ + VisibleInStorefront = 'VISIBLE_IN_STOREFRONT', + /** Sort attributes by the filterable in storefront flag */ + FilterableInStorefront = 'FILTERABLE_IN_STOREFRONT', + /** Sort attributes by the filterable in dashboard flag */ + FilterableInDashboard = 'FILTERABLE_IN_DASHBOARD', + /** Sort attributes by their position in storefront */ + StorefrontSearchPosition = 'STOREFRONT_SEARCH_POSITION', + /** Sort attributes based on whether they can be displayed or not in a product grid. */ + AvailableInGrid = 'AVAILABLE_IN_GRID', +} + +export type AttributeSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection + /** Sort attributes by the selected field. */ + field: AttributeSortField +} + +export type AttributeTranslatableContent = Node & { + __typename?: 'AttributeTranslatableContent' + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + /** Returns translated attribute fields for the given language code. */ + translation?: Maybe + /** Custom attribute of a product. */ + attribute?: Maybe +} + +export type AttributeTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum +} + +/** Creates/Updates translations for attribute. */ +export type AttributeTranslate = { + __typename?: 'AttributeTranslate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + translationErrors: Array + errors: Array + attribute?: Maybe +} + +export type AttributeTranslation = Node & { + __typename?: 'AttributeTranslation' + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + /** Translation language. */ + language: LanguageDisplay } /** An enumeration. */ @@ -1492,6 +897,40 @@ export enum AttributeTypeEnum { PageType = 'PAGE_TYPE', } +/** Updates attribute. */ +export type AttributeUpdate = { + __typename?: 'AttributeUpdate' + attribute?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + attributeErrors: Array + errors: Array +} + +export type AttributeUpdateInput = { + /** Name of an attribute displayed in the interface. */ + name?: Maybe + /** Internal representation of an attribute name. */ + slug?: Maybe + /** IDs of values to be removed from this attribute. */ + removeValues?: Maybe>> + /** New values to be created for this attribute. */ + addValues?: Maybe>> + /** Whether the attribute requires values to be passed or not. */ + valueRequired?: Maybe + /** Whether the attribute is for variants only. */ + isVariantOnly?: Maybe + /** Whether the attribute should be visible or not in storefront. */ + visibleInStorefront?: Maybe + /** Whether the attribute can be filtered in storefront. */ + filterableInStorefront?: Maybe + /** Whether the attribute can be filtered in dashboard. */ + filterableInDashboard?: Maybe + /** The position of the attribute in the storefront navigation (0 by default). */ + storefrontSearchPosition?: Maybe + /** Whether the attribute can be displayed in the admin product list. */ + availableInGrid?: Maybe +} + /** Represents a value of an attribute. */ export type AttributeValue = Node & { __typename?: 'AttributeValue' @@ -1520,6 +959,86 @@ export type AttributeValueTranslationArgs = { languageCode: LanguageCodeEnum } +/** Deletes values of attributes. */ +export type AttributeValueBulkDelete = { + __typename?: 'AttributeValueBulkDelete' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + attributeErrors: Array + errors: Array +} + +/** Creates a value for an attribute. */ +export type AttributeValueCreate = { + __typename?: 'AttributeValueCreate' + /** The updated attribute. */ + attribute?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + attributeErrors: Array + errors: Array + attributeValue?: Maybe +} + +export type AttributeValueCreateInput = { + /** Name of a value displayed in the interface. */ + name: Scalars['String'] + /** Represents the value of the attribute value. */ + value?: Maybe + /** Represents the text (JSON) of the attribute value. */ + richText?: Maybe +} + +/** Deletes a value of an attribute. */ +export type AttributeValueDelete = { + __typename?: 'AttributeValueDelete' + /** The updated attribute. */ + attribute?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + attributeErrors: Array + errors: Array + attributeValue?: Maybe +} + +export type AttributeValueInput = { + /** ID of the selected attribute. */ + id?: Maybe + /** The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. */ + values?: Maybe>> + /** URL of the file attribute. Every time, a new value is created. */ + file?: Maybe + /** File content type. */ + contentType?: Maybe + /** List of entity IDs that will be used as references. */ + references?: Maybe> + /** Text content in JSON format. */ + richText?: Maybe +} + +export type AttributeValueTranslatableContent = Node & { + __typename?: 'AttributeValueTranslatableContent' + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + /** Returns translated attribute value fields for the given language code. */ + translation?: Maybe + /** Represents a value of an attribute. */ + attributeValue?: Maybe +} + +export type AttributeValueTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum +} + +/** Creates/Updates translations for attribute value. */ +export type AttributeValueTranslate = { + __typename?: 'AttributeValueTranslate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + translationErrors: Array + errors: Array + attributeValue?: Maybe +} + export type AttributeValueTranslation = Node & { __typename?: 'AttributeValueTranslation' /** The ID of the object. */ @@ -1530,68 +1049,72 @@ export type AttributeValueTranslation = Node & { language: LanguageDisplay } -export type File = { - __typename?: 'File' - /** The URL of the file. */ - url: Scalars['String'] - /** Content type of the file. */ - contentType?: Maybe +export type AttributeValueTranslationInput = { + name?: Maybe + richText?: Maybe } -export type AttributeTranslation = Node & { - __typename?: 'AttributeTranslation' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - /** Translation language. */ - language: LanguageDisplay +/** Updates value of an attribute. */ +export type AttributeValueUpdate = { + __typename?: 'AttributeValueUpdate' + /** The updated attribute. */ + attribute?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + attributeErrors: Array + errors: Array + attributeValue?: Maybe } -export enum VariantAttributeScope { - All = 'ALL', - VariantSelection = 'VARIANT_SELECTION', - NotVariantSelection = 'NOT_VARIANT_SELECTION', +export type BulkAttributeValueInput = { + /** ID of the selected attribute. */ + id?: Maybe + /** The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. */ + values: Array> } -export type AttributeCountableConnection = { - __typename?: 'AttributeCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe +export type BulkProductError = { + __typename?: 'BulkProductError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: ProductErrorCode + /** List of attributes IDs which causes the error. */ + attributes?: Maybe> + /** List of attribute values IDs which causes the error. */ + values?: Maybe> + /** Index of an input list item that caused the error. */ + index?: Maybe + /** List of warehouse IDs which causes the error. */ + warehouses?: Maybe> + /** List of channel IDs which causes the error. */ + channels?: Maybe> } -export type AttributeCountableEdge = { - __typename?: 'AttributeCountableEdge' - /** The item at the end of the edge. */ - node: Attribute - /** A cursor for use in pagination. */ - cursor: Scalars['String'] +export type BulkStockError = { + __typename?: 'BulkStockError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: ProductErrorCode + /** List of attributes IDs which causes the error. */ + attributes?: Maybe> + /** List of attribute values IDs which causes the error. */ + values?: Maybe> + /** Index of an input list item that caused the error. */ + index?: Maybe } -export type AttributeFilterInput = { - valueRequired?: Maybe - isVariantOnly?: Maybe - visibleInStorefront?: Maybe - filterableInStorefront?: Maybe - filterableInDashboard?: Maybe - availableInGrid?: Maybe - metadata?: Maybe>> - search?: Maybe - ids?: Maybe>> - type?: Maybe - inCollection?: Maybe - inCategory?: Maybe - /** Specifies the channel by which the data should be sorted. */ - channel?: Maybe -} - -export type MetadataInput = { - /** Key of a metadata item. */ - key: Scalars['String'] - /** Value of a metadata item. */ - value: Scalars['String'] +export type CatalogueInput = { + /** Products related to the discount. */ + products?: Maybe>> + /** Categories related to the discount. */ + categories?: Maybe>> + /** Collections related to the discount. */ + collections?: Maybe>> } /** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ @@ -1620,11 +1143,6 @@ export type Category = Node & ancestors?: Maybe /** List of products in the category. */ products?: Maybe - /** - * The storefront's URL for the category. - * @deprecated This field will be removed after 2020-07-31. - */ - url?: Maybe /** List of children of the category. */ children?: Maybe backgroundImage?: Maybe @@ -1667,6 +1185,16 @@ export type CategoryTranslationArgs = { languageCode: LanguageCodeEnum } +/** Deletes categories. */ +export type CategoryBulkDelete = { + __typename?: 'CategoryBulkDelete' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array +} + export type CategoryCountableConnection = { __typename?: 'CategoryCountableConnection' /** Pagination data for this connection. */ @@ -1684,13 +1212,93 @@ export type CategoryCountableEdge = { cursor: Scalars['String'] } -/** Represents an image. */ -export type Image = { - __typename?: 'Image' - /** The URL of the image. */ - url: Scalars['String'] - /** Alt text for an image. */ - alt?: Maybe +/** Creates a new category. */ +export type CategoryCreate = { + __typename?: 'CategoryCreate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array + category?: Maybe +} + +/** Deletes a category. */ +export type CategoryDelete = { + __typename?: 'CategoryDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array + category?: Maybe +} + +export type CategoryFilterInput = { + search?: Maybe + metadata?: Maybe>> + ids?: Maybe>> +} + +export type CategoryInput = { + /** Category description (JSON). */ + description?: Maybe + /** Category name. */ + name?: Maybe + /** Category slug. */ + slug?: Maybe + /** Search engine optimization fields. */ + seo?: Maybe + /** Background image file. */ + backgroundImage?: Maybe + /** Alt text for a product media. */ + backgroundImageAlt?: Maybe +} + +export enum CategorySortField { + /** Sort categories by name. */ + Name = 'NAME', + /** Sort categories by product count. */ + ProductCount = 'PRODUCT_COUNT', + /** Sort categories by subcategory count. */ + SubcategoryCount = 'SUBCATEGORY_COUNT', +} + +export type CategorySortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection + /** Specifies the channel in which to sort the data. */ + channel?: Maybe + /** Sort categories by the selected field. */ + field: CategorySortField +} + +export type CategoryTranslatableContent = Node & { + __typename?: 'CategoryTranslatableContent' + seoTitle?: Maybe + seoDescription?: Maybe + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + description?: Maybe + /** + * Description of the category (JSON). + * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. + */ + descriptionJson?: Maybe + /** Returns translated category fields for the given language code. */ + translation?: Maybe + /** Represents a single category of products. */ + category?: Maybe +} + +export type CategoryTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum +} + +/** Creates/Updates translations for Category. */ +export type CategoryTranslate = { + __typename?: 'CategoryTranslate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + translationErrors: Array + errors: Array + category?: Maybe } export type CategoryTranslation = Node & { @@ -1710,150 +1318,825 @@ export type CategoryTranslation = Node & { descriptionJson?: Maybe } -/** Represents a version of a product such as different size or color. */ -export type ProductVariant = Node & +/** Updates a category. */ +export type CategoryUpdate = { + __typename?: 'CategoryUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array + category?: Maybe +} + +/** Represents channel. */ +export type Channel = Node & { + __typename?: 'Channel' + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + isActive: Scalars['Boolean'] + slug: Scalars['String'] + currencyCode: Scalars['String'] + /** Whether a channel has associated orders. */ + hasOrders: Scalars['Boolean'] + /** List of channel shipping zones. */ + shippingZones: Array +} + +/** Activate a channel. */ +export type ChannelActivate = { + __typename?: 'ChannelActivate' + /** Activated channel. */ + channel?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + channelErrors: Array + errors: Array +} + +/** Creates new channel. */ +export type ChannelCreate = { + __typename?: 'ChannelCreate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + channelErrors: Array + errors: Array + channel?: Maybe +} + +export type ChannelCreateInput = { + /** isActive flag. */ + isActive?: Maybe + /** Name of the channel. */ + name: Scalars['String'] + /** Slug of the channel. */ + slug: Scalars['String'] + /** Currency of the channel. */ + currencyCode: Scalars['String'] + /** List of shipping zones to assign to the channel. */ + addShippingZones?: Maybe> +} + +/** Deactivate a channel. */ +export type ChannelDeactivate = { + __typename?: 'ChannelDeactivate' + /** Deactivated channel. */ + channel?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + channelErrors: Array + errors: Array +} + +/** Delete a channel. Orders associated with the deleted channel will be moved to the target channel. Checkouts, product availability, and pricing will be removed. */ +export type ChannelDelete = { + __typename?: 'ChannelDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + channelErrors: Array + errors: Array + channel?: Maybe +} + +export type ChannelDeleteInput = { + /** ID of channel to migrate orders from origin channel. */ + targetChannel: Scalars['ID'] +} + +export type ChannelError = { + __typename?: 'ChannelError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: ChannelErrorCode + /** List of shipping zone IDs which causes the error. */ + shippingZones?: Maybe> +} + +/** An enumeration. */ +export enum ChannelErrorCode { + AlreadyExists = 'ALREADY_EXISTS', + GraphqlError = 'GRAPHQL_ERROR', + Invalid = 'INVALID', + NotFound = 'NOT_FOUND', + Required = 'REQUIRED', + Unique = 'UNIQUE', + ChannelTargetIdMustBeDifferent = 'CHANNEL_TARGET_ID_MUST_BE_DIFFERENT', + ChannelsCurrencyMustBeTheSame = 'CHANNELS_CURRENCY_MUST_BE_THE_SAME', + ChannelWithOrders = 'CHANNEL_WITH_ORDERS', + DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', +} + +/** Update a channel. */ +export type ChannelUpdate = { + __typename?: 'ChannelUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + channelErrors: Array + errors: Array + channel?: Maybe +} + +export type ChannelUpdateInput = { + /** isActive flag. */ + isActive?: Maybe + /** Name of the channel. */ + name?: Maybe + /** Slug of the channel. */ + slug?: Maybe + /** List of shipping zones to assign to the channel. */ + addShippingZones?: Maybe> + /** List of shipping zones to unassign from the channel. */ + removeShippingZones?: Maybe> +} + +/** Checkout object. */ +export type Checkout = Node & ObjectWithMetadata & { - __typename?: 'ProductVariant' + __typename?: 'Checkout' + created: Scalars['DateTime'] + lastChange: Scalars['DateTime'] + user?: Maybe + quantity: Scalars['Int'] + channel: Channel + billingAddress?: Maybe
+ shippingAddress?: Maybe
+ note: Scalars['String'] + discount?: Maybe + discountName?: Maybe + translatedDiscountName?: Maybe + voucherCode?: Maybe + /** List of gift cards associated with this checkout. */ + giftCards?: Maybe>> /** The ID of the object. */ id: Scalars['ID'] - name: Scalars['String'] - sku: Scalars['String'] - product: Product - trackInventory: Scalars['Boolean'] - weight?: Maybe /** List of private metadata items.Requires proper staff permissions to access. */ privateMetadata: Array> /** List of public metadata items. Can be accessed without permissions. */ metadata: Array> - /** List of price information in channels for the product. */ - channelListings?: Maybe> - /** Lists the storefront variant's pricing, the current price and discounts, only meant for displaying. */ - pricing?: Maybe - /** List of attributes assigned to this variant. */ - attributes: Array - /** Cost price of the variant. */ - costPrice?: Maybe - /** Gross margin percentage value. */ - margin?: Maybe - /** Total quantity ordered. */ - 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. */ - revenue?: Maybe - /** - * List of images for the product variant. - * @deprecated Will be removed in Saleor 4.0. Use the `media` instead. - */ - images?: Maybe>> - /** List of media for the product variant. */ - media?: Maybe> - /** Returns translated product variant fields for the given language code. */ - translation?: Maybe - /** Digital content for the product variant. */ - digitalContent?: Maybe - /** Stocks for the product variant. */ - stocks?: Maybe>> - /** Quantity of a product available for sale in one checkout. */ - quantityAvailable: Scalars['Int'] + /** Shipping methods that can be used with this order. */ + availableShippingMethods: Array> + /** List of available payment gateways. */ + availablePaymentGateways: Array + /** Email of a customer. */ + email: Scalars['String'] + /** Returns True, if checkout requires shipping. */ + isShippingRequired: Scalars['Boolean'] + /** A list of checkout lines, each containing information about an item in the checkout. */ + lines?: Maybe>> + /** The price of the shipping, with all the taxes included. */ + shippingPrice?: Maybe + /** The shipping method related with checkout. */ + shippingMethod?: Maybe + /** The price of the checkout before shipping, with taxes included. */ + subtotalPrice?: Maybe + /** The checkout's token. */ + token: Scalars['UUID'] + /** The sum of the the checkout line prices, with all the taxes,shipping costs, and discounts included. */ + totalPrice?: Maybe + /** Checkout language code. */ + languageCode: LanguageCodeEnum } -/** Represents a version of a product such as different size or color. */ -export type ProductVariantPricingArgs = { - address?: Maybe +/** Adds a gift card or a voucher to a checkout. */ +export type CheckoutAddPromoCode = { + __typename?: 'CheckoutAddPromoCode' + /** The checkout with the added gift card or voucher. */ + checkout?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + checkoutErrors: Array + errors: Array } -/** Represents a version of a product such as different size or color. */ -export type ProductVariantAttributesArgs = { - variantSelection?: Maybe +/** Update billing address in the existing checkout. */ +export type CheckoutBillingAddressUpdate = { + __typename?: 'CheckoutBillingAddressUpdate' + /** An updated checkout. */ + checkout?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + checkoutErrors: Array + errors: Array } -/** Represents a version of a product such as different size or color. */ -export type ProductVariantRevenueArgs = { - period?: Maybe +/** Completes the checkout. As a result a new order is created and a payment charge is made. This action requires a successful payment before it can be performed. In case additional confirmation step as 3D secure is required confirmationNeeded flag will be set to True and no order created until payment is confirmed with second call of this mutation. */ +export type CheckoutComplete = { + __typename?: 'CheckoutComplete' + /** Placed order. */ + order?: Maybe + /** Set to true if payment needs to be confirmed before checkout is complete. */ + confirmationNeeded: Scalars['Boolean'] + /** Confirmation data used to process additional authorization steps. */ + confirmationData?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + checkoutErrors: Array + errors: Array } -/** Represents a version of a product such as different size or color. */ -export type ProductVariantTranslationArgs = { +export type CheckoutCountableConnection = { + __typename?: 'CheckoutCountableConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe +} + +export type CheckoutCountableEdge = { + __typename?: 'CheckoutCountableEdge' + /** The item at the end of the edge. */ + node: Checkout + /** A cursor for use in pagination. */ + cursor: Scalars['String'] +} + +/** Create a new checkout. */ +export type CheckoutCreate = { + __typename?: 'CheckoutCreate' + /** Whether the checkout was created or the current active one was returned. Refer to checkoutLinesAdd and checkoutLinesUpdate to merge a cart with an active checkout. */ + created?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + checkoutErrors: Array + errors: Array + checkout?: Maybe +} + +export type CheckoutCreateInput = { + /** Slug of a channel in which to create a checkout. */ + channel?: Maybe + /** A list of checkout lines, each containing information about an item in the checkout. */ + lines: Array> + /** The customer's email address. */ + email?: Maybe + /** The mailing address to where the checkout will be shipped. Note: the address will be ignored if the checkout doesn't contain shippable items. */ + shippingAddress?: Maybe + /** Billing address of the customer. */ + billingAddress?: Maybe + /** Checkout language code. */ + languageCode?: Maybe +} + +/** Sets the customer as the owner of the checkout. */ +export type CheckoutCustomerAttach = { + __typename?: 'CheckoutCustomerAttach' + /** An updated checkout. */ + checkout?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + checkoutErrors: Array + errors: Array +} + +/** Removes the user assigned as the owner of the checkout. */ +export type CheckoutCustomerDetach = { + __typename?: 'CheckoutCustomerDetach' + /** An updated checkout. */ + checkout?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + checkoutErrors: Array + errors: Array +} + +/** Updates email address in the existing checkout object. */ +export type CheckoutEmailUpdate = { + __typename?: 'CheckoutEmailUpdate' + /** An updated checkout. */ + checkout?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + checkoutErrors: Array + errors: Array +} + +export type CheckoutError = { + __typename?: 'CheckoutError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: CheckoutErrorCode + /** List of varint IDs which causes the error. */ + variants?: Maybe> +} + +/** An enumeration. */ +export enum CheckoutErrorCode { + BillingAddressNotSet = 'BILLING_ADDRESS_NOT_SET', + CheckoutNotFullyPaid = 'CHECKOUT_NOT_FULLY_PAID', + GraphqlError = 'GRAPHQL_ERROR', + ProductNotPublished = 'PRODUCT_NOT_PUBLISHED', + ProductUnavailableForPurchase = 'PRODUCT_UNAVAILABLE_FOR_PURCHASE', + InsufficientStock = 'INSUFFICIENT_STOCK', + Invalid = 'INVALID', + InvalidShippingMethod = 'INVALID_SHIPPING_METHOD', + NotFound = 'NOT_FOUND', + PaymentError = 'PAYMENT_ERROR', + QuantityGreaterThanLimit = 'QUANTITY_GREATER_THAN_LIMIT', + Required = 'REQUIRED', + ShippingAddressNotSet = 'SHIPPING_ADDRESS_NOT_SET', + ShippingMethodNotApplicable = 'SHIPPING_METHOD_NOT_APPLICABLE', + ShippingMethodNotSet = 'SHIPPING_METHOD_NOT_SET', + ShippingNotRequired = 'SHIPPING_NOT_REQUIRED', + TaxError = 'TAX_ERROR', + Unique = 'UNIQUE', + VoucherNotApplicable = 'VOUCHER_NOT_APPLICABLE', + ZeroQuantity = 'ZERO_QUANTITY', + MissingChannelSlug = 'MISSING_CHANNEL_SLUG', + ChannelInactive = 'CHANNEL_INACTIVE', + UnavailableVariantInChannel = 'UNAVAILABLE_VARIANT_IN_CHANNEL', +} + +/** Update language code in the existing checkout. */ +export type CheckoutLanguageCodeUpdate = { + __typename?: 'CheckoutLanguageCodeUpdate' + /** An updated checkout. */ + checkout?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + checkoutErrors: Array + errors: Array +} + +/** Represents an item in the checkout. */ +export type CheckoutLine = Node & { + __typename?: 'CheckoutLine' + /** The ID of the object. */ + id: Scalars['ID'] + variant: ProductVariant + quantity: Scalars['Int'] + /** The sum of the checkout line price, taxes and discounts. */ + totalPrice?: Maybe + /** Indicates whether the item need to be delivered. */ + requiresShipping?: Maybe +} + +export type CheckoutLineCountableConnection = { + __typename?: 'CheckoutLineCountableConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe +} + +export type CheckoutLineCountableEdge = { + __typename?: 'CheckoutLineCountableEdge' + /** The item at the end of the edge. */ + node: CheckoutLine + /** A cursor for use in pagination. */ + cursor: Scalars['String'] +} + +/** Deletes a CheckoutLine. */ +export type CheckoutLineDelete = { + __typename?: 'CheckoutLineDelete' + /** An updated checkout. */ + checkout?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + checkoutErrors: Array + errors: Array +} + +export type CheckoutLineInput = { + /** The number of items purchased. */ + quantity: Scalars['Int'] + /** ID of the product variant. */ + variantId: Scalars['ID'] +} + +/** Adds a checkout line to the existing checkout. */ +export type CheckoutLinesAdd = { + __typename?: 'CheckoutLinesAdd' + /** An updated checkout. */ + checkout?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + checkoutErrors: Array + errors: Array +} + +/** Updates checkout line in the existing checkout. */ +export type CheckoutLinesUpdate = { + __typename?: 'CheckoutLinesUpdate' + /** An updated checkout. */ + checkout?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + checkoutErrors: Array + errors: Array +} + +/** Create a new payment for given checkout. */ +export type CheckoutPaymentCreate = { + __typename?: 'CheckoutPaymentCreate' + /** Related checkout object. */ + checkout?: Maybe + /** A newly created payment. */ + payment?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + paymentErrors: Array + errors: Array +} + +/** Remove a gift card or a voucher from a checkout. */ +export type CheckoutRemovePromoCode = { + __typename?: 'CheckoutRemovePromoCode' + /** The checkout with the removed gift card or voucher. */ + checkout?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + checkoutErrors: Array + errors: Array +} + +/** Update shipping address in the existing checkout. */ +export type CheckoutShippingAddressUpdate = { + __typename?: 'CheckoutShippingAddressUpdate' + /** An updated checkout. */ + checkout?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + checkoutErrors: Array + errors: Array +} + +/** Updates the shipping address of the checkout. */ +export type CheckoutShippingMethodUpdate = { + __typename?: 'CheckoutShippingMethodUpdate' + /** An updated checkout. */ + checkout?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + checkoutErrors: Array + errors: Array +} + +export type ChoiceValue = { + __typename?: 'ChoiceValue' + raw?: Maybe + verbose?: Maybe +} + +/** Represents a collection of products. */ +export type Collection = Node & + ObjectWithMetadata & { + __typename?: 'Collection' + seoTitle?: Maybe + seoDescription?: Maybe + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + description?: Maybe + slug: Scalars['String'] + /** List of private metadata items.Requires proper staff permissions to access. */ + privateMetadata: Array> + /** List of public metadata items. Can be accessed without permissions. */ + metadata: Array> + /** + * Description of the collection (JSON). + * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. + */ + descriptionJson?: Maybe + /** List of products in this collection. */ + products?: Maybe + backgroundImage?: Maybe + /** Returns translated collection fields for the given language code. */ + translation?: Maybe + /** List of channels in which the collection is available. */ + channelListings?: Maybe> + } + +/** Represents a collection of products. */ +export type CollectionProductsArgs = { + filter?: Maybe + sortBy?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +/** Represents a collection of products. */ +export type CollectionBackgroundImageArgs = { + size?: Maybe +} + +/** Represents a collection of products. */ +export type CollectionTranslationArgs = { languageCode: LanguageCodeEnum } -/** Represents a version of a product such as different size or color. */ -export type ProductVariantStocksArgs = { - address?: Maybe - countryCode?: Maybe +/** Adds products to a collection. */ +export type CollectionAddProducts = { + __typename?: 'CollectionAddProducts' + /** Collection to which products will be added. */ + collection?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + collectionErrors: Array + errors: Array } -/** Represents a version of a product such as different size or color. */ -export type ProductVariantQuantityAvailableArgs = { - address?: Maybe - countryCode?: Maybe +/** Deletes collections. */ +export type CollectionBulkDelete = { + __typename?: 'CollectionBulkDelete' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + collectionErrors: Array + errors: Array } -/** Represents product varaint channel listing. */ -export type ProductVariantChannelListing = Node & { - __typename?: 'ProductVariantChannelListing' +/** Represents collection channel listing. */ +export type CollectionChannelListing = Node & { + __typename?: 'CollectionChannelListing' + publicationDate?: Maybe + isPublished: Scalars['Boolean'] /** The ID of the object. */ id: Scalars['ID'] channel: Channel - price?: Maybe - /** Cost price of the variant. */ - costPrice?: Maybe - /** Gross margin percentage value. */ - margin?: Maybe } -/** Represents availability of a variant in the storefront. */ -export type VariantPricingInfo = { - __typename?: 'VariantPricingInfo' - /** Whether it is in sale or not. */ - onSale?: Maybe - /** The discount amount if in sale (null otherwise). */ - discount?: Maybe - /** The discount amount in the local currency. */ - discountLocalCurrency?: Maybe - /** The price, with any discount subtracted. */ - price?: Maybe - /** The price without any discount. */ - priceUndiscounted?: Maybe - /** The discounted price in the local currency. */ - priceLocalCurrency?: Maybe +export type CollectionChannelListingError = { + __typename?: 'CollectionChannelListingError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: ProductErrorCode + /** List of attributes IDs which causes the error. */ + attributes?: Maybe> + /** List of attribute values IDs which causes the error. */ + values?: Maybe> + /** List of channels IDs which causes the error. */ + channels?: Maybe> } -/** Represents a monetary value with taxes. In cases where taxes were not applied, net and gross values will be equal. */ -export type TaxedMoney = { - __typename?: 'TaxedMoney' - /** Currency code. */ - currency: Scalars['String'] - /** Amount of money including taxes. */ - gross: Money - /** Amount of money without taxes. */ - net: Money - /** Amount of taxes. */ - tax: Money +/** Manage collection's availability in channels. */ +export type CollectionChannelListingUpdate = { + __typename?: 'CollectionChannelListingUpdate' + /** An updated collection instance. */ + collection?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + collectionChannelListingErrors: Array + errors: Array } -export type AddressInput = { - /** Given name. */ - firstName?: Maybe - /** Family name. */ - lastName?: Maybe - /** Company or organization. */ - companyName?: Maybe - /** Address. */ - streetAddress1?: Maybe - /** Address. */ - streetAddress2?: Maybe - /** City. */ - city?: Maybe - /** District. */ - cityArea?: Maybe - /** Postal code. */ - postalCode?: Maybe - /** Country. */ - country?: Maybe - /** State or province. */ - countryArea?: Maybe - /** Phone number. */ - phone?: Maybe +export type CollectionChannelListingUpdateInput = { + /** List of channels to which the collection should be assigned. */ + addChannels?: Maybe> + /** List of channels from which the collection should be unassigned. */ + removeChannels?: Maybe> +} + +export type CollectionCountableConnection = { + __typename?: 'CollectionCountableConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe +} + +export type CollectionCountableEdge = { + __typename?: 'CollectionCountableEdge' + /** The item at the end of the edge. */ + node: Collection + /** A cursor for use in pagination. */ + cursor: Scalars['String'] +} + +/** Creates a new collection. */ +export type CollectionCreate = { + __typename?: 'CollectionCreate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + collectionErrors: Array + errors: Array + collection?: Maybe +} + +export type CollectionCreateInput = { + /** Informs whether a collection is published. */ + isPublished?: Maybe + /** Name of the collection. */ + name?: Maybe + /** Slug of the collection. */ + slug?: Maybe + /** Description of the collection (JSON). */ + description?: Maybe + /** Background image file. */ + backgroundImage?: Maybe + /** Alt text for an image. */ + backgroundImageAlt?: Maybe + /** Search engine optimization fields. */ + seo?: Maybe + /** Publication date. ISO 8601 standard. */ + publicationDate?: Maybe + /** List of products to be added to the collection. */ + products?: Maybe>> +} + +/** Deletes a collection. */ +export type CollectionDelete = { + __typename?: 'CollectionDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + collectionErrors: Array + errors: Array + collection?: Maybe +} + +export type CollectionError = { + __typename?: 'CollectionError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** List of products IDs which causes the error. */ + products?: Maybe> + /** The error code. */ + code: CollectionErrorCode +} + +/** An enumeration. */ +export enum CollectionErrorCode { + DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', + GraphqlError = 'GRAPHQL_ERROR', + Invalid = 'INVALID', + NotFound = 'NOT_FOUND', + Required = 'REQUIRED', + Unique = 'UNIQUE', + CannotManageProductWithoutVariant = 'CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT', +} + +export type CollectionFilterInput = { + published?: Maybe + search?: Maybe + metadata?: Maybe>> + ids?: Maybe>> + /** Specifies the channel by which the data should be sorted. */ + channel?: Maybe +} + +export type CollectionInput = { + /** Informs whether a collection is published. */ + isPublished?: Maybe + /** Name of the collection. */ + name?: Maybe + /** Slug of the collection. */ + slug?: Maybe + /** Description of the collection (JSON). */ + description?: Maybe + /** Background image file. */ + backgroundImage?: Maybe + /** Alt text for an image. */ + backgroundImageAlt?: Maybe + /** Search engine optimization fields. */ + seo?: Maybe + /** Publication date. ISO 8601 standard. */ + publicationDate?: Maybe +} + +export enum CollectionPublished { + Published = 'PUBLISHED', + Hidden = 'HIDDEN', +} + +/** Remove products from a collection. */ +export type CollectionRemoveProducts = { + __typename?: 'CollectionRemoveProducts' + /** Collection from which products will be removed. */ + collection?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + collectionErrors: Array + errors: Array +} + +/** Reorder the products of a collection. */ +export type CollectionReorderProducts = { + __typename?: 'CollectionReorderProducts' + /** Collection from which products are reordered. */ + collection?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + collectionErrors: Array + errors: Array +} + +export enum CollectionSortField { + /** Sort collections by name. */ + Name = 'NAME', + /** Sort collections by availability. */ + Availability = 'AVAILABILITY', + /** Sort collections by product count. */ + ProductCount = 'PRODUCT_COUNT', + /** Sort collections by publication date. */ + PublicationDate = 'PUBLICATION_DATE', +} + +export type CollectionSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection + /** Specifies the channel in which to sort the data. */ + channel?: Maybe + /** Sort collections by the selected field. */ + field: CollectionSortField +} + +export type CollectionTranslatableContent = Node & { + __typename?: 'CollectionTranslatableContent' + seoTitle?: Maybe + seoDescription?: Maybe + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + description?: Maybe + /** + * Description of the collection (JSON). + * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. + */ + descriptionJson?: Maybe + /** Returns translated collection fields for the given language code. */ + translation?: Maybe + /** Represents a collection of products. */ + collection?: Maybe +} + +export type CollectionTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum +} + +/** Creates/Updates translations for collection. */ +export type CollectionTranslate = { + __typename?: 'CollectionTranslate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + translationErrors: Array + errors: Array + collection?: Maybe +} + +export type CollectionTranslation = Node & { + __typename?: 'CollectionTranslation' + seoTitle?: Maybe + seoDescription?: Maybe + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + description?: Maybe + /** Translation language. */ + language: LanguageDisplay + /** + * Translated description of the product (JSON). + * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. + */ + descriptionJson?: Maybe +} + +/** Updates a collection. */ +export type CollectionUpdate = { + __typename?: 'CollectionUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + collectionErrors: Array + errors: Array + collection?: Maybe +} + +/** Stores information about a single configuration field. */ +export type ConfigurationItem = { + __typename?: 'ConfigurationItem' + /** Name of the field. */ + name: Scalars['String'] + /** Current value of the field. */ + value?: Maybe + /** Type of the field. */ + type?: Maybe + /** Help text for the field. */ + helpText?: Maybe + /** Label for the field. */ + label?: Maybe +} + +export type ConfigurationItemInput = { + /** Name of the field to update. */ + name: Scalars['String'] + /** Value of the given field to update. */ + value?: Maybe +} + +/** An enumeration. */ +export enum ConfigurationTypeFieldEnum { + String = 'STRING', + Multiline = 'MULTILINE', + Boolean = 'BOOLEAN', + Secret = 'SECRET', + Password = 'PASSWORD', + Secretmultiline = 'SECRETMULTILINE', +} + +/** Confirm user account with token sent by email during registration. */ +export type ConfirmAccount = { + __typename?: 'ConfirmAccount' + /** An activated user account. */ + user?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array +} + +/** Confirm the email change of the logged-in user. */ +export type ConfirmEmailChange = { + __typename?: 'ConfirmEmailChange' + /** A user instance with a new email. */ + user?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array } /** An enumeration. */ @@ -2110,1726 +2393,30 @@ export enum CountryCode { Zw = 'ZW', } -/** Represents a custom attribute. */ -export type SelectedAttribute = { - __typename?: 'SelectedAttribute' - /** Name of an attribute displayed in the interface. */ - attribute: Attribute - /** Values of an attribute. */ - values: Array> -} - -export enum ReportingPeriod { - Today = 'TODAY', - ThisMonth = 'THIS_MONTH', -} - -/** Represents a product image. */ -export type ProductImage = { - __typename?: 'ProductImage' - /** The ID of the image. */ - id: Scalars['ID'] - /** The alt text of the image. */ - alt?: Maybe - /** The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. */ - sortOrder?: Maybe - /** The URL of the image. */ - url: Scalars['String'] -} - -/** Represents a product image. */ -export type ProductImageUrlArgs = { - size?: Maybe -} - -/** Represents a product media. */ -export type ProductMedia = Node & { - __typename?: 'ProductMedia' - /** The ID of the object. */ - id: Scalars['ID'] - sortOrder?: Maybe - alt: Scalars['String'] - type: ProductMediaType - oembedData: Scalars['JSONString'] - /** The URL of the media. */ - url: Scalars['String'] -} - -/** Represents a product media. */ -export type ProductMediaUrlArgs = { - size?: Maybe -} - -/** An enumeration. */ -export enum ProductMediaType { - /** An uploaded image or an URL to an image */ - Image = 'IMAGE', - /** A URL to an external video */ - Video = 'VIDEO', -} - -export type ProductVariantTranslation = Node & { - __typename?: 'ProductVariantTranslation' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - /** Translation language. */ - language: LanguageDisplay -} - -export type DigitalContent = Node & - ObjectWithMetadata & { - __typename?: 'DigitalContent' - useDefaultSettings: Scalars['Boolean'] - automaticFulfillment: Scalars['Boolean'] - contentFile: Scalars['String'] - maxDownloads?: Maybe - urlValidDays?: Maybe - /** List of URLs for the digital variant. */ - urls?: Maybe>> - /** The ID of the object. */ - id: Scalars['ID'] - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** Product variant assigned to digital content. */ - productVariant: ProductVariant - } - -export type DigitalContentUrl = Node & { - __typename?: 'DigitalContentUrl' - content: DigitalContent - created: Scalars['DateTime'] - downloadNum: Scalars['Int'] - /** The ID of the object. */ - id: Scalars['ID'] - /** URL for digital content. */ - url?: Maybe - /** UUID of digital content. */ - token: Scalars['UUID'] -} - -/** Represents stock. */ -export type Stock = Node & { - __typename?: 'Stock' - warehouse: Warehouse - productVariant: ProductVariant - /** Quantity of a product in the warehouse's possession, including the allocated stock that is waiting for shipment. */ - quantity: Scalars['Int'] - /** The ID of the object. */ - id: Scalars['ID'] - /** Quantity allocated for orders */ - quantityAllocated: Scalars['Int'] -} - -/** Represents availability of a product in the storefront. */ -export type ProductPricingInfo = { - __typename?: 'ProductPricingInfo' - /** Whether it is in sale or not. */ - onSale?: Maybe - /** The discount amount if in sale (null otherwise). */ - discount?: Maybe - /** The discount amount in the local currency. */ - discountLocalCurrency?: Maybe - /** The discounted price range of the product variants. */ - priceRange?: Maybe - /** The undiscounted price range of the product variants. */ - priceRangeUndiscounted?: Maybe - /** The discounted price range of the product variants in the local currency. */ - priceRangeLocalCurrency?: Maybe -} - -/** Represents a range of monetary values. */ -export type TaxedMoneyRange = { - __typename?: 'TaxedMoneyRange' - /** Lower bound of a price range. */ - start?: Maybe - /** Upper bound of a price range. */ - stop?: Maybe -} - -/** Represents product channel listing. */ -export type ProductChannelListing = Node & { - __typename?: 'ProductChannelListing' - /** The ID of the object. */ - id: Scalars['ID'] - publicationDate?: Maybe - isPublished: Scalars['Boolean'] - channel: Channel - visibleInListings: Scalars['Boolean'] - availableForPurchase?: Maybe - /** The price of the cheapest variant (including discounts). */ - discountedPrice?: Maybe - /** Purchase cost of product. */ - purchaseCost?: Maybe - /** Range of margin percentage value. */ - margin?: Maybe - /** Whether the product is available for purchase. */ - isAvailableForPurchase?: Maybe - /** Lists the storefront product's pricing, the current price and discounts, only meant for displaying. */ - pricing?: Maybe -} - -/** Represents product channel listing. */ -export type ProductChannelListingPricingArgs = { - address?: Maybe -} - -export type Margin = { - __typename?: 'Margin' - start?: Maybe - stop?: Maybe -} - -/** Represents a collection of products. */ -export type Collection = Node & - ObjectWithMetadata & { - __typename?: 'Collection' - seoTitle?: Maybe - seoDescription?: Maybe - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - description?: Maybe - slug: Scalars['String'] - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** - * Description of the collection (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. - */ - descriptionJson?: Maybe - /** List of products in this collection. */ - products?: Maybe - backgroundImage?: Maybe - /** Returns translated collection fields for the given language code. */ - translation?: Maybe - /** List of channels in which the collection is available. */ - channelListings?: Maybe> - } - -/** Represents a collection of products. */ -export type CollectionProductsArgs = { - filter?: Maybe - sortBy?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Represents a collection of products. */ -export type CollectionBackgroundImageArgs = { - size?: Maybe -} - -/** Represents a collection of products. */ -export type CollectionTranslationArgs = { - languageCode: LanguageCodeEnum -} - -export type ProductFilterInput = { - isPublished?: Maybe - collections?: Maybe>> - categories?: Maybe>> - hasCategory?: Maybe - attributes?: Maybe>> - stockAvailability?: Maybe - productType?: Maybe - stocks?: Maybe - search?: Maybe - metadata?: Maybe>> - price?: Maybe - minimalPrice?: Maybe - productTypes?: Maybe>> - ids?: Maybe>> - /** Specifies the channel by which the data should be sorted. */ - channel?: Maybe -} - -export type AttributeInput = { - /** Internal representation of an attribute name. */ - slug: Scalars['String'] - /** [Deprecated] Internal representation of a value (unique per attribute). This field will be removed after 2020-07-31. */ - value?: Maybe - /** Internal representation of a value (unique per attribute). */ - values?: Maybe>> -} - -export enum StockAvailability { - InStock = 'IN_STOCK', - OutOfStock = 'OUT_OF_STOCK', -} - -export type ProductStockFilterInput = { - warehouseIds?: Maybe> - quantity?: Maybe -} - -export type IntRangeInput = { - /** Value greater than or equal to. */ - gte?: Maybe - /** Value less than or equal to. */ - lte?: Maybe -} - -export type PriceRangeInput = { - /** Price greater than or equal to. */ - gte?: Maybe - /** Price less than or equal to. */ - lte?: Maybe -} - -export type ProductOrder = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Specifies the channel in which to sort the data. */ - channel?: Maybe - /** - * Sort product by the selected attribute's values. - * Note: this doesn't take translations into account yet. - */ - attributeId?: Maybe - /** Sort products by the selected field. */ - field?: Maybe -} - -export enum OrderDirection { - /** Specifies an ascending sort order. */ - Asc = 'ASC', - /** Specifies a descending sort order. */ - Desc = 'DESC', -} - -export enum ProductOrderField { - /** Sort products by name. */ - Name = 'NAME', - /** Sort products by rank. Note: This option is available only with the `search` filter. */ - Rank = 'RANK', - /** Sort products by price. */ - Price = 'PRICE', - /** Sort products by a minimal price of a product's variant. */ - MinimalPrice = 'MINIMAL_PRICE', - /** Sort products by update date. */ - Date = 'DATE', - /** Sort products by type. */ - Type = 'TYPE', - /** Sort products by publication status. */ - Published = 'PUBLISHED', - /** Sort products by publication date. */ - PublicationDate = 'PUBLICATION_DATE', - /** Sort products by collection. Note: This option is available only for the `Collection.products` query. */ - Collection = 'COLLECTION', - /** Sort products by rating. */ - Rating = 'RATING', -} - -export type CollectionTranslation = Node & { - __typename?: 'CollectionTranslation' - seoTitle?: Maybe - seoDescription?: Maybe - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - description?: Maybe - /** Translation language. */ - language: LanguageDisplay - /** - * Translated description of the product (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. - */ - descriptionJson?: Maybe -} - -/** Represents collection channel listing. */ -export type CollectionChannelListing = Node & { - __typename?: 'CollectionChannelListing' - publicationDate?: Maybe - isPublished: Scalars['Boolean'] - /** The ID of the object. */ - id: Scalars['ID'] - channel: Channel -} - -export type ProductTranslation = Node & { - __typename?: 'ProductTranslation' - /** The ID of the object. */ - id: Scalars['ID'] - seoTitle?: Maybe - seoDescription?: Maybe - name: Scalars['String'] - description?: Maybe - /** Translation language. */ - language: LanguageDisplay - /** - * Translated description of the product (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. - */ - descriptionJson?: Maybe -} - -/** Represents user address data. */ -export type Address = Node & { - __typename?: 'Address' - /** The ID of the object. */ - id: Scalars['ID'] - firstName: Scalars['String'] - lastName: Scalars['String'] - companyName: Scalars['String'] - streetAddress1: Scalars['String'] - streetAddress2: Scalars['String'] - city: Scalars['String'] - cityArea: Scalars['String'] - postalCode: Scalars['String'] - /** Shop's default country. */ - country: CountryDisplay - countryArea: Scalars['String'] - phone?: Maybe - /** Address is user's default shipping address. */ - isDefaultShippingAddress?: Maybe - /** Address is user's default billing address. */ - isDefaultBillingAddress?: Maybe -} - -export type WarehouseCountableConnection = { - __typename?: 'WarehouseCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type WarehouseCountableEdge = { - __typename?: 'WarehouseCountableEdge' - /** The item at the end of the edge. */ - node: Warehouse - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type WarehouseFilterInput = { - search?: Maybe - ids?: Maybe>> -} - -export type WarehouseSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort warehouses by the selected field. */ - field: WarehouseSortField -} - -export enum WarehouseSortField { - /** Sort warehouses by name. */ - Name = 'NAME', -} - -export type TranslatableItemConnection = { - __typename?: 'TranslatableItemConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type TranslatableItemEdge = { - __typename?: 'TranslatableItemEdge' - /** The item at the end of the edge. */ - node: TranslatableItem - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type TranslatableItem = - | ProductTranslatableContent - | CollectionTranslatableContent - | CategoryTranslatableContent - | AttributeTranslatableContent - | AttributeValueTranslatableContent - | ProductVariantTranslatableContent - | PageTranslatableContent - | ShippingMethodTranslatableContent - | SaleTranslatableContent - | VoucherTranslatableContent - | MenuItemTranslatableContent - -export type ProductTranslatableContent = Node & { - __typename?: 'ProductTranslatableContent' - /** The ID of the object. */ - id: Scalars['ID'] - seoTitle?: Maybe - seoDescription?: Maybe - name: Scalars['String'] - description?: Maybe - /** - * Description of the product (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. - */ - descriptionJson?: Maybe - /** Returns translated product fields for the given language code. */ - translation?: Maybe - /** Represents an individual item for sale in the storefront. */ - product?: Maybe -} - -export type ProductTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -export type CollectionTranslatableContent = Node & { - __typename?: 'CollectionTranslatableContent' - seoTitle?: Maybe - seoDescription?: Maybe - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - description?: Maybe - /** - * Description of the collection (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. - */ - descriptionJson?: Maybe - /** Returns translated collection fields for the given language code. */ - translation?: Maybe - /** Represents a collection of products. */ - collection?: Maybe -} - -export type CollectionTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -export type CategoryTranslatableContent = Node & { - __typename?: 'CategoryTranslatableContent' - seoTitle?: Maybe - seoDescription?: Maybe - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - description?: Maybe - /** - * Description of the category (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. - */ - descriptionJson?: Maybe - /** Returns translated category fields for the given language code. */ - translation?: Maybe - /** Represents a single category of products. */ - category?: Maybe -} - -export type CategoryTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -export type AttributeTranslatableContent = Node & { - __typename?: 'AttributeTranslatableContent' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - /** Returns translated attribute fields for the given language code. */ - translation?: Maybe - /** Custom attribute of a product. */ - attribute?: Maybe -} - -export type AttributeTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -export type AttributeValueTranslatableContent = Node & { - __typename?: 'AttributeValueTranslatableContent' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - /** Returns translated attribute value fields for the given language code. */ - translation?: Maybe - /** Represents a value of an attribute. */ - attributeValue?: Maybe -} - -export type AttributeValueTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -export type ProductVariantTranslatableContent = Node & { - __typename?: 'ProductVariantTranslatableContent' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - /** Returns translated product variant fields for the given language code. */ - translation?: Maybe - /** Represents a version of a product such as different size or color. */ - productVariant?: Maybe -} - -export type ProductVariantTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -export type PageTranslatableContent = Node & { - __typename?: 'PageTranslatableContent' - seoTitle?: Maybe - seoDescription?: Maybe - /** The ID of the object. */ - id: Scalars['ID'] - title: Scalars['String'] - content?: Maybe - /** - * Content of the page (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `content` field instead. - */ - contentJson?: Maybe - /** Returns translated page fields for the given language code. */ - translation?: Maybe - /** ('A static page that can be manually added by a shop operator ', 'through the dashboard.') */ - page?: Maybe -} - -export type PageTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -export type PageTranslation = Node & { - __typename?: 'PageTranslation' - seoTitle?: Maybe - seoDescription?: Maybe - /** The ID of the object. */ - id: Scalars['ID'] - title: Scalars['String'] - content?: Maybe - /** Translation language. */ - language: LanguageDisplay - /** - * Translated description of the page (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `content` field instead. - */ - contentJson?: Maybe -} - -/** A static page that can be manually added by a shop operator through the dashboard. */ -export type Page = Node & - ObjectWithMetadata & { - __typename?: 'Page' - seoTitle?: Maybe - seoDescription?: Maybe - /** The ID of the object. */ - id: Scalars['ID'] - title: Scalars['String'] - content?: Maybe - publicationDate?: Maybe - isPublished: Scalars['Boolean'] - slug: Scalars['String'] - pageType: PageType - created: Scalars['DateTime'] - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** - * Content of the page (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `content` field instead. - */ - contentJson: Scalars['JSONString'] - /** Returns translated page fields for the given language code. */ - translation?: Maybe - /** List of attributes assigned to this product. */ - attributes: Array - } - -/** A static page that can be manually added by a shop operator through the dashboard. */ -export type PageTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Represents a type of page. It defines what attributes are available to pages of this type. */ -export type PageType = Node & - ObjectWithMetadata & { - __typename?: 'PageType' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - slug: Scalars['String'] - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** Page attributes of that page type. */ - attributes?: Maybe>> - /** Attributes that can be assigned to the page type. */ - availableAttributes?: Maybe - /** Whether page type has pages assigned. */ - hasPages?: Maybe - } - -/** Represents a type of page. It defines what attributes are available to pages of this type. */ -export type PageTypeAvailableAttributesArgs = { - filter?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type ShippingMethodTranslatableContent = Node & { - __typename?: 'ShippingMethodTranslatableContent' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - description?: Maybe - /** Returns translated shipping method fields for the given language code. */ - translation?: Maybe - /** Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. */ - shippingMethod?: Maybe -} - -export type ShippingMethodTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -export type SaleTranslatableContent = Node & { - __typename?: 'SaleTranslatableContent' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - /** Returns translated sale fields for the given language code. */ - translation?: Maybe - /** Sales allow creating discounts for categories, collections or products and are visible to all the customers. */ - sale?: Maybe -} - -export type SaleTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -export type SaleTranslation = Node & { - __typename?: 'SaleTranslation' - /** The ID of the object. */ - id: Scalars['ID'] - name?: Maybe - /** Translation language. */ - language: LanguageDisplay -} - -/** Sales allow creating discounts for categories, collections or products and are visible to all the customers. */ -export type Sale = Node & { - __typename?: 'Sale' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - type: SaleType - startDate: Scalars['DateTime'] - endDate?: Maybe - /** List of categories this sale applies to. */ - categories?: Maybe - /** List of collections this sale applies to. */ - collections?: Maybe - /** List of products this sale applies to. */ - products?: Maybe - /** Returns translated sale fields for the given language code. */ - translation?: Maybe - /** List of channels available for the sale. */ - channelListings?: Maybe> - /** Sale value. */ - discountValue?: Maybe - /** Currency code for sale. */ - currency?: Maybe -} - -/** Sales allow creating discounts for categories, collections or products and are visible to all the customers. */ -export type SaleCategoriesArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Sales allow creating discounts for categories, collections or products and are visible to all the customers. */ -export type SaleCollectionsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Sales allow creating discounts for categories, collections or products and are visible to all the customers. */ -export type SaleProductsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Sales allow creating discounts for categories, collections or products and are visible to all the customers. */ -export type SaleTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** An enumeration. */ -export enum SaleType { - /** fixed */ - Fixed = 'FIXED', - /** % */ - Percentage = 'PERCENTAGE', -} - -export type CollectionCountableConnection = { - __typename?: 'CollectionCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type CollectionCountableEdge = { - __typename?: 'CollectionCountableEdge' - /** The item at the end of the edge. */ - node: Collection - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Represents sale channel listing. */ -export type SaleChannelListing = Node & { - __typename?: 'SaleChannelListing' - /** The ID of the object. */ - id: Scalars['ID'] - channel: Channel - discountValue: Scalars['Float'] - currency: Scalars['String'] -} - -export type VoucherTranslatableContent = Node & { - __typename?: 'VoucherTranslatableContent' - /** The ID of the object. */ - id: Scalars['ID'] - name?: Maybe - /** Returns translated voucher fields for the given language code. */ - 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. */ - voucher?: Maybe -} - -export type VoucherTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -export type VoucherTranslation = Node & { - __typename?: 'VoucherTranslation' - /** The ID of the object. */ - id: Scalars['ID'] - name?: Maybe - /** Translation language. */ - language: LanguageDisplay -} - -/** 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 & { - __typename?: 'Voucher' - /** The ID of the object. */ - id: Scalars['ID'] - name?: Maybe - /** Determines a type of voucher. */ - type: VoucherTypeEnum +export type CountryDisplay = { + __typename?: 'CountryDisplay' + /** Country code. */ code: Scalars['String'] - usageLimit?: Maybe - used: Scalars['Int'] - startDate: Scalars['DateTime'] - endDate?: Maybe - applyOncePerOrder: Scalars['Boolean'] - applyOncePerCustomer: Scalars['Boolean'] - /** Determines a type of discount for voucher - value or percentage */ - discountValueType: DiscountValueTypeEnum - minCheckoutItemsQuantity?: Maybe - /** List of categories this voucher applies to. */ - categories?: Maybe - /** List of collections this voucher applies to. */ - collections?: Maybe - /** List of products this voucher applies to. */ - products?: Maybe - /** List of countries available for the shipping voucher. */ - countries?: Maybe>> - /** Returns translated voucher fields for the given language code. */ - translation?: Maybe - /** Voucher value. */ - discountValue?: Maybe - /** Currency code for voucher. */ - currency?: Maybe - /** Minimum order value to apply voucher. */ - minSpent?: Maybe - /** List of availability in channels for the voucher. */ - channelListings?: Maybe> + /** Country name. */ + country: Scalars['String'] + /** Country tax. */ + vat?: 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 = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: 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 VoucherCollectionsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: 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 VoucherProductsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: 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 VoucherTranslationArgs = { - languageCode: LanguageCodeEnum -} - -export enum VoucherTypeEnum { - Shipping = 'SHIPPING', - EntireOrder = 'ENTIRE_ORDER', - SpecificProduct = 'SPECIFIC_PRODUCT', -} - -export enum DiscountValueTypeEnum { - Fixed = 'FIXED', - Percentage = 'PERCENTAGE', -} - -/** Represents voucher channel listing. */ -export type VoucherChannelListing = Node & { - __typename?: 'VoucherChannelListing' - /** The ID of the object. */ - id: Scalars['ID'] - channel: Channel - discountValue: Scalars['Float'] - currency: Scalars['String'] - minSpent?: Maybe -} - -export type MenuItemTranslatableContent = Node & { - __typename?: 'MenuItemTranslatableContent' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - /** Returns translated menu item fields for the given language code. */ - translation?: Maybe - /** Represents a single item of the related menu. Can store categories, collection or pages. */ - menuItem?: Maybe -} - -export type MenuItemTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -export type MenuItemTranslation = Node & { - __typename?: 'MenuItemTranslation' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - /** Translation language. */ - language: LanguageDisplay -} - -/** Represents a single item of the related menu. Can store categories, collection or pages. */ -export type MenuItem = Node & - ObjectWithMetadata & { - __typename?: 'MenuItem' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - menu: Menu - parent?: Maybe - category?: Maybe - collection?: Maybe - page?: Maybe - level: Scalars['Int'] - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - children?: Maybe>> - /** URL to the menu item. */ - url?: Maybe - /** Returns translated menu item fields for the given language code. */ - translation?: Maybe - } - -/** Represents a single item of the related menu. Can store categories, collection or pages. */ -export type MenuItemTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Represents a single menu - an object that is used to help navigate through the store. */ -export type Menu = Node & - ObjectWithMetadata & { - __typename?: 'Menu' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - slug: Scalars['String'] - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - items?: Maybe>> - } - -export enum TranslatableKinds { - Attribute = 'ATTRIBUTE', - AttributeValue = 'ATTRIBUTE_VALUE', - Category = 'CATEGORY', - Collection = 'COLLECTION', - MenuItem = 'MENU_ITEM', - Page = 'PAGE', - Product = 'PRODUCT', - Sale = 'SALE', - ShippingMethod = 'SHIPPING_METHOD', - Variant = 'VARIANT', - Voucher = 'VOUCHER', -} - -export type StockCountableConnection = { - __typename?: 'StockCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type StockCountableEdge = { - __typename?: 'StockCountableEdge' - /** The item at the end of the edge. */ - node: Stock - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type StockFilterInput = { - quantity?: Maybe - search?: Maybe -} - -/** Represents a shop resource containing general shop data and configuration. */ -export type Shop = { - __typename?: 'Shop' - /** List of available payment gateways. */ - availablePaymentGateways: Array - /** List of available external authentications. */ - availableExternalAuthentications: Array - /** Shipping methods that are available for the shop. */ - availableShippingMethods?: Maybe>> - /** List of countries available in the shop. */ - countries: Array - /** Shop's default country. */ - defaultCountry?: Maybe - /** Default shop's email sender's name. */ - defaultMailSenderName?: Maybe - /** Default shop's email sender's address. */ - defaultMailSenderAddress?: Maybe - /** Shop's description. */ - description?: Maybe - /** Shop's domain data. */ - domain: Domain - /** List of the shops's supported languages. */ - languages: Array> - /** Shop's name. */ - name: Scalars['String'] - /** - * Shop's navigation. - * @deprecated Fetch menus using the `menu` query with `slug` parameter. - */ - navigation?: Maybe - /** List of available permissions. */ - permissions: Array> - /** List of possible phone prefixes. */ - phonePrefixes: Array> - /** Header text. */ - headerText?: Maybe - /** Include taxes in prices. */ - includeTaxesInPrices: Scalars['Boolean'] - /** Display prices with tax in store. */ - displayGrossPrices: Scalars['Boolean'] - /** Charge taxes on shipping. */ - chargeTaxesOnShipping: Scalars['Boolean'] - /** Enable inventory tracking. */ - trackInventoryByDefault?: Maybe - /** Default weight unit. */ - defaultWeightUnit?: Maybe - /** Returns translated shop fields for the given language code. */ - translation?: Maybe - /** Enable automatic fulfillment for all digital products. */ - automaticFulfillmentDigitalProducts?: Maybe - /** Default number of max downloads per digital content URL. */ - defaultDigitalMaxDownloads?: Maybe - /** Default number of days which digital content URL will be valid. */ - defaultDigitalUrlValidDays?: Maybe - /** Company address. */ - companyAddress?: Maybe
- /** URL of a view where customers can set their password. */ - customerSetPasswordUrl?: Maybe - /** List of staff notification recipients. */ - staffNotificationRecipients?: Maybe>> - /** Resource limitations and current usage if any set for a shop */ - limits: LimitInfo - /** Saleor API version. */ - version: Scalars['String'] -} - -/** Represents a shop resource containing general shop data and configuration. */ -export type ShopAvailablePaymentGatewaysArgs = { - currency?: Maybe -} - -/** Represents a shop resource containing general shop data and configuration. */ -export type ShopAvailableShippingMethodsArgs = { - channel: Scalars['String'] - address?: Maybe -} - -/** Represents a shop resource containing general shop data and configuration. */ -export type ShopCountriesArgs = { - languageCode?: Maybe -} - -/** Represents a shop resource containing general shop data and configuration. */ -export type ShopTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Available payment gateway backend with configuration necessary to setup client. */ -export type PaymentGateway = { - __typename?: 'PaymentGateway' - /** Payment gateway name. */ - name: Scalars['String'] - /** Payment gateway ID. */ - id: Scalars['ID'] - /** Payment gateway client configuration. */ - config: Array - /** Payment gateway supported currencies. */ - currencies: Array> -} - -/** Payment gateway client configuration key and value pair. */ -export type GatewayConfigLine = { - __typename?: 'GatewayConfigLine' - /** Gateway config key. */ - field: Scalars['String'] - /** Gateway config value for key. */ - value?: Maybe -} - -export type ExternalAuthentication = { - __typename?: 'ExternalAuthentication' - /** ID of external authentication plugin. */ - id: Scalars['String'] - /** Name of external authentication plugin. */ - name?: Maybe -} - -/** Represents shop's domain. */ -export type Domain = { - __typename?: 'Domain' - /** The host name of the domain. */ - host: Scalars['String'] - /** Inform if SSL is enabled. */ - sslEnabled: Scalars['Boolean'] - /** Shop's absolute URL. */ - url: Scalars['String'] -} - -/** Represents shop's navigation menus. */ -export type Navigation = { - __typename?: 'Navigation' - /** Main navigation bar. */ - main?: Maybe - /** Secondary navigation bar. */ - secondary?: Maybe -} - -export type ShopTranslation = Node & { - __typename?: 'ShopTranslation' - /** The ID of the object. */ - id: Scalars['ID'] - headerText: Scalars['String'] - description: Scalars['String'] - /** Translation language. */ - language: LanguageDisplay -} - -/** 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 & { - __typename?: 'StaffNotificationRecipient' - /** Returns a user subscribed to email notifications. */ +/** Create JWT token. */ +export type CreateToken = { + __typename?: 'CreateToken' + /** JWT token, required to authenticate. */ + token?: Maybe + /** JWT refresh token, required to re-generate access token. */ + refreshToken?: Maybe + /** CSRF token required to re-generate access token. */ + csrfToken?: Maybe + /** A user instance. */ user?: Maybe - /** Determines if a notification active. */ - active?: Maybe - /** The ID of the object. */ - id: Scalars['ID'] - /** Returns email address of a user subscribed to email notifications. */ - email?: Maybe -} - -/** Represents user data. */ -export type User = Node & - ObjectWithMetadata & { - __typename?: 'User' - /** The ID of the object. */ - id: Scalars['ID'] - lastLogin?: Maybe - email: Scalars['String'] - firstName: Scalars['String'] - lastName: Scalars['String'] - isStaff: Scalars['Boolean'] - isActive: Scalars['Boolean'] - /** A note about the customer. */ - note?: Maybe - dateJoined: Scalars['DateTime'] - defaultShippingAddress?: Maybe
- defaultBillingAddress?: Maybe
- /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** List of all user's addresses. */ - addresses?: Maybe>> - /** - * Returns the last open checkout of this user. - * @deprecated Use the `checkout_tokens` field to fetch the user checkouts. - */ - checkout?: Maybe - /** Returns the checkout UUID's assigned to this user. */ - checkoutTokens?: Maybe> - /** List of the user gift cards. */ - giftCards?: Maybe - /** List of user's orders. */ - orders?: Maybe - /** - * List of user's permissions. - * @deprecated Will be removed in Saleor 2.11.Use the `userPermissions` instead. - */ - permissions?: Maybe>> - /** List of user's permissions. */ - userPermissions?: Maybe>> - /** List of user's permission groups. */ - permissionGroups?: Maybe>> - /** List of user's permission groups which user can manage. */ - editableGroups?: Maybe>> - avatar?: Maybe - /** List of events associated with the user. */ - events?: Maybe>> - /** List of stored payment sources. */ - storedPaymentSources?: Maybe>> - /** User language code. */ - languageCode: LanguageCodeEnum - } - -/** Represents user data. */ -export type UserCheckoutTokensArgs = { - channel?: Maybe -} - -/** Represents user data. */ -export type UserGiftCardsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Represents user data. */ -export type UserOrdersArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Represents user data. */ -export type UserAvatarArgs = { - size?: Maybe -} - -/** Checkout object. */ -export type Checkout = Node & - ObjectWithMetadata & { - __typename?: 'Checkout' - created: Scalars['DateTime'] - lastChange: Scalars['DateTime'] - user?: Maybe - quantity: Scalars['Int'] - channel: Channel - billingAddress?: Maybe
- shippingAddress?: Maybe
- note: Scalars['String'] - discount?: Maybe - discountName?: Maybe - translatedDiscountName?: Maybe - voucherCode?: Maybe - /** List of gift cards associated with this checkout. */ - giftCards?: Maybe>> - /** The ID of the object. */ - id: Scalars['ID'] - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** Shipping methods that can be used with this order. */ - availableShippingMethods: Array> - /** List of available payment gateways. */ - availablePaymentGateways: Array - /** Email of a customer. */ - email: Scalars['String'] - /** Returns True, if checkout requires shipping. */ - isShippingRequired: Scalars['Boolean'] - /** A list of checkout lines, each containing information about an item in the checkout. */ - lines?: Maybe>> - /** The price of the shipping, with all the taxes included. */ - shippingPrice?: Maybe - /** The shipping method related with checkout. */ - shippingMethod?: Maybe - /** The price of the checkout before shipping, with taxes included. */ - subtotalPrice?: Maybe - /** The checkout's token. */ - token: Scalars['UUID'] - /** The sum of the the checkout line prices, with all the taxes,shipping costs, and discounts included. */ - totalPrice?: Maybe - /** Checkout language code. */ - languageCode: LanguageCodeEnum - } - -/** 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 & { - __typename?: 'GiftCard' - /** Gift card code. */ - code?: Maybe - /** The customer who bought a gift card. */ - user?: Maybe - created: Scalars['DateTime'] - startDate: Scalars['Date'] - endDate?: Maybe - lastUsedOn?: Maybe - isActive: Scalars['Boolean'] - initialBalance?: Maybe - currentBalance?: Maybe - /** The ID of the object. */ - id: Scalars['ID'] - /** Code in format which allows displaying in a user interface. */ - displayCode?: Maybe -} - -/** Represents an item in the checkout. */ -export type CheckoutLine = Node & { - __typename?: 'CheckoutLine' - /** The ID of the object. */ - id: Scalars['ID'] - variant: ProductVariant - quantity: Scalars['Int'] - /** The sum of the checkout line price, taxes and discounts. */ - totalPrice?: Maybe - /** Indicates whether the item need to be delivered. */ - requiresShipping?: Maybe -} - -export type GiftCardCountableConnection = { - __typename?: 'GiftCardCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type GiftCardCountableEdge = { - __typename?: 'GiftCardCountableEdge' - /** The item at the end of the edge. */ - node: GiftCard - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type OrderCountableConnection = { - __typename?: 'OrderCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type OrderCountableEdge = { - __typename?: 'OrderCountableEdge' - /** The item at the end of the edge. */ - node: Order - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Represents an order in the shop. */ -export type Order = Node & - ObjectWithMetadata & { - __typename?: 'Order' - /** The ID of the object. */ - id: Scalars['ID'] - created: Scalars['DateTime'] - status: OrderStatus - user?: Maybe - trackingClientId: Scalars['String'] - billingAddress?: Maybe
- shippingAddress?: Maybe
- shippingMethod?: Maybe - shippingMethodName?: Maybe - channel: Channel - /** Total price of shipping. */ - shippingPrice: TaxedMoney - shippingTaxRate: Scalars['Float'] - token: Scalars['String'] - voucher?: Maybe - /** List of user gift cards. */ - giftCards?: Maybe>> - displayGrossPrices: Scalars['Boolean'] - customerNote: Scalars['String'] - weight?: Maybe - redirectUrl?: Maybe - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** List of shipments for the order. */ - fulfillments: Array> - /** List of order lines. */ - lines: Array> - /** List of actions that can be performed in the current state of an order. */ - actions: Array> - /** Shipping methods that can be used with this order. */ - availableShippingMethods?: Maybe>> - /** List of order invoices. */ - invoices?: Maybe>> - /** User-friendly number of an order. */ - number?: Maybe - /** Informs if an order is fully paid. */ - isPaid: Scalars['Boolean'] - /** Internal payment status. */ - paymentStatus: PaymentChargeStatusEnum - /** User-friendly payment status. */ - paymentStatusDisplay: Scalars['String'] - /** List of payments for the order. */ - payments?: Maybe>> - /** Total amount of the order. */ - total: TaxedMoney - /** Undiscounted total amount of the order. */ - undiscountedTotal: TaxedMoney - /** The sum of line prices not including shipping. */ - subtotal: TaxedMoney - /** User-friendly order status. */ - statusDisplay?: Maybe - /** Informs whether a draft order can be finalized(turned into a regular order). */ - canFinalize: Scalars['Boolean'] - /** Amount authorized for the order. */ - totalAuthorized: Money - /** Amount captured by payment. */ - totalCaptured: Money - /** List of events associated with the order. */ - events?: Maybe>> - /** The difference between the paid and the order total amount. */ - totalBalance: Money - /** Email address of the customer. */ - userEmail?: Maybe - /** Returns True, if order requires shipping. */ - isShippingRequired: Scalars['Boolean'] - /** @deprecated Use the `languageCodeEnum` field to fetch the language code. This field will be removed in Saleor 4.0. */ - languageCode: Scalars['String'] - /** Order language code. */ - languageCodeEnum: LanguageCodeEnum - /** - * Returns applied discount. - * @deprecated Use discounts field. This field will be removed in Saleor 4.0. - */ - discount?: Maybe - /** - * Discount name. - * @deprecated Use discounts field. This field will be removed in Saleor 4.0. - */ - discountName?: Maybe - /** - * Translated discount name. - * @deprecated Use discounts field. This field will be removed in Saleor 4.0. - */ - translatedDiscountName?: Maybe - /** List of all discounts assigned to the order. */ - discounts?: Maybe> - } - -/** An enumeration. */ -export enum OrderStatus { - /** Draft */ - Draft = 'DRAFT', - /** Unconfirmed */ - Unconfirmed = 'UNCONFIRMED', - /** Unfulfilled */ - Unfulfilled = 'UNFULFILLED', - /** Partially fulfilled */ - PartiallyFulfilled = 'PARTIALLY_FULFILLED', - /** Partially returned */ - PartiallyReturned = 'PARTIALLY_RETURNED', - /** Returned */ - Returned = 'RETURNED', - /** Fulfilled */ - Fulfilled = 'FULFILLED', - /** Canceled */ - Canceled = 'CANCELED', -} - -/** Represents order fulfillment. */ -export type Fulfillment = Node & - ObjectWithMetadata & { - __typename?: 'Fulfillment' - /** The ID of the object. */ - id: Scalars['ID'] - fulfillmentOrder: Scalars['Int'] - status: FulfillmentStatus - trackingNumber: Scalars['String'] - created: Scalars['DateTime'] - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** List of lines for the fulfillment. */ - lines?: Maybe>> - /** User-friendly fulfillment status. */ - statusDisplay?: Maybe - /** Warehouse from fulfillment was fulfilled. */ - warehouse?: Maybe - } - -/** An enumeration. */ -export enum FulfillmentStatus { - /** Fulfilled */ - Fulfilled = 'FULFILLED', - /** Refunded */ - Refunded = 'REFUNDED', - /** Returned */ - Returned = 'RETURNED', - /** Replaced */ - Replaced = 'REPLACED', - /** Refunded and returned */ - RefundedAndReturned = 'REFUNDED_AND_RETURNED', - /** Canceled */ - Canceled = 'CANCELED', -} - -/** Represents line of the fulfillment. */ -export type FulfillmentLine = Node & { - __typename?: 'FulfillmentLine' - /** The ID of the object. */ - id: Scalars['ID'] - quantity: Scalars['Int'] - orderLine?: Maybe -} - -/** Represents order line of particular order. */ -export type OrderLine = Node & { - __typename?: 'OrderLine' - /** The ID of the object. */ - id: Scalars['ID'] - productName: Scalars['String'] - variantName: Scalars['String'] - productSku: Scalars['String'] - isShippingRequired: Scalars['Boolean'] - quantity: Scalars['Int'] - quantityFulfilled: Scalars['Int'] - unitDiscountReason?: Maybe - taxRate: Scalars['Float'] - digitalContentUrl?: Maybe - /** The main thumbnail for the ordered product. */ - thumbnail?: Maybe - /** Price of the single item in the order line. */ - unitPrice: TaxedMoney - /** Price of the single item in the order line without applied an order line discount. */ - undiscountedUnitPrice: TaxedMoney - /** The discount applied to the single order line. */ - unitDiscount: Money - /** Value of the discount. Can store fixed value or percent value */ - unitDiscountValue: Scalars['PositiveDecimal'] - /** Price of the order line. */ - totalPrice: TaxedMoney - /** A purchased product variant. Note: this field may be null if the variant has been removed from stock at all. */ - variant?: Maybe - /** Product name in the customer's language */ - translatedProductName: Scalars['String'] - /** Variant name in the customer's language */ - translatedVariantName: Scalars['String'] - /** List of allocations across warehouses. */ - allocations?: Maybe> - /** Type of the discount: fixed or percent */ - unitDiscountType?: Maybe -} - -/** Represents order line of particular order. */ -export type OrderLineThumbnailArgs = { - size?: Maybe -} - -/** Represents allocation. */ -export type Allocation = Node & { - __typename?: 'Allocation' - /** The ID of the object. */ - id: Scalars['ID'] - /** Quantity allocated for orders. */ - quantity: Scalars['Int'] - /** The warehouse were items were allocated. */ - warehouse: Warehouse -} - -export enum OrderAction { - /** Represents the capture action. */ - Capture = 'CAPTURE', - /** Represents a mark-as-paid action. */ - MarkAsPaid = 'MARK_AS_PAID', - /** Represents a refund action. */ - Refund = 'REFUND', - /** Represents a void action. */ - Void = 'VOID', -} - -/** Represents an Invoice. */ -export type Invoice = ObjectWithMetadata & - Job & - Node & { - __typename?: 'Invoice' - /** The ID of the object. */ - id: Scalars['ID'] - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** Job status. */ - status: JobStatusEnum - number?: Maybe - externalUrl?: Maybe - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** Created date time of job in ISO 8601 format. */ - createdAt: Scalars['DateTime'] - /** Date time of job last update in ISO 8601 format. */ - updatedAt: Scalars['DateTime'] - /** Job message. */ - message?: Maybe - /** URL to download an invoice. */ - url?: Maybe - } - -export type Job = { - /** Job status. */ - status: JobStatusEnum - /** Created date time of job in ISO 8601 format. */ - createdAt: Scalars['DateTime'] - /** Date time of job last update in ISO 8601 format. */ - updatedAt: Scalars['DateTime'] - /** Job message. */ - message?: Maybe -} - -/** An enumeration. */ -export enum JobStatusEnum { - Pending = 'PENDING', - Success = 'SUCCESS', - Failed = 'FAILED', - Deleted = 'DELETED', -} - -/** An enumeration. */ -export enum PaymentChargeStatusEnum { - NotCharged = 'NOT_CHARGED', - Pending = 'PENDING', - PartiallyCharged = 'PARTIALLY_CHARGED', - FullyCharged = 'FULLY_CHARGED', - PartiallyRefunded = 'PARTIALLY_REFUNDED', - FullyRefunded = 'FULLY_REFUNDED', - Refused = 'REFUSED', - Cancelled = 'CANCELLED', -} - -/** Represents a payment of a given type. */ -export type Payment = Node & { - __typename?: 'Payment' - /** The ID of the object. */ - id: Scalars['ID'] - gateway: Scalars['String'] - isActive: Scalars['Boolean'] - created: Scalars['DateTime'] - modified: Scalars['DateTime'] - token: Scalars['String'] - checkout?: Maybe - order?: Maybe - paymentMethodType: Scalars['String'] - customerIpAddress?: Maybe - /** Internal payment status. */ - chargeStatus: PaymentChargeStatusEnum - /** List of actions that can be performed in the current state of a payment. */ - actions: Array> - /** Total amount of the payment. */ - total?: Maybe - /** Total amount captured for this payment. */ - capturedAmount?: Maybe - /** List of all transactions within this payment. */ - transactions?: Maybe>> - /** Maximum amount of money that can be captured. */ - availableCaptureAmount?: Maybe - /** Maximum amount of money that can be refunded. */ - availableRefundAmount?: Maybe - /** The details of the card used for this payment. */ - creditCard?: Maybe -} - -/** An object representing a single payment. */ -export type Transaction = Node & { - __typename?: 'Transaction' - /** The ID of the object. */ - id: Scalars['ID'] - created: Scalars['DateTime'] - payment: Payment - token: Scalars['String'] - kind: TransactionKind - isSuccess: Scalars['Boolean'] - error?: Maybe - gatewayResponse: Scalars['JSONString'] - /** Total amount of the transaction. */ - amount?: Maybe -} - -/** An enumeration. */ -export enum TransactionKind { - /** External reference */ - External = 'EXTERNAL', - /** Authorization */ - Auth = 'AUTH', - /** Pending */ - Pending = 'PENDING', - /** Action to confirm */ - ActionToConfirm = 'ACTION_TO_CONFIRM', - /** Refund */ - Refund = 'REFUND', - /** Refund in progress */ - RefundOngoing = 'REFUND_ONGOING', - /** Capture */ - Capture = 'CAPTURE', - /** Void */ - Void = 'VOID', - /** Confirm */ - Confirm = 'CONFIRM', - /** Cancel */ - Cancel = 'CANCEL', + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array } export type CreditCard = { @@ -3846,193 +2433,32 @@ export type CreditCard = { expYear?: Maybe } -/** History log of the order. */ -export type OrderEvent = Node & { - __typename?: 'OrderEvent' - /** The ID of the object. */ - id: Scalars['ID'] - /** Date when event happened at in ISO 8601 format. */ - date?: Maybe - /** Order event type. */ - type?: Maybe - /** User who performed the action. */ +/** Deletes customers. */ +export type CustomerBulkDelete = { + __typename?: 'CustomerBulkDelete' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array +} + +/** Creates a new customer. */ +export type CustomerCreate = { + __typename?: 'CustomerCreate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array user?: Maybe - /** Content of the event. */ - message?: Maybe - /** Email of the customer. */ - email?: Maybe - /** Type of an email sent to the customer. */ - emailType?: Maybe - /** Amount of money. */ - amount?: Maybe - /** The payment ID from the payment gateway. */ - paymentId?: Maybe - /** The payment gateway of the payment. */ - paymentGateway?: Maybe - /** Number of items. */ - quantity?: Maybe - /** Composed ID of the Fulfillment. */ - composedId?: Maybe - /** User-friendly number of an order. */ - orderNumber?: Maybe - /** Number of an invoice related to the order. */ - invoiceNumber?: Maybe - /** List of oversold lines names. */ - oversoldItems?: Maybe>> - /** The concerned lines. */ - lines?: Maybe>> - /** The lines fulfilled. */ - fulfilledItems?: Maybe>> - /** The warehouse were items were restocked. */ - warehouse?: Maybe - /** The transaction reference of captured payment. */ - transactionReference?: Maybe - /** Define if shipping costs were included to the refund. */ - shippingCostsIncluded?: Maybe - /** The order which is related to this order. */ - relatedOrder?: Maybe - /** The discount applied to the order. */ - discount?: Maybe } -/** An enumeration. */ -export enum OrderEventsEnum { - DraftCreated = 'DRAFT_CREATED', - DraftCreatedFromReplace = 'DRAFT_CREATED_FROM_REPLACE', - AddedProducts = 'ADDED_PRODUCTS', - RemovedProducts = 'REMOVED_PRODUCTS', - Placed = 'PLACED', - PlacedFromDraft = 'PLACED_FROM_DRAFT', - OversoldItems = 'OVERSOLD_ITEMS', - Canceled = 'CANCELED', - OrderMarkedAsPaid = 'ORDER_MARKED_AS_PAID', - OrderFullyPaid = 'ORDER_FULLY_PAID', - OrderReplacementCreated = 'ORDER_REPLACEMENT_CREATED', - OrderDiscountAdded = 'ORDER_DISCOUNT_ADDED', - OrderDiscountAutomaticallyUpdated = 'ORDER_DISCOUNT_AUTOMATICALLY_UPDATED', - OrderDiscountUpdated = 'ORDER_DISCOUNT_UPDATED', - OrderDiscountDeleted = 'ORDER_DISCOUNT_DELETED', - OrderLineDiscountUpdated = 'ORDER_LINE_DISCOUNT_UPDATED', - OrderLineDiscountRemoved = 'ORDER_LINE_DISCOUNT_REMOVED', - UpdatedAddress = 'UPDATED_ADDRESS', - EmailSent = 'EMAIL_SENT', - Confirmed = 'CONFIRMED', - PaymentAuthorized = 'PAYMENT_AUTHORIZED', - PaymentCaptured = 'PAYMENT_CAPTURED', - ExternalServiceNotification = 'EXTERNAL_SERVICE_NOTIFICATION', - PaymentRefunded = 'PAYMENT_REFUNDED', - PaymentVoided = 'PAYMENT_VOIDED', - PaymentFailed = 'PAYMENT_FAILED', - InvoiceRequested = 'INVOICE_REQUESTED', - InvoiceGenerated = 'INVOICE_GENERATED', - InvoiceUpdated = 'INVOICE_UPDATED', - InvoiceSent = 'INVOICE_SENT', - FulfillmentCanceled = 'FULFILLMENT_CANCELED', - FulfillmentRestockedItems = 'FULFILLMENT_RESTOCKED_ITEMS', - FulfillmentFulfilledItems = 'FULFILLMENT_FULFILLED_ITEMS', - FulfillmentRefunded = 'FULFILLMENT_REFUNDED', - FulfillmentReturned = 'FULFILLMENT_RETURNED', - FulfillmentReplaced = 'FULFILLMENT_REPLACED', - TrackingUpdated = 'TRACKING_UPDATED', - NoteAdded = 'NOTE_ADDED', - Other = 'OTHER', -} - -/** An enumeration. */ -export enum OrderEventsEmailsEnum { - PaymentConfirmation = 'PAYMENT_CONFIRMATION', - Confirmed = 'CONFIRMED', - ShippingConfirmation = 'SHIPPING_CONFIRMATION', - TrackingUpdated = 'TRACKING_UPDATED', - OrderConfirmation = 'ORDER_CONFIRMATION', - OrderCancel = 'ORDER_CANCEL', - OrderRefund = 'ORDER_REFUND', - FulfillmentConfirmation = 'FULFILLMENT_CONFIRMATION', - DigitalLinks = 'DIGITAL_LINKS', -} - -export type OrderEventOrderLineObject = { - __typename?: 'OrderEventOrderLineObject' - /** The variant quantity. */ - quantity?: Maybe - /** The order line. */ - orderLine?: Maybe - /** The variant name. */ - itemName?: Maybe - /** The discount applied to the order line. */ - discount?: Maybe -} - -export type OrderEventDiscountObject = { - __typename?: 'OrderEventDiscountObject' - /** Type of the discount: fixed or percent. */ - valueType: DiscountValueTypeEnum - /** Value of the discount. Can store fixed value or percent value. */ - value: Scalars['PositiveDecimal'] - /** Explanation for the applied discount. */ - reason?: Maybe - /** Returns amount of discount. */ - amount?: Maybe - /** Type of the discount: fixed or percent. */ - oldValueType?: Maybe - /** Value of the discount. Can store fixed value or percent value. */ - oldValue?: Maybe - /** Returns amount of discount. */ - oldAmount?: Maybe -} - -/** Contains all details related to the applied discount to the order. */ -export type OrderDiscount = Node & { - __typename?: 'OrderDiscount' - /** The ID of the object. */ - id: Scalars['ID'] - type: OrderDiscountType - /** Type of the discount: fixed or percent */ - valueType: DiscountValueTypeEnum - /** Value of the discount. Can store fixed value or percent value */ - value: Scalars['PositiveDecimal'] - name?: Maybe - translatedName?: Maybe - /** Explanation for the applied discount. */ - reason?: Maybe - /** Returns amount of discount. */ - amount: Money -} - -/** An enumeration. */ -export enum OrderDiscountType { - /** Voucher */ - Voucher = 'VOUCHER', - /** Manual */ - Manual = 'MANUAL', -} - -export type UserPermission = { - __typename?: 'UserPermission' - /** Internal code for permission. */ - code: PermissionEnum - /** Describe action(s) allowed to do by permission. */ - name: Scalars['String'] - /** List of user permission groups which contains this permission. */ - sourcePermissionGroups?: Maybe> -} - -export type UserPermissionSourcePermissionGroupsArgs = { - userId: Scalars['ID'] -} - -/** Represents permission group data. */ -export type Group = Node & { - __typename?: 'Group' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - /** List of group permissions */ - permissions?: Maybe>> - /** List of group users */ - users?: Maybe>> - /** True, if the currently authenticated user has rights to manage a group. */ - userCanManage: Scalars['Boolean'] +/** Deletes a customer. */ +export type CustomerDelete = { + __typename?: 'CustomerDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array + user?: Maybe } /** History log of the customer. */ @@ -4073,42 +2499,101 @@ export enum CustomerEventsEnum { NoteAdded = 'NOTE_ADDED', } -/** Represents a payment source stored for user in payment gateway, such as credit card. */ -export type PaymentSource = { - __typename?: 'PaymentSource' - /** Payment gateway name. */ - gateway: Scalars['String'] - /** Stored credit card details if available. */ - creditCardInfo?: Maybe -} - -export type LimitInfo = { - __typename?: 'LimitInfo' - /** Defines the current resource usage. */ - currentUsage: Limits - /** Defines the allowed maximum resource usage, null means unlimited. */ - allowedUsage: Limits -} - -export type Limits = { - __typename?: 'Limits' - channels?: Maybe - orders?: Maybe - productVariants?: Maybe - staffUsers?: Maybe - warehouses?: Maybe -} - -/** Order related settings from site settings. */ -export type OrderSettings = { - __typename?: 'OrderSettings' - automaticallyConfirmAllNewOrders: Scalars['Boolean'] -} - -export type ShippingZoneFilterInput = { +export type CustomerFilterInput = { + dateJoined?: Maybe + numberOfOrders?: Maybe + placedOrders?: Maybe search?: Maybe } +export type CustomerInput = { + /** Billing address of the customer. */ + defaultBillingAddress?: Maybe + /** Shipping address of the customer. */ + defaultShippingAddress?: Maybe + /** Given name. */ + firstName?: Maybe + /** Family name. */ + lastName?: Maybe + /** The unique email address of the user. */ + email?: Maybe + /** User account is active. */ + isActive?: Maybe + /** A note about the user. */ + note?: Maybe + /** User language code. */ + languageCode?: Maybe +} + +/** Updates an existing customer. */ +export type CustomerUpdate = { + __typename?: 'CustomerUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array + user?: Maybe +} + +export type DateRangeInput = { + /** Start date. */ + gte?: Maybe + /** End date. */ + lte?: Maybe +} + +export type DateTimeRangeInput = { + /** Start date. */ + gte?: Maybe + /** End date. */ + lte?: Maybe +} + +/** Deactivate all JWT tokens of the currently authenticated user. */ +export type DeactivateAllUserTokens = { + __typename?: 'DeactivateAllUserTokens' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array +} + +/** Delete metadata of an object. */ +export type DeleteMetadata = { + __typename?: 'DeleteMetadata' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + metadataErrors: Array + errors: Array + item?: Maybe +} + +/** Delete object's private metadata. */ +export type DeletePrivateMetadata = { + __typename?: 'DeletePrivateMetadata' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + metadataErrors: Array + errors: Array + item?: Maybe +} + +export type DigitalContent = Node & + ObjectWithMetadata & { + __typename?: 'DigitalContent' + useDefaultSettings: Scalars['Boolean'] + automaticFulfillment: Scalars['Boolean'] + contentFile: Scalars['String'] + maxDownloads?: Maybe + urlValidDays?: Maybe + /** List of URLs for the digital variant. */ + urls?: Maybe>> + /** The ID of the object. */ + id: Scalars['ID'] + /** List of private metadata items.Requires proper staff permissions to access. */ + privateMetadata: Array> + /** List of public metadata items. Can be accessed without permissions. */ + metadata: Array> + /** Product variant assigned to digital content. */ + productVariant: ProductVariant + } + export type DigitalContentCountableConnection = { __typename?: 'DigitalContentCountableConnection' /** Pagination data for this connection. */ @@ -4126,453 +2611,110 @@ export type DigitalContentCountableEdge = { cursor: Scalars['String'] } -export type CategoryFilterInput = { - search?: Maybe - metadata?: Maybe>> - ids?: Maybe>> +/** Create new digital content. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec */ +export type DigitalContentCreate = { + __typename?: 'DigitalContentCreate' + variant?: Maybe + content?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array } -export type CategorySortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Specifies the channel in which to sort the data. */ - channel?: Maybe - /** Sort categories by the selected field. */ - field: CategorySortField +/** Remove digital content assigned to given variant. */ +export type DigitalContentDelete = { + __typename?: 'DigitalContentDelete' + variant?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array } -export enum CategorySortField { - /** Sort categories by name. */ - Name = 'NAME', - /** Sort categories by product count. */ - ProductCount = 'PRODUCT_COUNT', - /** Sort categories by subcategory count. */ - SubcategoryCount = 'SUBCATEGORY_COUNT', +export type DigitalContentInput = { + /** Use default digital content settings for this product. */ + useDefaultSettings: Scalars['Boolean'] + /** Determines how many times a download link can be accessed by a customer. */ + maxDownloads?: Maybe + /** Determines for how many days a download link is active since it was generated. */ + urlValidDays?: Maybe + /** Overwrite default automatic_fulfillment setting for variant. */ + automaticFulfillment?: Maybe } -export type CollectionFilterInput = { - published?: Maybe - search?: Maybe - metadata?: Maybe>> - ids?: Maybe>> - /** Specifies the channel by which the data should be sorted. */ - channel?: Maybe +/** Update digital content. */ +export type DigitalContentUpdate = { + __typename?: 'DigitalContentUpdate' + variant?: Maybe + content?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array } -export enum CollectionPublished { - Published = 'PUBLISHED', - Hidden = 'HIDDEN', +export type DigitalContentUploadInput = { + /** Use default digital content settings for this product. */ + useDefaultSettings: Scalars['Boolean'] + /** Determines how many times a download link can be accessed by a customer. */ + maxDownloads?: Maybe + /** Determines for how many days a download link is active since it was generated. */ + urlValidDays?: Maybe + /** Overwrite default automatic_fulfillment setting for variant. */ + automaticFulfillment?: Maybe + /** Represents an file in a multipart request. */ + contentFile: Scalars['Upload'] } -export type CollectionSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Specifies the channel in which to sort the data. */ - channel?: Maybe - /** Sort collections by the selected field. */ - field: CollectionSortField -} - -export enum CollectionSortField { - /** Sort collections by name. */ - Name = 'NAME', - /** Sort collections by availability. */ - Availability = 'AVAILABILITY', - /** Sort collections by product count. */ - ProductCount = 'PRODUCT_COUNT', - /** Sort collections by publication date. */ - PublicationDate = 'PUBLICATION_DATE', -} - -export type ProductTypeFilterInput = { - search?: Maybe - configurable?: Maybe - productType?: Maybe - metadata?: Maybe>> - ids?: Maybe>> -} - -export enum ProductTypeConfigurable { - Configurable = 'CONFIGURABLE', - Simple = 'SIMPLE', -} - -export enum ProductTypeEnum { - Digital = 'DIGITAL', - Shippable = 'SHIPPABLE', -} - -export type ProductTypeSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort product types by the selected field. */ - field: ProductTypeSortField -} - -export enum ProductTypeSortField { - /** Sort products by name. */ - Name = 'NAME', - /** Sort products by type. */ - Digital = 'DIGITAL', - /** Sort products by shipping. */ - ShippingRequired = 'SHIPPING_REQUIRED', -} - -export type ProductVariantCountableConnection = { - __typename?: 'ProductVariantCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type ProductVariantCountableEdge = { - __typename?: 'ProductVariantCountableEdge' - /** The item at the end of the edge. */ - node: ProductVariant - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type ProductVariantFilterInput = { - search?: Maybe - sku?: Maybe>> - metadata?: Maybe>> -} - -export type PaymentCountableConnection = { - __typename?: 'PaymentCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type PaymentCountableEdge = { - __typename?: 'PaymentCountableEdge' - /** The item at the end of the edge. */ - node: Payment - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type PaymentFilterInput = { - checkouts?: Maybe>> -} - -export type PageCountableConnection = { - __typename?: 'PageCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type PageCountableEdge = { - __typename?: 'PageCountableEdge' - /** The item at the end of the edge. */ - node: Page - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type PageSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort pages by the selected field. */ - field: PageSortField -} - -export enum PageSortField { - /** Sort pages by title. */ - Title = 'TITLE', - /** Sort pages by slug. */ - Slug = 'SLUG', - /** Sort pages by visibility. */ - Visibility = 'VISIBILITY', - /** Sort pages by creation date. */ - CreationDate = 'CREATION_DATE', - /** Sort pages by publication date. */ - PublicationDate = 'PUBLICATION_DATE', -} - -export type PageFilterInput = { - search?: Maybe - metadata?: Maybe>> -} - -export type PageTypeCountableConnection = { - __typename?: 'PageTypeCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type PageTypeCountableEdge = { - __typename?: 'PageTypeCountableEdge' - /** The item at the end of the edge. */ - node: PageType - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type PageTypeSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort page types by the selected field. */ - field: PageTypeSortField -} - -export enum PageTypeSortField { - /** Sort page types by name. */ - Name = 'NAME', - /** Sort page types by slug. */ - Slug = 'SLUG', -} - -export type PageTypeFilterInput = { - search?: Maybe -} - -export type OrderEventCountableConnection = { - __typename?: 'OrderEventCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type OrderEventCountableEdge = { - __typename?: 'OrderEventCountableEdge' - /** The item at the end of the edge. */ - node: OrderEvent - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type OrderSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort orders by the selected field. */ - field: OrderSortField -} - -export enum OrderSortField { - /** Sort orders by number. */ - Number = 'NUMBER', - /** Sort orders by creation date. */ - CreationDate = 'CREATION_DATE', - /** Sort orders by customer. */ - Customer = 'CUSTOMER', - /** Sort orders by payment. */ - Payment = 'PAYMENT', - /** Sort orders by fulfillment status. */ - FulfillmentStatus = 'FULFILLMENT_STATUS', -} - -export type OrderFilterInput = { - paymentStatus?: Maybe>> - status?: Maybe>> - customer?: Maybe - created?: Maybe - search?: Maybe - metadata?: Maybe>> - channels?: Maybe>> -} - -export enum OrderStatusFilter { - ReadyToFulfill = 'READY_TO_FULFILL', - ReadyToCapture = 'READY_TO_CAPTURE', - Unfulfilled = 'UNFULFILLED', - Unconfirmed = 'UNCONFIRMED', - PartiallyFulfilled = 'PARTIALLY_FULFILLED', - Fulfilled = 'FULFILLED', - Canceled = 'CANCELED', -} - -export type DateRangeInput = { - /** Start date. */ - gte?: Maybe - /** End date. */ - lte?: Maybe -} - -export type OrderDraftFilterInput = { - customer?: Maybe - created?: Maybe - search?: Maybe - metadata?: Maybe>> - channels?: Maybe>> -} - -export type MenuCountableConnection = { - __typename?: 'MenuCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type MenuCountableEdge = { - __typename?: 'MenuCountableEdge' - /** The item at the end of the edge. */ - node: Menu - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type MenuSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort menus by the selected field. */ - field: MenuSortField -} - -export enum MenuSortField { - /** Sort menus by name. */ - Name = 'NAME', - /** Sort menus by items count. */ - ItemsCount = 'ITEMS_COUNT', -} - -export type MenuFilterInput = { - search?: Maybe - slug?: Maybe>> - metadata?: Maybe>> -} - -export type MenuItemCountableConnection = { - __typename?: 'MenuItemCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type MenuItemCountableEdge = { - __typename?: 'MenuItemCountableEdge' - /** The item at the end of the edge. */ - node: MenuItem - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type MenuItemSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort menu items by the selected field. */ - field: MenuItemsSortField -} - -export enum MenuItemsSortField { - /** Sort menu items by name. */ - Name = 'NAME', -} - -export type MenuItemFilterInput = { - search?: Maybe - metadata?: Maybe>> -} - -/** Plugin. */ -export type Plugin = Node & { - __typename?: 'Plugin' +export type DigitalContentUrl = Node & { + __typename?: 'DigitalContentUrl' + content: DigitalContent + created: Scalars['DateTime'] + downloadNum: Scalars['Int'] + /** The ID of the object. */ id: Scalars['ID'] - name: Scalars['String'] - description: Scalars['String'] - active: Scalars['Boolean'] - configuration?: Maybe>> + /** URL for digital content. */ + url?: Maybe + /** UUID of digital content. */ + token: Scalars['UUID'] } -/** Stores information about a single configuration field. */ -export type ConfigurationItem = { - __typename?: 'ConfigurationItem' - /** Name of the field. */ - name: Scalars['String'] - /** Current value of the field. */ - value?: Maybe - /** Type of the field. */ - type?: Maybe - /** Help text for the field. */ - helpText?: Maybe - /** Label for the field. */ - label?: Maybe +/** Generate new URL to digital content. */ +export type DigitalContentUrlCreate = { + __typename?: 'DigitalContentUrlCreate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array + digitalContentUrl?: Maybe +} + +export type DigitalContentUrlCreateInput = { + /** Digital content ID which URL will belong to. */ + content: Scalars['ID'] +} + +export type DiscountError = { + __typename?: 'DiscountError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** List of products IDs which causes the error. */ + products?: Maybe> + /** The error code. */ + code: DiscountErrorCode + /** List of channels IDs which causes the error. */ + channels?: Maybe> } /** An enumeration. */ -export enum ConfigurationTypeFieldEnum { - String = 'STRING', - Multiline = 'MULTILINE', - Boolean = 'BOOLEAN', - Secret = 'SECRET', - Password = 'PASSWORD', - Secretmultiline = 'SECRETMULTILINE', -} - -export type PluginCountableConnection = { - __typename?: 'PluginCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type PluginCountableEdge = { - __typename?: 'PluginCountableEdge' - /** The item at the end of the edge. */ - node: Plugin - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type PluginFilterInput = { - active?: Maybe - search?: Maybe -} - -export type PluginSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort plugins by the selected field. */ - field: PluginSortField -} - -export enum PluginSortField { - Name = 'NAME', - IsActive = 'IS_ACTIVE', -} - -export type SaleCountableConnection = { - __typename?: 'SaleCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type SaleCountableEdge = { - __typename?: 'SaleCountableEdge' - /** The item at the end of the edge. */ - node: Sale - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type SaleFilterInput = { - status?: Maybe>> - saleType?: Maybe - started?: Maybe - search?: Maybe +export enum DiscountErrorCode { + AlreadyExists = 'ALREADY_EXISTS', + GraphqlError = 'GRAPHQL_ERROR', + Invalid = 'INVALID', + NotFound = 'NOT_FOUND', + Required = 'REQUIRED', + Unique = 'UNIQUE', + CannotManageProductWithoutVariant = 'CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT', + DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', } export enum DiscountStatusEnum { @@ -4581,113 +2723,141 @@ export enum DiscountStatusEnum { Scheduled = 'SCHEDULED', } -export type DateTimeRangeInput = { - /** Start date. */ - gte?: Maybe - /** End date. */ - lte?: Maybe -} - -export type SaleSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Specifies the channel in which to sort the data. */ - channel?: Maybe - /** Sort sales by the selected field. */ - field: SaleSortField -} - -export enum SaleSortField { - /** Sort sales by name. */ - Name = 'NAME', - /** Sort sales by start date. */ - StartDate = 'START_DATE', - /** Sort sales by end date. */ - EndDate = 'END_DATE', - /** Sort sales by value. */ - Value = 'VALUE', - /** Sort sales by type. */ - Type = 'TYPE', -} - -export type VoucherCountableConnection = { - __typename?: 'VoucherCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type VoucherCountableEdge = { - __typename?: 'VoucherCountableEdge' - /** The item at the end of the edge. */ - node: Voucher - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type VoucherFilterInput = { - status?: Maybe>> - timesUsed?: Maybe - discountType?: Maybe>> - started?: Maybe - search?: Maybe -} - -export enum VoucherDiscountType { +export enum DiscountValueTypeEnum { Fixed = 'FIXED', Percentage = 'PERCENTAGE', - Shipping = 'SHIPPING', } -export type VoucherSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Specifies the channel in which to sort the data. */ - channel?: Maybe - /** Sort vouchers by the selected field. */ - field: VoucherSortField +/** Represents shop's domain. */ +export type Domain = { + __typename?: 'Domain' + /** The host name of the domain. */ + host: Scalars['String'] + /** Inform if SSL is enabled. */ + sslEnabled: Scalars['Boolean'] + /** Shop's absolute URL. */ + url: Scalars['String'] } -export enum VoucherSortField { - /** Sort vouchers by code. */ - Code = 'CODE', - /** Sort vouchers by start date. */ - StartDate = 'START_DATE', - /** Sort vouchers by end date. */ - EndDate = 'END_DATE', - /** Sort vouchers by value. */ - Value = 'VALUE', - /** Sort vouchers by type. */ - Type = 'TYPE', - /** Sort vouchers by usage limit. */ - UsageLimit = 'USAGE_LIMIT', - /** Sort vouchers by minimum spent amount. */ - MinimumSpentAmount = 'MINIMUM_SPENT_AMOUNT', +/** Deletes draft orders. */ +export type DraftOrderBulkDelete = { + __typename?: 'DraftOrderBulkDelete' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderErrors: Array + errors: Array } -/** Represents a job data of exported file. */ -export type ExportFile = Node & - Job & { - __typename?: 'ExportFile' - /** The ID of the object. */ - id: Scalars['ID'] - user?: Maybe - app?: Maybe - /** Job status. */ - status: JobStatusEnum - /** Created date time of job in ISO 8601 format. */ - createdAt: Scalars['DateTime'] - /** Date time of job last update in ISO 8601 format. */ - updatedAt: Scalars['DateTime'] - /** Job message. */ - message?: Maybe - /** The URL of field to download. */ - url?: Maybe - /** List of events associated with the export. */ - events?: Maybe> - } +/** Completes creating an order. */ +export type DraftOrderComplete = { + __typename?: 'DraftOrderComplete' + /** Completed order. */ + order?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderErrors: Array + errors: Array +} + +/** Creates a new draft order. */ +export type DraftOrderCreate = { + __typename?: 'DraftOrderCreate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderErrors: Array + errors: Array + order?: Maybe +} + +export type DraftOrderCreateInput = { + /** Billing address of the customer. */ + billingAddress?: Maybe + user?: Maybe + /** Email address of the customer. */ + userEmail?: Maybe + /** Discount amount for the order. */ + discount?: Maybe + /** Shipping address of the customer. */ + shippingAddress?: Maybe + /** ID of a selected shipping method. */ + shippingMethod?: Maybe + /** ID of the voucher associated with the order. */ + voucher?: Maybe + /** A note from a customer. Visible by customers in the order summary. */ + customerNote?: Maybe + /** ID of the channel associated with the order. */ + channel?: Maybe + /** URL of a view where users should be redirected to see the order details. URL in RFC 1808 format. */ + redirectUrl?: Maybe + /** Variant line input consisting of variant ID and quantity of products. */ + lines?: Maybe>> +} + +/** Deletes a draft order. */ +export type DraftOrderDelete = { + __typename?: 'DraftOrderDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderErrors: Array + errors: Array + order?: Maybe +} + +export type DraftOrderInput = { + /** Billing address of the customer. */ + billingAddress?: Maybe + user?: Maybe + /** Email address of the customer. */ + userEmail?: Maybe + /** Discount amount for the order. */ + discount?: Maybe + /** Shipping address of the customer. */ + shippingAddress?: Maybe + /** ID of a selected shipping method. */ + shippingMethod?: Maybe + /** ID of the voucher associated with the order. */ + voucher?: Maybe + /** A note from a customer. Visible by customers in the order summary. */ + customerNote?: Maybe + /** ID of the channel associated with the order. */ + channel?: Maybe + /** URL of a view where users should be redirected to see the order details. URL in RFC 1808 format. */ + redirectUrl?: Maybe +} + +/** Deletes order lines. */ +export type DraftOrderLinesBulkDelete = { + __typename?: 'DraftOrderLinesBulkDelete' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderErrors: Array + errors: Array +} + +/** Updates a draft order. */ +export type DraftOrderUpdate = { + __typename?: 'DraftOrderUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderErrors: Array + errors: Array + order?: Maybe +} + +export type ExportError = { + __typename?: 'ExportError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: ExportErrorCode +} + +/** An enumeration. */ +export enum ExportErrorCode { + Invalid = 'INVALID', + NotFound = 'NOT_FOUND', + Required = 'REQUIRED', +} /** History log of export file. */ export type ExportEvent = Node & { @@ -4716,6 +2886,28 @@ export enum ExportEventsEnum { ExportFailedInfoSent = 'EXPORT_FAILED_INFO_SENT', } +/** Represents a job data of exported file. */ +export type ExportFile = Node & + Job & { + __typename?: 'ExportFile' + /** The ID of the object. */ + id: Scalars['ID'] + user?: Maybe + app?: Maybe + /** Job status. */ + status: JobStatusEnum + /** Created date time of job in ISO 8601 format. */ + createdAt: Scalars['DateTime'] + /** Date time of job last update in ISO 8601 format. */ + updatedAt: Scalars['DateTime'] + /** Job message. */ + message?: Maybe + /** The URL of field to download. */ + url?: Maybe + /** List of events associated with the export. */ + events?: Maybe> + } + export type ExportFileCountableConnection = { __typename?: 'ExportFileCountableConnection' /** Pagination data for this connection. */ @@ -4741,13 +2933,6 @@ export type ExportFileFilterInput = { app?: Maybe } -export type ExportFileSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort export file by the selected field. */ - field: ExportFileSortField -} - export enum ExportFileSortField { /** Sort export file by status. */ Status = 'STATUS', @@ -4757,190 +2942,404 @@ export enum ExportFileSortField { UpdatedAt = 'UPDATED_AT', } -export type CheckoutCountableConnection = { - __typename?: 'CheckoutCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type CheckoutCountableEdge = { - __typename?: 'CheckoutCountableEdge' - /** The item at the end of the edge. */ - node: Checkout - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type CheckoutLineCountableConnection = { - __typename?: 'CheckoutLineCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type CheckoutLineCountableEdge = { - __typename?: 'CheckoutLineCountableEdge' - /** The item at the end of the edge. */ - node: CheckoutLine - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type AttributeSortingInput = { +export type ExportFileSortingInput = { /** Specifies the direction in which to sort products. */ direction: OrderDirection - /** Sort attributes by the selected field. */ - field: AttributeSortField + /** Sort export file by the selected field. */ + field: ExportFileSortField } -export enum AttributeSortField { - /** Sort attributes by name */ - Name = 'NAME', - /** Sort attributes by slug */ - Slug = 'SLUG', - /** Sort attributes by the value required flag */ - ValueRequired = 'VALUE_REQUIRED', - /** Sort attributes by the variant only flag */ - IsVariantOnly = 'IS_VARIANT_ONLY', - /** Sort attributes by visibility in the storefront */ - VisibleInStorefront = 'VISIBLE_IN_STOREFRONT', - /** Sort attributes by the filterable in storefront flag */ - FilterableInStorefront = 'FILTERABLE_IN_STOREFRONT', - /** Sort attributes by the filterable in dashboard flag */ - FilterableInDashboard = 'FILTERABLE_IN_DASHBOARD', - /** Sort attributes by their position in storefront */ - StorefrontSearchPosition = 'STOREFRONT_SEARCH_POSITION', - /** Sort attributes based on whether they can be displayed or not in a product grid. */ - AvailableInGrid = 'AVAILABLE_IN_GRID', +export type ExportInfoInput = { + /** List of attribute ids witch should be exported. */ + attributes?: Maybe> + /** List of warehouse ids witch should be exported. */ + warehouses?: Maybe> + /** List of channels ids which should be exported. */ + channels?: Maybe> + /** List of product fields witch should be exported. */ + fields?: Maybe> } -/** Represents ongoing installation of app. */ -export type AppInstallation = Node & - Job & { - __typename?: 'AppInstallation' - appName: Scalars['String'] - manifestUrl: Scalars['String'] +/** Export products to csv file. */ +export type ExportProducts = { + __typename?: 'ExportProducts' + /** The newly created export file job which is responsible for export data. */ + exportFile?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + exportErrors: Array + errors: Array +} + +export type ExportProductsInput = { + /** Determine which products should be exported. */ + scope: ExportScope + /** Filtering options for products. */ + filter?: Maybe + /** List of products IDS to export. */ + ids?: Maybe> + /** Input with info about fields which should be exported. */ + exportInfo?: Maybe + /** Type of exported file. */ + fileType: FileTypesEnum +} + +export enum ExportScope { + /** Export all products. */ + All = 'ALL', + /** Export products with given ids. */ + Ids = 'IDS', + /** Export the filtered products. */ + Filter = 'FILTER', +} + +export type ExternalAuthentication = { + __typename?: 'ExternalAuthentication' + /** ID of external authentication plugin. */ + id: Scalars['String'] + /** Name of external authentication plugin. */ + name?: Maybe +} + +/** Prepare external authentication url for user by custom plugin. */ +export type ExternalAuthenticationUrl = { + __typename?: 'ExternalAuthenticationUrl' + /** The data returned by authentication plugin. */ + authenticationData?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array +} + +/** Logout user by custom plugin. */ +export type ExternalLogout = { + __typename?: 'ExternalLogout' + /** The data returned by authentication plugin. */ + logoutData?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array +} + +/** Obtain external access tokens for user by custom plugin. */ +export type ExternalObtainAccessTokens = { + __typename?: 'ExternalObtainAccessTokens' + /** The token, required to authenticate. */ + token?: Maybe + /** The refresh token, required to re-generate external access token. */ + refreshToken?: Maybe + /** CSRF token required to re-generate external access token. */ + csrfToken?: Maybe + /** A user instance. */ + user?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array +} + +/** Refresh user's access by custom plugin. */ +export type ExternalRefresh = { + __typename?: 'ExternalRefresh' + /** The token, required to authenticate. */ + token?: Maybe + /** The refresh token, required to re-generate external access token. */ + refreshToken?: Maybe + /** CSRF token required to re-generate external access token. */ + csrfToken?: Maybe + /** A user instance. */ + user?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array +} + +/** Verify external authentication data by plugin. */ +export type ExternalVerify = { + __typename?: 'ExternalVerify' + /** User assigned to data. */ + user?: Maybe + /** Determine if authentication data is valid or not. */ + isValid: Scalars['Boolean'] + /** External data. */ + verifyData?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array +} + +export type File = { + __typename?: 'File' + /** The URL of the file. */ + url: Scalars['String'] + /** Content type of the file. */ + contentType?: Maybe +} + +/** An enumeration. */ +export enum FileTypesEnum { + Csv = 'CSV', + Xlsx = '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 */ +export type FileUpload = { + __typename?: 'FileUpload' + uploadedFile?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + uploadErrors: Array + errors: Array +} + +/** Represents order fulfillment. */ +export type Fulfillment = Node & + ObjectWithMetadata & { + __typename?: 'Fulfillment' /** The ID of the object. */ id: Scalars['ID'] - /** Job status. */ - status: JobStatusEnum - /** Created date time of job in ISO 8601 format. */ - createdAt: Scalars['DateTime'] - /** Date time of job last update in ISO 8601 format. */ - updatedAt: Scalars['DateTime'] - /** Job message. */ - message?: Maybe + fulfillmentOrder: Scalars['Int'] + status: FulfillmentStatus + trackingNumber: Scalars['String'] + created: Scalars['DateTime'] + /** List of private metadata items.Requires proper staff permissions to access. */ + privateMetadata: Array> + /** List of public metadata items. Can be accessed without permissions. */ + metadata: Array> + /** List of lines for the fulfillment. */ + lines?: Maybe>> + /** User-friendly fulfillment status. */ + statusDisplay?: Maybe + /** Warehouse from fulfillment was fulfilled. */ + warehouse?: Maybe } -export type AppCountableConnection = { - __typename?: 'AppCountableConnection' +/** Cancels existing fulfillment and optionally restocks items. */ +export type FulfillmentCancel = { + __typename?: 'FulfillmentCancel' + /** A canceled fulfillment. */ + fulfillment?: Maybe + /** Order which fulfillment was cancelled. */ + order?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderErrors: Array + errors: Array +} + +export type FulfillmentCancelInput = { + /** ID of warehouse where items will be restock. */ + warehouseId: Scalars['ID'] +} + +/** Represents line of the fulfillment. */ +export type FulfillmentLine = Node & { + __typename?: 'FulfillmentLine' + /** The ID of the object. */ + id: Scalars['ID'] + quantity: Scalars['Int'] + orderLine?: Maybe +} + +/** Refund products. */ +export type FulfillmentRefundProducts = { + __typename?: 'FulfillmentRefundProducts' + /** A refunded fulfillment. */ + fulfillment?: Maybe + /** Order which fulfillment was refunded. */ + order?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderErrors: Array + errors: Array +} + +/** Return products. */ +export type FulfillmentReturnProducts = { + __typename?: 'FulfillmentReturnProducts' + /** A return fulfillment. */ + returnFulfillment?: Maybe + /** A replace fulfillment. */ + replaceFulfillment?: Maybe + /** Order which fulfillment was returned. */ + order?: Maybe + /** A draft order which was created for products with replace flag. */ + replaceOrder?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderErrors: Array + errors: Array +} + +/** An enumeration. */ +export enum FulfillmentStatus { + /** Fulfilled */ + Fulfilled = 'FULFILLED', + /** Refunded */ + Refunded = 'REFUNDED', + /** Returned */ + Returned = 'RETURNED', + /** Replaced */ + Replaced = 'REPLACED', + /** Refunded and returned */ + RefundedAndReturned = 'REFUNDED_AND_RETURNED', + /** Canceled */ + Canceled = 'CANCELED', +} + +/** Updates a fulfillment for an order. */ +export type FulfillmentUpdateTracking = { + __typename?: 'FulfillmentUpdateTracking' + /** A fulfillment with updated tracking. */ + fulfillment?: Maybe + /** Order for which fulfillment was updated. */ + order?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderErrors: Array + errors: Array +} + +export type FulfillmentUpdateTrackingInput = { + /** Fulfillment tracking number. */ + trackingNumber?: Maybe + /** If true, send an email notification to the customer. */ + notifyCustomer?: Maybe +} + +/** Payment gateway client configuration key and value pair. */ +export type GatewayConfigLine = { + __typename?: 'GatewayConfigLine' + /** Gateway config key. */ + field: Scalars['String'] + /** Gateway config value for key. */ + 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 & { + __typename?: 'GiftCard' + /** Gift card code. */ + code?: Maybe + /** The customer who bought a gift card. */ + user?: Maybe + created: Scalars['DateTime'] + startDate: Scalars['Date'] + endDate?: Maybe + lastUsedOn?: Maybe + isActive: Scalars['Boolean'] + initialBalance?: Maybe + currentBalance?: Maybe + /** The ID of the object. */ + id: Scalars['ID'] + /** Code in format which allows displaying in a user interface. */ + displayCode?: Maybe +} + +/** Activate a gift card. */ +export type GiftCardActivate = { + __typename?: 'GiftCardActivate' + /** A gift card to activate. */ + giftCard?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + giftCardErrors: Array + errors: Array +} + +export type GiftCardCountableConnection = { + __typename?: 'GiftCardCountableConnection' /** Pagination data for this connection. */ pageInfo: PageInfo - edges: Array + edges: Array /** A total count of items in the collection. */ totalCount?: Maybe } -export type AppCountableEdge = { - __typename?: 'AppCountableEdge' +export type GiftCardCountableEdge = { + __typename?: 'GiftCardCountableEdge' /** The item at the end of the edge. */ - node: App + node: GiftCard /** A cursor for use in pagination. */ cursor: Scalars['String'] } -export type AppFilterInput = { - search?: Maybe - isActive?: Maybe - type?: Maybe +/** Creates a new gift card. */ +export type GiftCardCreate = { + __typename?: 'GiftCardCreate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + giftCardErrors: Array + errors: Array + giftCard?: Maybe } -export type AppSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort apps by the selected field. */ - field: AppSortField +export type GiftCardCreateInput = { + /** Start date of the gift card in ISO 8601 format. */ + startDate?: Maybe + /** End date of the gift card in ISO 8601 format. */ + endDate?: Maybe + /** Value of the gift card. */ + balance?: Maybe + /** The customer's email of the gift card buyer. */ + userEmail?: Maybe + /** Code to use the gift card. */ + code?: Maybe } -export enum AppSortField { - /** Sort apps by name. */ - Name = 'NAME', - /** Sort apps by creation date. */ - CreationDate = 'CREATION_DATE', +/** Deactivate a gift card. */ +export type GiftCardDeactivate = { + __typename?: 'GiftCardDeactivate' + /** A gift card to deactivate. */ + giftCard?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + giftCardErrors: Array + errors: Array } -export type AddressValidationData = { - __typename?: 'AddressValidationData' - countryCode?: Maybe - countryName?: Maybe - addressFormat?: Maybe - addressLatinFormat?: Maybe - allowedFields?: Maybe>> - requiredFields?: Maybe>> - upperFields?: Maybe>> - countryAreaType?: Maybe - countryAreaChoices?: Maybe>> - cityType?: Maybe - cityChoices?: Maybe>> - cityAreaType?: Maybe - cityAreaChoices?: Maybe>> - postalCodeType?: Maybe - postalCodeMatchers?: Maybe>> - postalCodeExamples?: Maybe>> - postalCodePrefix?: Maybe +export type GiftCardError = { + __typename?: 'GiftCardError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: GiftCardErrorCode } -export type ChoiceValue = { - __typename?: 'ChoiceValue' - raw?: Maybe - verbose?: Maybe +/** An enumeration. */ +export enum GiftCardErrorCode { + AlreadyExists = 'ALREADY_EXISTS', + GraphqlError = 'GRAPHQL_ERROR', + Invalid = 'INVALID', + NotFound = 'NOT_FOUND', + Required = 'REQUIRED', + Unique = 'UNIQUE', } -export type UserCountableConnection = { - __typename?: 'UserCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe +/** Update a gift card. */ +export type GiftCardUpdate = { + __typename?: 'GiftCardUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + giftCardErrors: Array + errors: Array + giftCard?: Maybe } -export type UserCountableEdge = { - __typename?: 'UserCountableEdge' - /** The item at the end of the edge. */ - node: User - /** A cursor for use in pagination. */ - cursor: Scalars['String'] +export type GiftCardUpdateInput = { + /** Start date of the gift card in ISO 8601 format. */ + startDate?: Maybe + /** End date of the gift card in ISO 8601 format. */ + endDate?: Maybe + /** Value of the gift card. */ + balance?: Maybe + /** The customer's email of the gift card buyer. */ + userEmail?: Maybe } -export type CustomerFilterInput = { - dateJoined?: Maybe - numberOfOrders?: Maybe - placedOrders?: Maybe - search?: Maybe -} - -export type UserSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort users by the selected field. */ - field: UserSortField -} - -export enum UserSortField { - /** Sort users by first name. */ - FirstName = 'FIRST_NAME', - /** Sort users by last name. */ - LastName = 'LAST_NAME', - /** Sort users by email. */ - Email = 'EMAIL', - /** Sort users by order count. */ - OrderCount = 'ORDER_COUNT', +/** Represents permission group data. */ +export type Group = Node & { + __typename?: 'Group' + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + /** List of group permissions */ + permissions?: Maybe>> + /** List of group users */ + users?: Maybe>> + /** True, if the currently authenticated user has rights to manage a group. */ + userCanManage: Scalars['Boolean'] } export type GroupCountableConnection = { @@ -4960,51 +3359,617 @@ export type GroupCountableEdge = { cursor: Scalars['String'] } -export type PermissionGroupFilterInput = { - search?: Maybe +/** Represents an image. */ +export type Image = { + __typename?: 'Image' + /** The URL of the image. */ + url: Scalars['String'] + /** Alt text for an image. */ + alt?: Maybe } -export type PermissionGroupSortingInput = { +export type IntRangeInput = { + /** Value greater than or equal to. */ + gte?: Maybe + /** Value less than or equal to. */ + lte?: Maybe +} + +/** Represents an Invoice. */ +export type Invoice = ObjectWithMetadata & + Job & + Node & { + __typename?: 'Invoice' + /** The ID of the object. */ + id: Scalars['ID'] + /** List of public metadata items. Can be accessed without permissions. */ + metadata: Array> + /** Job status. */ + status: JobStatusEnum + number?: Maybe + externalUrl?: Maybe + /** List of private metadata items.Requires proper staff permissions to access. */ + privateMetadata: Array> + /** Created date time of job in ISO 8601 format. */ + createdAt: Scalars['DateTime'] + /** Date time of job last update in ISO 8601 format. */ + updatedAt: Scalars['DateTime'] + /** Job message. */ + message?: Maybe + /** URL to download an invoice. */ + url?: Maybe + } + +/** Creates a ready to send invoice. */ +export type InvoiceCreate = { + __typename?: 'InvoiceCreate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + invoiceErrors: Array + errors: Array + invoice?: Maybe +} + +export type InvoiceCreateInput = { + /** Invoice number. */ + number: Scalars['String'] + /** URL of an invoice to download. */ + url: Scalars['String'] +} + +/** Deletes an invoice. */ +export type InvoiceDelete = { + __typename?: 'InvoiceDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + invoiceErrors: Array + errors: Array + invoice?: Maybe +} + +export type InvoiceError = { + __typename?: 'InvoiceError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: InvoiceErrorCode +} + +/** An enumeration. */ +export enum InvoiceErrorCode { + Required = 'REQUIRED', + NotReady = 'NOT_READY', + UrlNotSet = 'URL_NOT_SET', + EmailNotSet = 'EMAIL_NOT_SET', + NumberNotSet = 'NUMBER_NOT_SET', + NotFound = 'NOT_FOUND', + InvalidStatus = 'INVALID_STATUS', +} + +/** Request an invoice for the order using plugin. */ +export type InvoiceRequest = { + __typename?: 'InvoiceRequest' + /** Order related to an invoice. */ + order?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + invoiceErrors: Array + errors: Array + invoice?: Maybe +} + +/** Requests deletion of an invoice. */ +export type InvoiceRequestDelete = { + __typename?: 'InvoiceRequestDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + invoiceErrors: Array + errors: Array + invoice?: Maybe +} + +/** Send an invoice notification to the customer. */ +export type InvoiceSendNotification = { + __typename?: 'InvoiceSendNotification' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + invoiceErrors: Array + errors: Array + invoice?: Maybe +} + +/** Updates an invoice. */ +export type InvoiceUpdate = { + __typename?: 'InvoiceUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + invoiceErrors: Array + errors: Array + invoice?: Maybe +} + +export type Job = { + /** Job status. */ + status: JobStatusEnum + /** Created date time of job in ISO 8601 format. */ + createdAt: Scalars['DateTime'] + /** Date time of job last update in ISO 8601 format. */ + updatedAt: Scalars['DateTime'] + /** Job message. */ + message?: Maybe +} + +/** An enumeration. */ +export enum JobStatusEnum { + Pending = 'PENDING', + Success = 'SUCCESS', + Failed = 'FAILED', + Deleted = 'DELETED', +} + +/** An enumeration. */ +export enum LanguageCodeEnum { + Ar = 'AR', + Az = 'AZ', + Bg = 'BG', + Bn = 'BN', + Ca = 'CA', + Cs = 'CS', + Da = 'DA', + De = 'DE', + El = 'EL', + En = 'EN', + Es = 'ES', + EsCo = 'ES_CO', + Et = 'ET', + Fa = 'FA', + Fi = 'FI', + Fr = 'FR', + Hi = 'HI', + Hu = 'HU', + Hy = 'HY', + Id = 'ID', + Is = 'IS', + It = 'IT', + Ja = 'JA', + Ka = 'KA', + Km = 'KM', + Ko = 'KO', + Lt = 'LT', + Mn = 'MN', + My = 'MY', + Nb = 'NB', + Nl = 'NL', + Pl = 'PL', + Pt = 'PT', + PtBr = 'PT_BR', + Ro = 'RO', + Ru = 'RU', + Sk = 'SK', + Sl = 'SL', + Sq = 'SQ', + Sr = 'SR', + Sv = 'SV', + Sw = 'SW', + Ta = 'TA', + Th = 'TH', + Tr = 'TR', + Uk = 'UK', + Vi = 'VI', + ZhHans = 'ZH_HANS', + ZhHant = 'ZH_HANT', +} + +export type LanguageDisplay = { + __typename?: 'LanguageDisplay' + /** ISO 639 representation of the language name. */ + code: LanguageCodeEnum + /** Full name of the language. */ + language: Scalars['String'] +} + +export type LimitInfo = { + __typename?: 'LimitInfo' + /** Defines the current resource usage. */ + currentUsage: Limits + /** Defines the allowed maximum resource usage, null means unlimited. */ + allowedUsage: Limits +} + +export type Limits = { + __typename?: 'Limits' + channels?: Maybe + orders?: Maybe + productVariants?: Maybe + staffUsers?: Maybe + warehouses?: Maybe +} + +/** The manifest definition. */ +export type Manifest = { + __typename?: 'Manifest' + identifier: Scalars['String'] + version: Scalars['String'] + name: Scalars['String'] + about?: Maybe + permissions?: Maybe>> + appUrl?: Maybe + configurationUrl?: Maybe + tokenTargetUrl?: Maybe + dataPrivacy?: Maybe + dataPrivacyUrl?: Maybe + homepageUrl?: Maybe + supportUrl?: Maybe +} + +export type Margin = { + __typename?: 'Margin' + start?: Maybe + stop?: Maybe +} + +/** Represents a single menu - an object that is used to help navigate through the store. */ +export type Menu = Node & + ObjectWithMetadata & { + __typename?: 'Menu' + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + slug: Scalars['String'] + /** List of private metadata items.Requires proper staff permissions to access. */ + privateMetadata: Array> + /** List of public metadata items. Can be accessed without permissions. */ + metadata: Array> + items?: Maybe>> + } + +/** Deletes menus. */ +export type MenuBulkDelete = { + __typename?: 'MenuBulkDelete' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + menuErrors: Array + errors: Array +} + +export type MenuCountableConnection = { + __typename?: 'MenuCountableConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe +} + +export type MenuCountableEdge = { + __typename?: 'MenuCountableEdge' + /** The item at the end of the edge. */ + node: Menu + /** A cursor for use in pagination. */ + cursor: Scalars['String'] +} + +/** Creates a new Menu. */ +export type MenuCreate = { + __typename?: 'MenuCreate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + menuErrors: Array + errors: Array + menu?: Maybe +} + +export type MenuCreateInput = { + /** Name of the menu. */ + name: Scalars['String'] + /** Slug of the menu. Will be generated if not provided. */ + slug?: Maybe + /** List of menu items. */ + items?: Maybe>> +} + +/** Deletes a menu. */ +export type MenuDelete = { + __typename?: 'MenuDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + menuErrors: Array + errors: Array + menu?: Maybe +} + +export type MenuError = { + __typename?: 'MenuError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: MenuErrorCode +} + +/** An enumeration. */ +export enum MenuErrorCode { + CannotAssignNode = 'CANNOT_ASSIGN_NODE', + GraphqlError = 'GRAPHQL_ERROR', + Invalid = 'INVALID', + InvalidMenuItem = 'INVALID_MENU_ITEM', + NoMenuItemProvided = 'NO_MENU_ITEM_PROVIDED', + NotFound = 'NOT_FOUND', + Required = 'REQUIRED', + TooManyMenuItems = 'TOO_MANY_MENU_ITEMS', + Unique = 'UNIQUE', +} + +export type MenuFilterInput = { + search?: Maybe + slug?: Maybe>> + metadata?: Maybe>> +} + +export type MenuInput = { + /** Name of the menu. */ + name?: Maybe + /** Slug of the menu. */ + slug?: Maybe +} + +/** Represents a single item of the related menu. Can store categories, collection or pages. */ +export type MenuItem = Node & + ObjectWithMetadata & { + __typename?: 'MenuItem' + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + menu: Menu + parent?: Maybe + category?: Maybe + collection?: Maybe + page?: Maybe + level: Scalars['Int'] + /** List of private metadata items.Requires proper staff permissions to access. */ + privateMetadata: Array> + /** List of public metadata items. Can be accessed without permissions. */ + metadata: Array> + children?: Maybe>> + /** URL to the menu item. */ + url?: Maybe + /** Returns translated menu item fields for the given language code. */ + translation?: Maybe + } + +/** Represents a single item of the related menu. Can store categories, collection or pages. */ +export type MenuItemTranslationArgs = { + languageCode: LanguageCodeEnum +} + +/** Deletes menu items. */ +export type MenuItemBulkDelete = { + __typename?: 'MenuItemBulkDelete' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + menuErrors: Array + errors: Array +} + +export type MenuItemCountableConnection = { + __typename?: 'MenuItemCountableConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe +} + +export type MenuItemCountableEdge = { + __typename?: 'MenuItemCountableEdge' + /** The item at the end of the edge. */ + node: MenuItem + /** A cursor for use in pagination. */ + cursor: Scalars['String'] +} + +/** Creates a new menu item. */ +export type MenuItemCreate = { + __typename?: 'MenuItemCreate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + menuErrors: Array + errors: Array + menuItem?: Maybe +} + +export type MenuItemCreateInput = { + /** Name of the menu item. */ + name: Scalars['String'] + /** URL of the pointed item. */ + url?: Maybe + /** Category to which item points. */ + category?: Maybe + /** Collection to which item points. */ + collection?: Maybe + /** Page to which item points. */ + page?: Maybe + /** Menu to which item belongs. */ + menu: Scalars['ID'] + /** ID of the parent menu. If empty, menu will be top level menu. */ + parent?: Maybe +} + +/** Deletes a menu item. */ +export type MenuItemDelete = { + __typename?: 'MenuItemDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + menuErrors: Array + errors: Array + menuItem?: Maybe +} + +export type MenuItemFilterInput = { + search?: Maybe + metadata?: Maybe>> +} + +export type MenuItemInput = { + /** Name of the menu item. */ + name?: Maybe + /** URL of the pointed item. */ + url?: Maybe + /** Category to which item points. */ + category?: Maybe + /** Collection to which item points. */ + collection?: Maybe + /** Page to which item points. */ + page?: Maybe +} + +/** Moves items of menus. */ +export type MenuItemMove = { + __typename?: 'MenuItemMove' + /** Assigned menu to move within. */ + menu?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + menuErrors: Array + errors: Array +} + +export type MenuItemMoveInput = { + /** The menu item ID to move. */ + itemId: Scalars['ID'] + /** ID of the parent menu. If empty, menu will be top level menu. */ + parentId?: Maybe + /** The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. */ + sortOrder?: Maybe +} + +export type MenuItemSortingInput = { /** Specifies the direction in which to sort products. */ direction: OrderDirection - /** Sort permission group by the selected field. */ - field: PermissionGroupSortField + /** Sort menu items by the selected field. */ + field: MenuItemsSortField } -export enum PermissionGroupSortField { - /** Sort permission group accounts by name. */ +export type MenuItemTranslatableContent = Node & { + __typename?: 'MenuItemTranslatableContent' + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + /** Returns translated menu item fields for the given language code. */ + translation?: Maybe + /** Represents a single item of the related menu. Can store categories, collection or pages. */ + menuItem?: Maybe +} + +export type MenuItemTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum +} + +/** Creates/Updates translations for Menu Item. */ +export type MenuItemTranslate = { + __typename?: 'MenuItemTranslate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + translationErrors: Array + errors: Array + menuItem?: Maybe +} + +export type MenuItemTranslation = Node & { + __typename?: 'MenuItemTranslation' + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + /** Translation language. */ + language: LanguageDisplay +} + +/** Updates a menu item. */ +export type MenuItemUpdate = { + __typename?: 'MenuItemUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + menuErrors: Array + errors: Array + menuItem?: Maybe +} + +export enum MenuItemsSortField { + /** Sort menu items by name. */ Name = 'NAME', } -export type StaffUserInput = { - status?: Maybe - search?: Maybe +export enum MenuSortField { + /** Sort menus by name. */ + Name = 'NAME', + /** Sort menus by items count. */ + ItemsCount = 'ITEMS_COUNT', } -export enum StaffMemberStatus { - /** User account has been activated. */ - Active = 'ACTIVE', - /** User account has not been activated yet. */ - Deactivated = 'DEACTIVATED', +export type MenuSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection + /** Sort menus by the selected field. */ + field: MenuSortField } -export type _Entity = - | Address - | User - | Group - | App - | ProductVariant - | Product - | ProductType - | Collection - | Category - | ProductMedia - | ProductImage - | PageType +/** Updates a menu. */ +export type MenuUpdate = { + __typename?: 'MenuUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + menuErrors: Array + errors: Array + menu?: Maybe +} -export type _Service = { - __typename?: '_Service' - sdl?: Maybe +export type MetadataError = { + __typename?: 'MetadataError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: MetadataErrorCode +} + +/** An enumeration. */ +export enum MetadataErrorCode { + GraphqlError = 'GRAPHQL_ERROR', + Invalid = 'INVALID', + NotFound = 'NOT_FOUND', + Required = 'REQUIRED', +} + +export type MetadataInput = { + /** Key of a metadata item. */ + key: Scalars['String'] + /** Value of a metadata item. */ + value: Scalars['String'] +} + +export type MetadataItem = { + __typename?: 'MetadataItem' + /** Key of a metadata item. */ + key: Scalars['String'] + /** Value of a metadata item. */ + value: Scalars['String'] +} + +/** Represents amount of money in specific currency. */ +export type Money = { + __typename?: 'Money' + /** Currency code. */ + currency: Scalars['String'] + /** Amount of money. */ + amount: Scalars['Float'] +} + +/** Represents a range of amounts of money. */ +export type MoneyRange = { + __typename?: 'MoneyRange' + /** Lower bound of a price range. */ + start?: Maybe + /** Upper bound of a price range. */ + stop?: Maybe +} + +export type MoveProductInput = { + /** The ID of the product to move. */ + productId: Scalars['ID'] + /** The relative sorting position of the product (from -inf to +inf) starting from the first given product's actual position.1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. */ + sortOrder?: Maybe } export type Mutation = { @@ -6340,7 +5305,6 @@ export type MutationCheckoutCreateArgs = { export type MutationCheckoutCustomerAttachArgs = { checkoutId: Scalars['ID'] - customerId?: Maybe } export type MutationCheckoutCustomerDetachArgs = { @@ -6697,2229 +5661,287 @@ export type MutationPermissionGroupDeleteArgs = { id: Scalars['ID'] } -/** Creates a new webhook subscription. */ -export type WebhookCreate = { - __typename?: 'WebhookCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - webhookErrors: Array - webhook?: Maybe -} - -/** Represents an error in the input of a mutation. */ -export type Error = { - __typename?: 'Error' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe -} - -export type WebhookError = { - __typename?: 'WebhookError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: WebhookErrorCode -} - -/** An enumeration. */ -export enum WebhookErrorCode { - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', -} - -export type WebhookCreateInput = { - /** The name of the webhook. */ - name?: Maybe - /** The url to receive the payload. */ - targetUrl?: Maybe - /** The events that webhook wants to subscribe. */ - events?: Maybe>> - /** ID of the app to which webhook belongs. */ - app?: Maybe - /** Determine if webhook will be set active or not. */ - isActive?: Maybe - /** The secret key used to create a hash signature with each payload. */ - secretKey?: Maybe -} - -/** Deletes a webhook subscription. */ -export type WebhookDelete = { - __typename?: 'WebhookDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - webhookErrors: Array - webhook?: Maybe -} - -/** Updates a webhook subscription. */ -export type WebhookUpdate = { - __typename?: 'WebhookUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - webhookErrors: Array - webhook?: Maybe -} - -export type WebhookUpdateInput = { - /** The new name of the webhook. */ - name?: Maybe - /** The url to receive the payload. */ - targetUrl?: Maybe - /** The events that webhook wants to subscribe. */ - events?: Maybe>> - /** ID of the app to which webhook belongs. */ - app?: Maybe - /** Determine if webhook will be set active or not. */ - isActive?: Maybe - /** Use to create a hash signature with each payload. */ - secretKey?: Maybe -} - -/** Creates new warehouse. */ -export type WarehouseCreate = { - __typename?: 'WarehouseCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - warehouseErrors: Array - warehouse?: Maybe -} - -export type WarehouseError = { - __typename?: 'WarehouseError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: WarehouseErrorCode -} - -/** An enumeration. */ -export enum WarehouseErrorCode { - AlreadyExists = 'ALREADY_EXISTS', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', -} - -export type WarehouseCreateInput = { - /** Warehouse slug. */ - slug?: Maybe - /** Company name. */ - companyName?: Maybe - /** The email address of the warehouse. */ - email?: Maybe - /** Warehouse name. */ - name: Scalars['String'] - /** Address of the warehouse. */ - address: WarehouseAddressInput - /** Shipping zones supported by the warehouse. */ - shippingZones?: Maybe>> -} - -export type WarehouseAddressInput = { - /** Address. */ - streetAddress1: Scalars['String'] - /** Address. */ - streetAddress2?: Maybe - /** City. */ - city: Scalars['String'] - /** District. */ - cityArea?: Maybe - /** Postal code. */ - postalCode?: Maybe - /** Country. */ - country: CountryCode - /** State or province. */ - countryArea?: Maybe - /** Phone number. */ - phone?: Maybe -} - -/** Updates given warehouse. */ -export type WarehouseUpdate = { - __typename?: 'WarehouseUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - warehouseErrors: Array - warehouse?: Maybe -} - -export type WarehouseUpdateInput = { - /** Warehouse slug. */ - slug?: Maybe - /** Company name. */ - companyName?: Maybe - /** The email address of the warehouse. */ - email?: Maybe - /** Warehouse name. */ - name?: Maybe - /** Address of the warehouse. */ - address?: Maybe -} - -/** Deletes selected warehouse. */ -export type WarehouseDelete = { - __typename?: 'WarehouseDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - warehouseErrors: Array - warehouse?: Maybe -} - -/** Add shipping zone to given warehouse. */ -export type WarehouseShippingZoneAssign = { - __typename?: 'WarehouseShippingZoneAssign' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - warehouseErrors: Array - warehouse?: Maybe -} - -/** Remove shipping zone from given warehouse. */ -export type WarehouseShippingZoneUnassign = { - __typename?: 'WarehouseShippingZoneUnassign' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - warehouseErrors: Array - warehouse?: Maybe -} - -/** Creates a new staff notification recipient. */ -export type StaffNotificationRecipientCreate = { - __typename?: 'StaffNotificationRecipientCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - shopErrors: Array - staffNotificationRecipient?: Maybe -} - -export type ShopError = { - __typename?: 'ShopError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: ShopErrorCode -} - -/** An enumeration. */ -export enum ShopErrorCode { - AlreadyExists = 'ALREADY_EXISTS', - CannotFetchTaxRates = 'CANNOT_FETCH_TAX_RATES', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', -} - -export type StaffNotificationRecipientInput = { - /** The ID of the user subscribed to email notifications.. */ - user?: Maybe - /** Email address of a user subscribed to email notifications. */ - email?: Maybe - /** Determines if a notification active. */ - active?: Maybe -} - -/** Updates a staff notification recipient. */ -export type StaffNotificationRecipientUpdate = { - __typename?: 'StaffNotificationRecipientUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - shopErrors: Array - staffNotificationRecipient?: Maybe -} - -/** Delete staff notification recipient. */ -export type StaffNotificationRecipientDelete = { - __typename?: 'StaffNotificationRecipientDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - shopErrors: Array - staffNotificationRecipient?: Maybe -} - -/** Updates site domain of the shop. */ -export type ShopDomainUpdate = { - __typename?: 'ShopDomainUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Updated shop. */ - shop?: Maybe - shopErrors: Array -} - -export type SiteDomainInput = { - /** Domain name for shop. */ - domain?: Maybe - /** Shop site name. */ - name?: Maybe -} - -/** Updates shop settings. */ -export type ShopSettingsUpdate = { - __typename?: 'ShopSettingsUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Updated shop. */ - shop?: Maybe - shopErrors: Array -} - -export type ShopSettingsInput = { - /** Header text. */ - headerText?: Maybe - /** SEO description. */ - description?: Maybe - /** Include taxes in prices. */ - includeTaxesInPrices?: Maybe - /** Display prices with tax in store. */ - displayGrossPrices?: Maybe - /** Charge taxes on shipping. */ - chargeTaxesOnShipping?: Maybe - /** Enable inventory tracking. */ - trackInventoryByDefault?: Maybe - /** Default weight unit. */ - defaultWeightUnit?: Maybe - /** Enable automatic fulfillment for all digital products. */ - automaticFulfillmentDigitalProducts?: Maybe - /** Default number of max downloads per digital content URL. */ - defaultDigitalMaxDownloads?: Maybe - /** Default number of days which digital content URL will be valid. */ - defaultDigitalUrlValidDays?: Maybe - /** Default email sender's name. */ - defaultMailSenderName?: Maybe - /** Default email sender's address. */ - defaultMailSenderAddress?: Maybe - /** URL of a view where customers can set their password. */ - customerSetPasswordUrl?: Maybe -} - -/** Fetch tax rates. */ -export type ShopFetchTaxRates = { - __typename?: 'ShopFetchTaxRates' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Updated shop. */ - shop?: Maybe - shopErrors: Array -} - -/** Creates/Updates translations for Shop Settings. */ -export type ShopSettingsTranslate = { - __typename?: 'ShopSettingsTranslate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Updated shop. */ - shop?: Maybe - translationErrors: Array -} - -export type TranslationError = { - __typename?: 'TranslationError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: TranslationErrorCode -} - -/** An enumeration. */ -export enum TranslationErrorCode { - GraphqlError = 'GRAPHQL_ERROR', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', -} - -export type ShopSettingsTranslationInput = { - headerText?: Maybe - description?: Maybe -} - -/** Update the shop's address. If the `null` value is passed, the currently selected address will be deleted. */ -export type ShopAddressUpdate = { - __typename?: 'ShopAddressUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Updated shop. */ - shop?: Maybe - shopErrors: Array -} - -/** Update shop order settings. */ -export type OrderSettingsUpdate = { - __typename?: 'OrderSettingsUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Order settings. */ - orderSettings?: Maybe - orderSettingsErrors: Array -} - -export type OrderSettingsError = { - __typename?: 'OrderSettingsError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: OrderSettingsErrorCode -} - -/** An enumeration. */ -export enum OrderSettingsErrorCode { - Invalid = 'INVALID', -} - -export type OrderSettingsUpdateInput = { - /** When disabled, all new orders from checkout will be marked as unconfirmed. When enabled orders from checkout will become unfulfilled immediately. */ - automaticallyConfirmAllNewOrders: Scalars['Boolean'] -} - -/** Manage shipping method's availability in channels. */ -export type ShippingMethodChannelListingUpdate = { - __typename?: 'ShippingMethodChannelListingUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** An updated shipping method instance. */ - shippingMethod?: Maybe - shippingErrors: Array -} - -export type ShippingError = { - __typename?: 'ShippingError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: ShippingErrorCode - /** List of warehouse IDs which causes the error. */ - warehouses?: Maybe> - /** List of channels IDs which causes the error. */ - channels?: Maybe> -} - -/** An enumeration. */ -export enum ShippingErrorCode { - AlreadyExists = 'ALREADY_EXISTS', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - MaxLessThanMin = 'MAX_LESS_THAN_MIN', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', - DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', -} - -export type ShippingMethodChannelListingInput = { - /** List of channels to which the shipping method should be assigned. */ - addChannels?: Maybe> - /** List of channels from which the shipping method should be unassigned. */ - removeChannels?: Maybe> -} - -export type ShippingMethodChannelListingAddInput = { - /** ID of a channel. */ - channelId: Scalars['ID'] - /** Shipping price of the shipping method in this channel. */ - price?: Maybe - /** Minimum order price to use this shipping method. */ - minimumOrderPrice?: Maybe - /** Maximum order price to use this shipping method. */ - maximumOrderPrice?: Maybe -} - -/** Creates a new shipping price. */ -export type ShippingPriceCreate = { - __typename?: 'ShippingPriceCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A shipping zone to which the shipping method belongs. */ - shippingZone?: Maybe - shippingMethod?: Maybe - shippingErrors: Array -} - -export type ShippingPriceInput = { - /** Name of the shipping method. */ - name?: Maybe - /** Shipping method description (JSON). */ - description?: Maybe - /** Minimum order weight to use this shipping method. */ - minimumOrderWeight?: Maybe - /** Maximum order weight to use this shipping method. */ - maximumOrderWeight?: Maybe - /** Maximum number of days for delivery. */ - maximumDeliveryDays?: Maybe - /** Minimal number of days for delivery. */ - minimumDeliveryDays?: Maybe - /** Shipping type: price or weight based. */ - type?: Maybe - /** Shipping zone this method belongs to. */ - shippingZone?: Maybe - /** Postal code rules to add. */ - addPostalCodeRules?: Maybe> - /** Postal code rules to delete. */ - deletePostalCodeRules?: Maybe> - /** Inclusion type for currently assigned postal code rules. */ - inclusionType?: Maybe -} - -export type ShippingPostalCodeRulesCreateInputRange = { - /** Start range of the postal code. */ - start: Scalars['String'] - /** End range of the postal code. */ - end?: Maybe -} - -/** Deletes a shipping price. */ -export type ShippingPriceDelete = { - __typename?: 'ShippingPriceDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A shipping method to delete. */ - shippingMethod?: Maybe - /** A shipping zone to which the shipping method belongs. */ - shippingZone?: Maybe - shippingErrors: Array -} - -/** Deletes shipping prices. */ -export type ShippingPriceBulkDelete = { - __typename?: 'ShippingPriceBulkDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - shippingErrors: Array -} - -/** Updates a new shipping price. */ -export type ShippingPriceUpdate = { - __typename?: 'ShippingPriceUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A shipping zone to which the shipping method belongs. */ - shippingZone?: Maybe - shippingMethod?: Maybe - shippingErrors: Array -} - -/** Creates/Updates translations for shipping method. */ -export type ShippingPriceTranslate = { - __typename?: 'ShippingPriceTranslate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - translationErrors: Array - shippingMethod?: Maybe -} - -export type ShippingPriceTranslationInput = { - name?: Maybe - /** Translated shipping method description (JSON). */ - description?: Maybe -} - -/** Exclude products from shipping price. */ -export type ShippingPriceExcludeProducts = { - __typename?: 'ShippingPriceExcludeProducts' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A shipping method with new list of excluded products. */ - shippingMethod?: Maybe - shippingErrors: Array -} - -export type ShippingPriceExcludeProductsInput = { - /** List of products which will be excluded. */ - products: Array> -} - -/** Remove product from excluded list for shipping price. */ -export type ShippingPriceRemoveProductFromExclude = { - __typename?: 'ShippingPriceRemoveProductFromExclude' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A shipping method with new list of excluded products. */ - shippingMethod?: Maybe - shippingErrors: Array -} - -/** Creates a new shipping zone. */ -export type ShippingZoneCreate = { - __typename?: 'ShippingZoneCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - shippingErrors: Array - shippingZone?: Maybe -} - -export type ShippingZoneCreateInput = { - /** Shipping zone's name. Visible only to the staff. */ - name?: Maybe - /** Description of the shipping zone. */ - description?: Maybe - /** List of countries in this shipping zone. */ - countries?: Maybe>> - /** Default shipping zone will be used for countries not covered by other zones. */ - default?: Maybe - /** List of warehouses to assign to a shipping zone */ - addWarehouses?: Maybe>> - /** List of channels to assign to the shipping zone. */ - addChannels?: Maybe> -} - -/** Deletes a shipping zone. */ -export type ShippingZoneDelete = { - __typename?: 'ShippingZoneDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - shippingErrors: Array - shippingZone?: Maybe -} - -/** Deletes shipping zones. */ -export type ShippingZoneBulkDelete = { - __typename?: 'ShippingZoneBulkDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - shippingErrors: Array -} - -/** Updates a new shipping zone. */ -export type ShippingZoneUpdate = { - __typename?: 'ShippingZoneUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - shippingErrors: Array - shippingZone?: Maybe -} - -export type ShippingZoneUpdateInput = { - /** Shipping zone's name. Visible only to the staff. */ - name?: Maybe - /** Description of the shipping zone. */ - description?: Maybe - /** List of countries in this shipping zone. */ - countries?: Maybe>> - /** Default shipping zone will be used for countries not covered by other zones. */ - default?: Maybe - /** List of warehouses to assign to a shipping zone */ - addWarehouses?: Maybe>> - /** List of channels to assign to the shipping zone. */ - addChannels?: Maybe> - /** List of warehouses to unassign from a shipping zone */ - removeWarehouses?: Maybe>> - /** List of channels to unassign from the shipping zone. */ - removeChannels?: Maybe> -} - -/** Assign attributes to a given product type. */ -export type ProductAttributeAssign = { - __typename?: 'ProductAttributeAssign' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** The updated product type. */ - productType?: Maybe - productErrors: Array -} - -export type ProductError = { - __typename?: 'ProductError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: ProductErrorCode - /** List of attributes IDs which causes the error. */ - attributes?: Maybe> - /** List of attribute values IDs which causes the error. */ - values?: Maybe> -} - -/** An enumeration. */ -export enum ProductErrorCode { - AlreadyExists = 'ALREADY_EXISTS', - AttributeAlreadyAssigned = 'ATTRIBUTE_ALREADY_ASSIGNED', - AttributeCannotBeAssigned = 'ATTRIBUTE_CANNOT_BE_ASSIGNED', - AttributeVariantsDisabled = 'ATTRIBUTE_VARIANTS_DISABLED', - DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - ProductWithoutCategory = 'PRODUCT_WITHOUT_CATEGORY', - NotProductsImage = 'NOT_PRODUCTS_IMAGE', - NotProductsVariant = 'NOT_PRODUCTS_VARIANT', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', - VariantNoDigitalContent = 'VARIANT_NO_DIGITAL_CONTENT', - CannotManageProductWithoutVariant = 'CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT', - ProductNotAssignedToChannel = 'PRODUCT_NOT_ASSIGNED_TO_CHANNEL', - UnsupportedMediaProvider = 'UNSUPPORTED_MEDIA_PROVIDER', -} - -export type ProductAttributeAssignInput = { - /** The ID of the attribute to assign. */ - id: Scalars['ID'] - /** The attribute type to be assigned as. */ - type: ProductAttributeType -} - -export enum ProductAttributeType { - Product = 'PRODUCT', - Variant = 'VARIANT', -} - -/** Un-assign attributes from a given product type. */ -export type ProductAttributeUnassign = { - __typename?: 'ProductAttributeUnassign' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** The updated product type. */ - productType?: Maybe - productErrors: Array -} - -/** Creates a new category. */ -export type CategoryCreate = { - __typename?: 'CategoryCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - productErrors: Array - category?: Maybe -} - -export type CategoryInput = { - /** Category description (JSON). */ - description?: Maybe - /** Category name. */ - name?: Maybe - /** Category slug. */ - slug?: Maybe - /** Search engine optimization fields. */ - seo?: Maybe - /** Background image file. */ - backgroundImage?: Maybe - /** Alt text for a product media. */ - backgroundImageAlt?: Maybe -} - -export type SeoInput = { - /** SEO title. */ - title?: Maybe - /** SEO description. */ - description?: Maybe -} - -/** Deletes a category. */ -export type CategoryDelete = { - __typename?: 'CategoryDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - productErrors: Array - category?: Maybe -} - -/** Deletes categories. */ -export type CategoryBulkDelete = { - __typename?: 'CategoryBulkDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - productErrors: Array -} - -/** Updates a category. */ -export type CategoryUpdate = { - __typename?: 'CategoryUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - productErrors: Array - category?: Maybe -} - -/** Creates/Updates translations for Category. */ -export type CategoryTranslate = { - __typename?: 'CategoryTranslate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - translationErrors: Array - category?: Maybe -} - -export type TranslationInput = { - seoTitle?: Maybe - seoDescription?: Maybe - name?: Maybe - description?: Maybe -} - -/** Adds products to a collection. */ -export type CollectionAddProducts = { - __typename?: 'CollectionAddProducts' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Collection to which products will be added. */ - collection?: Maybe - collectionErrors: Array -} - -export type CollectionError = { - __typename?: 'CollectionError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** List of products IDs which causes the error. */ - products?: Maybe> - /** The error code. */ - code: CollectionErrorCode -} - -/** An enumeration. */ -export enum CollectionErrorCode { - DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', - CannotManageProductWithoutVariant = 'CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT', -} - -/** Creates a new collection. */ -export type CollectionCreate = { - __typename?: 'CollectionCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - collectionErrors: Array - collection?: Maybe -} - -export type CollectionCreateInput = { - /** Informs whether a collection is published. */ - isPublished?: Maybe - /** Name of the collection. */ - name?: Maybe - /** Slug of the collection. */ - slug?: Maybe - /** Description of the collection (JSON). */ - description?: Maybe - /** Background image file. */ - backgroundImage?: Maybe - /** Alt text for an image. */ - backgroundImageAlt?: Maybe - /** Search engine optimization fields. */ - seo?: Maybe - /** Publication date. ISO 8601 standard. */ - publicationDate?: Maybe - /** List of products to be added to the collection. */ - products?: Maybe>> -} - -/** Deletes a collection. */ -export type CollectionDelete = { - __typename?: 'CollectionDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - collectionErrors: Array - collection?: Maybe -} - -/** Reorder the products of a collection. */ -export type CollectionReorderProducts = { - __typename?: 'CollectionReorderProducts' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Collection from which products are reordered. */ - collection?: Maybe - collectionErrors: Array -} - -export type MoveProductInput = { - /** The ID of the product to move. */ - productId: Scalars['ID'] - /** The relative sorting position of the product (from -inf to +inf) starting from the first given product's actual position.1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. */ - sortOrder?: Maybe -} - -/** Deletes collections. */ -export type CollectionBulkDelete = { - __typename?: 'CollectionBulkDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - collectionErrors: Array -} - -/** Remove products from a collection. */ -export type CollectionRemoveProducts = { - __typename?: 'CollectionRemoveProducts' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Collection from which products will be removed. */ - collection?: Maybe - collectionErrors: Array -} - -/** Updates a collection. */ -export type CollectionUpdate = { - __typename?: 'CollectionUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - collectionErrors: Array - collection?: Maybe -} - -export type CollectionInput = { - /** Informs whether a collection is published. */ - isPublished?: Maybe - /** Name of the collection. */ - name?: Maybe - /** Slug of the collection. */ - slug?: Maybe - /** Description of the collection (JSON). */ - description?: Maybe - /** Background image file. */ - backgroundImage?: Maybe - /** Alt text for an image. */ - backgroundImageAlt?: Maybe - /** Search engine optimization fields. */ - seo?: Maybe - /** Publication date. ISO 8601 standard. */ - publicationDate?: Maybe -} - -/** Creates/Updates translations for collection. */ -export type CollectionTranslate = { - __typename?: 'CollectionTranslate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - translationErrors: Array - collection?: Maybe -} - -/** Manage collection's availability in channels. */ -export type CollectionChannelListingUpdate = { - __typename?: 'CollectionChannelListingUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** An updated collection instance. */ - collection?: Maybe - collectionChannelListingErrors: Array -} - -export type CollectionChannelListingError = { - __typename?: 'CollectionChannelListingError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: ProductErrorCode - /** List of attributes IDs which causes the error. */ - attributes?: Maybe> - /** List of attribute values IDs which causes the error. */ - values?: Maybe> - /** List of channels IDs which causes the error. */ - channels?: Maybe> -} - -export type CollectionChannelListingUpdateInput = { - /** List of channels to which the collection should be assigned. */ - addChannels?: Maybe> - /** List of channels from which the collection should be unassigned. */ - removeChannels?: Maybe> -} - -export type PublishableChannelListingInput = { - /** ID of a channel. */ - channelId: Scalars['ID'] - /** Determines if object is visible to customers. */ - isPublished?: Maybe - /** Publication date. ISO 8601 standard. */ - publicationDate?: Maybe -} - -/** Creates a new product. */ -export type ProductCreate = { - __typename?: 'ProductCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - productErrors: Array - product?: Maybe -} - -export type ProductCreateInput = { - /** List of attributes. */ - attributes?: Maybe> - /** ID of the product's category. */ - category?: Maybe - /** Determine if taxes are being charged for the product. */ - chargeTaxes?: Maybe - /** List of IDs of collections that the product belongs to. */ - collections?: Maybe> - /** Product description (JSON). */ - description?: Maybe - /** Product name. */ - name?: Maybe - /** Product slug. */ - slug?: Maybe - /** Tax rate for enabled tax gateway. */ - taxCode?: Maybe - /** Search engine optimization fields. */ - seo?: Maybe - /** Weight of the Product. */ - weight?: Maybe - /** Defines the product rating value. */ - rating?: Maybe - /** ID of the type that product belongs to. */ - productType: Scalars['ID'] -} - -export type AttributeValueInput = { - /** ID of the selected attribute. */ - id?: Maybe - /** The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. */ - values?: Maybe>> - /** URL of the file attribute. Every time, a new value is created. */ - file?: Maybe - /** File content type. */ - contentType?: Maybe - /** List of entity IDs that will be used as references. */ - references?: Maybe> - /** Text content in JSON format. */ - richText?: Maybe -} - -/** Deletes a product. */ -export type ProductDelete = { - __typename?: 'ProductDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - productErrors: Array - product?: Maybe -} - -/** Deletes products. */ -export type ProductBulkDelete = { - __typename?: 'ProductBulkDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - productErrors: Array -} - -/** Updates an existing product. */ -export type ProductUpdate = { - __typename?: 'ProductUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - productErrors: Array - product?: Maybe -} - -export type ProductInput = { - /** List of attributes. */ - attributes?: Maybe> - /** ID of the product's category. */ - category?: Maybe - /** Determine if taxes are being charged for the product. */ - chargeTaxes?: Maybe - /** List of IDs of collections that the product belongs to. */ - collections?: Maybe> - /** Product description (JSON). */ - description?: Maybe - /** Product name. */ - name?: Maybe - /** Product slug. */ - slug?: Maybe - /** Tax rate for enabled tax gateway. */ - taxCode?: Maybe - /** Search engine optimization fields. */ - seo?: Maybe - /** Weight of the Product. */ - weight?: Maybe - /** Defines the product rating value. */ - rating?: Maybe -} - -/** Creates/Updates translations for Product. */ -export type ProductTranslate = { - __typename?: 'ProductTranslate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - translationErrors: Array - product?: Maybe -} - -/** Manage product's availability in channels. */ -export type ProductChannelListingUpdate = { - __typename?: 'ProductChannelListingUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** An updated product instance. */ - product?: Maybe - productChannelListingErrors: Array -} - -export type ProductChannelListingError = { - __typename?: 'ProductChannelListingError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: ProductErrorCode - /** List of attributes IDs which causes the error. */ - attributes?: Maybe> - /** List of attribute values IDs which causes the error. */ - values?: Maybe> - /** List of channels IDs which causes the error. */ - channels?: Maybe> - /** List of variants IDs which causes the error. */ - variants?: Maybe> -} - -export type ProductChannelListingUpdateInput = { - /** List of channels to which the product should be assigned or updated. */ - updateChannels?: Maybe> - /** List of channels from which the product should be unassigned. */ - removeChannels?: Maybe> -} - -export type ProductChannelListingAddInput = { - /** ID of a channel. */ - channelId: Scalars['ID'] - /** Determines if object is visible to customers. */ - isPublished?: Maybe - /** Publication date. ISO 8601 standard. */ - publicationDate?: Maybe - /** Determines if product is visible in product listings (doesn't apply to product collections). */ - visibleInListings?: Maybe - /** Determine if product should be available for purchase. */ - isAvailableForPurchase?: Maybe - /** 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. */ - availableForPurchaseDate?: Maybe - /** List of variants to which the channel should be assigned. */ - addVariants?: Maybe> - /** List of variants from which the channel should be unassigned. */ - removeVariants?: 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 */ -export type ProductMediaCreate = { - __typename?: 'ProductMediaCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - product?: Maybe - media?: Maybe - productErrors: Array -} - -export type ProductMediaCreateInput = { - /** Alt text for a product media. */ - alt?: Maybe - /** Represents an image file in a multipart request. */ - image?: Maybe - /** ID of an product. */ - product: Scalars['ID'] - /** Represents an URL to an external media. */ - mediaUrl?: Maybe -} - -/** Reorder the variants of a product. Mutation updates updated_at on product and triggers PRODUCT_UPDATED webhook. */ -export type ProductVariantReorder = { - __typename?: 'ProductVariantReorder' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - product?: Maybe - productErrors: Array -} - -export type ReorderInput = { - /** The ID of the item to move. */ - id: Scalars['ID'] - /** The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. */ - sortOrder?: Maybe -} - -/** Deletes a product media. */ -export type ProductMediaDelete = { - __typename?: 'ProductMediaDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - product?: Maybe - media?: Maybe - productErrors: Array -} - -/** Deletes product media. */ -export type ProductMediaBulkDelete = { - __typename?: 'ProductMediaBulkDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - productErrors: Array -} - -/** Changes ordering of the product media. */ -export type ProductMediaReorder = { - __typename?: 'ProductMediaReorder' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - product?: Maybe - media?: Maybe> - productErrors: Array -} - -/** Updates a product media. */ -export type ProductMediaUpdate = { - __typename?: 'ProductMediaUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - product?: Maybe - media?: Maybe - productErrors: Array -} - -export type ProductMediaUpdateInput = { - /** Alt text for a product media. */ - alt?: Maybe -} - -/** Creates a new product type. */ -export type ProductTypeCreate = { - __typename?: 'ProductTypeCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - productErrors: Array - productType?: Maybe -} - -export type ProductTypeInput = { - /** Name of the product type. */ - name?: Maybe - /** Product type slug. */ - slug?: Maybe - /** Determines if product of this type has multiple variants. This option mainly simplifies product management in the dashboard. There is always at least one variant created under the hood. */ - hasVariants?: Maybe - /** List of attributes shared among all product variants. */ - productAttributes?: Maybe>> - /** List of attributes used to distinguish between different variants of a product. */ - variantAttributes?: Maybe>> - /** Determines if shipping is required for products of this variant. */ - isShippingRequired?: Maybe - /** Determines if products are digital. */ - isDigital?: Maybe - /** Weight of the ProductType items. */ - weight?: Maybe - /** Tax rate for enabled tax gateway. */ - taxCode?: Maybe -} - -/** Deletes a product type. */ -export type ProductTypeDelete = { - __typename?: 'ProductTypeDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - productErrors: Array - productType?: Maybe -} - -/** Deletes product types. */ -export type ProductTypeBulkDelete = { - __typename?: 'ProductTypeBulkDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - productErrors: Array -} - -/** Updates an existing product type. */ -export type ProductTypeUpdate = { - __typename?: 'ProductTypeUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - productErrors: Array - productType?: Maybe -} - -/** Reorder the attributes of a product type. */ -export type ProductTypeReorderAttributes = { - __typename?: 'ProductTypeReorderAttributes' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Product type from which attributes are reordered. */ - productType?: Maybe - productErrors: Array -} - -/** Reorder product attribute values. */ -export type ProductReorderAttributeValues = { - __typename?: 'ProductReorderAttributeValues' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Product from which attribute values are reordered. */ - product?: Maybe - productErrors: Array -} - -/** Create new digital content. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec */ -export type DigitalContentCreate = { - __typename?: 'DigitalContentCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - variant?: Maybe - content?: Maybe - productErrors: Array -} - -export type DigitalContentUploadInput = { - /** Use default digital content settings for this product. */ - useDefaultSettings: Scalars['Boolean'] - /** Determines how many times a download link can be accessed by a customer. */ - maxDownloads?: Maybe - /** Determines for how many days a download link is active since it was generated. */ - urlValidDays?: Maybe - /** Overwrite default automatic_fulfillment setting for variant. */ - automaticFulfillment?: Maybe - /** Represents an file in a multipart request. */ - contentFile: Scalars['Upload'] -} - -/** Remove digital content assigned to given variant. */ -export type DigitalContentDelete = { - __typename?: 'DigitalContentDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - variant?: Maybe - productErrors: Array -} - -/** Update digital content. */ -export type DigitalContentUpdate = { - __typename?: 'DigitalContentUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - variant?: Maybe - content?: Maybe - productErrors: Array -} - -export type DigitalContentInput = { - /** Use default digital content settings for this product. */ - useDefaultSettings: Scalars['Boolean'] - /** Determines how many times a download link can be accessed by a customer. */ - maxDownloads?: Maybe - /** Determines for how many days a download link is active since it was generated. */ - urlValidDays?: Maybe - /** Overwrite default automatic_fulfillment setting for variant. */ - automaticFulfillment?: Maybe -} - -/** Generate new URL to digital content. */ -export type DigitalContentUrlCreate = { - __typename?: 'DigitalContentUrlCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - productErrors: Array - digitalContentUrl?: Maybe -} - -export type DigitalContentUrlCreateInput = { - /** Digital content ID which URL will belong to. */ - content: Scalars['ID'] -} - -/** Creates a new variant for a product. */ -export type ProductVariantCreate = { - __typename?: 'ProductVariantCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - productErrors: Array - productVariant?: Maybe -} - -export type ProductVariantCreateInput = { - /** List of attributes specific to this variant. */ - attributes: Array> - /** Stock keeping unit. */ - sku?: Maybe - /** Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. */ - trackInventory?: Maybe - /** Weight of the Product Variant. */ - weight?: Maybe - /** Product ID of which type is the variant. */ - product: Scalars['ID'] - /** Stocks of a product available for sale. */ - stocks?: Maybe> -} - -export type StockInput = { - /** Warehouse in which stock is located. */ - warehouse: Scalars['ID'] - /** Quantity of items available for sell. */ - quantity: Scalars['Int'] -} - -/** Deletes a product variant. */ -export type ProductVariantDelete = { - __typename?: 'ProductVariantDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - productErrors: Array - productVariant?: Maybe -} - -/** Creates product variants for a given product. */ -export type ProductVariantBulkCreate = { - __typename?: 'ProductVariantBulkCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were created. */ - count: Scalars['Int'] - /** List of the created variants. */ - productVariants: Array - bulkProductErrors: Array -} - -export type BulkProductError = { - __typename?: 'BulkProductError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: ProductErrorCode - /** List of attributes IDs which causes the error. */ - attributes?: Maybe> - /** List of attribute values IDs which causes the error. */ - values?: Maybe> - /** Index of an input list item that caused the error. */ - index?: Maybe - /** List of warehouse IDs which causes the error. */ - warehouses?: Maybe> - /** List of channel IDs which causes the error. */ - channels?: Maybe> -} - -export type ProductVariantBulkCreateInput = { - /** List of attributes specific to this variant. */ - attributes: Array> - /** Stock keeping unit. */ - sku: Scalars['String'] - /** Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. */ - trackInventory?: Maybe - /** Weight of the Product Variant. */ - weight?: Maybe - /** Stocks of a product available for sale. */ - stocks?: Maybe> - /** List of prices assigned to channels. */ - channelListings?: Maybe> -} - -export type BulkAttributeValueInput = { - /** ID of the selected attribute. */ - id?: Maybe - /** The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. */ - values: Array> -} - -export type ProductVariantChannelListingAddInput = { - /** ID of a channel. */ - channelId: Scalars['ID'] - /** Price of the particular variant in channel. */ - price: Scalars['PositiveDecimal'] - /** Cost price of the variant in channel. */ - costPrice?: Maybe -} - -/** Deletes product variants. */ -export type ProductVariantBulkDelete = { - __typename?: 'ProductVariantBulkDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - productErrors: Array -} - -/** Creates stocks for product variant. */ -export type ProductVariantStocksCreate = { - __typename?: 'ProductVariantStocksCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Updated product variant. */ - productVariant?: Maybe - bulkStockErrors: Array -} - -export type BulkStockError = { - __typename?: 'BulkStockError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: ProductErrorCode - /** List of attributes IDs which causes the error. */ - attributes?: Maybe> - /** List of attribute values IDs which causes the error. */ - values?: Maybe> - /** Index of an input list item that caused the error. */ - index?: Maybe -} - -/** Delete stocks from product variant. */ -export type ProductVariantStocksDelete = { - __typename?: 'ProductVariantStocksDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Updated product variant. */ - productVariant?: Maybe - stockErrors: Array -} - -export type StockError = { - __typename?: 'StockError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: StockErrorCode -} - -/** An enumeration. */ -export enum StockErrorCode { - AlreadyExists = 'ALREADY_EXISTS', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', -} - -/** Update stocks for product variant. */ -export type ProductVariantStocksUpdate = { - __typename?: 'ProductVariantStocksUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Updated product variant. */ - productVariant?: Maybe - bulkStockErrors: Array -} - -/** Updates an existing variant for product. */ -export type ProductVariantUpdate = { - __typename?: 'ProductVariantUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - productErrors: Array - productVariant?: Maybe -} - -export type ProductVariantInput = { - /** List of attributes specific to this variant. */ - attributes?: Maybe>> - /** Stock keeping unit. */ - sku?: Maybe - /** Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. */ - trackInventory?: Maybe - /** Weight of the Product Variant. */ - weight?: Maybe -} - -/** Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook. */ -export type ProductVariantSetDefault = { - __typename?: 'ProductVariantSetDefault' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - product?: Maybe - productErrors: Array -} - -/** Creates/Updates translations for Product Variant. */ -export type ProductVariantTranslate = { - __typename?: 'ProductVariantTranslate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - translationErrors: Array - productVariant?: Maybe -} - export type NameTranslationInput = { name?: Maybe } -/** Manage product variant prices in channels. */ -export type ProductVariantChannelListingUpdate = { - __typename?: 'ProductVariantChannelListingUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** An updated product variant instance. */ - variant?: Maybe - productChannelListingErrors: Array +export enum NavigationType { + /** Main storefront navigation. */ + Main = 'MAIN', + /** Secondary storefront navigation. */ + Secondary = 'SECONDARY', } -/** Reorder product variant attribute values. */ -export type ProductVariantReorderAttributeValues = { - __typename?: 'ProductVariantReorderAttributeValues' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Product variant from which attribute values are reordered. */ - productVariant?: Maybe - productErrors: Array +/** An object with an ID */ +export type Node = { + /** The ID of the object. */ + id: Scalars['ID'] } -/** Assign an media to a product variant. */ -export type VariantMediaAssign = { - __typename?: 'VariantMediaAssign' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - productVariant?: Maybe - media?: Maybe - productErrors: Array +export type ObjectWithMetadata = { + /** List of private metadata items.Requires proper staff permissions to access. */ + privateMetadata: Array> + /** List of public metadata items. Can be accessed without permissions. */ + metadata: Array> } -/** Unassign an media from a product variant. */ -export type VariantMediaUnassign = { - __typename?: 'VariantMediaUnassign' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - productVariant?: Maybe - media?: Maybe - productErrors: Array +/** Represents an order in the shop. */ +export type Order = Node & + ObjectWithMetadata & { + __typename?: 'Order' + /** The ID of the object. */ + id: Scalars['ID'] + created: Scalars['DateTime'] + status: OrderStatus + user?: Maybe + trackingClientId: Scalars['String'] + billingAddress?: Maybe
+ shippingAddress?: Maybe
+ shippingMethod?: Maybe + shippingMethodName?: Maybe + channel: Channel + /** Total price of shipping. */ + shippingPrice: TaxedMoney + shippingTaxRate: Scalars['Float'] + token: Scalars['String'] + voucher?: Maybe + /** List of user gift cards. */ + giftCards?: Maybe>> + displayGrossPrices: Scalars['Boolean'] + customerNote: Scalars['String'] + weight?: Maybe + redirectUrl?: Maybe + /** List of private metadata items.Requires proper staff permissions to access. */ + privateMetadata: Array> + /** List of public metadata items. Can be accessed without permissions. */ + metadata: Array> + /** List of shipments for the order. */ + fulfillments: Array> + /** List of order lines. */ + lines: Array> + /** List of actions that can be performed in the current state of an order. */ + actions: Array> + /** Shipping methods that can be used with this order. */ + availableShippingMethods?: Maybe>> + /** List of order invoices. */ + invoices?: Maybe>> + /** User-friendly number of an order. */ + number?: Maybe + /** Informs if an order is fully paid. */ + isPaid: Scalars['Boolean'] + /** Internal payment status. */ + paymentStatus: PaymentChargeStatusEnum + /** User-friendly payment status. */ + paymentStatusDisplay: Scalars['String'] + /** List of payments for the order. */ + payments?: Maybe>> + /** Total amount of the order. */ + total: TaxedMoney + /** Undiscounted total amount of the order. */ + undiscountedTotal: TaxedMoney + /** The sum of line prices not including shipping. */ + subtotal: TaxedMoney + /** User-friendly order status. */ + statusDisplay?: Maybe + /** Informs whether a draft order can be finalized(turned into a regular order). */ + canFinalize: Scalars['Boolean'] + /** Amount authorized for the order. */ + totalAuthorized: Money + /** Amount captured by payment. */ + totalCaptured: Money + /** List of events associated with the order. */ + events?: Maybe>> + /** The difference between the paid and the order total amount. */ + totalBalance: Money + /** Email address of the customer. */ + userEmail?: Maybe + /** Returns True, if order requires shipping. */ + isShippingRequired: Scalars['Boolean'] + /** @deprecated Use the `languageCodeEnum` field to fetch the language code. This field will be removed in Saleor 4.0. */ + languageCode: Scalars['String'] + /** Order language code. */ + languageCodeEnum: LanguageCodeEnum + /** + * Returns applied discount. + * @deprecated Use discounts field. This field will be removed in Saleor 4.0. + */ + discount?: Maybe + /** + * Discount name. + * @deprecated Use discounts field. This field will be removed in Saleor 4.0. + */ + discountName?: Maybe + /** + * Translated discount name. + * @deprecated Use discounts field. This field will be removed in Saleor 4.0. + */ + translatedDiscountName?: Maybe + /** List of all discounts assigned to the order. */ + discounts?: Maybe> + } + +export enum OrderAction { + /** Represents the capture action. */ + Capture = 'CAPTURE', + /** Represents a mark-as-paid action. */ + MarkAsPaid = 'MARK_AS_PAID', + /** Represents a refund action. */ + Refund = 'REFUND', + /** Represents a void action. */ + Void = 'VOID', } -/** Captures the authorized payment amount. */ -export type PaymentCapture = { - __typename?: 'PaymentCapture' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Updated payment. */ - payment?: Maybe - paymentErrors: Array -} - -export type PaymentError = { - __typename?: 'PaymentError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: PaymentErrorCode -} - -/** An enumeration. */ -export enum PaymentErrorCode { - BillingAddressNotSet = 'BILLING_ADDRESS_NOT_SET', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', - PartialPaymentNotAllowed = 'PARTIAL_PAYMENT_NOT_ALLOWED', - ShippingAddressNotSet = 'SHIPPING_ADDRESS_NOT_SET', - InvalidShippingMethod = 'INVALID_SHIPPING_METHOD', - ShippingMethodNotSet = 'SHIPPING_METHOD_NOT_SET', - PaymentError = 'PAYMENT_ERROR', - NotSupportedGateway = 'NOT_SUPPORTED_GATEWAY', -} - -/** Refunds the captured payment amount. */ -export type PaymentRefund = { - __typename?: 'PaymentRefund' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Updated payment. */ - payment?: Maybe - paymentErrors: Array -} - -/** Voids the authorized payment. */ -export type PaymentVoid = { - __typename?: 'PaymentVoid' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Updated payment. */ - payment?: Maybe - paymentErrors: Array -} - -/** Initializes payment process when it is required by gateway. */ -export type PaymentInitialize = { - __typename?: 'PaymentInitialize' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - initializedPayment?: Maybe - paymentErrors: Array -} - -/** 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 = { - __typename?: 'PaymentInitialized' - /** ID of a payment gateway. */ - gateway: Scalars['String'] - /** Payment gateway name. */ - name: Scalars['String'] - /** Initialized data by gateway. */ - data?: Maybe -} - -/** Creates a new page. */ -export type PageCreate = { - __typename?: 'PageCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - pageErrors: Array - page?: Maybe -} - -export type PageError = { - __typename?: 'PageError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: PageErrorCode - /** List of attributes IDs which causes the error. */ - attributes?: Maybe> - /** List of attribute values IDs which causes the error. */ - values?: Maybe> -} - -/** An enumeration. */ -export enum PageErrorCode { - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', - DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', - AttributeAlreadyAssigned = 'ATTRIBUTE_ALREADY_ASSIGNED', -} - -export type PageCreateInput = { - /** Page internal name. */ - slug?: Maybe - /** Page title. */ - title?: Maybe - /** Page content in JSON format. */ - content?: Maybe - /** List of attributes. */ - attributes?: Maybe> - /** Determines if page is visible in the storefront. */ - isPublished?: Maybe - /** Publication date. ISO 8601 standard. */ - publicationDate?: Maybe - /** Search engine optimization fields. */ - seo?: Maybe - /** ID of the page type that page belongs to. */ - pageType: Scalars['ID'] -} - -/** Deletes a page. */ -export type PageDelete = { - __typename?: 'PageDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - pageErrors: Array - page?: Maybe -} - -/** Deletes pages. */ -export type PageBulkDelete = { - __typename?: 'PageBulkDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - pageErrors: Array -} - -/** Publish pages. */ -export type PageBulkPublish = { - __typename?: 'PageBulkPublish' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - pageErrors: Array -} - -/** Updates an existing page. */ -export type PageUpdate = { - __typename?: 'PageUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - pageErrors: Array - page?: Maybe -} - -export type PageInput = { - /** Page internal name. */ - slug?: Maybe - /** Page title. */ - title?: Maybe - /** Page content in JSON format. */ - content?: Maybe - /** List of attributes. */ - attributes?: Maybe> - /** Determines if page is visible in the storefront. */ - isPublished?: Maybe - /** Publication date. ISO 8601 standard. */ - publicationDate?: Maybe - /** Search engine optimization fields. */ - seo?: Maybe -} - -/** Creates/Updates translations for Page. */ -export type PageTranslate = { - __typename?: 'PageTranslate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - translationErrors: Array - page?: Maybe -} - -export type PageTranslationInput = { - seoTitle?: Maybe - seoDescription?: Maybe - title?: Maybe - content?: Maybe -} - -/** Create a new page type. */ -export type PageTypeCreate = { - __typename?: 'PageTypeCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - pageErrors: Array - pageType?: Maybe -} - -export type PageTypeCreateInput = { - /** Name of the page type. */ - name?: Maybe - /** Page type slug. */ - slug?: Maybe - /** List of attribute IDs to be assigned to the page type. */ - addAttributes?: Maybe> -} - -/** Update page type. */ -export type PageTypeUpdate = { - __typename?: 'PageTypeUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - pageErrors: Array - pageType?: Maybe -} - -export type PageTypeUpdateInput = { - /** Name of the page type. */ - name?: Maybe - /** Page type slug. */ - slug?: Maybe - /** List of attribute IDs to be assigned to the page type. */ - addAttributes?: Maybe> - /** List of attribute IDs to be assigned to the page type. */ - removeAttributes?: Maybe> -} - -/** Delete a page type. */ -export type PageTypeDelete = { - __typename?: 'PageTypeDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - pageErrors: Array - pageType?: Maybe -} - -/** Delete page types. */ -export type PageTypeBulkDelete = { - __typename?: 'PageTypeBulkDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - pageErrors: Array -} - -/** Assign attributes to a given page type. */ -export type PageAttributeAssign = { - __typename?: 'PageAttributeAssign' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** The updated page type. */ - pageType?: Maybe - pageErrors: Array -} - -/** Unassign attributes from a given page type. */ -export type PageAttributeUnassign = { - __typename?: 'PageAttributeUnassign' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** The updated page type. */ - pageType?: Maybe - pageErrors: Array -} - -/** Reorder the attributes of a page type. */ -export type PageTypeReorderAttributes = { - __typename?: 'PageTypeReorderAttributes' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Page type from which attributes are reordered. */ - pageType?: Maybe - pageErrors: Array -} - -/** Reorder page attribute values. */ -export type PageReorderAttributeValues = { - __typename?: 'PageReorderAttributeValues' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Page from which attribute values are reordered. */ - page?: Maybe - pageErrors: Array -} - -/** Completes creating an order. */ -export type DraftOrderComplete = { - __typename?: 'DraftOrderComplete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Completed order. */ +/** Adds note to the order. */ +export type OrderAddNote = { + __typename?: 'OrderAddNote' + /** Order with the note added. */ order?: Maybe + /** Order note created. */ + event?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ orderErrors: Array + errors: Array +} + +export type OrderAddNoteInput = { + /** Note message. */ + message: Scalars['String'] +} + +/** Cancels orders. */ +export type OrderBulkCancel = { + __typename?: 'OrderBulkCancel' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderErrors: Array + errors: Array +} + +/** Cancel an order. */ +export type OrderCancel = { + __typename?: 'OrderCancel' + /** Canceled order. */ + order?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderErrors: Array + errors: Array +} + +/** Capture an order. */ +export type OrderCapture = { + __typename?: 'OrderCapture' + /** Captured order. */ + order?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderErrors: Array + errors: Array +} + +/** Confirms an unconfirmed order by changing status to unfulfilled. */ +export type OrderConfirm = { + __typename?: 'OrderConfirm' + order?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderErrors: Array + errors: Array +} + +export type OrderCountableConnection = { + __typename?: 'OrderCountableConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe +} + +export type OrderCountableEdge = { + __typename?: 'OrderCountableEdge' + /** The item at the end of the edge. */ + node: Order + /** A cursor for use in pagination. */ + cursor: Scalars['String'] +} + +export enum OrderDirection { + /** Specifies an ascending sort order. */ + Asc = 'ASC', + /** Specifies a descending sort order. */ + Desc = 'DESC', +} + +/** Contains all details related to the applied discount to the order. */ +export type OrderDiscount = Node & { + __typename?: 'OrderDiscount' + /** The ID of the object. */ + id: Scalars['ID'] + type: OrderDiscountType + /** Type of the discount: fixed or percent */ + valueType: DiscountValueTypeEnum + /** Value of the discount. Can store fixed value or percent value */ + value: Scalars['PositiveDecimal'] + name?: Maybe + translatedName?: Maybe + /** Explanation for the applied discount. */ + reason?: Maybe + /** Returns amount of discount. */ + amount: Money +} + +/** Adds discount to the order. */ +export type OrderDiscountAdd = { + __typename?: 'OrderDiscountAdd' + /** Order which has been discounted. */ + order?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderErrors: Array + errors: Array +} + +export type OrderDiscountCommonInput = { + /** Type of the discount: fixed or percent */ + valueType: DiscountValueTypeEnum + /** Value of the discount. Can store fixed value or percent value */ + value: Scalars['PositiveDecimal'] + /** Explanation for the applied discount. */ + reason?: Maybe +} + +/** Remove discount from the order. */ +export type OrderDiscountDelete = { + __typename?: 'OrderDiscountDelete' + /** Order which has removed discount. */ + order?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderErrors: Array + errors: Array +} + +/** An enumeration. */ +export enum OrderDiscountType { + /** Voucher */ + Voucher = 'VOUCHER', + /** Manual */ + Manual = 'MANUAL', +} + +/** Update discount for the order. */ +export type OrderDiscountUpdate = { + __typename?: 'OrderDiscountUpdate' + /** Order which has been discounted. */ + order?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderErrors: Array + errors: Array +} + +export type OrderDraftFilterInput = { + customer?: Maybe + created?: Maybe + search?: Maybe + metadata?: Maybe>> + channels?: Maybe>> } export type OrderError = { @@ -8971,192 +5993,178 @@ export enum OrderErrorCode { ChannelInactive = 'CHANNEL_INACTIVE', } -/** Creates a new draft order. */ -export type DraftOrderCreate = { - __typename?: 'DraftOrderCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - orderErrors: Array - order?: Maybe +/** History log of the order. */ +export type OrderEvent = Node & { + __typename?: 'OrderEvent' + /** The ID of the object. */ + id: Scalars['ID'] + /** Date when event happened at in ISO 8601 format. */ + date?: Maybe + /** Order event type. */ + type?: Maybe + /** User who performed the action. */ + user?: Maybe + /** Content of the event. */ + message?: Maybe + /** Email of the customer. */ + email?: Maybe + /** Type of an email sent to the customer. */ + emailType?: Maybe + /** Amount of money. */ + amount?: Maybe + /** The payment ID from the payment gateway. */ + paymentId?: Maybe + /** The payment gateway of the payment. */ + paymentGateway?: Maybe + /** Number of items. */ + quantity?: Maybe + /** Composed ID of the Fulfillment. */ + composedId?: Maybe + /** User-friendly number of an order. */ + orderNumber?: Maybe + /** Number of an invoice related to the order. */ + invoiceNumber?: Maybe + /** List of oversold lines names. */ + oversoldItems?: Maybe>> + /** The concerned lines. */ + lines?: Maybe>> + /** The lines fulfilled. */ + fulfilledItems?: Maybe>> + /** The warehouse were items were restocked. */ + warehouse?: Maybe + /** The transaction reference of captured payment. */ + transactionReference?: Maybe + /** Define if shipping costs were included to the refund. */ + shippingCostsIncluded?: Maybe + /** The order which is related to this order. */ + relatedOrder?: Maybe + /** The discount applied to the order. */ + discount?: Maybe } -export type DraftOrderCreateInput = { - /** Billing address of the customer. */ - billingAddress?: Maybe - user?: Maybe - /** Email address of the customer. */ - userEmail?: Maybe - /** Discount amount for the order. */ - discount?: Maybe - /** Shipping address of the customer. */ - shippingAddress?: Maybe - /** ID of a selected shipping method. */ - shippingMethod?: Maybe - /** ID of the voucher associated with the order. */ - voucher?: Maybe - /** A note from a customer. Visible by customers in the order summary. */ - customerNote?: Maybe - /** ID of the channel associated with the order. */ - channel?: Maybe - /** URL of a view where users should be redirected to see the order details. URL in RFC 1808 format. */ - redirectUrl?: Maybe - /** Variant line input consisting of variant ID and quantity of products. */ - lines?: Maybe>> +export type OrderEventCountableConnection = { + __typename?: 'OrderEventCountableConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe } -export type OrderLineCreateInput = { - /** Number of variant items ordered. */ - quantity: Scalars['Int'] - /** Product variant ID. */ - variantId: Scalars['ID'] +export type OrderEventCountableEdge = { + __typename?: 'OrderEventCountableEdge' + /** The item at the end of the edge. */ + node: OrderEvent + /** A cursor for use in pagination. */ + cursor: Scalars['String'] } -/** Deletes a draft order. */ -export type DraftOrderDelete = { - __typename?: 'DraftOrderDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - orderErrors: Array - order?: Maybe +export type OrderEventDiscountObject = { + __typename?: 'OrderEventDiscountObject' + /** Type of the discount: fixed or percent. */ + valueType: DiscountValueTypeEnum + /** Value of the discount. Can store fixed value or percent value. */ + value: Scalars['PositiveDecimal'] + /** Explanation for the applied discount. */ + reason?: Maybe + /** Returns amount of discount. */ + amount?: Maybe + /** Type of the discount: fixed or percent. */ + oldValueType?: Maybe + /** Value of the discount. Can store fixed value or percent value. */ + oldValue?: Maybe + /** Returns amount of discount. */ + oldAmount?: Maybe } -/** Deletes draft orders. */ -export type DraftOrderBulkDelete = { - __typename?: 'DraftOrderBulkDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - orderErrors: Array +export type OrderEventOrderLineObject = { + __typename?: 'OrderEventOrderLineObject' + /** The variant quantity. */ + quantity?: Maybe + /** The order line. */ + orderLine?: Maybe + /** The variant name. */ + itemName?: Maybe + /** The discount applied to the order line. */ + discount?: Maybe } -/** Deletes order lines. */ -export type DraftOrderLinesBulkDelete = { - __typename?: 'DraftOrderLinesBulkDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - orderErrors: Array +/** An enumeration. */ +export enum OrderEventsEmailsEnum { + PaymentConfirmation = 'PAYMENT_CONFIRMATION', + Confirmed = 'CONFIRMED', + ShippingConfirmation = 'SHIPPING_CONFIRMATION', + TrackingUpdated = 'TRACKING_UPDATED', + OrderConfirmation = 'ORDER_CONFIRMATION', + OrderCancel = 'ORDER_CANCEL', + OrderRefund = 'ORDER_REFUND', + FulfillmentConfirmation = 'FULFILLMENT_CONFIRMATION', + DigitalLinks = 'DIGITAL_LINKS', } -/** Updates a draft order. */ -export type DraftOrderUpdate = { - __typename?: 'DraftOrderUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - orderErrors: Array - order?: Maybe +/** An enumeration. */ +export enum OrderEventsEnum { + DraftCreated = 'DRAFT_CREATED', + DraftCreatedFromReplace = 'DRAFT_CREATED_FROM_REPLACE', + AddedProducts = 'ADDED_PRODUCTS', + RemovedProducts = 'REMOVED_PRODUCTS', + Placed = 'PLACED', + PlacedFromDraft = 'PLACED_FROM_DRAFT', + OversoldItems = 'OVERSOLD_ITEMS', + Canceled = 'CANCELED', + OrderMarkedAsPaid = 'ORDER_MARKED_AS_PAID', + OrderFullyPaid = 'ORDER_FULLY_PAID', + OrderReplacementCreated = 'ORDER_REPLACEMENT_CREATED', + OrderDiscountAdded = 'ORDER_DISCOUNT_ADDED', + OrderDiscountAutomaticallyUpdated = 'ORDER_DISCOUNT_AUTOMATICALLY_UPDATED', + OrderDiscountUpdated = 'ORDER_DISCOUNT_UPDATED', + OrderDiscountDeleted = 'ORDER_DISCOUNT_DELETED', + OrderLineDiscountUpdated = 'ORDER_LINE_DISCOUNT_UPDATED', + OrderLineDiscountRemoved = 'ORDER_LINE_DISCOUNT_REMOVED', + UpdatedAddress = 'UPDATED_ADDRESS', + EmailSent = 'EMAIL_SENT', + Confirmed = 'CONFIRMED', + PaymentAuthorized = 'PAYMENT_AUTHORIZED', + PaymentCaptured = 'PAYMENT_CAPTURED', + ExternalServiceNotification = 'EXTERNAL_SERVICE_NOTIFICATION', + PaymentRefunded = 'PAYMENT_REFUNDED', + PaymentVoided = 'PAYMENT_VOIDED', + PaymentFailed = 'PAYMENT_FAILED', + InvoiceRequested = 'INVOICE_REQUESTED', + InvoiceGenerated = 'INVOICE_GENERATED', + InvoiceUpdated = 'INVOICE_UPDATED', + InvoiceSent = 'INVOICE_SENT', + FulfillmentCanceled = 'FULFILLMENT_CANCELED', + FulfillmentRestockedItems = 'FULFILLMENT_RESTOCKED_ITEMS', + FulfillmentFulfilledItems = 'FULFILLMENT_FULFILLED_ITEMS', + FulfillmentRefunded = 'FULFILLMENT_REFUNDED', + FulfillmentReturned = 'FULFILLMENT_RETURNED', + FulfillmentReplaced = 'FULFILLMENT_REPLACED', + TrackingUpdated = 'TRACKING_UPDATED', + NoteAdded = 'NOTE_ADDED', + Other = 'OTHER', } -export type DraftOrderInput = { - /** Billing address of the customer. */ - billingAddress?: Maybe - user?: Maybe - /** Email address of the customer. */ - userEmail?: Maybe - /** Discount amount for the order. */ - discount?: Maybe - /** Shipping address of the customer. */ - shippingAddress?: Maybe - /** ID of a selected shipping method. */ - shippingMethod?: Maybe - /** ID of the voucher associated with the order. */ - voucher?: Maybe - /** A note from a customer. Visible by customers in the order summary. */ - customerNote?: Maybe - /** ID of the channel associated with the order. */ - channel?: Maybe - /** URL of a view where users should be redirected to see the order details. URL in RFC 1808 format. */ - redirectUrl?: Maybe -} - -/** Adds note to the order. */ -export type OrderAddNote = { - __typename?: 'OrderAddNote' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Order with the note added. */ - order?: Maybe - /** Order note created. */ - event?: Maybe - orderErrors: Array -} - -export type OrderAddNoteInput = { - /** Note message. */ - message: Scalars['String'] -} - -/** Cancel an order. */ -export type OrderCancel = { - __typename?: 'OrderCancel' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Canceled order. */ - order?: Maybe - orderErrors: Array -} - -/** Capture an order. */ -export type OrderCapture = { - __typename?: 'OrderCapture' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Captured order. */ - order?: Maybe - orderErrors: Array -} - -/** Confirms an unconfirmed order by changing status to unfulfilled. */ -export type OrderConfirm = { - __typename?: 'OrderConfirm' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - order?: Maybe - orderErrors: Array +export type OrderFilterInput = { + paymentStatus?: Maybe>> + status?: Maybe>> + customer?: Maybe + created?: Maybe + search?: Maybe + metadata?: Maybe>> + channels?: Maybe>> } /** Creates new fulfillments for an order. */ export type OrderFulfill = { __typename?: 'OrderFulfill' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array /** List of created fulfillments. */ fulfillments?: Maybe>> /** Fulfilled order. */ order?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ orderErrors: Array + errors: Array } export type OrderFulfillInput = { @@ -9180,61 +6188,152 @@ export type OrderFulfillStockInput = { warehouse: Scalars['ID'] } -/** Cancels existing fulfillment and optionally restocks items. */ -export type FulfillmentCancel = { - __typename?: 'FulfillmentCancel' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A canceled fulfillment. */ - fulfillment?: Maybe - /** Order which fulfillment was cancelled. */ +/** Represents order line of particular order. */ +export type OrderLine = Node & { + __typename?: 'OrderLine' + /** The ID of the object. */ + id: Scalars['ID'] + productName: Scalars['String'] + variantName: Scalars['String'] + productSku: Scalars['String'] + isShippingRequired: Scalars['Boolean'] + quantity: Scalars['Int'] + quantityFulfilled: Scalars['Int'] + unitDiscountReason?: Maybe + taxRate: Scalars['Float'] + digitalContentUrl?: Maybe + /** The main thumbnail for the ordered product. */ + thumbnail?: Maybe + /** Price of the single item in the order line. */ + unitPrice: TaxedMoney + /** Price of the single item in the order line without applied an order line discount. */ + undiscountedUnitPrice: TaxedMoney + /** The discount applied to the single order line. */ + unitDiscount: Money + /** Value of the discount. Can store fixed value or percent value */ + unitDiscountValue: Scalars['PositiveDecimal'] + /** Price of the order line. */ + totalPrice: TaxedMoney + /** A purchased product variant. Note: this field may be null if the variant has been removed from stock at all. */ + variant?: Maybe + /** Product name in the customer's language */ + translatedProductName: Scalars['String'] + /** Variant name in the customer's language */ + translatedVariantName: Scalars['String'] + /** List of allocations across warehouses. */ + allocations?: Maybe> + /** Type of the discount: fixed or percent */ + unitDiscountType?: Maybe +} + +/** Represents order line of particular order. */ +export type OrderLineThumbnailArgs = { + size?: Maybe +} + +export type OrderLineCreateInput = { + /** Number of variant items ordered. */ + quantity: Scalars['Int'] + /** Product variant ID. */ + variantId: Scalars['ID'] +} + +/** Deletes an order line from an order. */ +export type OrderLineDelete = { + __typename?: 'OrderLineDelete' + /** A related order. */ order?: Maybe + /** An order line that was deleted. */ + orderLine?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ orderErrors: Array + errors: Array } -export type FulfillmentCancelInput = { - /** ID of warehouse where items will be restock. */ - warehouseId: Scalars['ID'] -} - -/** Updates a fulfillment for an order. */ -export type FulfillmentUpdateTracking = { - __typename?: 'FulfillmentUpdateTracking' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A fulfillment with updated tracking. */ - fulfillment?: Maybe - /** Order for which fulfillment was updated. */ +/** Remove discount applied to the order line. */ +export type OrderLineDiscountRemove = { + __typename?: 'OrderLineDiscountRemove' + /** Order line which has removed discount. */ + orderLine?: Maybe + /** Order which is related to line which has removed discount. */ order?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ orderErrors: Array + errors: Array } -export type FulfillmentUpdateTrackingInput = { - /** Fulfillment tracking number. */ - trackingNumber?: Maybe - /** If true, send an email notification to the customer. */ - notifyCustomer?: Maybe -} - -/** Refund products. */ -export type FulfillmentRefundProducts = { - __typename?: 'FulfillmentRefundProducts' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A refunded fulfillment. */ - fulfillment?: Maybe - /** Order which fulfillment was refunded. */ +/** Update discount for the order line. */ +export type OrderLineDiscountUpdate = { + __typename?: 'OrderLineDiscountUpdate' + /** Order line which has been discounted. */ + orderLine?: Maybe + /** Order which is related to the discounted line. */ order?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ orderErrors: Array + errors: Array +} + +export type OrderLineInput = { + /** Number of variant items ordered. */ + quantity: Scalars['Int'] +} + +/** Updates an order line of an order. */ +export type OrderLineUpdate = { + __typename?: 'OrderLineUpdate' + /** Related order. */ + order?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderErrors: Array + errors: Array + orderLine?: Maybe +} + +/** Create order lines for an order. */ +export type OrderLinesCreate = { + __typename?: 'OrderLinesCreate' + /** Related order. */ + order?: Maybe + /** List of added order lines. */ + orderLines?: Maybe> + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderErrors: Array + errors: Array +} + +/** Mark order as manually paid. */ +export type OrderMarkAsPaid = { + __typename?: 'OrderMarkAsPaid' + /** Order marked as paid. */ + order?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderErrors: Array + errors: Array +} + +/** Refund an order. */ +export type OrderRefund = { + __typename?: 'OrderRefund' + /** A refunded order. */ + order?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderErrors: Array + errors: Array +} + +export type OrderRefundFulfillmentLineInput = { + /** The ID of the fulfillment line to refund. */ + fulfillmentLineId: Scalars['ID'] + /** The number of items to be refunded. */ + quantity: Scalars['Int'] +} + +export type OrderRefundLineInput = { + /** The ID of the order line to refund. */ + orderLineId: Scalars['ID'] + /** The number of items to be refunded. */ + quantity: Scalars['Int'] } export type OrderRefundProductsInput = { @@ -9248,37 +6347,22 @@ export type OrderRefundProductsInput = { includeShippingCosts?: Maybe } -export type OrderRefundLineInput = { - /** The ID of the order line to refund. */ - orderLineId: Scalars['ID'] - /** The number of items to be refunded. */ - quantity: Scalars['Int'] -} - -export type OrderRefundFulfillmentLineInput = { - /** The ID of the fulfillment line to refund. */ +export type OrderReturnFulfillmentLineInput = { + /** The ID of the fulfillment line to return. */ fulfillmentLineId: Scalars['ID'] - /** The number of items to be refunded. */ + /** The number of items to be returned. */ quantity: Scalars['Int'] + /** Determines, if the line should be added to replace order. */ + replace?: Maybe } -/** Return products. */ -export type FulfillmentReturnProducts = { - __typename?: 'FulfillmentReturnProducts' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A return fulfillment. */ - returnFulfillment?: Maybe - /** A replace fulfillment. */ - replaceFulfillment?: Maybe - /** Order which fulfillment was returned. */ - order?: Maybe - /** A draft order which was created for products with replace flag. */ - replaceOrder?: Maybe - orderErrors: Array +export type OrderReturnLineInput = { + /** The ID of the order line to return. */ + orderLineId: Scalars['ID'] + /** The number of items to be returned. */ + quantity: Scalars['Int'] + /** Determines, if the line should be added to replace order. */ + replace?: Maybe } export type OrderReturnProductsInput = { @@ -9294,186 +6378,98 @@ export type OrderReturnProductsInput = { refund?: Maybe } -export type OrderReturnLineInput = { - /** The ID of the order line to return. */ - orderLineId: Scalars['ID'] - /** The number of items to be returned. */ - quantity: Scalars['Int'] - /** Determines, if the line should be added to replace order. */ - replace?: Maybe +/** Order related settings from site settings. */ +export type OrderSettings = { + __typename?: 'OrderSettings' + automaticallyConfirmAllNewOrders: Scalars['Boolean'] } -export type OrderReturnFulfillmentLineInput = { - /** The ID of the fulfillment line to return. */ - fulfillmentLineId: Scalars['ID'] - /** The number of items to be returned. */ - quantity: Scalars['Int'] - /** Determines, if the line should be added to replace order. */ - replace?: Maybe +export type OrderSettingsError = { + __typename?: 'OrderSettingsError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: OrderSettingsErrorCode } -/** Create order lines for an order. */ -export type OrderLinesCreate = { - __typename?: 'OrderLinesCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Related order. */ - order?: Maybe - /** List of added order lines. */ - orderLines?: Maybe> - orderErrors: Array +/** An enumeration. */ +export enum OrderSettingsErrorCode { + Invalid = 'INVALID', } -/** Deletes an order line from an order. */ -export type OrderLineDelete = { - __typename?: 'OrderLineDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A related order. */ - order?: Maybe - /** An order line that was deleted. */ - orderLine?: Maybe - orderErrors: Array +/** Update shop order settings. */ +export type OrderSettingsUpdate = { + __typename?: 'OrderSettingsUpdate' + /** Order settings. */ + orderSettings?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + orderSettingsErrors: Array + errors: Array } -/** Updates an order line of an order. */ -export type OrderLineUpdate = { - __typename?: 'OrderLineUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Related order. */ - order?: Maybe - orderErrors: Array - orderLine?: Maybe +export type OrderSettingsUpdateInput = { + /** When disabled, all new orders from checkout will be marked as unconfirmed. When enabled orders from checkout will become unfulfilled immediately. */ + automaticallyConfirmAllNewOrders: Scalars['Boolean'] } -export type OrderLineInput = { - /** Number of variant items ordered. */ - quantity: Scalars['Int'] +export enum OrderSortField { + /** Sort orders by number. */ + Number = 'NUMBER', + /** Sort orders by creation date. */ + CreationDate = 'CREATION_DATE', + /** Sort orders by customer. */ + Customer = 'CUSTOMER', + /** Sort orders by payment. */ + Payment = 'PAYMENT', + /** Sort orders by fulfillment status. */ + FulfillmentStatus = 'FULFILLMENT_STATUS', } -/** Adds discount to the order. */ -export type OrderDiscountAdd = { - __typename?: 'OrderDiscountAdd' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Order which has been discounted. */ - order?: Maybe - orderErrors: Array +export type OrderSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection + /** Sort orders by the selected field. */ + field: OrderSortField } -export type OrderDiscountCommonInput = { - /** Type of the discount: fixed or percent */ - valueType: DiscountValueTypeEnum - /** Value of the discount. Can store fixed value or percent value */ - value: Scalars['PositiveDecimal'] - /** Explanation for the applied discount. */ - reason?: Maybe +/** An enumeration. */ +export enum OrderStatus { + /** Draft */ + Draft = 'DRAFT', + /** Unconfirmed */ + Unconfirmed = 'UNCONFIRMED', + /** Unfulfilled */ + Unfulfilled = 'UNFULFILLED', + /** Partially fulfilled */ + PartiallyFulfilled = 'PARTIALLY_FULFILLED', + /** Partially returned */ + PartiallyReturned = 'PARTIALLY_RETURNED', + /** Returned */ + Returned = 'RETURNED', + /** Fulfilled */ + Fulfilled = 'FULFILLED', + /** Canceled */ + Canceled = 'CANCELED', } -/** Update discount for the order. */ -export type OrderDiscountUpdate = { - __typename?: 'OrderDiscountUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Order which has been discounted. */ - order?: Maybe - orderErrors: Array -} - -/** Remove discount from the order. */ -export type OrderDiscountDelete = { - __typename?: 'OrderDiscountDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Order which has removed discount. */ - order?: Maybe - orderErrors: Array -} - -/** Update discount for the order line. */ -export type OrderLineDiscountUpdate = { - __typename?: 'OrderLineDiscountUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Order line which has been discounted. */ - orderLine?: Maybe - /** Order which is related to the discounted line. */ - order?: Maybe - orderErrors: Array -} - -/** Remove discount applied to the order line. */ -export type OrderLineDiscountRemove = { - __typename?: 'OrderLineDiscountRemove' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Order line which has removed discount. */ - orderLine?: Maybe - /** Order which is related to line which has removed discount. */ - order?: Maybe - orderErrors: Array -} - -/** Mark order as manually paid. */ -export type OrderMarkAsPaid = { - __typename?: 'OrderMarkAsPaid' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Order marked as paid. */ - order?: Maybe - orderErrors: Array -} - -/** Refund an order. */ -export type OrderRefund = { - __typename?: 'OrderRefund' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A refunded order. */ - order?: Maybe - orderErrors: Array +export enum OrderStatusFilter { + ReadyToFulfill = 'READY_TO_FULFILL', + ReadyToCapture = 'READY_TO_CAPTURE', + Unfulfilled = 'UNFULFILLED', + Unconfirmed = 'UNCONFIRMED', + PartiallyFulfilled = 'PARTIALLY_FULFILLED', + Fulfilled = 'FULFILLED', + Canceled = 'CANCELED', } /** Updates an order. */ export type OrderUpdate = { __typename?: 'OrderUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ orderErrors: Array + errors: Array order?: Maybe } @@ -9489,14 +6485,11 @@ export type OrderUpdateInput = { /** Updates a shipping method of the order. */ export type OrderUpdateShipping = { __typename?: 'OrderUpdateShipping' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array /** Order with updated shipping method. */ order?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ orderErrors: Array + errors: Array } export type OrderUpdateShippingInput = { @@ -9507,529 +6500,758 @@ export type OrderUpdateShippingInput = { /** Void an order. */ export type OrderVoid = { __typename?: 'OrderVoid' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array /** A voided order. */ order?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ orderErrors: Array + errors: Array } -/** Cancels orders. */ -export type OrderBulkCancel = { - __typename?: 'OrderBulkCancel' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array +/** A static page that can be manually added by a shop operator through the dashboard. */ +export type Page = Node & + ObjectWithMetadata & { + __typename?: 'Page' + seoTitle?: Maybe + seoDescription?: Maybe + /** The ID of the object. */ + id: Scalars['ID'] + title: Scalars['String'] + content?: Maybe + publicationDate?: Maybe + isPublished: Scalars['Boolean'] + slug: Scalars['String'] + pageType: PageType + created: Scalars['DateTime'] + /** List of private metadata items.Requires proper staff permissions to access. */ + privateMetadata: Array> + /** List of public metadata items. Can be accessed without permissions. */ + metadata: Array> + /** + * Content of the page (JSON). + * @deprecated Will be removed in Saleor 4.0. Use the `content` field instead. + */ + contentJson: Scalars['JSONString'] + /** Returns translated page fields for the given language code. */ + translation?: Maybe + /** List of attributes assigned to this product. */ + attributes: Array + } + +/** 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. */ +export type PageAttributeAssign = { + __typename?: 'PageAttributeAssign' + /** The updated page type. */ + pageType?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + pageErrors: Array + errors: Array +} + +/** Unassign attributes from a given page type. */ +export type PageAttributeUnassign = { + __typename?: 'PageAttributeUnassign' + /** The updated page type. */ + pageType?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + pageErrors: Array + errors: Array +} + +/** Deletes pages. */ +export type PageBulkDelete = { + __typename?: 'PageBulkDelete' /** Returns how many objects were affected. */ count: Scalars['Int'] - orderErrors: Array + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + pageErrors: Array + errors: Array } -/** Delete metadata of an object. */ -export type DeleteMetadata = { - __typename?: 'DeleteMetadata' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - metadataErrors: Array - item?: Maybe +/** Publish pages. */ +export type PageBulkPublish = { + __typename?: 'PageBulkPublish' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + pageErrors: Array + errors: Array } -export type MetadataError = { - __typename?: 'MetadataError' +export type PageCountableConnection = { + __typename?: 'PageCountableConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe +} + +export type PageCountableEdge = { + __typename?: 'PageCountableEdge' + /** The item at the end of the edge. */ + node: Page + /** A cursor for use in pagination. */ + cursor: Scalars['String'] +} + +/** Creates a new page. */ +export type PageCreate = { + __typename?: 'PageCreate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + pageErrors: Array + errors: Array + page?: Maybe +} + +export type PageCreateInput = { + /** Page internal name. */ + slug?: Maybe + /** Page title. */ + title?: Maybe + /** Page content in JSON format. */ + content?: Maybe + /** List of attributes. */ + attributes?: Maybe> + /** Determines if page is visible in the storefront. */ + isPublished?: Maybe + /** Publication date. ISO 8601 standard. */ + publicationDate?: Maybe + /** Search engine optimization fields. */ + seo?: Maybe + /** ID of the page type that page belongs to. */ + pageType: Scalars['ID'] +} + +/** Deletes a page. */ +export type PageDelete = { + __typename?: 'PageDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + pageErrors: Array + errors: Array + page?: Maybe +} + +export type PageError = { + __typename?: 'PageError' /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ field?: Maybe /** The error message. */ message?: Maybe /** The error code. */ - code: MetadataErrorCode + code: PageErrorCode + /** List of attributes IDs which causes the error. */ + attributes?: Maybe> + /** List of attribute values IDs which causes the error. */ + values?: Maybe> } /** An enumeration. */ -export enum MetadataErrorCode { +export enum PageErrorCode { GraphqlError = 'GRAPHQL_ERROR', Invalid = 'INVALID', NotFound = 'NOT_FOUND', Required = 'REQUIRED', -} - -/** Delete object's private metadata. */ -export type DeletePrivateMetadata = { - __typename?: 'DeletePrivateMetadata' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - metadataErrors: Array - item?: Maybe -} - -/** Updates metadata of an object. */ -export type UpdateMetadata = { - __typename?: 'UpdateMetadata' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - metadataErrors: Array - item?: Maybe -} - -/** Updates private metadata of an object. */ -export type UpdatePrivateMetadata = { - __typename?: 'UpdatePrivateMetadata' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - metadataErrors: Array - item?: Maybe -} - -/** Assigns storefront's navigation menus. */ -export type AssignNavigation = { - __typename?: 'AssignNavigation' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Assigned navigation menu. */ - menu?: Maybe - menuErrors: Array -} - -export type MenuError = { - __typename?: 'MenuError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: MenuErrorCode -} - -/** An enumeration. */ -export enum MenuErrorCode { - CannotAssignNode = 'CANNOT_ASSIGN_NODE', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - InvalidMenuItem = 'INVALID_MENU_ITEM', - NoMenuItemProvided = 'NO_MENU_ITEM_PROVIDED', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - TooManyMenuItems = 'TOO_MANY_MENU_ITEMS', Unique = 'UNIQUE', + DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', + AttributeAlreadyAssigned = 'ATTRIBUTE_ALREADY_ASSIGNED', } -export enum NavigationType { - /** Main storefront navigation. */ - Main = 'MAIN', - /** Secondary storefront navigation. */ - Secondary = 'SECONDARY', +export type PageFilterInput = { + search?: Maybe + metadata?: Maybe>> } -/** Creates a new Menu. */ -export type MenuCreate = { - __typename?: 'MenuCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - menuErrors: Array - menu?: Maybe +/** The Relay compliant `PageInfo` type, containing data necessary to paginate this connection. */ +export type PageInfo = { + __typename?: 'PageInfo' + /** When paginating forwards, are there more items? */ + hasNextPage: Scalars['Boolean'] + /** When paginating backwards, are there more items? */ + hasPreviousPage: Scalars['Boolean'] + /** When paginating backwards, the cursor to continue. */ + startCursor?: Maybe + /** When paginating forwards, the cursor to continue. */ + endCursor?: Maybe } -export type MenuCreateInput = { - /** Name of the menu. */ - name: Scalars['String'] - /** Slug of the menu. Will be generated if not provided. */ +export type PageInput = { + /** Page internal name. */ slug?: Maybe - /** List of menu items. */ - items?: Maybe>> + /** Page title. */ + title?: Maybe + /** Page content in JSON format. */ + content?: Maybe + /** List of attributes. */ + attributes?: Maybe> + /** Determines if page is visible in the storefront. */ + isPublished?: Maybe + /** Publication date. ISO 8601 standard. */ + publicationDate?: Maybe + /** Search engine optimization fields. */ + seo?: Maybe } -export type MenuItemInput = { - /** Name of the menu item. */ - name?: Maybe - /** URL of the pointed item. */ - url?: Maybe - /** Category to which item points. */ - category?: Maybe - /** Collection to which item points. */ - collection?: Maybe - /** Page to which item points. */ - page?: Maybe +/** Reorder page attribute values. */ +export type PageReorderAttributeValues = { + __typename?: 'PageReorderAttributeValues' + /** Page from which attribute values are reordered. */ + page?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + pageErrors: Array + errors: Array } -/** Deletes a menu. */ -export type MenuDelete = { - __typename?: 'MenuDelete' +export enum PageSortField { + /** Sort pages by title. */ + Title = 'TITLE', + /** Sort pages by slug. */ + Slug = 'SLUG', + /** Sort pages by visibility. */ + Visibility = 'VISIBILITY', + /** Sort pages by creation date. */ + CreationDate = 'CREATION_DATE', + /** Sort pages by publication date. */ + PublicationDate = 'PUBLICATION_DATE', +} + +export type PageSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection + /** Sort pages by the selected field. */ + field: PageSortField +} + +export type PageTranslatableContent = Node & { + __typename?: 'PageTranslatableContent' + seoTitle?: Maybe + seoDescription?: Maybe + /** The ID of the object. */ + id: Scalars['ID'] + title: Scalars['String'] + content?: Maybe /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. + * Content of the page (JSON). + * @deprecated Will be removed in Saleor 4.0. Use the `content` field instead. */ - errors: Array - menuErrors: Array - menu?: Maybe + contentJson?: Maybe + /** Returns translated page fields for the given language code. */ + translation?: Maybe + /** ('A static page that can be manually added by a shop operator ', 'through the dashboard.') */ + page?: Maybe } -/** Deletes menus. */ -export type MenuBulkDelete = { - __typename?: 'MenuBulkDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - menuErrors: Array +export type PageTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum } -/** Updates a menu. */ -export type MenuUpdate = { - __typename?: 'MenuUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - menuErrors: Array - menu?: Maybe -} - -export type MenuInput = { - /** Name of the menu. */ - name?: Maybe - /** Slug of the menu. */ - slug?: Maybe -} - -/** Creates a new menu item. */ -export type MenuItemCreate = { - __typename?: 'MenuItemCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - menuErrors: Array - menuItem?: Maybe -} - -export type MenuItemCreateInput = { - /** Name of the menu item. */ - name: Scalars['String'] - /** URL of the pointed item. */ - url?: Maybe - /** Category to which item points. */ - category?: Maybe - /** Collection to which item points. */ - collection?: Maybe - /** Page to which item points. */ - page?: Maybe - /** Menu to which item belongs. */ - menu: Scalars['ID'] - /** ID of the parent menu. If empty, menu will be top level menu. */ - parent?: Maybe -} - -/** Deletes a menu item. */ -export type MenuItemDelete = { - __typename?: 'MenuItemDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - menuErrors: Array - menuItem?: Maybe -} - -/** Deletes menu items. */ -export type MenuItemBulkDelete = { - __typename?: 'MenuItemBulkDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - menuErrors: Array -} - -/** Updates a menu item. */ -export type MenuItemUpdate = { - __typename?: 'MenuItemUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - menuErrors: Array - menuItem?: Maybe -} - -/** Creates/Updates translations for Menu Item. */ -export type MenuItemTranslate = { - __typename?: 'MenuItemTranslate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array +/** Creates/Updates translations for Page. */ +export type PageTranslate = { + __typename?: 'PageTranslate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ translationErrors: Array - menuItem?: Maybe + errors: Array + page?: Maybe } -/** Moves items of menus. */ -export type MenuItemMove = { - __typename?: 'MenuItemMove' +export type PageTranslation = Node & { + __typename?: 'PageTranslation' + seoTitle?: Maybe + seoDescription?: Maybe + /** The ID of the object. */ + id: Scalars['ID'] + title: Scalars['String'] + content?: Maybe + /** Translation language. */ + language: LanguageDisplay /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. + * Translated description of the page (JSON). + * @deprecated Will be removed in Saleor 4.0. Use the `content` field instead. */ - errors: Array - /** Assigned menu to move within. */ - menu?: Maybe - menuErrors: Array + contentJson?: Maybe } -export type MenuItemMoveInput = { - /** The menu item ID to move. */ - itemId: Scalars['ID'] - /** ID of the parent menu. If empty, menu will be top level menu. */ - parentId?: Maybe - /** The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. */ - sortOrder?: Maybe +export type PageTranslationInput = { + seoTitle?: Maybe + seoDescription?: Maybe + title?: Maybe + content?: Maybe } -/** Request an invoice for the order using plugin. */ -export type InvoiceRequest = { - __typename?: 'InvoiceRequest' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Order related to an invoice. */ +/** Represents a type of page. It defines what attributes are available to pages of this type. */ +export type PageType = Node & + ObjectWithMetadata & { + __typename?: 'PageType' + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + slug: Scalars['String'] + /** List of private metadata items.Requires proper staff permissions to access. */ + privateMetadata: Array> + /** List of public metadata items. Can be accessed without permissions. */ + metadata: Array> + /** Page attributes of that page type. */ + attributes?: Maybe>> + /** Attributes that can be assigned to the page type. */ + availableAttributes?: Maybe + /** Whether page type has pages assigned. */ + hasPages?: Maybe + } + +/** Represents a type of page. It defines what attributes are available to pages of this type. */ +export type PageTypeAvailableAttributesArgs = { + filter?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +/** Delete page types. */ +export type PageTypeBulkDelete = { + __typename?: 'PageTypeBulkDelete' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + pageErrors: Array + errors: Array +} + +export type PageTypeCountableConnection = { + __typename?: 'PageTypeCountableConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe +} + +export type PageTypeCountableEdge = { + __typename?: 'PageTypeCountableEdge' + /** The item at the end of the edge. */ + node: PageType + /** A cursor for use in pagination. */ + cursor: Scalars['String'] +} + +/** Create a new page type. */ +export type PageTypeCreate = { + __typename?: 'PageTypeCreate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + pageErrors: Array + errors: Array + pageType?: Maybe +} + +export type PageTypeCreateInput = { + /** Name of the page type. */ + name?: Maybe + /** Page type slug. */ + slug?: Maybe + /** List of attribute IDs to be assigned to the page type. */ + addAttributes?: Maybe> +} + +/** Delete a page type. */ +export type PageTypeDelete = { + __typename?: 'PageTypeDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + pageErrors: Array + errors: Array + pageType?: Maybe +} + +export type PageTypeFilterInput = { + search?: Maybe +} + +/** Reorder the attributes of a page type. */ +export type PageTypeReorderAttributes = { + __typename?: 'PageTypeReorderAttributes' + /** Page type from which attributes are reordered. */ + pageType?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + pageErrors: Array + errors: Array +} + +export enum PageTypeSortField { + /** Sort page types by name. */ + Name = 'NAME', + /** Sort page types by slug. */ + Slug = 'SLUG', +} + +export type PageTypeSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection + /** Sort page types by the selected field. */ + field: PageTypeSortField +} + +/** Update page type. */ +export type PageTypeUpdate = { + __typename?: 'PageTypeUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + pageErrors: Array + errors: Array + pageType?: Maybe +} + +export type PageTypeUpdateInput = { + /** Name of the page type. */ + name?: Maybe + /** Page type slug. */ + slug?: Maybe + /** List of attribute IDs to be assigned to the page type. */ + addAttributes?: Maybe> + /** List of attribute IDs to be assigned to the page type. */ + removeAttributes?: Maybe> +} + +/** Updates an existing page. */ +export type PageUpdate = { + __typename?: 'PageUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + pageErrors: Array + errors: Array + page?: Maybe +} + +/** Change the password of the logged in user. */ +export type PasswordChange = { + __typename?: 'PasswordChange' + /** A user instance with a new password. */ + user?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array +} + +/** Represents a payment of a given type. */ +export type Payment = Node & { + __typename?: 'Payment' + /** The ID of the object. */ + id: Scalars['ID'] + gateway: Scalars['String'] + isActive: Scalars['Boolean'] + created: Scalars['DateTime'] + modified: Scalars['DateTime'] + token: Scalars['String'] + checkout?: Maybe order?: Maybe - invoiceErrors: Array - invoice?: Maybe + paymentMethodType: Scalars['String'] + customerIpAddress?: Maybe + /** Internal payment status. */ + chargeStatus: PaymentChargeStatusEnum + /** List of actions that can be performed in the current state of a payment. */ + actions: Array> + /** Total amount of the payment. */ + total?: Maybe + /** Total amount captured for this payment. */ + capturedAmount?: Maybe + /** List of all transactions within this payment. */ + transactions?: Maybe>> + /** Maximum amount of money that can be captured. */ + availableCaptureAmount?: Maybe + /** Maximum amount of money that can be refunded. */ + availableRefundAmount?: Maybe + /** The details of the card used for this payment. */ + creditCard?: Maybe } -export type InvoiceError = { - __typename?: 'InvoiceError' +/** Captures the authorized payment amount. */ +export type PaymentCapture = { + __typename?: 'PaymentCapture' + /** Updated payment. */ + payment?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + paymentErrors: Array + errors: Array +} + +/** An enumeration. */ +export enum PaymentChargeStatusEnum { + NotCharged = 'NOT_CHARGED', + Pending = 'PENDING', + PartiallyCharged = 'PARTIALLY_CHARGED', + FullyCharged = 'FULLY_CHARGED', + PartiallyRefunded = 'PARTIALLY_REFUNDED', + FullyRefunded = 'FULLY_REFUNDED', + Refused = 'REFUSED', + Cancelled = 'CANCELLED', +} + +export type PaymentCountableConnection = { + __typename?: 'PaymentCountableConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe +} + +export type PaymentCountableEdge = { + __typename?: 'PaymentCountableEdge' + /** The item at the end of the edge. */ + node: Payment + /** A cursor for use in pagination. */ + cursor: Scalars['String'] +} + +export type PaymentError = { + __typename?: 'PaymentError' /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ field?: Maybe /** The error message. */ message?: Maybe /** The error code. */ - code: InvoiceErrorCode + code: PaymentErrorCode } /** An enumeration. */ -export enum InvoiceErrorCode { - Required = 'REQUIRED', - NotReady = 'NOT_READY', - UrlNotSet = 'URL_NOT_SET', - EmailNotSet = 'EMAIL_NOT_SET', - NumberNotSet = 'NUMBER_NOT_SET', - NotFound = 'NOT_FOUND', - InvalidStatus = 'INVALID_STATUS', -} - -/** Requests deletion of an invoice. */ -export type InvoiceRequestDelete = { - __typename?: 'InvoiceRequestDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - invoiceErrors: Array - invoice?: Maybe -} - -/** Creates a ready to send invoice. */ -export type InvoiceCreate = { - __typename?: 'InvoiceCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - invoiceErrors: Array - invoice?: Maybe -} - -export type InvoiceCreateInput = { - /** Invoice number. */ - number: Scalars['String'] - /** URL of an invoice to download. */ - url: Scalars['String'] -} - -/** Deletes an invoice. */ -export type InvoiceDelete = { - __typename?: 'InvoiceDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - invoiceErrors: Array - invoice?: Maybe -} - -/** Updates an invoice. */ -export type InvoiceUpdate = { - __typename?: 'InvoiceUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - invoiceErrors: Array - invoice?: Maybe -} - -export type UpdateInvoiceInput = { - /** Invoice number */ - number?: Maybe - /** URL of an invoice to download. */ - url?: Maybe -} - -/** Send an invoice notification to the customer. */ -export type InvoiceSendNotification = { - __typename?: 'InvoiceSendNotification' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - invoiceErrors: Array - invoice?: Maybe -} - -/** Activate a gift card. */ -export type GiftCardActivate = { - __typename?: 'GiftCardActivate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A gift card to activate. */ - giftCard?: Maybe - giftCardErrors: Array -} - -export type GiftCardError = { - __typename?: 'GiftCardError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: GiftCardErrorCode -} - -/** An enumeration. */ -export enum GiftCardErrorCode { - AlreadyExists = 'ALREADY_EXISTS', +export enum PaymentErrorCode { + BillingAddressNotSet = 'BILLING_ADDRESS_NOT_SET', GraphqlError = 'GRAPHQL_ERROR', Invalid = 'INVALID', NotFound = 'NOT_FOUND', Required = 'REQUIRED', Unique = 'UNIQUE', + PartialPaymentNotAllowed = 'PARTIAL_PAYMENT_NOT_ALLOWED', + ShippingAddressNotSet = 'SHIPPING_ADDRESS_NOT_SET', + InvalidShippingMethod = 'INVALID_SHIPPING_METHOD', + ShippingMethodNotSet = 'SHIPPING_METHOD_NOT_SET', + PaymentError = 'PAYMENT_ERROR', + NotSupportedGateway = 'NOT_SUPPORTED_GATEWAY', } -/** Creates a new gift card. */ -export type GiftCardCreate = { - __typename?: 'GiftCardCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - giftCardErrors: Array - giftCard?: Maybe +export type PaymentFilterInput = { + checkouts?: Maybe>> } -export type GiftCardCreateInput = { - /** Start date of the gift card in ISO 8601 format. */ - startDate?: Maybe - /** End date of the gift card in ISO 8601 format. */ - endDate?: Maybe - /** Value of the gift card. */ - balance?: Maybe - /** The customer's email of the gift card buyer. */ - userEmail?: Maybe - /** Code to use the gift card. */ - code?: Maybe +/** Available payment gateway backend with configuration necessary to setup client. */ +export type PaymentGateway = { + __typename?: 'PaymentGateway' + /** Payment gateway name. */ + name: Scalars['String'] + /** Payment gateway ID. */ + id: Scalars['ID'] + /** Payment gateway client configuration. */ + config: Array + /** Payment gateway supported currencies. */ + currencies: Array> } -/** Deactivate a gift card. */ -export type GiftCardDeactivate = { - __typename?: 'GiftCardDeactivate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A gift card to deactivate. */ - giftCard?: Maybe - giftCardErrors: Array +/** Initializes payment process when it is required by gateway. */ +export type PaymentInitialize = { + __typename?: 'PaymentInitialize' + initializedPayment?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + paymentErrors: Array + errors: Array } -/** Update a gift card. */ -export type GiftCardUpdate = { - __typename?: 'GiftCardUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - giftCardErrors: Array - giftCard?: Maybe +/** 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 = { + __typename?: 'PaymentInitialized' + /** ID of a payment gateway. */ + gateway: Scalars['String'] + /** Payment gateway name. */ + name: Scalars['String'] + /** Initialized data by gateway. */ + data?: Maybe } -export type GiftCardUpdateInput = { - /** Start date of the gift card in ISO 8601 format. */ - startDate?: Maybe - /** End date of the gift card in ISO 8601 format. */ - endDate?: Maybe - /** Value of the gift card. */ - balance?: Maybe - /** The customer's email of the gift card buyer. */ - userEmail?: Maybe +export type PaymentInput = { + /** A gateway to use with that payment. */ + gateway: Scalars['String'] + /** Client-side generated payment token, representing customer's billing data in a secure manner. */ + token?: Maybe + /** Total amount of the transaction, including all taxes and discounts. If no amount is provided, the checkout total will be used. */ + amount?: Maybe + /** URL of a storefront view where user should be redirected after requiring additional actions. Payment with additional actions will not be finished if this field is not provided. */ + returnUrl?: Maybe } -/** Update plugin configuration. */ -export type PluginUpdate = { - __typename?: 'PluginUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - plugin?: Maybe - pluginsErrors: Array +/** Refunds the captured payment amount. */ +export type PaymentRefund = { + __typename?: 'PaymentRefund' + /** Updated payment. */ + payment?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + paymentErrors: Array + errors: Array +} + +/** Represents a payment source stored for user in payment gateway, such as credit card. */ +export type PaymentSource = { + __typename?: 'PaymentSource' + /** Payment gateway name. */ + gateway: Scalars['String'] + /** Stored credit card details if available. */ + creditCardInfo?: Maybe +} + +/** Voids the authorized payment. */ +export type PaymentVoid = { + __typename?: 'PaymentVoid' + /** Updated payment. */ + payment?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + paymentErrors: Array + errors: Array +} + +/** Represents a permission object in a friendly form. */ +export type Permission = { + __typename?: 'Permission' + /** Internal code for permission. */ + code: PermissionEnum + /** Describe action(s) allowed to do by permission. */ + name: Scalars['String'] +} + +/** An enumeration. */ +export enum PermissionEnum { + ManageUsers = 'MANAGE_USERS', + ManageStaff = 'MANAGE_STAFF', + ManageApps = 'MANAGE_APPS', + ManageChannels = 'MANAGE_CHANNELS', + ManageDiscounts = 'MANAGE_DISCOUNTS', + ManagePlugins = 'MANAGE_PLUGINS', + ManageGiftCard = 'MANAGE_GIFT_CARD', + ManageMenus = 'MANAGE_MENUS', + ManageOrders = 'MANAGE_ORDERS', + ManagePages = 'MANAGE_PAGES', + ManagePageTypesAndAttributes = 'MANAGE_PAGE_TYPES_AND_ATTRIBUTES', + ManageProducts = 'MANAGE_PRODUCTS', + ManageProductTypesAndAttributes = 'MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES', + ManageShipping = 'MANAGE_SHIPPING', + ManageSettings = 'MANAGE_SETTINGS', + ManageTranslations = 'MANAGE_TRANSLATIONS', + ManageCheckouts = 'MANAGE_CHECKOUTS', +} + +/** Create new permission group. */ +export type PermissionGroupCreate = { + __typename?: 'PermissionGroupCreate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + permissionGroupErrors: Array + errors: Array + group?: Maybe +} + +export type PermissionGroupCreateInput = { + /** List of permission code names to assign to this group. */ + addPermissions?: Maybe> + /** List of users to assign to this group. */ + addUsers?: Maybe> + /** Group name. */ + name: Scalars['String'] +} + +/** Delete permission group. */ +export type PermissionGroupDelete = { + __typename?: 'PermissionGroupDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + permissionGroupErrors: Array + errors: Array + group?: Maybe +} + +export type PermissionGroupError = { + __typename?: 'PermissionGroupError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: PermissionGroupErrorCode + /** List of permissions which causes the error. */ + permissions?: Maybe> + /** List of user IDs which causes the error. */ + users?: Maybe> +} + +/** An enumeration. */ +export enum PermissionGroupErrorCode { + AssignNonStaffMember = 'ASSIGN_NON_STAFF_MEMBER', + DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', + CannotRemoveFromLastGroup = 'CANNOT_REMOVE_FROM_LAST_GROUP', + LeftNotManageablePermission = 'LEFT_NOT_MANAGEABLE_PERMISSION', + OutOfScopePermission = 'OUT_OF_SCOPE_PERMISSION', + OutOfScopeUser = 'OUT_OF_SCOPE_USER', + Required = 'REQUIRED', + Unique = 'UNIQUE', +} + +export type PermissionGroupFilterInput = { + search?: Maybe +} + +export enum PermissionGroupSortField { + /** Sort permission group accounts by name. */ + Name = 'NAME', +} + +export type PermissionGroupSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection + /** Sort permission group by the selected field. */ + field: PermissionGroupSortField +} + +/** Update permission group. */ +export type PermissionGroupUpdate = { + __typename?: 'PermissionGroupUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + permissionGroupErrors: Array + errors: Array + group?: Maybe +} + +export type PermissionGroupUpdateInput = { + /** List of permission code names to assign to this group. */ + addPermissions?: Maybe> + /** List of users to assign to this group. */ + addUsers?: Maybe> + /** Group name. */ + name?: Maybe + /** List of permission code names to unassign from this group. */ + removePermissions?: Maybe> + /** List of users to unassign from this group. */ + removeUsers?: Maybe> +} + +/** Plugin. */ +export type Plugin = Node & { + __typename?: 'Plugin' + id: Scalars['ID'] + name: Scalars['String'] + description: Scalars['String'] + active: Scalars['Boolean'] + configuration?: Maybe>> +} + +export type PluginCountableConnection = { + __typename?: 'PluginCountableConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe +} + +export type PluginCountableEdge = { + __typename?: 'PluginCountableEdge' + /** The item at the end of the edge. */ + node: Plugin + /** A cursor for use in pagination. */ + cursor: Scalars['String'] } export type PluginError = { @@ -10052,6 +7274,32 @@ export enum PluginErrorCode { Unique = 'UNIQUE', } +export type PluginFilterInput = { + active?: Maybe + search?: Maybe +} + +export enum PluginSortField { + Name = 'NAME', + IsActive = 'IS_ACTIVE', +} + +export type PluginSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection + /** Sort plugins by the selected field. */ + field: PluginSortField +} + +/** Update plugin configuration. */ +export type PluginUpdate = { + __typename?: 'PluginUpdate' + plugin?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + pluginsErrors: Array + errors: Array +} + export type PluginUpdateInput = { /** Indicates whether the plugin should be enabled. */ active?: Maybe @@ -10059,49 +7307,1911 @@ export type PluginUpdateInput = { configuration?: Maybe>> } -export type ConfigurationItemInput = { - /** Name of the field to update. */ +/** An enumeration. */ +export enum PostalCodeRuleInclusionTypeEnum { + Include = 'INCLUDE', + Exclude = 'EXCLUDE', +} + +export type PriceRangeInput = { + /** Price greater than or equal to. */ + gte?: Maybe + /** Price less than or equal to. */ + lte?: Maybe +} + +/** Represents an individual item for sale in the storefront. */ +export type Product = Node & + ObjectWithMetadata & { + __typename?: 'Product' + /** The ID of the object. */ + id: Scalars['ID'] + seoTitle?: Maybe + seoDescription?: Maybe + name: Scalars['String'] + description?: Maybe + productType: ProductType + slug: Scalars['String'] + category?: Maybe + updatedAt?: Maybe + chargeTaxes: Scalars['Boolean'] + weight?: Maybe + defaultVariant?: Maybe + rating?: Maybe + /** List of private metadata items.Requires proper staff permissions to access. */ + privateMetadata: Array> + /** List of public metadata items. Can be accessed without permissions. */ + metadata: Array> + /** + * Description of the product (JSON). + * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. + */ + descriptionJson?: Maybe + /** The main thumbnail for a product. */ + thumbnail?: Maybe + /** Lists the storefront product's pricing, the current price and discounts, only meant for displaying. */ + pricing?: Maybe + /** Whether the product is in stock and visible or not. */ + isAvailable?: Maybe + /** A type of tax. Assigned by enabled tax gateway */ + taxType?: Maybe + /** List of attributes assigned to this product. */ + attributes: Array + /** List of availability in channels for the product. */ + channelListings?: Maybe> + /** Get a single product media by ID. */ + mediaById: ProductMedia + /** + * Get a single product image by ID. + * @deprecated Will be removed in Saleor 4.0. Use the `mediaById` field instead. + */ + imageById?: Maybe + /** List of variants for the product. */ + variants?: Maybe>> + /** List of media for the product. */ + media?: Maybe> + /** + * List of images for the product. + * @deprecated Will be removed in Saleor 4.0. Use the `media` field instead. + */ + images?: Maybe>> + /** List of collections for the product. */ + collections?: Maybe>> + /** Returns translated product fields for the given language code. */ + translation?: Maybe + /** Date when product is available for purchase. */ + availableForPurchase?: Maybe + /** Whether the product is available for purchase. */ + isAvailableForPurchase?: Maybe + } + +/** Represents an individual item for sale in the storefront. */ +export type ProductThumbnailArgs = { + size?: Maybe +} + +/** Represents an individual item for sale in the storefront. */ +export type ProductPricingArgs = { + address?: Maybe +} + +/** Represents an individual item for sale in the storefront. */ +export type ProductIsAvailableArgs = { + address?: Maybe +} + +/** Represents an individual item for sale in the storefront. */ +export type ProductMediaByIdArgs = { + id?: Maybe +} + +/** Represents an individual item for sale in the storefront. */ +export type ProductImageByIdArgs = { + id?: Maybe +} + +/** Represents an individual item for sale in the storefront. */ +export type ProductTranslationArgs = { + languageCode: LanguageCodeEnum +} + +/** Assign attributes to a given product type. */ +export type ProductAttributeAssign = { + __typename?: 'ProductAttributeAssign' + /** The updated product type. */ + productType?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array +} + +export type ProductAttributeAssignInput = { + /** The ID of the attribute to assign. */ + id: Scalars['ID'] + /** The attribute type to be assigned as. */ + type: ProductAttributeType +} + +export enum ProductAttributeType { + Product = 'PRODUCT', + Variant = 'VARIANT', +} + +/** Un-assign attributes from a given product type. */ +export type ProductAttributeUnassign = { + __typename?: 'ProductAttributeUnassign' + /** The updated product type. */ + productType?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array +} + +/** Deletes products. */ +export type ProductBulkDelete = { + __typename?: 'ProductBulkDelete' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array +} + +/** Represents product channel listing. */ +export type ProductChannelListing = Node & { + __typename?: 'ProductChannelListing' + /** The ID of the object. */ + id: Scalars['ID'] + publicationDate?: Maybe + isPublished: Scalars['Boolean'] + channel: Channel + visibleInListings: Scalars['Boolean'] + availableForPurchase?: Maybe + /** The price of the cheapest variant (including discounts). */ + discountedPrice?: Maybe + /** Purchase cost of product. */ + purchaseCost?: Maybe + /** Range of margin percentage value. */ + margin?: Maybe + /** Whether the product is available for purchase. */ + isAvailableForPurchase?: Maybe + /** Lists the storefront product's pricing, the current price and discounts, only meant for displaying. */ + pricing?: Maybe +} + +/** Represents product channel listing. */ +export type ProductChannelListingPricingArgs = { + address?: Maybe +} + +export type ProductChannelListingAddInput = { + /** ID of a channel. */ + channelId: Scalars['ID'] + /** Determines if object is visible to customers. */ + isPublished?: Maybe + /** Publication date. ISO 8601 standard. */ + publicationDate?: Maybe + /** Determines if product is visible in product listings (doesn't apply to product collections). */ + visibleInListings?: Maybe + /** Determine if product should be available for purchase. */ + isAvailableForPurchase?: Maybe + /** 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. */ + availableForPurchaseDate?: Maybe + /** List of variants to which the channel should be assigned. */ + addVariants?: Maybe> + /** List of variants from which the channel should be unassigned. */ + removeVariants?: Maybe> +} + +export type ProductChannelListingError = { + __typename?: 'ProductChannelListingError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: ProductErrorCode + /** List of attributes IDs which causes the error. */ + attributes?: Maybe> + /** List of attribute values IDs which causes the error. */ + values?: Maybe> + /** List of channels IDs which causes the error. */ + channels?: Maybe> + /** List of variants IDs which causes the error. */ + variants?: Maybe> +} + +/** Manage product's availability in channels. */ +export type ProductChannelListingUpdate = { + __typename?: 'ProductChannelListingUpdate' + /** An updated product instance. */ + product?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productChannelListingErrors: Array + errors: Array +} + +export type ProductChannelListingUpdateInput = { + /** List of channels to which the product should be assigned or updated. */ + updateChannels?: Maybe> + /** List of channels from which the product should be unassigned. */ + removeChannels?: Maybe> +} + +export type ProductCountableConnection = { + __typename?: 'ProductCountableConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe +} + +export type ProductCountableEdge = { + __typename?: 'ProductCountableEdge' + /** The item at the end of the edge. */ + node: Product + /** A cursor for use in pagination. */ + cursor: Scalars['String'] +} + +/** Creates a new product. */ +export type ProductCreate = { + __typename?: 'ProductCreate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array + product?: Maybe +} + +export type ProductCreateInput = { + /** List of attributes. */ + attributes?: Maybe> + /** ID of the product's category. */ + category?: Maybe + /** Determine if taxes are being charged for the product. */ + chargeTaxes?: Maybe + /** List of IDs of collections that the product belongs to. */ + collections?: Maybe> + /** Product description (JSON). */ + description?: Maybe + /** Product name. */ + name?: Maybe + /** Product slug. */ + slug?: Maybe + /** Tax rate for enabled tax gateway. */ + taxCode?: Maybe + /** Search engine optimization fields. */ + seo?: Maybe + /** Weight of the Product. */ + weight?: Maybe + /** Defines the product rating value. */ + rating?: Maybe + /** ID of the type that product belongs to. */ + productType: Scalars['ID'] +} + +/** Deletes a product. */ +export type ProductDelete = { + __typename?: 'ProductDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array + product?: Maybe +} + +export type ProductError = { + __typename?: 'ProductError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: ProductErrorCode + /** List of attributes IDs which causes the error. */ + attributes?: Maybe> + /** List of attribute values IDs which causes the error. */ + values?: Maybe> +} + +/** An enumeration. */ +export enum ProductErrorCode { + AlreadyExists = 'ALREADY_EXISTS', + AttributeAlreadyAssigned = 'ATTRIBUTE_ALREADY_ASSIGNED', + AttributeCannotBeAssigned = 'ATTRIBUTE_CANNOT_BE_ASSIGNED', + AttributeVariantsDisabled = 'ATTRIBUTE_VARIANTS_DISABLED', + DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', + GraphqlError = 'GRAPHQL_ERROR', + Invalid = 'INVALID', + ProductWithoutCategory = 'PRODUCT_WITHOUT_CATEGORY', + NotProductsImage = 'NOT_PRODUCTS_IMAGE', + NotProductsVariant = 'NOT_PRODUCTS_VARIANT', + NotFound = 'NOT_FOUND', + Required = 'REQUIRED', + Unique = 'UNIQUE', + VariantNoDigitalContent = 'VARIANT_NO_DIGITAL_CONTENT', + CannotManageProductWithoutVariant = 'CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT', + ProductNotAssignedToChannel = 'PRODUCT_NOT_ASSIGNED_TO_CHANNEL', + UnsupportedMediaProvider = 'UNSUPPORTED_MEDIA_PROVIDER', +} + +export enum ProductFieldEnum { + Name = 'NAME', + Description = 'DESCRIPTION', + ProductType = 'PRODUCT_TYPE', + Category = 'CATEGORY', + ProductWeight = 'PRODUCT_WEIGHT', + Collections = 'COLLECTIONS', + ChargeTaxes = 'CHARGE_TAXES', + ProductMedia = 'PRODUCT_MEDIA', + VariantSku = 'VARIANT_SKU', + VariantWeight = 'VARIANT_WEIGHT', + VariantMedia = 'VARIANT_MEDIA', +} + +export type ProductFilterInput = { + isPublished?: Maybe + collections?: Maybe>> + categories?: Maybe>> + hasCategory?: Maybe + attributes?: Maybe>> + stockAvailability?: Maybe + stocks?: Maybe + search?: Maybe + metadata?: Maybe>> + price?: Maybe + minimalPrice?: Maybe + productTypes?: Maybe>> + ids?: Maybe>> + /** Specifies the channel by which the data should be sorted. */ + channel?: Maybe +} + +/** Represents a product image. */ +export type ProductImage = { + __typename?: 'ProductImage' + /** The ID of the image. */ + id: Scalars['ID'] + /** The alt text of the image. */ + alt?: Maybe + /** The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. */ + sortOrder?: Maybe + /** The URL of the image. */ + url: Scalars['String'] +} + +/** Represents a product image. */ +export type ProductImageUrlArgs = { + size?: Maybe +} + +export type ProductInput = { + /** List of attributes. */ + attributes?: Maybe> + /** ID of the product's category. */ + category?: Maybe + /** Determine if taxes are being charged for the product. */ + chargeTaxes?: Maybe + /** List of IDs of collections that the product belongs to. */ + collections?: Maybe> + /** Product description (JSON). */ + description?: Maybe + /** Product name. */ + name?: Maybe + /** Product slug. */ + slug?: Maybe + /** Tax rate for enabled tax gateway. */ + taxCode?: Maybe + /** Search engine optimization fields. */ + seo?: Maybe + /** Weight of the Product. */ + weight?: Maybe + /** Defines the product rating value. */ + rating?: Maybe +} + +/** Represents a product media. */ +export type ProductMedia = Node & { + __typename?: 'ProductMedia' + /** The ID of the object. */ + id: Scalars['ID'] + sortOrder?: Maybe + alt: Scalars['String'] + type: ProductMediaType + oembedData: Scalars['JSONString'] + /** The URL of the media. */ + url: Scalars['String'] +} + +/** Represents a product media. */ +export type ProductMediaUrlArgs = { + size?: Maybe +} + +/** Deletes product media. */ +export type ProductMediaBulkDelete = { + __typename?: 'ProductMediaBulkDelete' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array +} + +/** 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 */ +export type ProductMediaCreate = { + __typename?: 'ProductMediaCreate' + product?: Maybe + media?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array +} + +export type ProductMediaCreateInput = { + /** Alt text for a product media. */ + alt?: Maybe + /** Represents an image file in a multipart request. */ + image?: Maybe + /** ID of an product. */ + product: Scalars['ID'] + /** Represents an URL to an external media. */ + mediaUrl?: Maybe +} + +/** Deletes a product media. */ +export type ProductMediaDelete = { + __typename?: 'ProductMediaDelete' + product?: Maybe + media?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array +} + +/** Changes ordering of the product media. */ +export type ProductMediaReorder = { + __typename?: 'ProductMediaReorder' + product?: Maybe + media?: Maybe> + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array +} + +/** An enumeration. */ +export enum ProductMediaType { + /** An uploaded image or an URL to an image */ + Image = 'IMAGE', + /** A URL to an external video */ + Video = 'VIDEO', +} + +/** Updates a product media. */ +export type ProductMediaUpdate = { + __typename?: 'ProductMediaUpdate' + product?: Maybe + media?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array +} + +export type ProductMediaUpdateInput = { + /** Alt text for a product media. */ + alt?: Maybe +} + +export type ProductOrder = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection + /** Specifies the channel in which to sort the data. */ + channel?: Maybe + /** + * Sort product by the selected attribute's values. + * Note: this doesn't take translations into account yet. + */ + attributeId?: Maybe + /** Sort products by the selected field. */ + field?: Maybe +} + +export enum ProductOrderField { + /** Sort products by name. */ + Name = 'NAME', + /** Sort products by rank. Note: This option is available only with the `search` filter. */ + Rank = 'RANK', + /** Sort products by price. */ + Price = 'PRICE', + /** Sort products by a minimal price of a product's variant. */ + MinimalPrice = 'MINIMAL_PRICE', + /** Sort products by update date. */ + Date = 'DATE', + /** Sort products by type. */ + Type = 'TYPE', + /** Sort products by publication status. */ + Published = 'PUBLISHED', + /** Sort products by publication date. */ + PublicationDate = 'PUBLICATION_DATE', + /** Sort products by collection. Note: This option is available only for the `Collection.products` query. */ + Collection = 'COLLECTION', + /** Sort products by rating. */ + Rating = 'RATING', +} + +/** Represents availability of a product in the storefront. */ +export type ProductPricingInfo = { + __typename?: 'ProductPricingInfo' + /** Whether it is in sale or not. */ + onSale?: Maybe + /** The discount amount if in sale (null otherwise). */ + discount?: Maybe + /** The discount amount in the local currency. */ + discountLocalCurrency?: Maybe + /** The discounted price range of the product variants. */ + priceRange?: Maybe + /** The undiscounted price range of the product variants. */ + priceRangeUndiscounted?: Maybe + /** The discounted price range of the product variants in the local currency. */ + priceRangeLocalCurrency?: Maybe +} + +/** Reorder product attribute values. */ +export type ProductReorderAttributeValues = { + __typename?: 'ProductReorderAttributeValues' + /** Product from which attribute values are reordered. */ + product?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array +} + +export type ProductStockFilterInput = { + warehouseIds?: Maybe> + quantity?: Maybe +} + +export type ProductTranslatableContent = Node & { + __typename?: 'ProductTranslatableContent' + /** The ID of the object. */ + id: Scalars['ID'] + seoTitle?: Maybe + seoDescription?: Maybe name: Scalars['String'] - /** Value of the given field to update. */ - value?: Maybe + description?: Maybe + /** + * Description of the product (JSON). + * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. + */ + descriptionJson?: Maybe + /** Returns translated product fields for the given language code. */ + translation?: Maybe + /** Represents an individual item for sale in the storefront. */ + product?: Maybe +} + +export type ProductTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum +} + +/** Creates/Updates translations for Product. */ +export type ProductTranslate = { + __typename?: 'ProductTranslate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + translationErrors: Array + errors: Array + product?: Maybe +} + +export type ProductTranslation = Node & { + __typename?: 'ProductTranslation' + /** The ID of the object. */ + id: Scalars['ID'] + seoTitle?: Maybe + seoDescription?: Maybe + name: Scalars['String'] + description?: Maybe + /** Translation language. */ + language: LanguageDisplay + /** + * Translated description of the product (JSON). + * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. + */ + descriptionJson?: Maybe +} + +/** Represents a type of product. It defines what attributes are available to products of this type. */ +export type ProductType = Node & + ObjectWithMetadata & { + __typename?: 'ProductType' + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + slug: Scalars['String'] + hasVariants: Scalars['Boolean'] + isShippingRequired: Scalars['Boolean'] + isDigital: Scalars['Boolean'] + weight?: Maybe + /** List of private metadata items.Requires proper staff permissions to access. */ + privateMetadata: Array> + /** List of public metadata items. Can be accessed without permissions. */ + metadata: Array> + /** + * List of products of this type. + * @deprecated Will be removed in Saleor 4.0. Use the top-level `products` query with the `productTypes` filter. + */ + products?: Maybe + /** A type of tax. Assigned by enabled tax gateway */ + taxType?: Maybe + /** Variant attributes of that product type. */ + variantAttributes?: Maybe>> + /** Product attributes of that product type. */ + productAttributes?: Maybe>> + availableAttributes?: Maybe + } + +/** Represents a type of product. It defines what attributes are available to products of this type. */ +export type ProductTypeProductsArgs = { + channel?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +/** Represents a type of product. It defines what attributes are available to products of this type. */ +export type ProductTypeVariantAttributesArgs = { + variantSelection?: Maybe +} + +/** Represents a type of product. It defines what attributes are available to products of this type. */ +export type ProductTypeAvailableAttributesArgs = { + filter?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +/** Deletes product types. */ +export type ProductTypeBulkDelete = { + __typename?: 'ProductTypeBulkDelete' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array +} + +export enum ProductTypeConfigurable { + Configurable = 'CONFIGURABLE', + Simple = 'SIMPLE', +} + +export type ProductTypeCountableConnection = { + __typename?: 'ProductTypeCountableConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe +} + +export type ProductTypeCountableEdge = { + __typename?: 'ProductTypeCountableEdge' + /** The item at the end of the edge. */ + node: ProductType + /** A cursor for use in pagination. */ + cursor: Scalars['String'] +} + +/** Creates a new product type. */ +export type ProductTypeCreate = { + __typename?: 'ProductTypeCreate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array + productType?: Maybe +} + +/** Deletes a product type. */ +export type ProductTypeDelete = { + __typename?: 'ProductTypeDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array + productType?: Maybe +} + +export enum ProductTypeEnum { + Digital = 'DIGITAL', + Shippable = 'SHIPPABLE', +} + +export type ProductTypeFilterInput = { + search?: Maybe + configurable?: Maybe + productType?: Maybe + metadata?: Maybe>> + ids?: Maybe>> +} + +export type ProductTypeInput = { + /** Name of the product type. */ + name?: Maybe + /** Product type slug. */ + slug?: Maybe + /** Determines if product of this type has multiple variants. This option mainly simplifies product management in the dashboard. There is always at least one variant created under the hood. */ + hasVariants?: Maybe + /** List of attributes shared among all product variants. */ + productAttributes?: Maybe>> + /** List of attributes used to distinguish between different variants of a product. */ + variantAttributes?: Maybe>> + /** Determines if shipping is required for products of this variant. */ + isShippingRequired?: Maybe + /** Determines if products are digital. */ + isDigital?: Maybe + /** Weight of the ProductType items. */ + weight?: Maybe + /** Tax rate for enabled tax gateway. */ + taxCode?: Maybe +} + +/** Reorder the attributes of a product type. */ +export type ProductTypeReorderAttributes = { + __typename?: 'ProductTypeReorderAttributes' + /** Product type from which attributes are reordered. */ + productType?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array +} + +export enum ProductTypeSortField { + /** Sort products by name. */ + Name = 'NAME', + /** Sort products by type. */ + Digital = 'DIGITAL', + /** Sort products by shipping. */ + ShippingRequired = 'SHIPPING_REQUIRED', +} + +export type ProductTypeSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection + /** Sort product types by the selected field. */ + field: ProductTypeSortField +} + +/** Updates an existing product type. */ +export type ProductTypeUpdate = { + __typename?: 'ProductTypeUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array + productType?: Maybe +} + +/** Updates an existing product. */ +export type ProductUpdate = { + __typename?: 'ProductUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array + product?: Maybe +} + +/** Represents a version of a product such as different size or color. */ +export type ProductVariant = Node & + ObjectWithMetadata & { + __typename?: 'ProductVariant' + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + sku: Scalars['String'] + product: Product + trackInventory: Scalars['Boolean'] + weight?: Maybe + /** List of private metadata items.Requires proper staff permissions to access. */ + privateMetadata: Array> + /** List of public metadata items. Can be accessed without permissions. */ + metadata: Array> + /** List of price information in channels for the product. */ + channelListings?: Maybe> + /** Lists the storefront variant's pricing, the current price and discounts, only meant for displaying. */ + pricing?: Maybe + /** List of attributes assigned to this variant. */ + attributes: Array + /** Cost price of the variant. */ + costPrice?: Maybe + /** Gross margin percentage value. */ + margin?: Maybe + /** Total quantity ordered. */ + 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. */ + revenue?: Maybe + /** + * List of images for the product variant. + * @deprecated Will be removed in Saleor 4.0. Use the `media` instead. + */ + images?: Maybe>> + /** List of media for the product variant. */ + media?: Maybe> + /** Returns translated product variant fields for the given language code. */ + translation?: Maybe + /** Digital content for the product variant. */ + digitalContent?: Maybe + /** Stocks for the product variant. */ + stocks?: Maybe>> + /** Quantity of a product available for sale in one checkout. */ + quantityAvailable: Scalars['Int'] + } + +/** Represents a version of a product such as different size or color. */ +export type ProductVariantPricingArgs = { + address?: Maybe +} + +/** Represents a version of a product such as different size or color. */ +export type ProductVariantAttributesArgs = { + variantSelection?: Maybe +} + +/** Represents a version of a product such as different size or color. */ +export type ProductVariantRevenueArgs = { + period?: Maybe +} + +/** Represents a version of a product such as different size or color. */ +export type ProductVariantTranslationArgs = { + languageCode: LanguageCodeEnum +} + +/** Represents a version of a product such as different size or color. */ +export type ProductVariantStocksArgs = { + address?: Maybe + countryCode?: Maybe +} + +/** Represents a version of a product such as different size or color. */ +export type ProductVariantQuantityAvailableArgs = { + address?: Maybe + countryCode?: Maybe +} + +/** Creates product variants for a given product. */ +export type ProductVariantBulkCreate = { + __typename?: 'ProductVariantBulkCreate' + /** Returns how many objects were created. */ + count: Scalars['Int'] + /** List of the created variants. */ + productVariants: Array + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + bulkProductErrors: Array + errors: Array +} + +export type ProductVariantBulkCreateInput = { + /** List of attributes specific to this variant. */ + attributes: Array> + /** Stock keeping unit. */ + sku: Scalars['String'] + /** Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. */ + trackInventory?: Maybe + /** Weight of the Product Variant. */ + weight?: Maybe + /** Stocks of a product available for sale. */ + stocks?: Maybe> + /** List of prices assigned to channels. */ + channelListings?: Maybe> +} + +/** Deletes product variants. */ +export type ProductVariantBulkDelete = { + __typename?: 'ProductVariantBulkDelete' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array +} + +/** Represents product varaint channel listing. */ +export type ProductVariantChannelListing = Node & { + __typename?: 'ProductVariantChannelListing' + /** The ID of the object. */ + id: Scalars['ID'] + channel: Channel + price?: Maybe + /** Cost price of the variant. */ + costPrice?: Maybe + /** Gross margin percentage value. */ + margin?: Maybe +} + +export type ProductVariantChannelListingAddInput = { + /** ID of a channel. */ + channelId: Scalars['ID'] + /** Price of the particular variant in channel. */ + price: Scalars['PositiveDecimal'] + /** Cost price of the variant in channel. */ + costPrice?: Maybe +} + +/** Manage product variant prices in channels. */ +export type ProductVariantChannelListingUpdate = { + __typename?: 'ProductVariantChannelListingUpdate' + /** An updated product variant instance. */ + variant?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productChannelListingErrors: Array + errors: Array +} + +export type ProductVariantCountableConnection = { + __typename?: 'ProductVariantCountableConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe +} + +export type ProductVariantCountableEdge = { + __typename?: 'ProductVariantCountableEdge' + /** The item at the end of the edge. */ + node: ProductVariant + /** A cursor for use in pagination. */ + cursor: Scalars['String'] +} + +/** Creates a new variant for a product. */ +export type ProductVariantCreate = { + __typename?: 'ProductVariantCreate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array + productVariant?: Maybe +} + +export type ProductVariantCreateInput = { + /** List of attributes specific to this variant. */ + attributes: Array> + /** Stock keeping unit. */ + sku?: Maybe + /** Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. */ + trackInventory?: Maybe + /** Weight of the Product Variant. */ + weight?: Maybe + /** Product ID of which type is the variant. */ + product: Scalars['ID'] + /** Stocks of a product available for sale. */ + stocks?: Maybe> +} + +/** Deletes a product variant. */ +export type ProductVariantDelete = { + __typename?: 'ProductVariantDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array + productVariant?: Maybe +} + +export type ProductVariantFilterInput = { + search?: Maybe + sku?: Maybe>> + metadata?: Maybe>> +} + +export type ProductVariantInput = { + /** List of attributes specific to this variant. */ + attributes?: Maybe>> + /** Stock keeping unit. */ + sku?: Maybe + /** Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. */ + trackInventory?: Maybe + /** Weight of the Product Variant. */ + weight?: Maybe +} + +/** Reorder the variants of a product. Mutation updates updated_at on product and triggers PRODUCT_UPDATED webhook. */ +export type ProductVariantReorder = { + __typename?: 'ProductVariantReorder' + product?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array +} + +/** Reorder product variant attribute values. */ +export type ProductVariantReorderAttributeValues = { + __typename?: 'ProductVariantReorderAttributeValues' + /** Product variant from which attribute values are reordered. */ + productVariant?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array +} + +/** Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook. */ +export type ProductVariantSetDefault = { + __typename?: 'ProductVariantSetDefault' + product?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array +} + +/** Creates stocks for product variant. */ +export type ProductVariantStocksCreate = { + __typename?: 'ProductVariantStocksCreate' + /** Updated product variant. */ + productVariant?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + bulkStockErrors: Array + errors: Array +} + +/** Delete stocks from product variant. */ +export type ProductVariantStocksDelete = { + __typename?: 'ProductVariantStocksDelete' + /** Updated product variant. */ + productVariant?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + stockErrors: Array + errors: Array +} + +/** Update stocks for product variant. */ +export type ProductVariantStocksUpdate = { + __typename?: 'ProductVariantStocksUpdate' + /** Updated product variant. */ + productVariant?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + bulkStockErrors: Array + errors: Array +} + +export type ProductVariantTranslatableContent = Node & { + __typename?: 'ProductVariantTranslatableContent' + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + /** Returns translated product variant fields for the given language code. */ + translation?: Maybe + /** Represents a version of a product such as different size or color. */ + productVariant?: Maybe +} + +export type ProductVariantTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum +} + +/** Creates/Updates translations for Product Variant. */ +export type ProductVariantTranslate = { + __typename?: 'ProductVariantTranslate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + translationErrors: Array + errors: Array + productVariant?: Maybe +} + +export type ProductVariantTranslation = Node & { + __typename?: 'ProductVariantTranslation' + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + /** Translation language. */ + language: LanguageDisplay +} + +/** Updates an existing variant for product. */ +export type ProductVariantUpdate = { + __typename?: 'ProductVariantUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array + productVariant?: Maybe +} + +export type PublishableChannelListingInput = { + /** ID of a channel. */ + channelId: Scalars['ID'] + /** Determines if object is visible to customers. */ + isPublished?: Maybe + /** Publication date. ISO 8601 standard. */ + publicationDate?: Maybe +} + +export type Query = { + __typename?: 'Query' + /** Look up a webhook by ID. */ + webhook?: Maybe + /** List of all available webhook events. */ + 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. */ + webhookSamplePayload?: Maybe + /** Look up a warehouse by ID. */ + warehouse?: Maybe + /** List of warehouses. */ + warehouses?: Maybe + /** Returns a list of all translatable items of a given kind. */ + translations?: Maybe + translation?: Maybe + /** Look up a stock by ID */ + stock?: Maybe + /** List of stocks. */ + stocks?: Maybe + /** Return information about the shop. */ + shop: Shop + /** Order related settings from site settings. */ + orderSettings?: Maybe + /** Look up a shipping zone by ID. */ + shippingZone?: Maybe + /** List of the shop's shipping zones. */ + shippingZones?: Maybe + /** Look up digital content by ID. */ + digitalContent?: Maybe + /** List of digital content. */ + digitalContents?: Maybe + /** List of the shop's categories. */ + categories?: Maybe + /** Look up a category by ID or slug. */ + category?: Maybe + /** Look up a collection by ID. */ + collection?: Maybe + /** List of the shop's collections. */ + collections?: Maybe + /** Look up a product by ID. */ + product?: Maybe + /** List of the shop's products. */ + products?: Maybe + /** Look up a product type by ID. */ + productType?: Maybe + /** List of the shop's product types. */ + productTypes?: Maybe + /** Look up a product variant by ID or SKU. */ + productVariant?: Maybe + /** List of product variants. */ + productVariants?: Maybe + /** List of top selling products. */ + reportProductSales?: Maybe + /** Look up a payment by ID. */ + payment?: Maybe + /** List of payments. */ + payments?: Maybe + /** Look up a page by ID or slug. */ + page?: Maybe + /** List of the shop's pages. */ + pages?: Maybe + /** Look up a page type by ID. */ + pageType?: Maybe + /** List of the page types. */ + pageTypes?: Maybe + /** List of activity events to display on homepage (at the moment it only contains order-events). */ + homepageEvents?: Maybe + /** Look up an order by ID. */ + order?: Maybe + /** List of orders. */ + orders?: Maybe + /** List of draft orders. */ + draftOrders?: Maybe + /** Return the total sales amount from a specific period. */ + ordersTotal?: Maybe + /** Look up an order by token. */ + orderByToken?: Maybe + /** Look up a navigation menu by ID or name. */ + menu?: Maybe + /** List of the storefront's menus. */ + menus?: Maybe + /** Look up a menu item by ID. */ + menuItem?: Maybe + /** List of the storefronts's menu items. */ + menuItems?: Maybe + /** Look up a gift card by ID. */ + giftCard?: Maybe + /** List of gift cards. */ + giftCards?: Maybe + /** Look up a plugin by ID. */ + plugin?: Maybe + /** List of plugins. */ + plugins?: Maybe + /** Look up a sale by ID. */ + sale?: Maybe + /** List of the shop's sales. */ + sales?: Maybe + /** Look up a voucher by ID. */ + voucher?: Maybe + /** List of the shop's vouchers. */ + vouchers?: Maybe + /** Look up a export file by ID. */ + exportFile?: Maybe + /** List of export files. */ + exportFiles?: Maybe + /** List of all tax rates available from tax gateway. */ + taxTypes?: Maybe>> + /** Look up a checkout by token and slug of channel. */ + checkout?: Maybe + /** List of checkouts. */ + checkouts?: Maybe + /** Look up a checkout line by ID. */ + checkoutLine?: Maybe + /** List of checkout lines. */ + checkoutLines?: Maybe + /** Look up a channel by ID. */ + channel?: Maybe + /** List of all channels. */ + channels?: Maybe> + /** List of the shop's attributes. */ + attributes?: Maybe + /** Look up an attribute by ID. */ + attribute?: Maybe + /** List of all apps installations */ + appsInstallations: Array + /** List of the apps. */ + apps?: Maybe + /** Look up an app by ID. If ID is not provided, return the currently authenticated app. */ + app?: Maybe + /** Returns address validation rules. */ + addressValidationRules?: Maybe + /** Look up an address by ID. */ + address?: Maybe
+ /** List of the shop's customers. */ + customers?: Maybe + /** List of permission groups. */ + permissionGroups?: Maybe + /** Look up permission group by ID. */ + permissionGroup?: Maybe + /** Return the currently authenticated user. */ + me?: Maybe + /** List of the shop's staff users. */ + staffUsers?: Maybe + /** Look up a user by ID or email address. */ + user?: Maybe + _entities?: Maybe>> + _service?: Maybe<_Service> +} + +export type QueryWebhookArgs = { + id: Scalars['ID'] +} + +export type QueryWebhookSamplePayloadArgs = { + eventType: WebhookSampleEventTypeEnum +} + +export type QueryWarehouseArgs = { + id: Scalars['ID'] +} + +export type QueryWarehousesArgs = { + filter?: Maybe + sortBy?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryTranslationsArgs = { + kind: TranslatableKinds + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryTranslationArgs = { + id: Scalars['ID'] + kind: TranslatableKinds +} + +export type QueryStockArgs = { + id: Scalars['ID'] +} + +export type QueryStocksArgs = { + filter?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryShippingZoneArgs = { + id: Scalars['ID'] + channel?: Maybe +} + +export type QueryShippingZonesArgs = { + filter?: Maybe + channel?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryDigitalContentArgs = { + id: Scalars['ID'] +} + +export type QueryDigitalContentsArgs = { + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryCategoriesArgs = { + filter?: Maybe + sortBy?: Maybe + level?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryCategoryArgs = { + id?: Maybe + slug?: Maybe +} + +export type QueryCollectionArgs = { + id?: Maybe + slug?: Maybe + channel?: Maybe +} + +export type QueryCollectionsArgs = { + filter?: Maybe + sortBy?: Maybe + channel?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryProductArgs = { + id?: Maybe + slug?: Maybe + channel?: Maybe +} + +export type QueryProductsArgs = { + filter?: Maybe + sortBy?: Maybe + channel?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryProductTypeArgs = { + id: Scalars['ID'] +} + +export type QueryProductTypesArgs = { + filter?: Maybe + sortBy?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryProductVariantArgs = { + id?: Maybe + sku?: Maybe + channel?: Maybe +} + +export type QueryProductVariantsArgs = { + ids?: Maybe>> + channel?: Maybe + filter?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryReportProductSalesArgs = { + period: ReportingPeriod + channel: Scalars['String'] + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryPaymentArgs = { + id: Scalars['ID'] +} + +export type QueryPaymentsArgs = { + filter?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryPageArgs = { + id?: Maybe + slug?: Maybe +} + +export type QueryPagesArgs = { + sortBy?: Maybe + filter?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryPageTypeArgs = { + id: Scalars['ID'] +} + +export type QueryPageTypesArgs = { + sortBy?: Maybe + filter?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryHomepageEventsArgs = { + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryOrderArgs = { + id: Scalars['ID'] +} + +export type QueryOrdersArgs = { + sortBy?: Maybe + filter?: Maybe + channel?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryDraftOrdersArgs = { + sortBy?: Maybe + filter?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryOrdersTotalArgs = { + period?: Maybe + channel?: Maybe +} + +export type QueryOrderByTokenArgs = { + token: Scalars['UUID'] +} + +export type QueryMenuArgs = { + channel?: Maybe + id?: Maybe + name?: Maybe + slug?: Maybe +} + +export type QueryMenusArgs = { + channel?: Maybe + sortBy?: Maybe + filter?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryMenuItemArgs = { + id: Scalars['ID'] + channel?: Maybe +} + +export type QueryMenuItemsArgs = { + channel?: Maybe + sortBy?: Maybe + filter?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryGiftCardArgs = { + id: Scalars['ID'] +} + +export type QueryGiftCardsArgs = { + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryPluginArgs = { + id: Scalars['ID'] +} + +export type QueryPluginsArgs = { + filter?: Maybe + sortBy?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QuerySaleArgs = { + id: Scalars['ID'] + channel?: Maybe +} + +export type QuerySalesArgs = { + filter?: Maybe + sortBy?: Maybe + query?: Maybe + channel?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryVoucherArgs = { + id: Scalars['ID'] + channel?: Maybe +} + +export type QueryVouchersArgs = { + filter?: Maybe + sortBy?: Maybe + query?: Maybe + channel?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryExportFileArgs = { + id: Scalars['ID'] +} + +export type QueryExportFilesArgs = { + filter?: Maybe + sortBy?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryCheckoutArgs = { + token?: Maybe +} + +export type QueryCheckoutsArgs = { + channel?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryCheckoutLineArgs = { + id?: Maybe +} + +export type QueryCheckoutLinesArgs = { + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryChannelArgs = { + id?: Maybe +} + +export type QueryAttributesArgs = { + filter?: Maybe + sortBy?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryAttributeArgs = { + id?: Maybe + slug?: Maybe +} + +export type QueryAppsArgs = { + filter?: Maybe + sortBy?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryAppArgs = { + id?: Maybe +} + +export type QueryAddressValidationRulesArgs = { + countryCode: CountryCode + countryArea?: Maybe + city?: Maybe + cityArea?: Maybe +} + +export type QueryAddressArgs = { + id: Scalars['ID'] +} + +export type QueryCustomersArgs = { + filter?: Maybe + sortBy?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryPermissionGroupsArgs = { + filter?: Maybe + sortBy?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryPermissionGroupArgs = { + id: Scalars['ID'] +} + +export type QueryStaffUsersArgs = { + filter?: Maybe + sortBy?: Maybe + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +export type QueryUserArgs = { + id?: Maybe + email?: Maybe +} + +export type Query_EntitiesArgs = { + representations?: Maybe>> +} + +/** Represents a reduced VAT rate for a particular type of goods. */ +export type ReducedRate = { + __typename?: 'ReducedRate' + /** Reduced VAT rate in percent. */ + rate: Scalars['Float'] + /** A type of goods. */ + rateType: TaxRateType +} + +/** 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 = { + __typename?: 'RefreshToken' + /** JWT token, required to authenticate. */ + token?: Maybe + /** A user instance. */ + user?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array +} + +export type ReorderInput = { + /** The ID of the item to move. */ + id: Scalars['ID'] + /** The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. */ + sortOrder?: Maybe +} + +export enum ReportingPeriod { + Today = 'TODAY', + ThisMonth = 'THIS_MONTH', +} + +/** Request email change of the logged in user. */ +export type RequestEmailChange = { + __typename?: 'RequestEmailChange' + /** A user instance. */ + user?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array +} + +/** Sends an email with the account password modification link. */ +export type RequestPasswordReset = { + __typename?: 'RequestPasswordReset' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array +} + +/** Sales allow creating discounts for categories, collections or products and are visible to all the customers. */ +export type Sale = Node & { + __typename?: 'Sale' + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + type: SaleType + startDate: Scalars['DateTime'] + endDate?: Maybe + /** List of categories this sale applies to. */ + categories?: Maybe + /** List of collections this sale applies to. */ + collections?: Maybe + /** List of products this sale applies to. */ + products?: Maybe + /** Returns translated sale fields for the given language code. */ + translation?: Maybe + /** List of channels available for the sale. */ + channelListings?: Maybe> + /** Sale value. */ + discountValue?: Maybe + /** Currency code for sale. */ + currency?: Maybe +} + +/** Sales allow creating discounts for categories, collections or products and are visible to all the customers. */ +export type SaleCategoriesArgs = { + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +/** Sales allow creating discounts for categories, collections or products and are visible to all the customers. */ +export type SaleCollectionsArgs = { + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +/** Sales allow creating discounts for categories, collections or products and are visible to all the customers. */ +export type SaleProductsArgs = { + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +/** Sales allow creating discounts for categories, collections or products and are visible to all the customers. */ +export type SaleTranslationArgs = { + languageCode: LanguageCodeEnum +} + +/** Adds products, categories, collections to a voucher. */ +export type SaleAddCatalogues = { + __typename?: 'SaleAddCatalogues' + /** Sale of which catalogue IDs will be modified. */ + sale?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + discountErrors: Array + errors: Array +} + +/** Deletes sales. */ +export type SaleBulkDelete = { + __typename?: 'SaleBulkDelete' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + discountErrors: Array + errors: Array +} + +/** Represents sale channel listing. */ +export type SaleChannelListing = Node & { + __typename?: 'SaleChannelListing' + /** The ID of the object. */ + id: Scalars['ID'] + channel: Channel + discountValue: Scalars['Float'] + currency: Scalars['String'] +} + +export type SaleChannelListingAddInput = { + /** ID of a channel. */ + channelId: Scalars['ID'] + /** The value of the discount. */ + discountValue: Scalars['PositiveDecimal'] +} + +export type SaleChannelListingInput = { + /** List of channels to which the sale should be assigned. */ + addChannels?: Maybe> + /** List of channels from which the sale should be unassigned. */ + removeChannels?: Maybe> +} + +/** Manage sale's availability in channels. */ +export type SaleChannelListingUpdate = { + __typename?: 'SaleChannelListingUpdate' + /** An updated sale instance. */ + sale?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + discountErrors: Array + errors: Array +} + +export type SaleCountableConnection = { + __typename?: 'SaleCountableConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe +} + +export type SaleCountableEdge = { + __typename?: 'SaleCountableEdge' + /** The item at the end of the edge. */ + node: Sale + /** A cursor for use in pagination. */ + cursor: Scalars['String'] } /** Creates a new sale. */ export type SaleCreate = { __typename?: 'SaleCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ discountErrors: Array + errors: Array sale?: Maybe } -export type DiscountError = { - __typename?: 'DiscountError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** List of products IDs which causes the error. */ - products?: Maybe> - /** The error code. */ - code: DiscountErrorCode - /** List of channels IDs which causes the error. */ - channels?: Maybe> +/** Deletes a sale. */ +export type SaleDelete = { + __typename?: 'SaleDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + discountErrors: Array + errors: Array + sale?: Maybe } -/** An enumeration. */ -export enum DiscountErrorCode { - AlreadyExists = 'ALREADY_EXISTS', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', - CannotManageProductWithoutVariant = 'CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT', - DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', +export type SaleFilterInput = { + status?: Maybe>> + saleType?: Maybe + started?: Maybe + search?: Maybe } export type SaleInput = { @@ -10123,129 +9233,1554 @@ export type SaleInput = { endDate?: Maybe } -/** Deletes a sale. */ -export type SaleDelete = { - __typename?: 'SaleDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - discountErrors: Array - sale?: Maybe -} - -/** Deletes sales. */ -export type SaleBulkDelete = { - __typename?: 'SaleBulkDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - discountErrors: Array -} - -/** Updates a sale. */ -export type SaleUpdate = { - __typename?: 'SaleUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - discountErrors: Array - sale?: Maybe -} - -/** Adds products, categories, collections to a voucher. */ -export type SaleAddCatalogues = { - __typename?: 'SaleAddCatalogues' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Sale of which catalogue IDs will be modified. */ - sale?: Maybe - discountErrors: Array -} - -export type CatalogueInput = { - /** Products related to the discount. */ - products?: Maybe>> - /** Categories related to the discount. */ - categories?: Maybe>> - /** Collections related to the discount. */ - collections?: Maybe>> -} - /** Removes products, categories, collections from a sale. */ export type SaleRemoveCatalogues = { __typename?: 'SaleRemoveCatalogues' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array /** Sale of which catalogue IDs will be modified. */ sale?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ discountErrors: Array + errors: Array +} + +export enum SaleSortField { + /** Sort sales by name. */ + Name = 'NAME', + /** Sort sales by start date. */ + StartDate = 'START_DATE', + /** Sort sales by end date. */ + EndDate = 'END_DATE', + /** Sort sales by value. */ + Value = 'VALUE', + /** Sort sales by type. */ + Type = 'TYPE', +} + +export type SaleSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection + /** Specifies the channel in which to sort the data. */ + channel?: Maybe + /** Sort sales by the selected field. */ + field: SaleSortField +} + +export type SaleTranslatableContent = Node & { + __typename?: 'SaleTranslatableContent' + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + /** Returns translated sale fields for the given language code. */ + translation?: Maybe + /** Sales allow creating discounts for categories, collections or products and are visible to all the customers. */ + sale?: Maybe +} + +export type SaleTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum } /** Creates/updates translations for a sale. */ export type SaleTranslate = { __typename?: 'SaleTranslate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ translationErrors: Array + errors: Array sale?: Maybe } -/** Manage sale's availability in channels. */ -export type SaleChannelListingUpdate = { - __typename?: 'SaleChannelListingUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** An updated sale instance. */ - sale?: Maybe +export type SaleTranslation = Node & { + __typename?: 'SaleTranslation' + /** The ID of the object. */ + id: Scalars['ID'] + name?: Maybe + /** Translation language. */ + language: LanguageDisplay +} + +/** An enumeration. */ +export enum SaleType { + /** fixed */ + Fixed = 'FIXED', + /** % */ + Percentage = 'PERCENTAGE', +} + +/** Updates a sale. */ +export type SaleUpdate = { + __typename?: 'SaleUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ discountErrors: Array + errors: Array + sale?: Maybe } -export type SaleChannelListingInput = { - /** List of channels to which the sale should be assigned. */ - addChannels?: Maybe> - /** List of channels from which the sale should be unassigned. */ +/** Represents a custom attribute. */ +export type SelectedAttribute = { + __typename?: 'SelectedAttribute' + /** Name of an attribute displayed in the interface. */ + attribute: Attribute + /** Values of an attribute. */ + values: Array> +} + +export type SeoInput = { + /** SEO title. */ + title?: Maybe + /** SEO description. */ + description?: Maybe +} + +/** Sets the user's password from the token sent by email using the RequestPasswordReset mutation. */ +export type SetPassword = { + __typename?: 'SetPassword' + /** JWT token, required to authenticate. */ + token?: Maybe + /** JWT refresh token, required to re-generate access token. */ + refreshToken?: Maybe + /** CSRF token required to re-generate access token. */ + csrfToken?: Maybe + /** A user instance. */ + user?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array +} + +export type ShippingError = { + __typename?: 'ShippingError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: ShippingErrorCode + /** List of warehouse IDs which causes the error. */ + warehouses?: Maybe> + /** List of channels IDs which causes the error. */ + channels?: Maybe> +} + +/** An enumeration. */ +export enum ShippingErrorCode { + AlreadyExists = 'ALREADY_EXISTS', + GraphqlError = 'GRAPHQL_ERROR', + Invalid = 'INVALID', + MaxLessThanMin = 'MAX_LESS_THAN_MIN', + NotFound = 'NOT_FOUND', + Required = 'REQUIRED', + Unique = 'UNIQUE', + DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', +} + +/** Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. */ +export type ShippingMethod = Node & + ObjectWithMetadata & { + __typename?: 'ShippingMethod' + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + description?: Maybe + minimumOrderWeight?: Maybe + maximumOrderWeight?: Maybe + maximumDeliveryDays?: Maybe + minimumDeliveryDays?: Maybe + /** List of private metadata items.Requires proper staff permissions to access. */ + privateMetadata: Array> + /** List of public metadata items. Can be accessed without permissions. */ + metadata: Array> + /** Type of the shipping method. */ + type?: Maybe + /** Returns translated shipping method fields for the given language code. */ + translation?: Maybe + /** List of channels available for the method. */ + channelListings?: Maybe> + /** The price of the cheapest variant (including discounts). */ + price?: Maybe + /** The price of the cheapest variant (including discounts). */ + maximumOrderPrice?: Maybe + /** The price of the cheapest variant (including discounts). */ + minimumOrderPrice?: Maybe + /** Postal code ranges rule of exclusion or inclusion of the shipping method. */ + postalCodeRules?: Maybe>> + /** List of excluded products for the shipping method. */ + excludedProducts?: 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 ShippingMethodTranslationArgs = { + languageCode: LanguageCodeEnum +} + +/** Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. */ +export type ShippingMethodExcludedProductsArgs = { + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +/** Represents shipping method channel listing. */ +export type ShippingMethodChannelListing = Node & { + __typename?: 'ShippingMethodChannelListing' + /** The ID of the object. */ + id: Scalars['ID'] + channel: Channel + minimumOrderPrice?: Maybe + maximumOrderPrice?: Maybe + price?: Maybe +} + +export type ShippingMethodChannelListingAddInput = { + /** ID of a channel. */ + channelId: Scalars['ID'] + /** Shipping price of the shipping method in this channel. */ + price?: Maybe + /** Minimum order price to use this shipping method. */ + minimumOrderPrice?: Maybe + /** Maximum order price to use this shipping method. */ + maximumOrderPrice?: Maybe +} + +export type ShippingMethodChannelListingInput = { + /** List of channels to which the shipping method should be assigned. */ + addChannels?: Maybe> + /** List of channels from which the shipping method should be unassigned. */ removeChannels?: Maybe> } -export type SaleChannelListingAddInput = { +/** Manage shipping method's availability in channels. */ +export type ShippingMethodChannelListingUpdate = { + __typename?: 'ShippingMethodChannelListingUpdate' + /** An updated shipping method instance. */ + shippingMethod?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + shippingErrors: Array + errors: Array +} + +/** Represents shipping method postal code rule. */ +export type ShippingMethodPostalCodeRule = Node & { + __typename?: 'ShippingMethodPostalCodeRule' + /** Start address range. */ + start?: Maybe + /** End address range. */ + end?: Maybe + /** Inclusion type of the postal code rule. */ + inclusionType?: Maybe + /** The ID of the object. */ + id: Scalars['ID'] +} + +export type ShippingMethodTranslatableContent = Node & { + __typename?: 'ShippingMethodTranslatableContent' + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + description?: Maybe + /** Returns translated shipping method fields for the given language code. */ + translation?: Maybe + /** Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. */ + shippingMethod?: Maybe +} + +export type ShippingMethodTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum +} + +export type ShippingMethodTranslation = Node & { + __typename?: 'ShippingMethodTranslation' + /** The ID of the object. */ + id: Scalars['ID'] + name?: Maybe + description?: Maybe + /** Translation language. */ + language: LanguageDisplay +} + +/** An enumeration. */ +export enum ShippingMethodTypeEnum { + Price = 'PRICE', + Weight = 'WEIGHT', +} + +export type ShippingPostalCodeRulesCreateInputRange = { + /** Start range of the postal code. */ + start: Scalars['String'] + /** End range of the postal code. */ + end?: Maybe +} + +/** Deletes shipping prices. */ +export type ShippingPriceBulkDelete = { + __typename?: 'ShippingPriceBulkDelete' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + shippingErrors: Array + errors: Array +} + +/** Creates a new shipping price. */ +export type ShippingPriceCreate = { + __typename?: 'ShippingPriceCreate' + /** A shipping zone to which the shipping method belongs. */ + shippingZone?: Maybe + shippingMethod?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + shippingErrors: Array + errors: Array +} + +/** Deletes a shipping price. */ +export type ShippingPriceDelete = { + __typename?: 'ShippingPriceDelete' + /** A shipping method to delete. */ + shippingMethod?: Maybe + /** A shipping zone to which the shipping method belongs. */ + shippingZone?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + shippingErrors: Array + errors: Array +} + +/** Exclude products from shipping price. */ +export type ShippingPriceExcludeProducts = { + __typename?: 'ShippingPriceExcludeProducts' + /** A shipping method with new list of excluded products. */ + shippingMethod?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + shippingErrors: Array + errors: Array +} + +export type ShippingPriceExcludeProductsInput = { + /** List of products which will be excluded. */ + products: Array> +} + +export type ShippingPriceInput = { + /** Name of the shipping method. */ + name?: Maybe + /** Shipping method description (JSON). */ + description?: Maybe + /** Minimum order weight to use this shipping method. */ + minimumOrderWeight?: Maybe + /** Maximum order weight to use this shipping method. */ + maximumOrderWeight?: Maybe + /** Maximum number of days for delivery. */ + maximumDeliveryDays?: Maybe + /** Minimal number of days for delivery. */ + minimumDeliveryDays?: Maybe + /** Shipping type: price or weight based. */ + type?: Maybe + /** Shipping zone this method belongs to. */ + shippingZone?: Maybe + /** Postal code rules to add. */ + addPostalCodeRules?: Maybe> + /** Postal code rules to delete. */ + deletePostalCodeRules?: Maybe> + /** Inclusion type for currently assigned postal code rules. */ + inclusionType?: Maybe +} + +/** Remove product from excluded list for shipping price. */ +export type ShippingPriceRemoveProductFromExclude = { + __typename?: 'ShippingPriceRemoveProductFromExclude' + /** A shipping method with new list of excluded products. */ + shippingMethod?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + shippingErrors: Array + errors: Array +} + +/** Creates/Updates translations for shipping method. */ +export type ShippingPriceTranslate = { + __typename?: 'ShippingPriceTranslate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + translationErrors: Array + errors: Array + shippingMethod?: Maybe +} + +export type ShippingPriceTranslationInput = { + name?: Maybe + /** Translated shipping method description (JSON). */ + description?: Maybe +} + +/** Updates a new shipping price. */ +export type ShippingPriceUpdate = { + __typename?: 'ShippingPriceUpdate' + /** A shipping zone to which the shipping method belongs. */ + shippingZone?: Maybe + shippingMethod?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + shippingErrors: Array + errors: Array +} + +/** 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 & { + __typename?: 'ShippingZone' + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + default: Scalars['Boolean'] + /** List of private metadata items.Requires proper staff permissions to access. */ + privateMetadata: Array> + /** List of public metadata items. Can be accessed without permissions. */ + metadata: Array> + /** Lowest and highest prices for the shipping. */ + priceRange?: Maybe + /** List of countries available for the method. */ + countries?: Maybe>> + /** List of shipping methods available for orders shipped to countries within this shipping zone. */ + shippingMethods?: Maybe>> + /** List of warehouses for shipping zone. */ + warehouses: Array + /** List of channels for shipping zone. */ + channels: Array + /** Description of a shipping zone. */ + description?: Maybe + } + +/** Deletes shipping zones. */ +export type ShippingZoneBulkDelete = { + __typename?: 'ShippingZoneBulkDelete' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + shippingErrors: Array + errors: Array +} + +export type ShippingZoneCountableConnection = { + __typename?: 'ShippingZoneCountableConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe +} + +export type ShippingZoneCountableEdge = { + __typename?: 'ShippingZoneCountableEdge' + /** The item at the end of the edge. */ + node: ShippingZone + /** A cursor for use in pagination. */ + cursor: Scalars['String'] +} + +/** Creates a new shipping zone. */ +export type ShippingZoneCreate = { + __typename?: 'ShippingZoneCreate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + shippingErrors: Array + errors: Array + shippingZone?: Maybe +} + +export type ShippingZoneCreateInput = { + /** Shipping zone's name. Visible only to the staff. */ + name?: Maybe + /** Description of the shipping zone. */ + description?: Maybe + /** List of countries in this shipping zone. */ + countries?: Maybe>> + /** Default shipping zone will be used for countries not covered by other zones. */ + default?: Maybe + /** List of warehouses to assign to a shipping zone */ + addWarehouses?: Maybe>> + /** List of channels to assign to the shipping zone. */ + addChannels?: Maybe> +} + +/** Deletes a shipping zone. */ +export type ShippingZoneDelete = { + __typename?: 'ShippingZoneDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + shippingErrors: Array + errors: Array + shippingZone?: Maybe +} + +export type ShippingZoneFilterInput = { + search?: Maybe +} + +/** Updates a new shipping zone. */ +export type ShippingZoneUpdate = { + __typename?: 'ShippingZoneUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + shippingErrors: Array + errors: Array + shippingZone?: Maybe +} + +export type ShippingZoneUpdateInput = { + /** Shipping zone's name. Visible only to the staff. */ + name?: Maybe + /** Description of the shipping zone. */ + description?: Maybe + /** List of countries in this shipping zone. */ + countries?: Maybe>> + /** Default shipping zone will be used for countries not covered by other zones. */ + default?: Maybe + /** List of warehouses to assign to a shipping zone */ + addWarehouses?: Maybe>> + /** List of channels to assign to the shipping zone. */ + addChannels?: Maybe> + /** List of warehouses to unassign from a shipping zone */ + removeWarehouses?: Maybe>> + /** List of channels to unassign from the shipping zone. */ + removeChannels?: Maybe> +} + +/** Represents a shop resource containing general shop data and configuration. */ +export type Shop = { + __typename?: 'Shop' + /** List of available payment gateways. */ + availablePaymentGateways: Array + /** List of available external authentications. */ + availableExternalAuthentications: Array + /** Shipping methods that are available for the shop. */ + availableShippingMethods?: Maybe>> + /** List of countries available in the shop. */ + countries: Array + /** Shop's default country. */ + defaultCountry?: Maybe + /** Default shop's email sender's name. */ + defaultMailSenderName?: Maybe + /** Default shop's email sender's address. */ + defaultMailSenderAddress?: Maybe + /** Shop's description. */ + description?: Maybe + /** Shop's domain data. */ + domain: Domain + /** List of the shops's supported languages. */ + languages: Array> + /** Shop's name. */ + name: Scalars['String'] + /** List of available permissions. */ + permissions: Array> + /** List of possible phone prefixes. */ + phonePrefixes: Array> + /** Header text. */ + headerText?: Maybe + /** Include taxes in prices. */ + includeTaxesInPrices: Scalars['Boolean'] + /** Display prices with tax in store. */ + displayGrossPrices: Scalars['Boolean'] + /** Charge taxes on shipping. */ + chargeTaxesOnShipping: Scalars['Boolean'] + /** Enable inventory tracking. */ + trackInventoryByDefault?: Maybe + /** Default weight unit. */ + defaultWeightUnit?: Maybe + /** Returns translated shop fields for the given language code. */ + translation?: Maybe + /** Enable automatic fulfillment for all digital products. */ + automaticFulfillmentDigitalProducts?: Maybe + /** Default number of max downloads per digital content URL. */ + defaultDigitalMaxDownloads?: Maybe + /** Default number of days which digital content URL will be valid. */ + defaultDigitalUrlValidDays?: Maybe + /** Company address. */ + companyAddress?: Maybe
+ /** URL of a view where customers can set their password. */ + customerSetPasswordUrl?: Maybe + /** List of staff notification recipients. */ + staffNotificationRecipients?: Maybe>> + /** Resource limitations and current usage if any set for a shop */ + limits: LimitInfo + /** Saleor API version. */ + version: Scalars['String'] +} + +/** Represents a shop resource containing general shop data and configuration. */ +export type ShopAvailablePaymentGatewaysArgs = { + currency?: Maybe +} + +/** Represents a shop resource containing general shop data and configuration. */ +export type ShopAvailableShippingMethodsArgs = { + channel: Scalars['String'] + address?: Maybe +} + +/** Represents a shop resource containing general shop data and configuration. */ +export type ShopCountriesArgs = { + languageCode?: Maybe +} + +/** 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. */ +export type ShopAddressUpdate = { + __typename?: 'ShopAddressUpdate' + /** Updated shop. */ + shop?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + shopErrors: Array + errors: Array +} + +/** Updates site domain of the shop. */ +export type ShopDomainUpdate = { + __typename?: 'ShopDomainUpdate' + /** Updated shop. */ + shop?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + shopErrors: Array + errors: Array +} + +export type ShopError = { + __typename?: 'ShopError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: ShopErrorCode +} + +/** An enumeration. */ +export enum ShopErrorCode { + AlreadyExists = 'ALREADY_EXISTS', + CannotFetchTaxRates = 'CANNOT_FETCH_TAX_RATES', + GraphqlError = 'GRAPHQL_ERROR', + Invalid = 'INVALID', + NotFound = 'NOT_FOUND', + Required = 'REQUIRED', + Unique = 'UNIQUE', +} + +/** Fetch tax rates. */ +export type ShopFetchTaxRates = { + __typename?: 'ShopFetchTaxRates' + /** Updated shop. */ + shop?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + shopErrors: Array + errors: Array +} + +export type ShopSettingsInput = { + /** Header text. */ + headerText?: Maybe + /** SEO description. */ + description?: Maybe + /** Include taxes in prices. */ + includeTaxesInPrices?: Maybe + /** Display prices with tax in store. */ + displayGrossPrices?: Maybe + /** Charge taxes on shipping. */ + chargeTaxesOnShipping?: Maybe + /** Enable inventory tracking. */ + trackInventoryByDefault?: Maybe + /** Default weight unit. */ + defaultWeightUnit?: Maybe + /** Enable automatic fulfillment for all digital products. */ + automaticFulfillmentDigitalProducts?: Maybe + /** Default number of max downloads per digital content URL. */ + defaultDigitalMaxDownloads?: Maybe + /** Default number of days which digital content URL will be valid. */ + defaultDigitalUrlValidDays?: Maybe + /** Default email sender's name. */ + defaultMailSenderName?: Maybe + /** Default email sender's address. */ + defaultMailSenderAddress?: Maybe + /** URL of a view where customers can set their password. */ + customerSetPasswordUrl?: Maybe +} + +/** Creates/Updates translations for Shop Settings. */ +export type ShopSettingsTranslate = { + __typename?: 'ShopSettingsTranslate' + /** Updated shop. */ + shop?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + translationErrors: Array + errors: Array +} + +export type ShopSettingsTranslationInput = { + headerText?: Maybe + description?: Maybe +} + +/** Updates shop settings. */ +export type ShopSettingsUpdate = { + __typename?: 'ShopSettingsUpdate' + /** Updated shop. */ + shop?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + shopErrors: Array + errors: Array +} + +export type ShopTranslation = Node & { + __typename?: 'ShopTranslation' + /** The ID of the object. */ + id: Scalars['ID'] + headerText: Scalars['String'] + description: Scalars['String'] + /** Translation language. */ + language: LanguageDisplay +} + +export type SiteDomainInput = { + /** Domain name for shop. */ + domain?: Maybe + /** Shop site name. */ + name?: Maybe +} + +/** Deletes staff users. */ +export type StaffBulkDelete = { + __typename?: 'StaffBulkDelete' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + staffErrors: Array + errors: Array +} + +/** Creates a new staff user. */ +export type StaffCreate = { + __typename?: 'StaffCreate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + staffErrors: Array + errors: Array + user?: Maybe +} + +export type StaffCreateInput = { + /** Given name. */ + firstName?: Maybe + /** Family name. */ + lastName?: Maybe + /** The unique email address of the user. */ + email?: Maybe + /** User account is active. */ + isActive?: Maybe + /** A note about the user. */ + note?: Maybe + /** List of permission group IDs to which user should be assigned. */ + addGroups?: Maybe> + /** URL of a view where users should be redirected to set the password. URL in RFC 1808 format. */ + redirectUrl?: Maybe +} + +/** Deletes a staff user. */ +export type StaffDelete = { + __typename?: 'StaffDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + staffErrors: Array + errors: Array + user?: Maybe +} + +export type StaffError = { + __typename?: 'StaffError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: AccountErrorCode + /** List of permissions which causes the error. */ + permissions?: Maybe> + /** List of permission group IDs which cause the error. */ + groups?: Maybe> + /** List of user IDs which causes the error. */ + users?: Maybe> +} + +export enum StaffMemberStatus { + /** User account has been activated. */ + Active = 'ACTIVE', + /** User account has not been activated yet. */ + Deactivated = '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 & { + __typename?: 'StaffNotificationRecipient' + /** Returns a user subscribed to email notifications. */ + user?: Maybe + /** Determines if a notification active. */ + active?: Maybe + /** The ID of the object. */ + id: Scalars['ID'] + /** Returns email address of a user subscribed to email notifications. */ + email?: Maybe +} + +/** Creates a new staff notification recipient. */ +export type StaffNotificationRecipientCreate = { + __typename?: 'StaffNotificationRecipientCreate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + shopErrors: Array + errors: Array + staffNotificationRecipient?: Maybe +} + +/** Delete staff notification recipient. */ +export type StaffNotificationRecipientDelete = { + __typename?: 'StaffNotificationRecipientDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + shopErrors: Array + errors: Array + staffNotificationRecipient?: Maybe +} + +export type StaffNotificationRecipientInput = { + /** The ID of the user subscribed to email notifications.. */ + user?: Maybe + /** Email address of a user subscribed to email notifications. */ + email?: Maybe + /** Determines if a notification active. */ + active?: Maybe +} + +/** Updates a staff notification recipient. */ +export type StaffNotificationRecipientUpdate = { + __typename?: 'StaffNotificationRecipientUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + shopErrors: Array + errors: Array + staffNotificationRecipient?: Maybe +} + +/** Updates an existing staff user. */ +export type StaffUpdate = { + __typename?: 'StaffUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + staffErrors: Array + errors: Array + user?: Maybe +} + +export type StaffUpdateInput = { + /** Given name. */ + firstName?: Maybe + /** Family name. */ + lastName?: Maybe + /** The unique email address of the user. */ + email?: Maybe + /** User account is active. */ + isActive?: Maybe + /** A note about the user. */ + note?: Maybe + /** List of permission group IDs to which user should be assigned. */ + addGroups?: Maybe> + /** List of permission group IDs from which user should be unassigned. */ + removeGroups?: Maybe> +} + +export type StaffUserInput = { + status?: Maybe + search?: Maybe +} + +/** Represents stock. */ +export type Stock = Node & { + __typename?: 'Stock' + warehouse: Warehouse + productVariant: ProductVariant + /** Quantity of a product in the warehouse's possession, including the allocated stock that is waiting for shipment. */ + quantity: Scalars['Int'] + /** The ID of the object. */ + id: Scalars['ID'] + /** Quantity allocated for orders */ + quantityAllocated: Scalars['Int'] +} + +export enum StockAvailability { + InStock = 'IN_STOCK', + OutOfStock = 'OUT_OF_STOCK', +} + +export type StockCountableConnection = { + __typename?: 'StockCountableConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe +} + +export type StockCountableEdge = { + __typename?: 'StockCountableEdge' + /** The item at the end of the edge. */ + node: Stock + /** A cursor for use in pagination. */ + cursor: Scalars['String'] +} + +export type StockError = { + __typename?: 'StockError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: StockErrorCode +} + +/** An enumeration. */ +export enum StockErrorCode { + AlreadyExists = 'ALREADY_EXISTS', + GraphqlError = 'GRAPHQL_ERROR', + Invalid = 'INVALID', + NotFound = 'NOT_FOUND', + Required = 'REQUIRED', + Unique = 'UNIQUE', +} + +export type StockFilterInput = { + quantity?: Maybe + search?: Maybe +} + +export type StockInput = { + /** Warehouse in which stock is located. */ + warehouse: Scalars['ID'] + /** Quantity of items available for sell. */ + quantity: Scalars['Int'] +} + +/** An enumeration. */ +export enum TaxRateType { + Accommodation = 'ACCOMMODATION', + AdmissionToCulturalEvents = 'ADMISSION_TO_CULTURAL_EVENTS', + AdmissionToEntertainmentEvents = 'ADMISSION_TO_ENTERTAINMENT_EVENTS', + AdmissionToSportingEvents = 'ADMISSION_TO_SPORTING_EVENTS', + Advertising = 'ADVERTISING', + AgriculturalSupplies = 'AGRICULTURAL_SUPPLIES', + BabyFoodstuffs = 'BABY_FOODSTUFFS', + Bikes = 'BIKES', + Books = 'BOOKS', + ChildrensClothing = 'CHILDRENS_CLOTHING', + DomesticFuel = 'DOMESTIC_FUEL', + DomesticServices = 'DOMESTIC_SERVICES', + EBooks = 'E_BOOKS', + Foodstuffs = 'FOODSTUFFS', + Hotels = 'HOTELS', + Medical = 'MEDICAL', + Newspapers = 'NEWSPAPERS', + PassengerTransport = 'PASSENGER_TRANSPORT', + Pharmaceuticals = 'PHARMACEUTICALS', + PropertyRenovations = 'PROPERTY_RENOVATIONS', + Restaurants = 'RESTAURANTS', + SocialHousing = 'SOCIAL_HOUSING', + Standard = 'STANDARD', + Water = 'WATER', + Wine = 'WINE', +} + +/** Representation of tax types fetched from tax gateway. */ +export type TaxType = { + __typename?: 'TaxType' + /** Description of the tax type. */ + description?: Maybe + /** External tax code used to identify given tax group. */ + taxCode?: Maybe +} + +/** Represents a monetary value with taxes. In cases where taxes were not applied, net and gross values will be equal. */ +export type TaxedMoney = { + __typename?: 'TaxedMoney' + /** Currency code. */ + currency: Scalars['String'] + /** Amount of money including taxes. */ + gross: Money + /** Amount of money without taxes. */ + net: Money + /** Amount of taxes. */ + tax: Money +} + +/** Represents a range of monetary values. */ +export type TaxedMoneyRange = { + __typename?: 'TaxedMoneyRange' + /** Lower bound of a price range. */ + start?: Maybe + /** Upper bound of a price range. */ + stop?: Maybe +} + +/** An object representing a single payment. */ +export type Transaction = Node & { + __typename?: 'Transaction' + /** The ID of the object. */ + id: Scalars['ID'] + created: Scalars['DateTime'] + payment: Payment + token: Scalars['String'] + kind: TransactionKind + isSuccess: Scalars['Boolean'] + error?: Maybe + gatewayResponse: Scalars['JSONString'] + /** Total amount of the transaction. */ + amount?: Maybe +} + +/** An enumeration. */ +export enum TransactionKind { + /** External reference */ + External = 'EXTERNAL', + /** Authorization */ + Auth = 'AUTH', + /** Pending */ + Pending = 'PENDING', + /** Action to confirm */ + ActionToConfirm = 'ACTION_TO_CONFIRM', + /** Refund */ + Refund = 'REFUND', + /** Refund in progress */ + RefundOngoing = 'REFUND_ONGOING', + /** Capture */ + Capture = 'CAPTURE', + /** Void */ + Void = 'VOID', + /** Confirm */ + Confirm = 'CONFIRM', + /** Cancel */ + Cancel = 'CANCEL', +} + +export type TranslatableItem = + | ProductTranslatableContent + | CollectionTranslatableContent + | CategoryTranslatableContent + | AttributeTranslatableContent + | AttributeValueTranslatableContent + | ProductVariantTranslatableContent + | PageTranslatableContent + | ShippingMethodTranslatableContent + | SaleTranslatableContent + | VoucherTranslatableContent + | MenuItemTranslatableContent + +export type TranslatableItemConnection = { + __typename?: 'TranslatableItemConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe +} + +export type TranslatableItemEdge = { + __typename?: 'TranslatableItemEdge' + /** The item at the end of the edge. */ + node: TranslatableItem + /** A cursor for use in pagination. */ + cursor: Scalars['String'] +} + +export enum TranslatableKinds { + Attribute = 'ATTRIBUTE', + AttributeValue = 'ATTRIBUTE_VALUE', + Category = 'CATEGORY', + Collection = 'COLLECTION', + MenuItem = 'MENU_ITEM', + Page = 'PAGE', + Product = 'PRODUCT', + Sale = 'SALE', + ShippingMethod = 'SHIPPING_METHOD', + Variant = 'VARIANT', + Voucher = 'VOUCHER', +} + +export type TranslationError = { + __typename?: 'TranslationError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: TranslationErrorCode +} + +/** An enumeration. */ +export enum TranslationErrorCode { + GraphqlError = 'GRAPHQL_ERROR', + NotFound = 'NOT_FOUND', + Required = 'REQUIRED', +} + +export type TranslationInput = { + seoTitle?: Maybe + seoDescription?: Maybe + name?: Maybe + description?: Maybe +} + +export type UpdateInvoiceInput = { + /** Invoice number */ + number?: Maybe + /** URL of an invoice to download. */ + url?: Maybe +} + +/** Updates metadata of an object. */ +export type UpdateMetadata = { + __typename?: 'UpdateMetadata' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + metadataErrors: Array + errors: Array + item?: Maybe +} + +/** Updates private metadata of an object. */ +export type UpdatePrivateMetadata = { + __typename?: 'UpdatePrivateMetadata' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + metadataErrors: Array + errors: Array + item?: Maybe +} + +export type UploadError = { + __typename?: 'UploadError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: UploadErrorCode +} + +/** An enumeration. */ +export enum UploadErrorCode { + GraphqlError = 'GRAPHQL_ERROR', +} + +/** Represents user data. */ +export type User = Node & + ObjectWithMetadata & { + __typename?: 'User' + /** The ID of the object. */ + id: Scalars['ID'] + lastLogin?: Maybe + email: Scalars['String'] + firstName: Scalars['String'] + lastName: Scalars['String'] + isStaff: Scalars['Boolean'] + isActive: Scalars['Boolean'] + /** A note about the customer. */ + note?: Maybe + dateJoined: Scalars['DateTime'] + defaultShippingAddress?: Maybe
+ defaultBillingAddress?: Maybe
+ /** List of private metadata items.Requires proper staff permissions to access. */ + privateMetadata: Array> + /** List of public metadata items. Can be accessed without permissions. */ + metadata: Array> + /** List of all user's addresses. */ + addresses?: Maybe>> + /** + * Returns the last open checkout of this user. + * @deprecated Will be removed in Saleor 4.0. Use the `checkout_tokens` field to fetch the user checkouts. + */ + checkout?: Maybe + /** Returns the checkout UUID's assigned to this user. */ + checkoutTokens?: Maybe> + /** List of the user gift cards. */ + giftCards?: Maybe + /** List of user's orders. */ + orders?: Maybe + /** List of user's permissions. */ + userPermissions?: Maybe>> + /** List of user's permission groups. */ + permissionGroups?: Maybe>> + /** List of user's permission groups which user can manage. */ + editableGroups?: Maybe>> + avatar?: Maybe + /** List of events associated with the user. */ + events?: Maybe>> + /** List of stored payment sources. */ + storedPaymentSources?: Maybe>> + /** User language code. */ + languageCode: LanguageCodeEnum + } + +/** Represents user data. */ +export type UserCheckoutTokensArgs = { + channel?: Maybe +} + +/** Represents user data. */ +export type UserGiftCardsArgs = { + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +/** Represents user data. */ +export type UserOrdersArgs = { + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + +/** Represents user data. */ +export type UserAvatarArgs = { + size?: Maybe +} + +/** Deletes a user avatar. Only for staff members. */ +export type UserAvatarDelete = { + __typename?: 'UserAvatarDelete' + /** An updated user instance. */ + user?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array +} + +/** 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 */ +export type UserAvatarUpdate = { + __typename?: 'UserAvatarUpdate' + /** An updated user instance. */ + user?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array +} + +/** Activate or deactivate users. */ +export type UserBulkSetActive = { + __typename?: 'UserBulkSetActive' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array +} + +export type UserCountableConnection = { + __typename?: 'UserCountableConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe +} + +export type UserCountableEdge = { + __typename?: 'UserCountableEdge' + /** The item at the end of the edge. */ + node: User + /** A cursor for use in pagination. */ + cursor: Scalars['String'] +} + +export type UserCreateInput = { + /** Billing address of the customer. */ + defaultBillingAddress?: Maybe + /** Shipping address of the customer. */ + defaultShippingAddress?: Maybe + /** Given name. */ + firstName?: Maybe + /** Family name. */ + lastName?: Maybe + /** The unique email address of the user. */ + email?: Maybe + /** User account is active. */ + isActive?: Maybe + /** A note about the user. */ + note?: Maybe + /** User language code. */ + languageCode?: Maybe + /** URL of a view where users should be redirected to set the password. URL in RFC 1808 format. */ + redirectUrl?: Maybe +} + +export type UserPermission = { + __typename?: 'UserPermission' + /** Internal code for permission. */ + code: PermissionEnum + /** Describe action(s) allowed to do by permission. */ + name: Scalars['String'] + /** List of user permission groups which contains this permission. */ + sourcePermissionGroups?: Maybe> +} + +export type UserPermissionSourcePermissionGroupsArgs = { + userId: Scalars['ID'] +} + +export enum UserSortField { + /** Sort users by first name. */ + FirstName = 'FIRST_NAME', + /** Sort users by last name. */ + LastName = 'LAST_NAME', + /** Sort users by email. */ + Email = 'EMAIL', + /** Sort users by order count. */ + OrderCount = 'ORDER_COUNT', +} + +export type UserSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection + /** Sort users by the selected field. */ + field: UserSortField +} + +/** Represents a VAT rate for a country. */ +export type Vat = { + __typename?: 'VAT' + /** Country code. */ + countryCode: Scalars['String'] + /** Standard VAT rate in percent. */ + standardRate?: Maybe + /** Country's VAT rate exceptions for specific types of goods. */ + reducedRates: Array> +} + +export enum VariantAttributeScope { + All = 'ALL', + VariantSelection = 'VARIANT_SELECTION', + NotVariantSelection = 'NOT_VARIANT_SELECTION', +} + +/** Assign an media to a product variant. */ +export type VariantMediaAssign = { + __typename?: 'VariantMediaAssign' + productVariant?: Maybe + media?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array +} + +/** Unassign an media from a product variant. */ +export type VariantMediaUnassign = { + __typename?: 'VariantMediaUnassign' + productVariant?: Maybe + media?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + productErrors: Array + errors: Array +} + +/** Represents availability of a variant in the storefront. */ +export type VariantPricingInfo = { + __typename?: 'VariantPricingInfo' + /** Whether it is in sale or not. */ + onSale?: Maybe + /** The discount amount if in sale (null otherwise). */ + discount?: Maybe + /** The discount amount in the local currency. */ + discountLocalCurrency?: Maybe + /** The price, with any discount subtracted. */ + price?: Maybe + /** The price without any discount. */ + priceUndiscounted?: Maybe + /** The discounted price in the local currency. */ + priceLocalCurrency?: Maybe +} + +/** Verify JWT token. */ +export type VerifyToken = { + __typename?: 'VerifyToken' + /** User assigned to token. */ + user?: Maybe + /** Determine if token is valid or not. */ + isValid: Scalars['Boolean'] + /** JWT payload. */ + payload?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + accountErrors: Array + errors: Array +} + +/** 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 & { + __typename?: 'Voucher' + /** The ID of the object. */ + id: Scalars['ID'] + name?: Maybe + /** Determines a type of voucher. */ + type: VoucherTypeEnum + code: Scalars['String'] + usageLimit?: Maybe + used: Scalars['Int'] + startDate: Scalars['DateTime'] + endDate?: Maybe + applyOncePerOrder: Scalars['Boolean'] + applyOncePerCustomer: Scalars['Boolean'] + /** Determines a type of discount for voucher - value or percentage */ + discountValueType: DiscountValueTypeEnum + minCheckoutItemsQuantity?: Maybe + /** List of categories this voucher applies to. */ + categories?: Maybe + /** List of collections this voucher applies to. */ + collections?: Maybe + /** List of products this voucher applies to. */ + products?: Maybe + /** List of countries available for the shipping voucher. */ + countries?: Maybe>> + /** Returns translated voucher fields for the given language code. */ + translation?: Maybe + /** Voucher value. */ + discountValue?: Maybe + /** Currency code for voucher. */ + currency?: Maybe + /** Minimum order value to apply voucher. */ + minSpent?: Maybe + /** List of availability in channels for the voucher. */ + channelListings?: 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 = { + before?: Maybe + after?: Maybe + first?: Maybe + last?: 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 VoucherCollectionsArgs = { + before?: Maybe + after?: Maybe + first?: Maybe + last?: 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 VoucherProductsArgs = { + before?: Maybe + after?: Maybe + first?: Maybe + last?: 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 VoucherTranslationArgs = { + languageCode: LanguageCodeEnum +} + +/** Adds products, categories, collections to a voucher. */ +export type VoucherAddCatalogues = { + __typename?: 'VoucherAddCatalogues' + /** Voucher of which catalogue IDs will be modified. */ + voucher?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + discountErrors: Array + errors: Array +} + +/** Deletes vouchers. */ +export type VoucherBulkDelete = { + __typename?: 'VoucherBulkDelete' + /** Returns how many objects were affected. */ + count: Scalars['Int'] + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + discountErrors: Array + errors: Array +} + +/** Represents voucher channel listing. */ +export type VoucherChannelListing = Node & { + __typename?: 'VoucherChannelListing' + /** The ID of the object. */ + id: Scalars['ID'] + channel: Channel + discountValue: Scalars['Float'] + currency: Scalars['String'] + minSpent?: Maybe +} + +export type VoucherChannelListingAddInput = { /** ID of a channel. */ channelId: Scalars['ID'] - /** The value of the discount. */ - discountValue: Scalars['PositiveDecimal'] + /** Value of the voucher. */ + discountValue?: Maybe + /** Min purchase amount required to apply the voucher. */ + minAmountSpent?: Maybe +} + +export type VoucherChannelListingInput = { + /** List of channels to which the voucher should be assigned. */ + addChannels?: Maybe> + /** List of channels from which the voucher should be unassigned. */ + removeChannels?: Maybe> +} + +/** Manage voucher's availability in channels. */ +export type VoucherChannelListingUpdate = { + __typename?: 'VoucherChannelListingUpdate' + /** An updated voucher instance. */ + voucher?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + discountErrors: Array + errors: Array +} + +export type VoucherCountableConnection = { + __typename?: 'VoucherCountableConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe +} + +export type VoucherCountableEdge = { + __typename?: 'VoucherCountableEdge' + /** The item at the end of the edge. */ + node: Voucher + /** A cursor for use in pagination. */ + cursor: Scalars['String'] } /** Creates a new voucher. */ export type VoucherCreate = { __typename?: 'VoucherCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ discountErrors: Array + errors: Array voucher?: Maybe } +/** Deletes a voucher. */ +export type VoucherDelete = { + __typename?: 'VoucherDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + discountErrors: Array + errors: Array + voucher?: Maybe +} + +export enum VoucherDiscountType { + Fixed = 'FIXED', + Percentage = 'PERCENTAGE', + Shipping = 'SHIPPING', +} + +export type VoucherFilterInput = { + status?: Maybe>> + timesUsed?: Maybe + discountType?: Maybe>> + started?: Maybe + search?: Maybe +} + export type VoucherInput = { /** Voucher type: PRODUCT, CATEGORY SHIPPING or ENTIRE_ORDER. */ type?: Maybe @@ -10277,1834 +10812,477 @@ export type VoucherInput = { usageLimit?: Maybe } -/** Deletes a voucher. */ -export type VoucherDelete = { - __typename?: 'VoucherDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - discountErrors: Array - voucher?: Maybe -} - -/** Deletes vouchers. */ -export type VoucherBulkDelete = { - __typename?: 'VoucherBulkDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - discountErrors: Array -} - -/** Updates a voucher. */ -export type VoucherUpdate = { - __typename?: 'VoucherUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - discountErrors: Array - voucher?: Maybe -} - -/** Adds products, categories, collections to a voucher. */ -export type VoucherAddCatalogues = { - __typename?: 'VoucherAddCatalogues' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Voucher of which catalogue IDs will be modified. */ - voucher?: Maybe - discountErrors: Array -} - /** Removes products, categories, collections from a voucher. */ export type VoucherRemoveCatalogues = { __typename?: 'VoucherRemoveCatalogues' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array /** Voucher of which catalogue IDs will be modified. */ voucher?: Maybe + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ discountErrors: Array + errors: Array +} + +export enum VoucherSortField { + /** Sort vouchers by code. */ + Code = 'CODE', + /** Sort vouchers by start date. */ + StartDate = 'START_DATE', + /** Sort vouchers by end date. */ + EndDate = 'END_DATE', + /** Sort vouchers by value. */ + Value = 'VALUE', + /** Sort vouchers by type. */ + Type = 'TYPE', + /** Sort vouchers by usage limit. */ + UsageLimit = 'USAGE_LIMIT', + /** Sort vouchers by minimum spent amount. */ + MinimumSpentAmount = 'MINIMUM_SPENT_AMOUNT', +} + +export type VoucherSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection + /** Specifies the channel in which to sort the data. */ + channel?: Maybe + /** Sort vouchers by the selected field. */ + field: VoucherSortField +} + +export type VoucherTranslatableContent = Node & { + __typename?: 'VoucherTranslatableContent' + /** The ID of the object. */ + id: Scalars['ID'] + name?: Maybe + /** Returns translated voucher fields for the given language code. */ + 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. */ + voucher?: Maybe +} + +export type VoucherTranslatableContentTranslationArgs = { + languageCode: LanguageCodeEnum } /** Creates/Updates translations for Voucher. */ export type VoucherTranslate = { __typename?: 'VoucherTranslate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ translationErrors: Array + errors: Array voucher?: Maybe } -/** Manage voucher's availability in channels. */ -export type VoucherChannelListingUpdate = { - __typename?: 'VoucherChannelListingUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** An updated voucher instance. */ - voucher?: Maybe - discountErrors: Array -} - -export type VoucherChannelListingInput = { - /** List of channels to which the voucher should be assigned. */ - addChannels?: Maybe> - /** List of channels from which the voucher should be unassigned. */ - removeChannels?: Maybe> -} - -export type VoucherChannelListingAddInput = { - /** ID of a channel. */ - channelId: Scalars['ID'] - /** Value of the voucher. */ - discountValue?: Maybe - /** Min purchase amount required to apply the voucher. */ - minAmountSpent?: Maybe -} - -/** Export products to csv file. */ -export type ExportProducts = { - __typename?: 'ExportProducts' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** The newly created export file job which is responsible for export data. */ - exportFile?: Maybe - exportErrors: Array -} - -export type ExportError = { - __typename?: 'ExportError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: ExportErrorCode -} - -/** An enumeration. */ -export enum ExportErrorCode { - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', -} - -export type ExportProductsInput = { - /** Determine which products should be exported. */ - scope: ExportScope - /** Filtering options for products. */ - filter?: Maybe - /** List of products IDS to export. */ - ids?: Maybe> - /** Input with info about fields which should be exported. */ - exportInfo?: Maybe - /** Type of exported file. */ - fileType: FileTypesEnum -} - -export enum ExportScope { - /** Export all products. */ - All = 'ALL', - /** Export products with given ids. */ - Ids = 'IDS', - /** Export the filtered products. */ - Filter = 'FILTER', -} - -export type ExportInfoInput = { - /** List of attribute ids witch should be exported. */ - attributes?: Maybe> - /** List of warehouse ids witch should be exported. */ - warehouses?: Maybe> - /** List of channels ids which should be exported. */ - channels?: Maybe> - /** List of product fields witch should be exported. */ - fields?: Maybe> -} - -export enum ProductFieldEnum { - Name = 'NAME', - Description = 'DESCRIPTION', - ProductType = 'PRODUCT_TYPE', - Category = 'CATEGORY', - Visible = 'VISIBLE', - ProductWeight = 'PRODUCT_WEIGHT', - Collections = 'COLLECTIONS', - ChargeTaxes = 'CHARGE_TAXES', - ProductMedia = 'PRODUCT_MEDIA', - VariantSku = 'VARIANT_SKU', - VariantWeight = 'VARIANT_WEIGHT', - VariantMedia = 'VARIANT_MEDIA', -} - -/** An enumeration. */ -export enum FileTypesEnum { - Csv = 'CSV', - Xlsx = '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 */ -export type FileUpload = { - __typename?: 'FileUpload' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - uploadedFile?: Maybe - uploadErrors: Array -} - -export type UploadError = { - __typename?: 'UploadError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: UploadErrorCode -} - -/** An enumeration. */ -export enum UploadErrorCode { - GraphqlError = 'GRAPHQL_ERROR', -} - -/** Adds a gift card or a voucher to a checkout. */ -export type CheckoutAddPromoCode = { - __typename?: 'CheckoutAddPromoCode' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** The checkout with the added gift card or voucher. */ - checkout?: Maybe - checkoutErrors: Array -} - -export type CheckoutError = { - __typename?: 'CheckoutError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: CheckoutErrorCode - /** List of varint IDs which causes the error. */ - variants?: Maybe> -} - -/** An enumeration. */ -export enum CheckoutErrorCode { - BillingAddressNotSet = 'BILLING_ADDRESS_NOT_SET', - CheckoutNotFullyPaid = 'CHECKOUT_NOT_FULLY_PAID', - GraphqlError = 'GRAPHQL_ERROR', - ProductNotPublished = 'PRODUCT_NOT_PUBLISHED', - ProductUnavailableForPurchase = 'PRODUCT_UNAVAILABLE_FOR_PURCHASE', - InsufficientStock = 'INSUFFICIENT_STOCK', - Invalid = 'INVALID', - InvalidShippingMethod = 'INVALID_SHIPPING_METHOD', - NotFound = 'NOT_FOUND', - PaymentError = 'PAYMENT_ERROR', - QuantityGreaterThanLimit = 'QUANTITY_GREATER_THAN_LIMIT', - Required = 'REQUIRED', - ShippingAddressNotSet = 'SHIPPING_ADDRESS_NOT_SET', - ShippingMethodNotApplicable = 'SHIPPING_METHOD_NOT_APPLICABLE', - ShippingMethodNotSet = 'SHIPPING_METHOD_NOT_SET', - ShippingNotRequired = 'SHIPPING_NOT_REQUIRED', - TaxError = 'TAX_ERROR', - Unique = 'UNIQUE', - VoucherNotApplicable = 'VOUCHER_NOT_APPLICABLE', - ZeroQuantity = 'ZERO_QUANTITY', - MissingChannelSlug = 'MISSING_CHANNEL_SLUG', - ChannelInactive = 'CHANNEL_INACTIVE', - UnavailableVariantInChannel = 'UNAVAILABLE_VARIANT_IN_CHANNEL', -} - -/** Update billing address in the existing checkout. */ -export type CheckoutBillingAddressUpdate = { - __typename?: 'CheckoutBillingAddressUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** An updated checkout. */ - checkout?: Maybe - checkoutErrors: Array -} - -/** Completes the checkout. As a result a new order is created and a payment charge is made. This action requires a successful payment before it can be performed. In case additional confirmation step as 3D secure is required confirmationNeeded flag will be set to True and no order created until payment is confirmed with second call of this mutation. */ -export type CheckoutComplete = { - __typename?: 'CheckoutComplete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Placed order. */ - order?: Maybe - /** Set to true if payment needs to be confirmed before checkout is complete. */ - confirmationNeeded: Scalars['Boolean'] - /** Confirmation data used to process additional authorization steps. */ - confirmationData?: Maybe - checkoutErrors: Array -} - -/** Create a new checkout. */ -export type CheckoutCreate = { - __typename?: 'CheckoutCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Whether the checkout was created or the current active one was returned. Refer to checkoutLinesAdd and checkoutLinesUpdate to merge a cart with an active checkout. */ - created?: Maybe - checkoutErrors: Array - checkout?: Maybe -} - -export type CheckoutCreateInput = { - /** Slug of a channel in which to create a checkout. */ - channel?: Maybe - /** A list of checkout lines, each containing information about an item in the checkout. */ - lines: Array> - /** The customer's email address. */ - email?: Maybe - /** The mailing address to where the checkout will be shipped. Note: the address will be ignored if the checkout doesn't contain shippable items. */ - shippingAddress?: Maybe - /** Billing address of the customer. */ - billingAddress?: Maybe - /** Checkout language code. */ - languageCode?: Maybe -} - -export type CheckoutLineInput = { - /** The number of items purchased. */ - quantity: Scalars['Int'] - /** ID of the product variant. */ - variantId: Scalars['ID'] -} - -/** Sets the customer as the owner of the checkout. */ -export type CheckoutCustomerAttach = { - __typename?: 'CheckoutCustomerAttach' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** An updated checkout. */ - checkout?: Maybe - checkoutErrors: Array -} - -/** Removes the user assigned as the owner of the checkout. */ -export type CheckoutCustomerDetach = { - __typename?: 'CheckoutCustomerDetach' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** An updated checkout. */ - checkout?: Maybe - checkoutErrors: Array -} - -/** Updates email address in the existing checkout object. */ -export type CheckoutEmailUpdate = { - __typename?: 'CheckoutEmailUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** An updated checkout. */ - checkout?: Maybe - checkoutErrors: Array -} - -/** Deletes a CheckoutLine. */ -export type CheckoutLineDelete = { - __typename?: 'CheckoutLineDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** An updated checkout. */ - checkout?: Maybe - checkoutErrors: Array -} - -/** Adds a checkout line to the existing checkout. */ -export type CheckoutLinesAdd = { - __typename?: 'CheckoutLinesAdd' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** An updated checkout. */ - checkout?: Maybe - checkoutErrors: Array -} - -/** Updates checkout line in the existing checkout. */ -export type CheckoutLinesUpdate = { - __typename?: 'CheckoutLinesUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** An updated checkout. */ - checkout?: Maybe - checkoutErrors: Array -} - -/** Remove a gift card or a voucher from a checkout. */ -export type CheckoutRemovePromoCode = { - __typename?: 'CheckoutRemovePromoCode' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** The checkout with the removed gift card or voucher. */ - checkout?: Maybe - checkoutErrors: Array -} - -/** Create a new payment for given checkout. */ -export type CheckoutPaymentCreate = { - __typename?: 'CheckoutPaymentCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Related checkout object. */ - checkout?: Maybe - /** A newly created payment. */ - payment?: Maybe - paymentErrors: Array -} - -export type PaymentInput = { - /** A gateway to use with that payment. */ - gateway: Scalars['String'] - /** Client-side generated payment token, representing customer's billing data in a secure manner. */ - token?: Maybe - /** Total amount of the transaction, including all taxes and discounts. If no amount is provided, the checkout total will be used. */ - amount?: Maybe - /** URL of a storefront view where user should be redirected after requiring additional actions. Payment with additional actions will not be finished if this field is not provided. */ - returnUrl?: Maybe -} - -/** Update shipping address in the existing checkout. */ -export type CheckoutShippingAddressUpdate = { - __typename?: 'CheckoutShippingAddressUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** An updated checkout. */ - checkout?: Maybe - checkoutErrors: Array -} - -/** Updates the shipping address of the checkout. */ -export type CheckoutShippingMethodUpdate = { - __typename?: 'CheckoutShippingMethodUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** An updated checkout. */ - checkout?: Maybe - checkoutErrors: Array -} - -/** Update language code in the existing checkout. */ -export type CheckoutLanguageCodeUpdate = { - __typename?: 'CheckoutLanguageCodeUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** An updated checkout. */ - checkout?: Maybe - checkoutErrors: Array -} - -/** Creates new channel. */ -export type ChannelCreate = { - __typename?: 'ChannelCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - channelErrors: Array - channel?: Maybe -} - -export type ChannelError = { - __typename?: 'ChannelError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: ChannelErrorCode - /** List of shipping zone IDs which causes the error. */ - shippingZones?: Maybe> -} - -/** An enumeration. */ -export enum ChannelErrorCode { - AlreadyExists = 'ALREADY_EXISTS', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', - ChannelTargetIdMustBeDifferent = 'CHANNEL_TARGET_ID_MUST_BE_DIFFERENT', - ChannelsCurrencyMustBeTheSame = 'CHANNELS_CURRENCY_MUST_BE_THE_SAME', - ChannelWithOrders = 'CHANNEL_WITH_ORDERS', - DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', -} - -export type ChannelCreateInput = { - /** isActive flag. */ - isActive?: Maybe - /** Name of the channel. */ - name: Scalars['String'] - /** Slug of the channel. */ - slug: Scalars['String'] - /** Currency of the channel. */ - currencyCode: Scalars['String'] - /** List of shipping zones to assign to the channel. */ - addShippingZones?: Maybe> -} - -/** Update a channel. */ -export type ChannelUpdate = { - __typename?: 'ChannelUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - channelErrors: Array - channel?: Maybe -} - -export type ChannelUpdateInput = { - /** isActive flag. */ - isActive?: Maybe - /** Name of the channel. */ +export type VoucherTranslation = Node & { + __typename?: 'VoucherTranslation' + /** The ID of the object. */ + id: Scalars['ID'] name?: Maybe - /** Slug of the channel. */ - slug?: Maybe - /** List of shipping zones to assign to the channel. */ - addShippingZones?: Maybe> - /** List of shipping zones to unassign from the channel. */ - removeShippingZones?: Maybe> + /** Translation language. */ + language: LanguageDisplay } -/** Delete a channel. Orders associated with the deleted channel will be moved to the target channel. Checkouts, product availability, and pricing will be removed. */ -export type ChannelDelete = { - __typename?: 'ChannelDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - channelErrors: Array - channel?: Maybe -} - -export type ChannelDeleteInput = { - /** ID of channel to migrate orders from origin channel. */ - targetChannel: Scalars['ID'] -} - -/** Activate a channel. */ -export type ChannelActivate = { - __typename?: 'ChannelActivate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Activated channel. */ - channel?: Maybe - channelErrors: Array -} - -/** Deactivate a channel. */ -export type ChannelDeactivate = { - __typename?: 'ChannelDeactivate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Deactivated channel. */ - channel?: Maybe - channelErrors: Array -} - -/** Creates an attribute. */ -export type AttributeCreate = { - __typename?: 'AttributeCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - attribute?: Maybe - attributeErrors: Array -} - -export type AttributeError = { - __typename?: 'AttributeError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: AttributeErrorCode -} - -/** An enumeration. */ -export enum AttributeErrorCode { - AlreadyExists = 'ALREADY_EXISTS', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', -} - -export type AttributeCreateInput = { - /** The input type to use for entering attribute values in the dashboard. */ - inputType?: Maybe - /** The entity type which can be used as a reference. */ - entityType?: Maybe - /** Name of an attribute displayed in the interface. */ - name: Scalars['String'] - /** Internal representation of an attribute name. */ - slug?: Maybe - /** The attribute type. */ - type: AttributeTypeEnum - /** List of attribute's values. */ - values?: Maybe>> - /** Whether the attribute requires values to be passed or not. */ - valueRequired?: Maybe - /** Whether the attribute is for variants only. */ - isVariantOnly?: Maybe - /** Whether the attribute should be visible or not in storefront. */ - visibleInStorefront?: Maybe - /** Whether the attribute can be filtered in storefront. */ - filterableInStorefront?: Maybe - /** Whether the attribute can be filtered in dashboard. */ - filterableInDashboard?: Maybe - /** The position of the attribute in the storefront navigation (0 by default). */ - storefrontSearchPosition?: Maybe - /** Whether the attribute can be displayed in the admin product list. */ - availableInGrid?: Maybe -} - -export type AttributeValueCreateInput = { - /** Name of a value displayed in the interface. */ - name: Scalars['String'] - /** Represents the value of the attribute value. */ - value?: Maybe - /** Represents the text (JSON) of the attribute value. */ - richText?: Maybe -} - -/** Deletes an attribute. */ -export type AttributeDelete = { - __typename?: 'AttributeDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - attributeErrors: Array - attribute?: Maybe -} - -/** Updates attribute. */ -export type AttributeUpdate = { - __typename?: 'AttributeUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - attribute?: Maybe - attributeErrors: Array -} - -export type AttributeUpdateInput = { - /** Name of an attribute displayed in the interface. */ - name?: Maybe - /** Internal representation of an attribute name. */ - slug?: Maybe - /** IDs of values to be removed from this attribute. */ - removeValues?: Maybe>> - /** New values to be created for this attribute. */ - addValues?: Maybe>> - /** Whether the attribute requires values to be passed or not. */ - valueRequired?: Maybe - /** Whether the attribute is for variants only. */ - isVariantOnly?: Maybe - /** Whether the attribute should be visible or not in storefront. */ - visibleInStorefront?: Maybe - /** Whether the attribute can be filtered in storefront. */ - filterableInStorefront?: Maybe - /** Whether the attribute can be filtered in dashboard. */ - filterableInDashboard?: Maybe - /** The position of the attribute in the storefront navigation (0 by default). */ - storefrontSearchPosition?: Maybe - /** Whether the attribute can be displayed in the admin product list. */ - availableInGrid?: Maybe -} - -/** Creates/Updates translations for attribute. */ -export type AttributeTranslate = { - __typename?: 'AttributeTranslate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - translationErrors: Array - attribute?: Maybe -} - -/** Deletes attributes. */ -export type AttributeBulkDelete = { - __typename?: 'AttributeBulkDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - attributeErrors: Array -} - -/** Deletes values of attributes. */ -export type AttributeValueBulkDelete = { - __typename?: 'AttributeValueBulkDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - attributeErrors: Array -} - -/** Creates a value for an attribute. */ -export type AttributeValueCreate = { - __typename?: 'AttributeValueCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** The updated attribute. */ - attribute?: Maybe - attributeErrors: Array - attributeValue?: Maybe -} - -/** Deletes a value of an attribute. */ -export type AttributeValueDelete = { - __typename?: 'AttributeValueDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** The updated attribute. */ - attribute?: Maybe - attributeErrors: Array - attributeValue?: Maybe -} - -/** Updates value of an attribute. */ -export type AttributeValueUpdate = { - __typename?: 'AttributeValueUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** The updated attribute. */ - attribute?: Maybe - attributeErrors: Array - attributeValue?: Maybe -} - -/** Creates/Updates translations for attribute value. */ -export type AttributeValueTranslate = { - __typename?: 'AttributeValueTranslate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - translationErrors: Array - attributeValue?: Maybe -} - -export type AttributeValueTranslationInput = { - name?: Maybe - richText?: Maybe -} - -/** Reorder the values of an attribute. */ -export type AttributeReorderValues = { - __typename?: 'AttributeReorderValues' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Attribute from which values are reordered. */ - attribute?: Maybe - attributeErrors: Array -} - -/** Creates a new app. */ -export type AppCreate = { - __typename?: 'AppCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** The newly created authentication token. */ - authToken?: Maybe - appErrors: Array - app?: Maybe -} - -export type AppError = { - __typename?: 'AppError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: AppErrorCode - /** List of permissions which causes the error. */ - permissions?: Maybe> -} - -/** An enumeration. */ -export enum AppErrorCode { - Forbidden = 'FORBIDDEN', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - InvalidStatus = 'INVALID_STATUS', - InvalidPermission = 'INVALID_PERMISSION', - InvalidUrlFormat = 'INVALID_URL_FORMAT', - InvalidManifestFormat = 'INVALID_MANIFEST_FORMAT', - ManifestUrlCantConnect = 'MANIFEST_URL_CANT_CONNECT', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', - OutOfScopeApp = 'OUT_OF_SCOPE_APP', - OutOfScopePermission = 'OUT_OF_SCOPE_PERMISSION', -} - -export type AppInput = { - /** Name of the app. */ - name?: Maybe - /** DEPRECATED: Use the `appActivate` and `appDeactivate` mutations instead. This field will be removed after 2020-07-31. */ - isActive?: Maybe - /** List of permission code names to assign to this app. */ - permissions?: Maybe>> -} - -/** Updates an existing app. */ -export type AppUpdate = { - __typename?: 'AppUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - appErrors: Array - app?: Maybe -} - -/** Deletes an app. */ -export type AppDelete = { - __typename?: 'AppDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - appErrors: Array - app?: Maybe -} - -/** Creates a new token. */ -export type AppTokenCreate = { - __typename?: 'AppTokenCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** The newly created authentication token. */ - authToken?: Maybe - appErrors: Array - appToken?: Maybe -} - -export type AppTokenInput = { - /** Name of the token. */ - name?: Maybe - /** ID of app. */ - app: Scalars['ID'] -} - -/** Deletes an authentication token assigned to app. */ -export type AppTokenDelete = { - __typename?: 'AppTokenDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - appErrors: Array - appToken?: Maybe -} - -/** Verify provided app token. */ -export type AppTokenVerify = { - __typename?: 'AppTokenVerify' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Determine if token is valid or not. */ - valid: Scalars['Boolean'] - appErrors: Array -} - -/** Install new app by using app manifest. */ -export type AppInstall = { - __typename?: 'AppInstall' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - appErrors: Array - appInstallation?: Maybe -} - -export type AppInstallInput = { - /** Name of the app to install. */ - appName?: Maybe - /** Url to app's manifest in JSON format. */ - manifestUrl?: Maybe - /** Determine if app will be set active or not. */ - activateAfterInstallation?: Maybe - /** List of permission code names to assign to this app. */ - permissions?: Maybe>> -} - -/** Retry failed installation of new app. */ -export type AppRetryInstall = { - __typename?: 'AppRetryInstall' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - appErrors: Array - appInstallation?: Maybe -} - -/** Delete failed installation. */ -export type AppDeleteFailedInstallation = { - __typename?: 'AppDeleteFailedInstallation' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - appErrors: Array - appInstallation?: Maybe -} - -/** Fetch and validate manifest. */ -export type AppFetchManifest = { - __typename?: 'AppFetchManifest' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - manifest?: Maybe - appErrors: Array -} - -/** The manifest definition. */ -export type Manifest = { - __typename?: 'Manifest' - identifier: Scalars['String'] - version: Scalars['String'] - name: Scalars['String'] - about?: Maybe - permissions?: Maybe>> - appUrl?: Maybe - configurationUrl?: Maybe - tokenTargetUrl?: Maybe - dataPrivacy?: Maybe - dataPrivacyUrl?: Maybe - homepageUrl?: Maybe - supportUrl?: Maybe -} - -/** Activate the app. */ -export type AppActivate = { - __typename?: 'AppActivate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - appErrors: Array - app?: Maybe -} - -/** Deactivate the app. */ -export type AppDeactivate = { - __typename?: 'AppDeactivate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - appErrors: Array - app?: Maybe -} - -/** Create JWT token. */ -export type CreateToken = { - __typename?: 'CreateToken' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** JWT token, required to authenticate. */ - token?: Maybe - /** JWT refresh token, required to re-generate access token. */ - refreshToken?: Maybe - /** CSRF token required to re-generate access token. */ - csrfToken?: Maybe - /** A user instance. */ - user?: Maybe - accountErrors: Array -} - -export type AccountError = { - __typename?: 'AccountError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: AccountErrorCode -} - -/** An enumeration. */ -export enum AccountErrorCode { - ActivateOwnAccount = 'ACTIVATE_OWN_ACCOUNT', - ActivateSuperuserAccount = 'ACTIVATE_SUPERUSER_ACCOUNT', - DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', - DeactivateOwnAccount = 'DEACTIVATE_OWN_ACCOUNT', - DeactivateSuperuserAccount = 'DEACTIVATE_SUPERUSER_ACCOUNT', - DeleteNonStaffUser = 'DELETE_NON_STAFF_USER', - DeleteOwnAccount = 'DELETE_OWN_ACCOUNT', - DeleteStaffAccount = 'DELETE_STAFF_ACCOUNT', - DeleteSuperuserAccount = 'DELETE_SUPERUSER_ACCOUNT', - GraphqlError = 'GRAPHQL_ERROR', - Inactive = 'INACTIVE', - Invalid = 'INVALID', - InvalidPassword = 'INVALID_PASSWORD', - LeftNotManageablePermission = 'LEFT_NOT_MANAGEABLE_PERMISSION', - InvalidCredentials = 'INVALID_CREDENTIALS', - NotFound = 'NOT_FOUND', - OutOfScopeUser = 'OUT_OF_SCOPE_USER', - OutOfScopeGroup = 'OUT_OF_SCOPE_GROUP', - OutOfScopePermission = 'OUT_OF_SCOPE_PERMISSION', - PasswordEntirelyNumeric = 'PASSWORD_ENTIRELY_NUMERIC', - PasswordTooCommon = 'PASSWORD_TOO_COMMON', - PasswordTooShort = 'PASSWORD_TOO_SHORT', - PasswordTooSimilar = 'PASSWORD_TOO_SIMILAR', - Required = 'REQUIRED', - Unique = 'UNIQUE', - JwtSignatureExpired = 'JWT_SIGNATURE_EXPIRED', - JwtInvalidToken = 'JWT_INVALID_TOKEN', - JwtDecodeError = 'JWT_DECODE_ERROR', - JwtMissingToken = 'JWT_MISSING_TOKEN', - JwtInvalidCsrfToken = 'JWT_INVALID_CSRF_TOKEN', -} - -/** 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 = { - __typename?: 'RefreshToken' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** JWT token, required to authenticate. */ - token?: Maybe - /** A user instance. */ - user?: Maybe - accountErrors: Array -} - -/** Verify JWT token. */ -export type VerifyToken = { - __typename?: 'VerifyToken' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** User assigned to token. */ - user?: Maybe - /** Determine if token is valid or not. */ - isValid: Scalars['Boolean'] - /** JWT payload. */ - payload?: Maybe - accountErrors: Array -} - -/** Deactivate all JWT tokens of the currently authenticated user. */ -export type DeactivateAllUserTokens = { - __typename?: 'DeactivateAllUserTokens' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - accountErrors: Array -} - -/** Prepare external authentication url for user by custom plugin. */ -export type ExternalAuthenticationUrl = { - __typename?: 'ExternalAuthenticationUrl' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** The data returned by authentication plugin. */ - authenticationData?: Maybe - accountErrors: Array -} - -/** Obtain external access tokens for user by custom plugin. */ -export type ExternalObtainAccessTokens = { - __typename?: 'ExternalObtainAccessTokens' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** The token, required to authenticate. */ - token?: Maybe - /** The refresh token, required to re-generate external access token. */ - refreshToken?: Maybe - /** CSRF token required to re-generate external access token. */ - csrfToken?: Maybe - /** A user instance. */ - user?: Maybe - accountErrors: Array -} - -/** Refresh user's access by custom plugin. */ -export type ExternalRefresh = { - __typename?: 'ExternalRefresh' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** The token, required to authenticate. */ - token?: Maybe - /** The refresh token, required to re-generate external access token. */ - refreshToken?: Maybe - /** CSRF token required to re-generate external access token. */ - csrfToken?: Maybe - /** A user instance. */ - user?: Maybe - accountErrors: Array -} - -/** Logout user by custom plugin. */ -export type ExternalLogout = { - __typename?: 'ExternalLogout' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** The data returned by authentication plugin. */ - logoutData?: Maybe - accountErrors: Array -} - -/** Verify external authentication data by plugin. */ -export type ExternalVerify = { - __typename?: 'ExternalVerify' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** User assigned to data. */ - user?: Maybe - /** Determine if authentication data is valid or not. */ - isValid: Scalars['Boolean'] - /** External data. */ - verifyData?: Maybe - accountErrors: Array -} - -/** Sends an email with the account password modification link. */ -export type RequestPasswordReset = { - __typename?: 'RequestPasswordReset' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - accountErrors: Array -} - -/** Confirm user account with token sent by email during registration. */ -export type ConfirmAccount = { - __typename?: 'ConfirmAccount' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** An activated user account. */ - user?: Maybe - accountErrors: Array -} - -/** Sets the user's password from the token sent by email using the RequestPasswordReset mutation. */ -export type SetPassword = { - __typename?: 'SetPassword' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** JWT token, required to authenticate. */ - token?: Maybe - /** JWT refresh token, required to re-generate access token. */ - refreshToken?: Maybe - /** CSRF token required to re-generate access token. */ - csrfToken?: Maybe - /** A user instance. */ - user?: Maybe - accountErrors: Array -} - -/** Change the password of the logged in user. */ -export type PasswordChange = { - __typename?: 'PasswordChange' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A user instance with a new password. */ - user?: Maybe - accountErrors: Array -} - -/** Request email change of the logged in user. */ -export type RequestEmailChange = { - __typename?: 'RequestEmailChange' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A user instance. */ - user?: Maybe - accountErrors: Array -} - -/** Confirm the email change of the logged-in user. */ -export type ConfirmEmailChange = { - __typename?: 'ConfirmEmailChange' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A user instance with a new email. */ - user?: Maybe - accountErrors: Array -} - -/** Create a new address for the customer. */ -export type AccountAddressCreate = { - __typename?: 'AccountAddressCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A user instance for which the address was created. */ - user?: Maybe - accountErrors: Array - address?: Maybe
-} - -/** An enumeration. */ -export enum AddressTypeEnum { - Billing = 'BILLING', +export enum VoucherTypeEnum { Shipping = 'SHIPPING', + EntireOrder = 'ENTIRE_ORDER', + SpecificProduct = 'SPECIFIC_PRODUCT', } -/** Updates an address of the logged-in user. */ -export type AccountAddressUpdate = { - __typename?: 'AccountAddressUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A user object for which the address was edited. */ - user?: Maybe - accountErrors: Array - address?: Maybe
+/** Updates a voucher. */ +export type VoucherUpdate = { + __typename?: 'VoucherUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + discountErrors: Array + errors: Array + voucher?: Maybe } -/** Delete an address of the logged-in user. */ -export type AccountAddressDelete = { - __typename?: 'AccountAddressDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A user instance for which the address was deleted. */ - user?: Maybe - accountErrors: Array - address?: Maybe
+/** Represents warehouse. */ +export type Warehouse = Node & + ObjectWithMetadata & { + __typename?: 'Warehouse' + /** The ID of the object. */ + id: Scalars['ID'] + name: Scalars['String'] + slug: Scalars['String'] + companyName: Scalars['String'] + shippingZones: ShippingZoneCountableConnection + address: Address + email: Scalars['String'] + /** List of private metadata items.Requires proper staff permissions to access. */ + privateMetadata: Array> + /** List of public metadata items. Can be accessed without permissions. */ + metadata: Array> + } + +/** Represents warehouse. */ +export type WarehouseShippingZonesArgs = { + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe } -/** Sets a default address for the authenticated user. */ -export type AccountSetDefaultAddress = { - __typename?: 'AccountSetDefaultAddress' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** An updated user instance. */ - user?: Maybe - accountErrors: Array +export type WarehouseAddressInput = { + /** Address. */ + streetAddress1: Scalars['String'] + /** Address. */ + streetAddress2?: Maybe + /** City. */ + city: Scalars['String'] + /** District. */ + cityArea?: Maybe + /** Postal code. */ + postalCode?: Maybe + /** Country. */ + country: CountryCode + /** State or province. */ + countryArea?: Maybe + /** Phone number. */ + phone?: Maybe } -/** Register a new user. */ -export type AccountRegister = { - __typename?: 'AccountRegister' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Informs whether users need to confirm their email address. */ - requiresConfirmation?: Maybe - accountErrors: Array - user?: Maybe +export type WarehouseCountableConnection = { + __typename?: 'WarehouseCountableConnection' + /** Pagination data for this connection. */ + pageInfo: PageInfo + edges: Array + /** A total count of items in the collection. */ + totalCount?: Maybe } -export type AccountRegisterInput = { - /** The email address of the user. */ - email: Scalars['String'] - /** Password. */ - password: Scalars['String'] - /** Base of frontend URL that will be needed to create confirmation URL. */ - redirectUrl?: Maybe - /** User language code. */ - languageCode?: Maybe - /** User public metadata. */ - metadata?: Maybe> +export type WarehouseCountableEdge = { + __typename?: 'WarehouseCountableEdge' + /** The item at the end of the edge. */ + node: Warehouse + /** A cursor for use in pagination. */ + cursor: Scalars['String'] } -/** Updates the account of the logged-in user. */ -export type AccountUpdate = { - __typename?: 'AccountUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - accountErrors: Array - user?: Maybe +/** Creates new warehouse. */ +export type WarehouseCreate = { + __typename?: 'WarehouseCreate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + warehouseErrors: Array + errors: Array + warehouse?: Maybe } -export type AccountInput = { - /** Given name. */ - firstName?: Maybe - /** Family name. */ - lastName?: Maybe - /** Billing address of the customer. */ - defaultBillingAddress?: Maybe - /** Shipping address of the customer. */ - defaultShippingAddress?: Maybe - /** User language code. */ - languageCode?: Maybe -} - -/** Sends an email with the account removal link for the logged-in user. */ -export type AccountRequestDeletion = { - __typename?: 'AccountRequestDeletion' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - accountErrors: Array -} - -/** Remove user account. */ -export type AccountDelete = { - __typename?: 'AccountDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - accountErrors: Array - user?: Maybe -} - -/** Creates user address. */ -export type AddressCreate = { - __typename?: 'AddressCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A user instance for which the address was created. */ - user?: Maybe - accountErrors: Array - address?: Maybe
-} - -/** Updates an address. */ -export type AddressUpdate = { - __typename?: 'AddressUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A user object for which the address was edited. */ - user?: Maybe - accountErrors: Array - address?: Maybe
-} - -/** Deletes an address. */ -export type AddressDelete = { - __typename?: 'AddressDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** A user instance for which the address was deleted. */ - user?: Maybe - accountErrors: Array - address?: Maybe
-} - -/** Sets a default address for the given user. */ -export type AddressSetDefault = { - __typename?: 'AddressSetDefault' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** An updated user instance. */ - user?: Maybe - accountErrors: Array -} - -/** Creates a new customer. */ -export type CustomerCreate = { - __typename?: 'CustomerCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - accountErrors: Array - user?: Maybe -} - -export type UserCreateInput = { - /** Billing address of the customer. */ - defaultBillingAddress?: Maybe - /** Shipping address of the customer. */ - defaultShippingAddress?: Maybe - /** Given name. */ - firstName?: Maybe - /** Family name. */ - lastName?: Maybe - /** The unique email address of the user. */ +export type WarehouseCreateInput = { + /** Warehouse slug. */ + slug?: Maybe + /** Company name. */ + companyName?: Maybe + /** The email address of the warehouse. */ email?: Maybe - /** User account is active. */ - isActive?: Maybe - /** A note about the user. */ - note?: Maybe - /** User language code. */ - languageCode?: Maybe - /** URL of a view where users should be redirected to set the password. URL in RFC 1808 format. */ - redirectUrl?: Maybe + /** Warehouse name. */ + name: Scalars['String'] + /** Address of the warehouse. */ + address: WarehouseAddressInput + /** Shipping zones supported by the warehouse. */ + shippingZones?: Maybe>> } -/** Updates an existing customer. */ -export type CustomerUpdate = { - __typename?: 'CustomerUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - accountErrors: Array - user?: Maybe +/** Deletes selected warehouse. */ +export type WarehouseDelete = { + __typename?: 'WarehouseDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + warehouseErrors: Array + errors: Array + warehouse?: Maybe } -export type CustomerInput = { - /** Billing address of the customer. */ - defaultBillingAddress?: Maybe - /** Shipping address of the customer. */ - defaultShippingAddress?: Maybe - /** Given name. */ - firstName?: Maybe - /** Family name. */ - lastName?: Maybe - /** The unique email address of the user. */ - email?: Maybe - /** User account is active. */ - isActive?: Maybe - /** A note about the user. */ - note?: Maybe - /** User language code. */ - languageCode?: Maybe -} - -/** Deletes a customer. */ -export type CustomerDelete = { - __typename?: 'CustomerDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - accountErrors: Array - user?: Maybe -} - -/** Deletes customers. */ -export type CustomerBulkDelete = { - __typename?: 'CustomerBulkDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - accountErrors: Array -} - -/** Creates a new staff user. */ -export type StaffCreate = { - __typename?: 'StaffCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - staffErrors: Array - user?: Maybe -} - -export type StaffError = { - __typename?: 'StaffError' +export type WarehouseError = { + __typename?: 'WarehouseError' /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ field?: Maybe /** The error message. */ message?: Maybe /** The error code. */ - code: AccountErrorCode - /** List of permissions which causes the error. */ - permissions?: Maybe> - /** List of permission group IDs which cause the error. */ - groups?: Maybe> - /** List of user IDs which causes the error. */ - users?: Maybe> -} - -export type StaffCreateInput = { - /** Given name. */ - firstName?: Maybe - /** Family name. */ - lastName?: Maybe - /** The unique email address of the user. */ - email?: Maybe - /** User account is active. */ - isActive?: Maybe - /** A note about the user. */ - note?: Maybe - /** List of permission group IDs to which user should be assigned. */ - addGroups?: Maybe> - /** URL of a view where users should be redirected to set the password. URL in RFC 1808 format. */ - redirectUrl?: Maybe -} - -/** Updates an existing staff user. */ -export type StaffUpdate = { - __typename?: 'StaffUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - staffErrors: Array - user?: Maybe -} - -export type StaffUpdateInput = { - /** Given name. */ - firstName?: Maybe - /** Family name. */ - lastName?: Maybe - /** The unique email address of the user. */ - email?: Maybe - /** User account is active. */ - isActive?: Maybe - /** A note about the user. */ - note?: Maybe - /** List of permission group IDs to which user should be assigned. */ - addGroups?: Maybe> - /** List of permission group IDs from which user should be unassigned. */ - removeGroups?: Maybe> -} - -/** Deletes a staff user. */ -export type StaffDelete = { - __typename?: 'StaffDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - staffErrors: Array - user?: Maybe -} - -/** Deletes staff users. */ -export type StaffBulkDelete = { - __typename?: 'StaffBulkDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - staffErrors: Array -} - -/** 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 */ -export type UserAvatarUpdate = { - __typename?: 'UserAvatarUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** An updated user instance. */ - user?: Maybe - accountErrors: Array -} - -/** Deletes a user avatar. Only for staff members. */ -export type UserAvatarDelete = { - __typename?: 'UserAvatarDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** An updated user instance. */ - user?: Maybe - accountErrors: Array -} - -/** Activate or deactivate users. */ -export type UserBulkSetActive = { - __typename?: 'UserBulkSetActive' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - /** Returns how many objects were affected. */ - count: Scalars['Int'] - accountErrors: Array -} - -/** Create new permission group. */ -export type PermissionGroupCreate = { - __typename?: 'PermissionGroupCreate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - permissionGroupErrors: Array - group?: Maybe -} - -export type PermissionGroupError = { - __typename?: 'PermissionGroupError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: PermissionGroupErrorCode - /** List of permissions which causes the error. */ - permissions?: Maybe> - /** List of user IDs which causes the error. */ - users?: Maybe> + code: WarehouseErrorCode } /** An enumeration. */ -export enum PermissionGroupErrorCode { - AssignNonStaffMember = 'ASSIGN_NON_STAFF_MEMBER', - DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', - CannotRemoveFromLastGroup = 'CANNOT_REMOVE_FROM_LAST_GROUP', - LeftNotManageablePermission = 'LEFT_NOT_MANAGEABLE_PERMISSION', - OutOfScopePermission = 'OUT_OF_SCOPE_PERMISSION', - OutOfScopeUser = 'OUT_OF_SCOPE_USER', +export enum WarehouseErrorCode { + AlreadyExists = 'ALREADY_EXISTS', + GraphqlError = 'GRAPHQL_ERROR', + Invalid = 'INVALID', + NotFound = 'NOT_FOUND', Required = 'REQUIRED', Unique = 'UNIQUE', } -export type PermissionGroupCreateInput = { - /** List of permission code names to assign to this group. */ - addPermissions?: Maybe> - /** List of users to assign to this group. */ - addUsers?: Maybe> - /** Group name. */ +export type WarehouseFilterInput = { + search?: Maybe + ids?: Maybe>> +} + +/** Add shipping zone to given warehouse. */ +export type WarehouseShippingZoneAssign = { + __typename?: 'WarehouseShippingZoneAssign' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + warehouseErrors: Array + errors: Array + warehouse?: Maybe +} + +/** Remove shipping zone from given warehouse. */ +export type WarehouseShippingZoneUnassign = { + __typename?: 'WarehouseShippingZoneUnassign' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + warehouseErrors: Array + errors: Array + warehouse?: Maybe +} + +export enum WarehouseSortField { + /** Sort warehouses by name. */ + Name = 'NAME', +} + +export type WarehouseSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection + /** Sort warehouses by the selected field. */ + field: WarehouseSortField +} + +/** Updates given warehouse. */ +export type WarehouseUpdate = { + __typename?: 'WarehouseUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + warehouseErrors: Array + errors: Array + warehouse?: Maybe +} + +export type WarehouseUpdateInput = { + /** Warehouse slug. */ + slug?: Maybe + /** Company name. */ + companyName?: Maybe + /** The email address of the warehouse. */ + email?: Maybe + /** Warehouse name. */ + name?: Maybe + /** Address of the warehouse. */ + address?: Maybe +} + +/** Webhook. */ +export type Webhook = Node & { + __typename?: 'Webhook' + name: Scalars['String'] + targetUrl: Scalars['String'] + isActive: Scalars['Boolean'] + secretKey?: Maybe + /** The ID of the object. */ + id: Scalars['ID'] + /** List of webhook events. */ + events: Array + app: App +} + +/** Creates a new webhook subscription. */ +export type WebhookCreate = { + __typename?: 'WebhookCreate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + webhookErrors: Array + errors: Array + webhook?: Maybe +} + +export type WebhookCreateInput = { + /** The name of the webhook. */ + name?: Maybe + /** The url to receive the payload. */ + targetUrl?: Maybe + /** The events that webhook wants to subscribe. */ + events?: Maybe>> + /** ID of the app to which webhook belongs. */ + app?: Maybe + /** Determine if webhook will be set active or not. */ + isActive?: Maybe + /** The secret key used to create a hash signature with each payload. */ + secretKey?: Maybe +} + +/** Deletes a webhook subscription. */ +export type WebhookDelete = { + __typename?: 'WebhookDelete' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + webhookErrors: Array + errors: Array + webhook?: Maybe +} + +export type WebhookError = { + __typename?: 'WebhookError' + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe + /** The error message. */ + message?: Maybe + /** The error code. */ + code: WebhookErrorCode +} + +/** An enumeration. */ +export enum WebhookErrorCode { + GraphqlError = 'GRAPHQL_ERROR', + Invalid = 'INVALID', + NotFound = 'NOT_FOUND', + Required = 'REQUIRED', + Unique = 'UNIQUE', +} + +/** Webhook event. */ +export type WebhookEvent = { + __typename?: 'WebhookEvent' + /** Internal name of the event type. */ + eventType: WebhookEventTypeEnum + /** Display name of the event. */ name: Scalars['String'] } -/** Update permission group. */ -export type PermissionGroupUpdate = { - __typename?: 'PermissionGroupUpdate' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - permissionGroupErrors: Array - group?: Maybe +/** Enum determining type of webhook. */ +export enum WebhookEventTypeEnum { + /** All the events. */ + AnyEvents = 'ANY_EVENTS', + /** A new order is placed. */ + OrderCreated = 'ORDER_CREATED', + /** 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. */ + OrderConfirmed = 'ORDER_CONFIRMED', + /** Payment is made and an order is fully paid. */ + OrderFullyPaid = 'ORDER_FULLY_PAID', + /** An order is updated; triggered for all changes related to an order; covers all other order webhooks, except for ORDER_CREATED. */ + OrderUpdated = 'ORDER_UPDATED', + /** An order is cancelled. */ + OrderCancelled = 'ORDER_CANCELLED', + /** An order is fulfilled. */ + OrderFulfilled = 'ORDER_FULFILLED', + /** An invoice for order requested. */ + InvoiceRequested = 'INVOICE_REQUESTED', + /** An invoice is deleted. */ + InvoiceDeleted = 'INVOICE_DELETED', + /** Invoice has been sent. */ + InvoiceSent = 'INVOICE_SENT', + /** A new customer account is created. */ + CustomerCreated = 'CUSTOMER_CREATED', + /** A customer account is updated. */ + CustomerUpdated = 'CUSTOMER_UPDATED', + /** A new product is created. */ + ProductCreated = 'PRODUCT_CREATED', + /** A product is updated. */ + ProductUpdated = 'PRODUCT_UPDATED', + /** A product is deleted. */ + ProductDeleted = 'PRODUCT_DELETED', + /** A new product variant is created. */ + ProductVariantCreated = 'PRODUCT_VARIANT_CREATED', + /** A product variant is updated. */ + ProductVariantUpdated = 'PRODUCT_VARIANT_UPDATED', + /** A product variant is deleted. */ + ProductVariantDeleted = 'PRODUCT_VARIANT_DELETED', + /** A new checkout is created. */ + CheckoutCreated = 'CHECKOUT_CREATED', + /** A checkout is updated. It also triggers all updates related to the checkout. */ + CheckoutUpdated = 'CHECKOUT_UPDATED', + /** A new fulfillment is created. */ + FulfillmentCreated = 'FULFILLMENT_CREATED', + /** User notification triggered. */ + NotifyUser = 'NOTIFY_USER', + /** A new page is created. */ + PageCreated = 'PAGE_CREATED', + /** A page is updated. */ + PageUpdated = 'PAGE_UPDATED', + /** A page is deleted. */ + PageDeleted = 'PAGE_DELETED', } -export type PermissionGroupUpdateInput = { - /** List of permission code names to assign to this group. */ - addPermissions?: Maybe> - /** List of users to assign to this group. */ - addUsers?: Maybe> - /** Group name. */ +/** An enumeration. */ +export enum WebhookSampleEventTypeEnum { + OrderCreated = 'ORDER_CREATED', + OrderConfirmed = 'ORDER_CONFIRMED', + OrderFullyPaid = 'ORDER_FULLY_PAID', + OrderUpdated = 'ORDER_UPDATED', + OrderCancelled = 'ORDER_CANCELLED', + OrderFulfilled = 'ORDER_FULFILLED', + InvoiceRequested = 'INVOICE_REQUESTED', + InvoiceDeleted = 'INVOICE_DELETED', + InvoiceSent = 'INVOICE_SENT', + CustomerCreated = 'CUSTOMER_CREATED', + CustomerUpdated = 'CUSTOMER_UPDATED', + ProductCreated = 'PRODUCT_CREATED', + ProductUpdated = 'PRODUCT_UPDATED', + ProductDeleted = 'PRODUCT_DELETED', + ProductVariantCreated = 'PRODUCT_VARIANT_CREATED', + ProductVariantUpdated = 'PRODUCT_VARIANT_UPDATED', + ProductVariantDeleted = 'PRODUCT_VARIANT_DELETED', + CheckoutCreated = 'CHECKOUT_CREATED', + CheckoutUpdated = 'CHECKOUT_UPDATED', + FulfillmentCreated = 'FULFILLMENT_CREATED', + NotifyUser = 'NOTIFY_USER', + PageCreated = 'PAGE_CREATED', + PageUpdated = 'PAGE_UPDATED', + PageDeleted = 'PAGE_DELETED', +} + +/** Updates a webhook subscription. */ +export type WebhookUpdate = { + __typename?: 'WebhookUpdate' + /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ + webhookErrors: Array + errors: Array + webhook?: Maybe +} + +export type WebhookUpdateInput = { + /** The new name of the webhook. */ name?: Maybe - /** List of permission code names to unassign from this group. */ - removePermissions?: Maybe> - /** List of users to unassign from this group. */ - removeUsers?: Maybe> + /** The url to receive the payload. */ + targetUrl?: Maybe + /** The events that webhook wants to subscribe. */ + events?: Maybe>> + /** ID of the app to which webhook belongs. */ + app?: Maybe + /** Determine if webhook will be set active or not. */ + isActive?: Maybe + /** Use to create a hash signature with each payload. */ + secretKey?: Maybe } -/** Delete permission group. */ -export type PermissionGroupDelete = { - __typename?: 'PermissionGroupDelete' - /** - * List of errors that occurred executing the mutation. - * @deprecated Use typed errors with error codes. This field will be removed after 2020-07-31. - */ - errors: Array - permissionGroupErrors: Array - group?: Maybe +/** Represents weight value in a specific weight unit. */ +export type Weight = { + __typename?: 'Weight' + /** Weight unit. */ + unit: WeightUnitsEnum + /** Weight value. */ + value: Scalars['Float'] +} + +/** An enumeration. */ +export enum WeightUnitsEnum { + Kg = 'KG', + Lb = 'LB', + Oz = 'OZ', + G = 'G', +} + +export type _Entity = + | Address + | User + | Group + | App + | ProductVariant + | Product + | ProductType + | Collection + | Category + | ProductMedia + | ProductImage + | PageType + +export type _Service = { + __typename?: '_Service' + sdl?: Maybe } export type GetAllProductPathsQueryVariables = Exact<{ @@ -12171,6 +11349,7 @@ export type ProductConnnectionFragment = { export type GetAllProductsQueryVariables = Exact<{ first?: Maybe + filter?: Maybe channel?: Maybe }> diff --git a/framework/saleor/schema.graphql b/framework/saleor/schema.graphql index f111333e9..aef45dd46 100644 --- a/framework/saleor/schema.graphql +++ b/framework/saleor/schema.graphql @@ -1,1752 +1,425 @@ -type Query { - """ - Look up a webhook by ID. - """ - webhook( - """ - ID of the webhook. - """ - id: ID! - ): Webhook - - """ - List of all available webhook events. - """ - webhookEvents: [WebhookEvent] - - """ - Retrieve a sample payload for a given webhook event based on real data. It can be useful for some integrations where sample payload is required. - """ - webhookSamplePayload( - """ - Name of the requested event type. - """ - eventType: WebhookSampleEventTypeEnum! - ): JSONString - - """ - Look up a warehouse by ID. - """ - warehouse( - """ - ID of an warehouse - """ - id: ID! - ): Warehouse - - """ - List of warehouses. - """ - warehouses( - filter: WarehouseFilterInput - sortBy: WarehouseSortingInput - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): WarehouseCountableConnection - - """ - Returns a list of all translatable items of a given kind. - """ - translations( - """ - Kind of objects to retrieve. - """ - kind: TranslatableKinds! - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): TranslatableItemConnection - translation( - """ - ID of the object to retrieve. - """ - id: ID! - - """ - Kind of the object to retrieve. - """ - kind: TranslatableKinds! - ): TranslatableItem - - """ - Look up a stock by ID - """ - stock( - """ - ID of an warehouse - """ - id: ID! - ): Stock - - """ - List of stocks. - """ - stocks( - filter: StockFilterInput - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): StockCountableConnection - - """ - Return information about the shop. - """ - shop: Shop! - - """ - Order related settings from site settings. - """ - orderSettings: OrderSettings - - """ - Look up a shipping zone by ID. - """ - shippingZone( - """ - ID of the shipping zone. - """ - id: ID! - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - ): ShippingZone - - """ - List of the shop's shipping zones. - """ - shippingZones( - """ - Filtering options for shipping zones. - """ - filter: ShippingZoneFilterInput - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): ShippingZoneCountableConnection - - """ - Look up digital content by ID. - """ - digitalContent( - """ - ID of the digital content. - """ - id: ID! - ): DigitalContent - - """ - List of digital content. - """ - digitalContents( - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): DigitalContentCountableConnection - - """ - List of the shop's categories. - """ - categories( - """ - Filtering options for categories. - """ - filter: CategoryFilterInput - - """ - Sort categories. - """ - sortBy: CategorySortingInput - - """ - Filter categories by the nesting level in the category tree. - """ - level: Int - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): CategoryCountableConnection - - """ - Look up a category by ID or slug. - """ - category( - """ - ID of the category. - """ - id: ID - - """ - Slug of the category - """ - slug: String - ): Category - - """ - Look up a collection by ID. - """ - collection( - """ - ID of the collection. - """ - id: ID - - """ - Slug of the category - """ - slug: String - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - ): Collection - - """ - List of the shop's collections. - """ - collections( - """ - Filtering options for collections. - """ - filter: CollectionFilterInput - - """ - Sort collections. - """ - sortBy: CollectionSortingInput - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): CollectionCountableConnection - - """ - Look up a product by ID. - """ - product( - """ - ID of the product. - """ - id: ID - - """ - Slug of the product. - """ - slug: String - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - ): Product - - """ - List of the shop's products. - """ - products( - """ - Filtering options for products. - """ - filter: ProductFilterInput - - """ - Sort products. - """ - sortBy: ProductOrder - - """ - [Deprecated] Filter products by stock availability. Use the `filter` field instead. This field will be removed after 2020-07-31. - """ - stockAvailability: StockAvailability - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): ProductCountableConnection - - """ - Look up a product type by ID. - """ - productType( - """ - ID of the product type. - """ - id: ID! - ): ProductType - - """ - List of the shop's product types. - """ - productTypes( - """ - Filtering options for product types. - """ - filter: ProductTypeFilterInput - - """ - Sort product types. - """ - sortBy: ProductTypeSortingInput - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): ProductTypeCountableConnection - - """ - Look up a product variant by ID or SKU. - """ - productVariant( - """ - ID of the product variant. - """ - id: ID - - """ - Sku of the product variant. - """ - sku: String - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - ): ProductVariant - - """ - List of product variants. - """ - productVariants( - """ - Filter product variants by given IDs. - """ - ids: [ID] - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - Filtering options for product variant. - """ - filter: ProductVariantFilterInput - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): ProductVariantCountableConnection - - """ - List of top selling products. - """ - reportProductSales( - """ - Span of time. - """ - period: ReportingPeriod! - - """ - Slug of a channel for which the data should be returned. - """ - channel: String! - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): ProductVariantCountableConnection - - """ - Look up a payment by ID. - """ - payment( - """ - ID of the payment. - """ - id: ID! - ): Payment - - """ - List of payments. - """ - payments( - """ - Filtering options for payments. - """ - filter: PaymentFilterInput - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): PaymentCountableConnection - - """ - Look up a page by ID or slug. - """ - page( - """ - ID of the page. - """ - id: ID - - """ - The slug of the page. - """ - slug: String - ): Page - - """ - List of the shop's pages. - """ - pages( - """ - Sort pages. - """ - sortBy: PageSortingInput - - """ - Filtering options for pages. - """ - filter: PageFilterInput - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): PageCountableConnection - - """ - Look up a page type by ID. - """ - pageType( - """ - ID of the page type. - """ - id: ID! - ): PageType - - """ - List of the page types. - """ - pageTypes( - """ - Sort page types. - """ - sortBy: PageTypeSortingInput - - """ - Filtering options for page types. - """ - filter: PageTypeFilterInput - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): PageTypeCountableConnection - - """ - List of activity events to display on homepage (at the moment it only contains order-events). - """ - homepageEvents( - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): OrderEventCountableConnection - - """ - Look up an order by ID. - """ - order( - """ - ID of an order. - """ - id: ID! - ): Order - - """ - List of orders. - """ - orders( - """ - Sort orders. - """ - sortBy: OrderSortingInput - - """ - Filtering options for orders. - """ - filter: OrderFilterInput - - """ - [Deprecated] Filter orders from a selected timespan. Use the `filter` field instead. This field will be removed after 2020-07-31. - """ - created: ReportingPeriod - - """ - [Deprecated] Filter order by status. Use the `filter` field instead. This field will be removed after 2020-07-31. - """ - status: OrderStatusFilter - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): OrderCountableConnection - - """ - List of draft orders. - """ - draftOrders( - """ - Sort draft orders. - """ - sortBy: OrderSortingInput - - """ - Filtering options for draft orders. - """ - filter: OrderDraftFilterInput - - """ - [Deprecated] Filter draft orders from a selected timespan. Use the `filter` field instead. This field will be removed after 2020-07-31. - """ - created: ReportingPeriod - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): OrderCountableConnection - - """ - Return the total sales amount from a specific period. - """ - ordersTotal( - """ - A period of time. - """ - period: ReportingPeriod - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - ): TaxedMoney - - """ - Look up an order by token. - """ - orderByToken( - """ - The order's token. - """ - token: UUID! - ): Order - - """ - Look up a navigation menu by ID or name. - """ - menu( - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - ID of the menu. - """ - id: ID - - """ - The menu's name. - """ - name: String - - """ - The menu's slug. - """ - slug: String - ): Menu - - """ - List of the storefront's menus. - """ - menus( - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - Sort menus. - """ - sortBy: MenuSortingInput - - """ - Filtering options for menus. - """ - filter: MenuFilterInput - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): MenuCountableConnection - - """ - Look up a menu item by ID. - """ - menuItem( - """ - ID of the menu item. - """ - id: ID! - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - ): MenuItem - - """ - List of the storefronts's menu items. - """ - menuItems( - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - Sort menus items. - """ - sortBy: MenuItemSortingInput - - """ - Filtering options for menu items. - """ - filter: MenuItemFilterInput - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): MenuItemCountableConnection - - """ - Look up a gift card by ID. - """ - giftCard( - """ - ID of the gift card. - """ - id: ID! - ): GiftCard - - """ - List of gift cards. - """ - giftCards( - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): GiftCardCountableConnection - - """ - Look up a plugin by ID. - """ - plugin( - """ - ID of the plugin. - """ - id: ID! - ): Plugin - - """ - List of plugins. - """ - plugins( - """ - Filtering options for plugins. - """ - filter: PluginFilterInput - - """ - Sort plugins. - """ - sortBy: PluginSortingInput - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): PluginCountableConnection - - """ - Look up a sale by ID. - """ - sale( - """ - ID of the sale. - """ - id: ID! - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - ): Sale - - """ - List of the shop's sales. - """ - sales( - """ - Filtering options for sales. - """ - filter: SaleFilterInput - - """ - Sort sales. - """ - sortBy: SaleSortingInput - - """ - Search sales by name, value or type. - """ - query: String - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): SaleCountableConnection - - """ - Look up a voucher by ID. - """ - voucher( - """ - ID of the voucher. - """ - id: ID! - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - ): Voucher - - """ - List of the shop's vouchers. - """ - vouchers( - """ - Filtering options for vouchers. - """ - filter: VoucherFilterInput - - """ - Sort voucher. - """ - sortBy: VoucherSortingInput - - """ - Search vouchers by name or code. - """ - query: String - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): VoucherCountableConnection - - """ - Look up a export file by ID. - """ - exportFile( - """ - ID of the export file job. - """ - id: ID! - ): ExportFile - - """ - List of export files. - """ - exportFiles( - """ - Filtering options for export files. - """ - filter: ExportFileFilterInput - - """ - Sort export files. - """ - sortBy: ExportFileSortingInput - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): ExportFileCountableConnection - - """ - List of all tax rates available from tax gateway. - """ - taxTypes: [TaxType] - - """ - Look up a checkout by token and slug of channel. - """ - checkout( - """ - The checkout's token. - """ - token: UUID - ): Checkout - - """ - List of checkouts. - """ - checkouts( - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): CheckoutCountableConnection - - """ - Look up a checkout line by ID. - """ - checkoutLine( - """ - ID of the checkout line. - """ - id: ID - ): CheckoutLine - - """ - List of checkout lines. - """ - checkoutLines( - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): CheckoutLineCountableConnection - - """ - Look up a channel by ID. - """ - channel( - """ - ID of the channel. - """ - id: ID - ): Channel - - """ - List of all channels. - """ - channels: [Channel!] - - """ - List of the shop's attributes. - """ - attributes( - """ - Filtering options for attributes. - """ - filter: AttributeFilterInput - - """ - Sorting options for attributes. - """ - sortBy: AttributeSortingInput - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): AttributeCountableConnection - - """ - Look up an attribute by ID. - """ - attribute( - """ - ID of the attribute. - """ - id: ID - - """ - Slug of the attribute. - """ - slug: String - ): Attribute - - """ - List of all apps installations - """ - appsInstallations: [AppInstallation!]! - - """ - List of the apps. - """ - apps( - """ - Filtering options for apps. - """ - filter: AppFilterInput - - """ - Sort apps. - """ - sortBy: AppSortingInput - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): AppCountableConnection - - """ - Look up an app by ID. If ID is not provided, return the currently authenticated app. - """ - app( - """ - ID of the app. - """ - id: ID - ): App - - """ - Returns address validation rules. - """ - addressValidationRules( - """ - Two-letter ISO 3166-1 country code. - """ - countryCode: CountryCode! - - """ - Designation of a region, province or state. - """ - countryArea: String - - """ - City or a town name. - """ - city: String - - """ - Sublocality like a district. - """ - cityArea: String - ): AddressValidationData - - """ - Look up an address by ID. - """ - address( - """ - ID of an address. - """ - id: ID! - ): Address - - """ - List of the shop's customers. - """ - customers( - """ - Filtering options for customers. - """ - filter: CustomerFilterInput - - """ - Sort customers. - """ - sortBy: UserSortingInput - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): UserCountableConnection - - """ - List of permission groups. - """ - permissionGroups( - """ - Filtering options for permission groups. - """ - filter: PermissionGroupFilterInput - - """ - Sort permission groups. - """ - sortBy: PermissionGroupSortingInput - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): GroupCountableConnection - - """ - Look up permission group by ID. - """ - permissionGroup( - """ - ID of the group. - """ - id: ID! - ): Group - - """ - Return the currently authenticated user. - """ - me: User - - """ - List of the shop's staff users. - """ - staffUsers( - """ - Filtering options for staff users. - """ - filter: StaffUserInput - - """ - Sort staff users. - """ - sortBy: UserSortingInput - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): UserCountableConnection - - """ - Look up a user by ID or email address. - """ - user( - """ - ID of the user. - """ - id: ID - - """ - Email address of the user. - """ - email: String - ): User - _entities(representations: [_Any]): [_Entity] - _service: _Service +""" +Create a new address for the customer. +""" +type AccountAddressCreate { + """ + A user instance for which the address was created. + """ + user: User + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! + address: Address } """ -Webhook. +Delete an address of the logged-in user. """ -type Webhook implements Node { - name: String! - targetUrl: String! - isActive: Boolean! - secretKey: String +type AccountAddressDelete { + """ + A user instance for which the address was deleted. + """ + user: User + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! + address: Address +} +""" +Updates an address of the logged-in user. +""" +type AccountAddressUpdate { + """ + A user object for which the address was edited. + """ + user: User + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! + address: Address +} + +""" +Remove user account. +""" +type AccountDelete { + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! + user: User +} + +type AccountError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """ + The error message. + """ + message: String + + """ + The error code. + """ + code: AccountErrorCode! +} + +""" +An enumeration. +""" +enum AccountErrorCode { + ACTIVATE_OWN_ACCOUNT + ACTIVATE_SUPERUSER_ACCOUNT + DUPLICATED_INPUT_ITEM + DEACTIVATE_OWN_ACCOUNT + DEACTIVATE_SUPERUSER_ACCOUNT + DELETE_NON_STAFF_USER + DELETE_OWN_ACCOUNT + DELETE_STAFF_ACCOUNT + DELETE_SUPERUSER_ACCOUNT + GRAPHQL_ERROR + INACTIVE + INVALID + INVALID_PASSWORD + LEFT_NOT_MANAGEABLE_PERMISSION + INVALID_CREDENTIALS + NOT_FOUND + OUT_OF_SCOPE_USER + OUT_OF_SCOPE_GROUP + OUT_OF_SCOPE_PERMISSION + PASSWORD_ENTIRELY_NUMERIC + PASSWORD_TOO_COMMON + PASSWORD_TOO_SHORT + PASSWORD_TOO_SIMILAR + REQUIRED + UNIQUE + JWT_SIGNATURE_EXPIRED + JWT_INVALID_TOKEN + JWT_DECODE_ERROR + JWT_MISSING_TOKEN + JWT_INVALID_CSRF_TOKEN +} + +input AccountInput { + """ + Given name. + """ + firstName: String + + """ + Family name. + """ + lastName: String + + """ + Billing address of the customer. + """ + defaultBillingAddress: AddressInput + + """ + Shipping address of the customer. + """ + defaultShippingAddress: AddressInput + + """ + User language code. + """ + languageCode: LanguageCodeEnum +} + +""" +Register a new user. +""" +type AccountRegister { + """ + Informs whether users need to confirm their email address. + """ + requiresConfirmation: Boolean + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! + user: User +} + +input AccountRegisterInput { + """ + The email address of the user. + """ + email: String! + + """ + Password. + """ + password: String! + + """ + Base of frontend URL that will be needed to create confirmation URL. + """ + redirectUrl: String + + """ + User language code. + """ + languageCode: LanguageCodeEnum + + """ + User public metadata. + """ + metadata: [MetadataInput!] +} + +""" +Sends an email with the account removal link for the logged-in user. +""" +type AccountRequestDeletion { + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! +} + +""" +Sets a default address for the authenticated user. +""" +type AccountSetDefaultAddress { + """ + An updated user instance. + """ + user: User + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! +} + +""" +Updates the account of the logged-in user. +""" +type AccountUpdate { + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! + user: User +} + +""" +Represents user address data. +""" +type Address implements Node { + """ + The ID of the object. + """ + id: ID! + firstName: String! + lastName: String! + companyName: String! + streetAddress1: String! + streetAddress2: String! + city: String! + cityArea: String! + postalCode: String! + + """ + Shop's default country. + """ + country: CountryDisplay! + countryArea: String! + phone: String + + """ + Address is user's default shipping address. + """ + isDefaultShippingAddress: Boolean + + """ + Address is user's default billing address. + """ + isDefaultBillingAddress: Boolean +} + +""" +Creates user address. +""" +type AddressCreate { + """ + A user instance for which the address was created. + """ + user: User + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! + address: Address +} + +""" +Deletes an address. +""" +type AddressDelete { + """ + A user instance for which the address was deleted. + """ + user: User + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! + address: Address +} + +input AddressInput { + """ + Given name. + """ + firstName: String + + """ + Family name. + """ + lastName: String + + """ + Company or organization. + """ + companyName: String + + """ + Address. + """ + streetAddress1: String + + """ + Address. + """ + streetAddress2: String + + """ + City. + """ + city: String + + """ + District. + """ + cityArea: String + + """ + Postal code. + """ + postalCode: String + + """ + Country. + """ + country: CountryCode + + """ + State or province. + """ + countryArea: String + + """ + Phone number. + """ + phone: String +} + +""" +Sets a default address for the given user. +""" +type AddressSetDefault { + """ + An updated user instance. + """ + user: User + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! +} + +""" +An enumeration. +""" +enum AddressTypeEnum { + BILLING + SHIPPING +} + +""" +Updates an address. +""" +type AddressUpdate { + """ + A user object for which the address was edited. + """ + user: User + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! + address: Address +} + +type AddressValidationData { + countryCode: String + countryName: String + addressFormat: String + addressLatinFormat: String + allowedFields: [String] + requiredFields: [String] + upperFields: [String] + countryAreaType: String + countryAreaChoices: [ChoiceValue] + cityType: String + cityChoices: [ChoiceValue] + cityAreaType: String + cityAreaChoices: [ChoiceValue] + postalCodeType: String + postalCodeMatchers: [String] + postalCodeExamples: [String] + postalCodePrefix: String +} + +""" +Represents allocation. +""" +type Allocation implements Node { """ The ID of the object. """ id: ID! """ - List of webhook events. + Quantity allocated for orders. """ - events: [WebhookEvent!]! - app: App! -} - -""" -An object with an ID -""" -interface Node { - """ - The ID of the object. - """ - id: ID! -} - -""" -Webhook event. -""" -type WebhookEvent { - """ - Internal name of the event type. - """ - eventType: WebhookEventTypeEnum! + quantity: Int! """ - Display name of the event. + The warehouse were items were allocated. """ - name: String! -} - -""" -Enum determining type of webhook. -""" -enum WebhookEventTypeEnum { - """ - All the events. - """ - ANY_EVENTS - - """ - A new order is placed. - """ - ORDER_CREATED - - """ - 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 - - """ - Payment is made and an order is fully paid. - """ - ORDER_FULLY_PAID - - """ - An order is updated; triggered for all changes related to an order; covers all other order webhooks, except for ORDER_CREATED. - """ - ORDER_UPDATED - - """ - An order is cancelled. - """ - ORDER_CANCELLED - - """ - An order is fulfilled. - """ - ORDER_FULFILLED - - """ - An invoice for order requested. - """ - INVOICE_REQUESTED - - """ - An invoice is deleted. - """ - INVOICE_DELETED - - """ - Invoice has been sent. - """ - INVOICE_SENT - - """ - A new customer account is created. - """ - CUSTOMER_CREATED - - """ - A customer account is updated. - """ - CUSTOMER_UPDATED - - """ - A new product is created. - """ - PRODUCT_CREATED - - """ - A product is updated. - """ - PRODUCT_UPDATED - - """ - A product is deleted. - """ - PRODUCT_DELETED - - """ - A new product variant is created. - """ - PRODUCT_VARIANT_CREATED - - """ - A product variant is updated. - """ - PRODUCT_VARIANT_UPDATED - - """ - A product variant is deleted. - """ - PRODUCT_VARIANT_DELETED - - """ - A new checkout is created. - """ - CHECKOUT_CREATED - - """ - A checkout is updated. It also triggers all updates related to the checkout. - """ - CHECKOUT_UPDATED - - """ - A new fulfillment is created. - """ - FULFILLMENT_CREATED - - """ - User notification triggered. - """ - NOTIFY_USER - - """ - A new page is created. - """ - PAGE_CREATED - - """ - A page is updated. - """ - PAGE_UPDATED - - """ - A page is deleted. - """ - PAGE_DELETED + warehouse: Warehouse! } """ @@ -1849,73 +522,267 @@ type App implements Node & ObjectWithMetadata { accessToken: String } -interface ObjectWithMetadata { - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! +""" +Activate the app. +""" +type AppActivate { + appErrors: [AppError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AppError!]! + app: App } -type MetadataItem { +type AppCountableConnection { """ - Key of a metadata item. + Pagination data for this connection. """ - key: String! + pageInfo: PageInfo! + edges: [AppCountableEdge!]! """ - Value of a metadata item. + A total count of items in the collection. """ - value: String! + totalCount: Int +} + +type AppCountableEdge { + """ + The item at the end of the edge. + """ + node: App! + + """ + A cursor for use in pagination. + """ + cursor: String! } """ -The `DateTime` scalar type represents a DateTime -value as specified by -[iso8601](https://en.wikipedia.org/wiki/ISO_8601). +Creates a new app. """ -scalar DateTime +type AppCreate { + """ + The newly created authentication token. + """ + authToken: String + appErrors: [AppError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AppError!]! + app: App +} """ -Represents a permission object in a friendly form. +Deactivate the app. """ -type Permission { +type AppDeactivate { + appErrors: [AppError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AppError!]! + app: App +} + +""" +Deletes an app. +""" +type AppDelete { + appErrors: [AppError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AppError!]! + app: App +} + +""" +Delete failed installation. +""" +type AppDeleteFailedInstallation { + appErrors: [AppError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AppError!]! + appInstallation: AppInstallation +} + +type AppError { """ - Internal code for permission. + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ - code: PermissionEnum! + field: String """ - Describe action(s) allowed to do by permission. + The error message. """ - name: String! + message: String + + """ + The error code. + """ + code: AppErrorCode! + + """ + List of permissions which causes the error. + """ + permissions: [PermissionEnum!] } """ An enumeration. """ -enum PermissionEnum { - MANAGE_USERS - MANAGE_STAFF - MANAGE_APPS - MANAGE_CHANNELS - MANAGE_DISCOUNTS - MANAGE_PLUGINS - MANAGE_GIFT_CARD - MANAGE_MENUS - MANAGE_ORDERS - MANAGE_PAGES - MANAGE_PAGE_TYPES_AND_ATTRIBUTES - MANAGE_PRODUCTS - MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES - MANAGE_SHIPPING - MANAGE_SETTINGS - MANAGE_TRANSLATIONS - MANAGE_CHECKOUTS +enum AppErrorCode { + FORBIDDEN + GRAPHQL_ERROR + INVALID + INVALID_STATUS + INVALID_PERMISSION + INVALID_URL_FORMAT + INVALID_MANIFEST_FORMAT + MANIFEST_URL_CANT_CONNECT + NOT_FOUND + REQUIRED + UNIQUE + OUT_OF_SCOPE_APP + OUT_OF_SCOPE_PERMISSION +} + +""" +Fetch and validate manifest. +""" +type AppFetchManifest { + manifest: Manifest + appErrors: [AppError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AppError!]! +} + +input AppFilterInput { + search: String + isActive: Boolean + type: AppTypeEnum +} + +input AppInput { + """ + Name of the app. + """ + name: String + + """ + List of permission code names to assign to this app. + """ + permissions: [PermissionEnum] +} + +""" +Install new app by using app manifest. +""" +type AppInstall { + appErrors: [AppError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AppError!]! + appInstallation: AppInstallation +} + +input AppInstallInput { + """ + Name of the app to install. + """ + appName: String + + """ + Url to app's manifest in JSON format. + """ + manifestUrl: String + + """ + Determine if app will be set active or not. + """ + activateAfterInstallation: Boolean = true + + """ + List of permission code names to assign to this app. + """ + permissions: [PermissionEnum] +} + +""" +Represents ongoing installation of app. +""" +type AppInstallation implements Node & Job { + appName: String! + manifestUrl: String! + + """ + The ID of the object. + """ + id: ID! + + """ + Job status. + """ + status: JobStatusEnum! + + """ + Created date time of job in ISO 8601 format. + """ + createdAt: DateTime! + + """ + Date time of job last update in ISO 8601 format. + """ + updatedAt: DateTime! + + """ + Job message. + """ + message: String +} + +""" +Retry failed installation of new app. +""" +type AppRetryInstall { + appErrors: [AppError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AppError!]! + appInstallation: AppInstallation +} + +enum AppSortField { + """ + Sort apps by name. + """ + NAME + + """ + Sort apps by creation date. + """ + CREATION_DATE +} + +input AppSortingInput { + """ + Specifies the direction in which to sort products. + """ + direction: OrderDirection! + + """ + Sort apps by the selected field. + """ + field: AppSortField! } """ @@ -1938,6 +805,61 @@ type AppToken implements Node { id: ID! } +""" +Creates a new token. +""" +type AppTokenCreate { + """ + The newly created authentication token. + """ + authToken: String + appErrors: [AppError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AppError!]! + appToken: AppToken +} + +""" +Deletes an authentication token assigned to app. +""" +type AppTokenDelete { + appErrors: [AppError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AppError!]! + appToken: AppToken +} + +input AppTokenInput { + """ + Name of the token. + """ + name: String + + """ + ID of app. + """ + app: ID! +} + +""" +Verify provided app token. +""" +type AppTokenVerify { + """ + Determine if token is valid or not. + """ + valid: Boolean! + appErrors: [AppError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AppError!]! +} + """ Enum determining type of your App. """ @@ -1954,870 +876,30 @@ enum AppTypeEnum { } """ -Allows use of a JSON String for input / output from the GraphQL schema. - -Use of this type is *not recommended* as you lose the benefits of having a defined, static -schema (one of the key benefits of GraphQL). +Updates an existing app. """ -scalar JSONString - -""" -An enumeration. -""" -enum WebhookSampleEventTypeEnum { - ORDER_CREATED - ORDER_CONFIRMED - ORDER_FULLY_PAID - ORDER_UPDATED - ORDER_CANCELLED - ORDER_FULFILLED - INVOICE_REQUESTED - INVOICE_DELETED - INVOICE_SENT - CUSTOMER_CREATED - CUSTOMER_UPDATED - PRODUCT_CREATED - PRODUCT_UPDATED - PRODUCT_DELETED - PRODUCT_VARIANT_CREATED - PRODUCT_VARIANT_UPDATED - PRODUCT_VARIANT_DELETED - CHECKOUT_CREATED - CHECKOUT_UPDATED - FULFILLMENT_CREATED - NOTIFY_USER - PAGE_CREATED - PAGE_UPDATED - PAGE_DELETED -} - -""" -Represents warehouse. -""" -type Warehouse implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - name: String! - slug: String! - companyName: String! - shippingZones( - before: String - after: String - first: Int - last: Int - ): ShippingZoneCountableConnection! - address: Address! - email: String! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! -} - -type ShippingZoneCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [ShippingZoneCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -""" -The Relay compliant `PageInfo` type, containing data necessary to paginate this connection. -""" -type PageInfo { - """ - When paginating forwards, are there more items? - """ - hasNextPage: Boolean! - - """ - When paginating backwards, are there more items? - """ - hasPreviousPage: Boolean! - - """ - When paginating backwards, the cursor to continue. - """ - startCursor: String - - """ - When paginating forwards, the cursor to continue. - """ - endCursor: String -} - -type ShippingZoneCountableEdge { - """ - The item at the end of the edge. - """ - node: ShippingZone! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Represents a shipping zone in the shop. Zones are the concept used only for grouping shipping methods in the dashboard, and are never exposed to the customers directly. -""" -type ShippingZone implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - name: String! - default: Boolean! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - Lowest and highest prices for the shipping. - """ - priceRange: MoneyRange - - """ - List of countries available for the method. - """ - countries: [CountryDisplay] - - """ - List of shipping methods available for orders shipped to countries within this shipping zone. - """ - shippingMethods: [ShippingMethod] - - """ - List of warehouses for shipping zone. - """ - warehouses: [Warehouse!]! - - """ - List of channels for shipping zone. - """ - channels: [Channel!]! - - """ - Description of a shipping zone. - """ - description: String -} - -""" -Represents a range of amounts of money. -""" -type MoneyRange { - """ - Lower bound of a price range. - """ - start: Money - - """ - Upper bound of a price range. - """ - stop: Money -} - -""" -Represents amount of money in specific currency. -""" -type Money { - """ - Currency code. - """ - currency: String! - - """ - Amount of money. - """ - amount: Float! - - """ - Money formatted according to the current locale. - """ - localized: String! +type AppUpdate { + appErrors: [AppError!]! @deprecated( - reason: "Price formatting according to the current locale should be handled by the frontend client. This field will be removed after 2020-07-31." + reason: "Use errors field instead. This field will be removed in Saleor 4.0." ) -} - -type CountryDisplay { - """ - Country code. - """ - code: String! - - """ - Country name. - """ - country: String! - - """ - Country tax. - """ - vat: VAT + errors: [AppError!]! + app: App } """ -Represents a VAT rate for a country. +Assigns storefront's navigation menus. """ -type VAT { +type AssignNavigation { """ - Country code. + Assigned navigation menu. """ - countryCode: String! - - """ - Standard VAT rate in percent. - """ - standardRate: Float - - """ - Country's VAT rate exceptions for specific types of goods. - """ - reducedRates: [ReducedRate]! -} - -""" -Represents a reduced VAT rate for a particular type of goods. -""" -type ReducedRate { - """ - Reduced VAT rate in percent. - """ - rate: Float! - - """ - A type of goods. - """ - rateType: TaxRateType! -} - -""" -An enumeration. -""" -enum TaxRateType { - ACCOMMODATION - ADMISSION_TO_CULTURAL_EVENTS - ADMISSION_TO_ENTERTAINMENT_EVENTS - ADMISSION_TO_SPORTING_EVENTS - ADVERTISING - AGRICULTURAL_SUPPLIES - BABY_FOODSTUFFS - BIKES - BOOKS - CHILDRENS_CLOTHING - DOMESTIC_FUEL - DOMESTIC_SERVICES - E_BOOKS - FOODSTUFFS - HOTELS - MEDICAL - NEWSPAPERS - PASSENGER_TRANSPORT - PHARMACEUTICALS - PROPERTY_RENOVATIONS - RESTAURANTS - SOCIAL_HOUSING - STANDARD - WATER - WINE -} - -""" -Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. -""" -type ShippingMethod implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - name: String! - description: JSONString - minimumOrderWeight: Weight - maximumOrderWeight: Weight - maximumDeliveryDays: Int - minimumDeliveryDays: Int - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - Type of the shipping method. - """ - type: ShippingMethodTypeEnum - - """ - Returns translated shipping method fields for the given language code. - """ - translation( - """ - A language code to return the translation for shipping method. - """ - languageCode: LanguageCodeEnum! - ): ShippingMethodTranslation - - """ - List of channels available for the method. - """ - channelListings: [ShippingMethodChannelListing!] - - """ - The price of the cheapest variant (including discounts). - """ - price: Money - - """ - The price of the cheapest variant (including discounts). - """ - maximumOrderPrice: Money - - """ - The price of the cheapest variant (including discounts). - """ - minimumOrderPrice: Money - - """ - Postal code ranges rule of exclusion or inclusion of the shipping method. - """ - postalCodeRules: [ShippingMethodPostalCodeRule] - - """ - List of excluded products for the shipping method. - """ - excludedProducts( - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): ProductCountableConnection -} - -""" -Represents weight value in a specific weight unit. -""" -type Weight { - """ - Weight unit. - """ - unit: WeightUnitsEnum! - - """ - Weight value. - """ - value: Float! -} - -""" -An enumeration. -""" -enum WeightUnitsEnum { - KG - LB - OZ - G -} - -""" -An enumeration. -""" -enum ShippingMethodTypeEnum { - PRICE - WEIGHT -} - -type ShippingMethodTranslation implements Node { - """ - The ID of the object. - """ - id: ID! - name: String - description: JSONString - - """ - Translation language. - """ - language: LanguageDisplay! -} - -type LanguageDisplay { - """ - ISO 639 representation of the language name. - """ - code: LanguageCodeEnum! - - """ - Full name of the language. - """ - language: String! -} - -""" -An enumeration. -""" -enum LanguageCodeEnum { - AR - AZ - BG - BN - CA - CS - DA - DE - EL - EN - ES - ES_CO - ET - FA - FI - FR - HI - HU - HY - ID - IS - IT - JA - KA - KM - KO - LT - MN - MY - NB - NL - PL - PT - PT_BR - RO - RU - SK - SL - SQ - SR - SV - SW - TA - TH - TR - UK - VI - ZH_HANS - ZH_HANT -} - -""" -Represents shipping method channel listing. -""" -type ShippingMethodChannelListing implements Node { - """ - The ID of the object. - """ - id: ID! - channel: Channel! - minimumOrderPrice: Money - maximumOrderPrice: Money - price: Money -} - -""" -Represents channel. -""" -type Channel implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - isActive: Boolean! - slug: String! - currencyCode: String! - - """ - Whether a channel has associated orders. - """ - hasOrders: Boolean! - - """ - List of channel shipping zones. - """ - shippingZones: [ShippingZone!]! -} - -""" -Represents shipping method postal code rule. -""" -type ShippingMethodPostalCodeRule implements Node { - """ - Start address range. - """ - start: String - - """ - End address range. - """ - end: String - - """ - Inclusion type of the postal code rule. - """ - inclusionType: PostalCodeRuleInclusionTypeEnum - - """ - The ID of the object. - """ - id: ID! -} - -""" -An enumeration. -""" -enum PostalCodeRuleInclusionTypeEnum { - INCLUDE - EXCLUDE -} - -type ProductCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [ProductCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type ProductCountableEdge { - """ - The item at the end of the edge. - """ - node: Product! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Represents an individual item for sale in the storefront. -""" -type Product implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - seoTitle: String - seoDescription: String - name: String! - description: JSONString - productType: ProductType! - slug: String! - category: Category - updatedAt: DateTime - chargeTaxes: Boolean! - weight: Weight - defaultVariant: ProductVariant - rating: Float - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - Description of the product (JSON). - """ - descriptionJson: JSONString + menu: Menu + menuErrors: [MenuError!]! @deprecated( - reason: "Will be removed in Saleor 4.0. Use the `description` field instead." + reason: "Use errors field instead. This field will be removed in Saleor 4.0." ) - - """ - The storefront URL for the product. - """ - url: String! - @deprecated(reason: "This field will be removed after 2020-07-31.") - - """ - The main thumbnail for a product. - """ - thumbnail( - """ - Size of thumbnail. - """ - size: Int - ): Image - - """ - Lists the storefront product's pricing, the current price and discounts, only meant for displaying. - """ - pricing( - """ - Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration. - """ - address: AddressInput - ): ProductPricingInfo - - """ - Whether the product is in stock and visible or not. - """ - isAvailable( - """ - Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration. - """ - address: AddressInput - ): Boolean - - """ - A type of tax. Assigned by enabled tax gateway - """ - taxType: TaxType - - """ - List of attributes assigned to this product. - """ - attributes: [SelectedAttribute!]! - - """ - List of availability in channels for the product. - """ - channelListings: [ProductChannelListing!] - - """ - Get a single product media by ID. - """ - mediaById( - """ - ID of a product media. - """ - id: ID - ): ProductMedia! - - """ - Get a single product image by ID. - """ - imageById( - """ - ID of a product image. - """ - id: ID - ): ProductImage - @deprecated( - reason: "Will be removed in Saleor 4.0. Use the `mediaById` field instead." - ) - - """ - List of variants for the product. - """ - variants: [ProductVariant] - - """ - List of media for the product. - """ - media: [ProductMedia!] - - """ - List of images for the product. - """ - images: [ProductImage] - @deprecated( - reason: "Will be removed in Saleor 4.0. Use the `media` field instead." - ) - - """ - List of collections for the product. - """ - collections: [Collection] - - """ - Returns translated product fields for the given language code. - """ - translation( - """ - A language code to return the translation for product. - """ - languageCode: LanguageCodeEnum! - ): ProductTranslation - - """ - Date when product is available for purchase. - """ - availableForPurchase: Date - - """ - Whether the product is available for purchase. - """ - isAvailableForPurchase: Boolean -} - -""" -Represents a type of product. It defines what attributes are available to products of this type. -""" -type ProductType implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - name: String! - slug: String! - hasVariants: Boolean! - isShippingRequired: Boolean! - isDigital: Boolean! - weight: Weight - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - List of products of this type. - """ - products( - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): ProductCountableConnection - @deprecated( - reason: "Use the top-level `products` query with the `productTypes` filter." - ) - - """ - A type of tax. Assigned by enabled tax gateway - """ - taxType: TaxType - - """ - Variant attributes of that product type. - """ - variantAttributes( - """ - Define scope of returned attributes. - """ - variantSelection: VariantAttributeScope - ): [Attribute] - - """ - Product attributes of that product type. - """ - productAttributes: [Attribute] - availableAttributes( - filter: AttributeFilterInput - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): AttributeCountableConnection -} - -""" -Representation of tax types fetched from tax gateway. -""" -type TaxType { - """ - Description of the tax type. - """ - description: String - - """ - External tax code used to identify given tax group. - """ - taxCode: String + errors: [MenuError!]! } """ @@ -2922,12 +1004,27 @@ type Attribute implements Node & ObjectWithMetadata { storefrontSearchPosition: Int! } -type ProductTypeCountableConnection { +""" +Deletes attributes. +""" +type AttributeBulkDelete { + """ + Returns how many objects were affected. + """ + count: Int! + attributeErrors: [AttributeError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AttributeError!]! +} + +type AttributeCountableConnection { """ Pagination data for this connection. """ pageInfo: PageInfo! - edges: [ProductTypeCountableEdge!]! + edges: [AttributeCountableEdge!]! """ A total count of items in the collection. @@ -2935,11 +1032,11 @@ type ProductTypeCountableConnection { totalCount: Int } -type ProductTypeCountableEdge { +type AttributeCountableEdge { """ The item at the end of the edge. """ - node: ProductType! + node: Attribute! """ A cursor for use in pagination. @@ -2947,6 +1044,166 @@ type ProductTypeCountableEdge { cursor: String! } +""" +Creates an attribute. +""" +type AttributeCreate { + attribute: Attribute + attributeErrors: [AttributeError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AttributeError!]! +} + +input AttributeCreateInput { + """ + The input type to use for entering attribute values in the dashboard. + """ + inputType: AttributeInputTypeEnum + + """ + The entity type which can be used as a reference. + """ + entityType: AttributeEntityTypeEnum + + """ + Name of an attribute displayed in the interface. + """ + name: String! + + """ + Internal representation of an attribute name. + """ + slug: String + + """ + The attribute type. + """ + type: AttributeTypeEnum! + + """ + List of attribute's values. + """ + values: [AttributeValueCreateInput] + + """ + Whether the attribute requires values to be passed or not. + """ + valueRequired: Boolean + + """ + Whether the attribute is for variants only. + """ + isVariantOnly: Boolean + + """ + Whether the attribute should be visible or not in storefront. + """ + visibleInStorefront: Boolean + + """ + Whether the attribute can be filtered in storefront. + """ + filterableInStorefront: Boolean + + """ + Whether the attribute can be filtered in dashboard. + """ + filterableInDashboard: Boolean + + """ + The position of the attribute in the storefront navigation (0 by default). + """ + storefrontSearchPosition: Int + + """ + Whether the attribute can be displayed in the admin product list. + """ + availableInGrid: Boolean +} + +""" +Deletes an attribute. +""" +type AttributeDelete { + attributeErrors: [AttributeError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AttributeError!]! + attribute: Attribute +} + +""" +An enumeration. +""" +enum AttributeEntityTypeEnum { + PAGE + PRODUCT +} + +type AttributeError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """ + The error message. + """ + message: String + + """ + The error code. + """ + code: AttributeErrorCode! +} + +""" +An enumeration. +""" +enum AttributeErrorCode { + ALREADY_EXISTS + GRAPHQL_ERROR + INVALID + NOT_FOUND + REQUIRED + UNIQUE +} + +input AttributeFilterInput { + valueRequired: Boolean + isVariantOnly: Boolean + visibleInStorefront: Boolean + filterableInStorefront: Boolean + filterableInDashboard: Boolean + availableInGrid: Boolean + metadata: [MetadataInput] + search: String + ids: [ID] + type: AttributeTypeEnum + inCollection: ID + inCategory: ID + + """ + Specifies the channel by which the data should be sorted. + """ + channel: String +} + +input AttributeInput { + """ + Internal representation of an attribute name. + """ + slug: String! + + """ + Internal representation of a value (unique per attribute). + """ + values: [String] +} + """ An enumeration. """ @@ -2959,11 +1216,125 @@ enum AttributeInputTypeEnum { } """ -An enumeration. +Reorder the values of an attribute. """ -enum AttributeEntityTypeEnum { - PAGE - PRODUCT +type AttributeReorderValues { + """ + Attribute from which values are reordered. + """ + attribute: Attribute + attributeErrors: [AttributeError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AttributeError!]! +} + +enum AttributeSortField { + """ + Sort attributes by name + """ + NAME + + """ + Sort attributes by slug + """ + SLUG + + """ + Sort attributes by the value required flag + """ + VALUE_REQUIRED + + """ + Sort attributes by the variant only flag + """ + IS_VARIANT_ONLY + + """ + Sort attributes by visibility in the storefront + """ + VISIBLE_IN_STOREFRONT + + """ + Sort attributes by the filterable in storefront flag + """ + FILTERABLE_IN_STOREFRONT + + """ + Sort attributes by the filterable in dashboard flag + """ + FILTERABLE_IN_DASHBOARD + + """ + Sort attributes by their position in storefront + """ + STOREFRONT_SEARCH_POSITION + + """ + Sort attributes based on whether they can be displayed or not in a product grid. + """ + AVAILABLE_IN_GRID +} + +input AttributeSortingInput { + """ + Specifies the direction in which to sort products. + """ + direction: OrderDirection! + + """ + Sort attributes by the selected field. + """ + field: AttributeSortField! +} + +type AttributeTranslatableContent implements Node { + """ + The ID of the object. + """ + id: ID! + name: String! + + """ + Returns translated attribute fields for the given language code. + """ + translation( + """ + A language code to return the translation for attribute. + """ + languageCode: LanguageCodeEnum! + ): AttributeTranslation + + """ + Custom attribute of a product. + """ + attribute: Attribute +} + +""" +Creates/Updates translations for attribute. +""" +type AttributeTranslate { + translationErrors: [TranslationError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [TranslationError!]! + attribute: Attribute +} + +type AttributeTranslation implements Node { + """ + The ID of the object. + """ + id: ID! + name: String! + + """ + Translation language. + """ + language: LanguageDisplay! } """ @@ -2974,6 +1345,75 @@ enum AttributeTypeEnum { PAGE_TYPE } +""" +Updates attribute. +""" +type AttributeUpdate { + attribute: Attribute + attributeErrors: [AttributeError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AttributeError!]! +} + +input AttributeUpdateInput { + """ + Name of an attribute displayed in the interface. + """ + name: String + + """ + Internal representation of an attribute name. + """ + slug: String + + """ + IDs of values to be removed from this attribute. + """ + removeValues: [ID] + + """ + New values to be created for this attribute. + """ + addValues: [AttributeValueCreateInput] + + """ + Whether the attribute requires values to be passed or not. + """ + valueRequired: Boolean + + """ + Whether the attribute is for variants only. + """ + isVariantOnly: Boolean + + """ + Whether the attribute should be visible or not in storefront. + """ + visibleInStorefront: Boolean + + """ + Whether the attribute can be filtered in storefront. + """ + filterableInStorefront: Boolean + + """ + Whether the attribute can be filtered in dashboard. + """ + filterableInDashboard: Boolean + + """ + The position of the attribute in the storefront navigation (0 by default). + """ + storefrontSearchPosition: Int + + """ + Whether the attribute can be displayed in the admin product list. + """ + availableInGrid: Boolean +} + """ Represents a value of an attribute. """ @@ -3029,6 +1469,137 @@ type AttributeValue implements Node { richText: JSONString } +""" +Deletes values of attributes. +""" +type AttributeValueBulkDelete { + """ + Returns how many objects were affected. + """ + count: Int! + attributeErrors: [AttributeError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AttributeError!]! +} + +""" +Creates a value for an attribute. +""" +type AttributeValueCreate { + """ + The updated attribute. + """ + attribute: Attribute + attributeErrors: [AttributeError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AttributeError!]! + attributeValue: AttributeValue +} + +input AttributeValueCreateInput { + """ + Name of a value displayed in the interface. + """ + name: String! + + """ + Represents the value of the attribute value. + """ + value: String + + """ + Represents the text (JSON) of the attribute value. + """ + richText: JSONString +} + +""" +Deletes a value of an attribute. +""" +type AttributeValueDelete { + """ + The updated attribute. + """ + attribute: Attribute + attributeErrors: [AttributeError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AttributeError!]! + attributeValue: AttributeValue +} + +input AttributeValueInput { + """ + ID of the selected attribute. + """ + id: ID + + """ + The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. + """ + values: [String] + + """ + URL of the file attribute. Every time, a new value is created. + """ + file: String + + """ + File content type. + """ + contentType: String + + """ + List of entity IDs that will be used as references. + """ + references: [ID!] + + """ + Text content in JSON format. + """ + richText: JSONString +} + +type AttributeValueTranslatableContent implements Node { + """ + The ID of the object. + """ + id: ID! + name: String! + + """ + Returns translated attribute value fields for the given language code. + """ + translation( + """ + A language code to return the translation for attribute value. + """ + languageCode: LanguageCodeEnum! + ): AttributeValueTranslation + + """ + Represents a value of an attribute. + """ + attributeValue: AttributeValue +} + +""" +Creates/Updates translations for attribute value. +""" +type AttributeValueTranslate { + translationErrors: [TranslationError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [TranslationError!]! + attributeValue: AttributeValue +} + type AttributeValueTranslation implements Node { """ The ID of the object. @@ -3043,92 +1614,128 @@ type AttributeValueTranslation implements Node { language: LanguageDisplay! } -type File { - """ - The URL of the file. - """ - url: String! - - """ - Content type of the file. - """ - contentType: String +input AttributeValueTranslationInput { + name: String + richText: JSONString } -type AttributeTranslation implements Node { +""" +Updates value of an attribute. +""" +type AttributeValueUpdate { """ - The ID of the object. + The updated attribute. """ - id: ID! - name: String! - - """ - Translation language. - """ - language: LanguageDisplay! + attribute: Attribute + attributeErrors: [AttributeError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AttributeError!]! + attributeValue: AttributeValue } -enum VariantAttributeScope { - ALL - VARIANT_SELECTION - NOT_VARIANT_SELECTION +input BulkAttributeValueInput { + """ + ID of the selected attribute. + """ + id: ID + + """ + The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. + """ + values: [String]! } -type AttributeCountableConnection { +type BulkProductError { """ - Pagination data for this connection. + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ - pageInfo: PageInfo! - edges: [AttributeCountableEdge!]! + field: String """ - A total count of items in the collection. + The error message. """ - totalCount: Int + message: String + + """ + The error code. + """ + code: ProductErrorCode! + + """ + List of attributes IDs which causes the error. + """ + attributes: [ID!] + + """ + List of attribute values IDs which causes the error. + """ + values: [ID!] + + """ + Index of an input list item that caused the error. + """ + index: Int + + """ + List of warehouse IDs which causes the error. + """ + warehouses: [ID!] + + """ + List of channel IDs which causes the error. + """ + channels: [ID!] } -type AttributeCountableEdge { +type BulkStockError { """ - The item at the end of the edge. + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ - node: Attribute! + field: String """ - A cursor for use in pagination. + The error message. """ - cursor: String! + message: String + + """ + The error code. + """ + code: ProductErrorCode! + + """ + List of attributes IDs which causes the error. + """ + attributes: [ID!] + + """ + List of attribute values IDs which causes the error. + """ + values: [ID!] + + """ + Index of an input list item that caused the error. + """ + index: Int } -input AttributeFilterInput { - valueRequired: Boolean - isVariantOnly: Boolean - visibleInStorefront: Boolean - filterableInStorefront: Boolean - filterableInDashboard: Boolean - availableInGrid: Boolean - metadata: [MetadataInput] - search: String - ids: [ID] - type: AttributeTypeEnum - inCollection: ID - inCategory: ID +input CatalogueInput { + """ + Products related to the discount. + """ + products: [ID] """ - Specifies the channel by which the data should be sorted. + Categories related to the discount. """ - channel: String -} - -input MetadataInput { - """ - Key of a metadata item. - """ - key: String! + categories: [ID] """ - Value of a metadata item. + Collections related to the discount. """ - value: String! + collections: [ID] } """ @@ -3221,12 +1828,6 @@ type Category implements Node & ObjectWithMetadata { last: Int ): ProductCountableConnection - """ - The storefront's URL for the category. - """ - url: String - @deprecated(reason: "This field will be removed after 2020-07-31.") - """ List of children of the category. """ @@ -3269,6 +1870,21 @@ type Category implements Node & ObjectWithMetadata { ): CategoryTranslation } +""" +Deletes categories. +""" +type CategoryBulkDelete { + """ + Returns how many objects were affected. + """ + count: Int! + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! +} + type CategoryCountableConnection { """ Pagination data for this connection. @@ -3295,18 +1911,146 @@ type CategoryCountableEdge { } """ -Represents an image. +Creates a new category. """ -type Image { +type CategoryCreate { + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! + category: Category +} + +""" +Deletes a category. +""" +type CategoryDelete { + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! + category: Category +} + +input CategoryFilterInput { + search: String + metadata: [MetadataInput] + ids: [ID] +} + +input CategoryInput { """ - The URL of the image. + Category description (JSON). """ - url: String! + description: JSONString """ - Alt text for an image. + Category name. """ - alt: String + name: String + + """ + Category slug. + """ + slug: String + + """ + Search engine optimization fields. + """ + seo: SeoInput + + """ + Background image file. + """ + backgroundImage: Upload + + """ + Alt text for a product media. + """ + backgroundImageAlt: String +} + +enum CategorySortField { + """ + Sort categories by name. + """ + NAME + + """ + Sort categories by product count. + """ + PRODUCT_COUNT + + """ + Sort categories by subcategory count. + """ + SUBCATEGORY_COUNT +} + +input CategorySortingInput { + """ + Specifies the direction in which to sort products. + """ + direction: OrderDirection! + + """ + Specifies the channel in which to sort the data. + """ + channel: String + + """ + Sort categories by the selected field. + """ + field: CategorySortField! +} + +type CategoryTranslatableContent implements Node { + seoTitle: String + seoDescription: String + + """ + The ID of the object. + """ + id: ID! + name: String! + description: JSONString + + """ + Description of the category (JSON). + """ + descriptionJson: JSONString + @deprecated( + reason: "Will be removed in Saleor 4.0. Use the `description` field instead." + ) + + """ + Returns translated category fields for the given language code. + """ + translation( + """ + A language code to return the translation for category. + """ + languageCode: LanguageCodeEnum! + ): CategoryTranslation + + """ + Represents a single category of products. + """ + category: Category +} + +""" +Creates/Updates translations for Category. +""" +type CategoryTranslate { + translationErrors: [TranslationError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [TranslationError!]! + category: Category } type CategoryTranslation implements Node { @@ -3335,18 +2079,232 @@ type CategoryTranslation implements Node { } """ -Represents a version of a product such as different size or color. +Updates a category. """ -type ProductVariant implements Node & ObjectWithMetadata { +type CategoryUpdate { + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! + category: Category +} + +""" +Represents channel. +""" +type Channel implements Node { """ The ID of the object. """ id: ID! name: String! - sku: String! - product: Product! - trackInventory: Boolean! - weight: Weight + isActive: Boolean! + slug: String! + currencyCode: String! + + """ + Whether a channel has associated orders. + """ + hasOrders: Boolean! + + """ + List of channel shipping zones. + """ + shippingZones: [ShippingZone!]! +} + +""" +Activate a channel. +""" +type ChannelActivate { + """ + Activated channel. + """ + channel: Channel + channelErrors: [ChannelError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ChannelError!]! +} + +""" +Creates new channel. +""" +type ChannelCreate { + channelErrors: [ChannelError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ChannelError!]! + channel: Channel +} + +input ChannelCreateInput { + """ + isActive flag. + """ + isActive: Boolean + + """ + Name of the channel. + """ + name: String! + + """ + Slug of the channel. + """ + slug: String! + + """ + Currency of the channel. + """ + currencyCode: String! + + """ + List of shipping zones to assign to the channel. + """ + addShippingZones: [ID!] +} + +""" +Deactivate a channel. +""" +type ChannelDeactivate { + """ + Deactivated channel. + """ + channel: Channel + channelErrors: [ChannelError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ChannelError!]! +} + +""" +Delete a channel. Orders associated with the deleted channel will be moved to the target channel. Checkouts, product availability, and pricing will be removed. +""" +type ChannelDelete { + channelErrors: [ChannelError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ChannelError!]! + channel: Channel +} + +input ChannelDeleteInput { + """ + ID of channel to migrate orders from origin channel. + """ + targetChannel: ID! +} + +type ChannelError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """ + The error message. + """ + message: String + + """ + The error code. + """ + code: ChannelErrorCode! + + """ + List of shipping zone IDs which causes the error. + """ + shippingZones: [ID!] +} + +""" +An enumeration. +""" +enum ChannelErrorCode { + ALREADY_EXISTS + GRAPHQL_ERROR + INVALID + NOT_FOUND + REQUIRED + UNIQUE + CHANNEL_TARGET_ID_MUST_BE_DIFFERENT + CHANNELS_CURRENCY_MUST_BE_THE_SAME + CHANNEL_WITH_ORDERS + DUPLICATED_INPUT_ITEM +} + +""" +Update a channel. +""" +type ChannelUpdate { + channelErrors: [ChannelError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ChannelError!]! + channel: Channel +} + +input ChannelUpdateInput { + """ + isActive flag. + """ + isActive: Boolean + + """ + Name of the channel. + """ + name: String + + """ + Slug of the channel. + """ + slug: String + + """ + List of shipping zones to assign to the channel. + """ + addShippingZones: [ID!] + + """ + List of shipping zones to unassign from the channel. + """ + removeShippingZones: [ID!] +} + +""" +Checkout object. +""" +type Checkout implements Node & ObjectWithMetadata { + created: DateTime! + lastChange: DateTime! + user: User + quantity: Int! + channel: Channel! + billingAddress: Address + shippingAddress: Address + note: String! + discount: Money + discountName: String + translatedDiscountName: String + voucherCode: String + + """ + List of gift cards associated with this checkout. + """ + giftCards: [GiftCard] + + """ + The ID of the object. + """ + id: ID! """ List of private metadata items.Requires proper staff permissions to access. @@ -3359,246 +2317,1092 @@ type ProductVariant implements Node & ObjectWithMetadata { metadata: [MetadataItem]! """ - List of price information in channels for the product. + Shipping methods that can be used with this order. """ - channelListings: [ProductVariantChannelListing!] + availableShippingMethods: [ShippingMethod]! """ - Lists the storefront variant's pricing, the current price and discounts, only meant for displaying. + List of available payment gateways. """ - pricing( - """ - Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration. - """ - address: AddressInput - ): VariantPricingInfo + availablePaymentGateways: [PaymentGateway!]! """ - List of attributes assigned to this variant. + Email of a customer. """ - attributes( - """ - Define scope of returned attributes. - """ - variantSelection: VariantAttributeScope - ): [SelectedAttribute!]! + email: String! """ - Cost price of the variant. + Returns True, if checkout requires shipping. """ - costPrice: Money + isShippingRequired: Boolean! """ - Gross margin percentage value. + A list of checkout lines, each containing information about an item in the checkout. """ - margin: Int + lines: [CheckoutLine] """ - Total quantity ordered. + The price of the shipping, with all the taxes included. """ - quantityOrdered: Int + shippingPrice: TaxedMoney """ - 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. + The shipping method related with checkout. """ - revenue(period: ReportingPeriod): TaxedMoney + shippingMethod: ShippingMethod """ - List of images for the product variant. + The price of the checkout before shipping, with taxes included. """ - images: [ProductImage] - @deprecated( - reason: "Will be removed in Saleor 4.0. Use the `media` instead." - ) + subtotalPrice: TaxedMoney """ - List of media for the product variant. + The checkout's token. """ - media: [ProductMedia!] + token: UUID! """ - Returns translated product variant fields for the given language code. + The sum of the the checkout line prices, with all the taxes,shipping costs, and discounts included. """ - translation( - """ - A language code to return the translation for product variant. - """ - languageCode: LanguageCodeEnum! - ): ProductVariantTranslation + totalPrice: TaxedMoney """ - Digital content for the product variant. + Checkout language code. """ - digitalContent: DigitalContent - - """ - Stocks for the product variant. - """ - stocks( - """ - Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration. - """ - address: AddressInput - - """ - DEPRECATED: use `address` argument instead. This argument will be removed in Saleor 4.0. Two-letter ISO 3166-1 country code. - """ - countryCode: CountryCode - ): [Stock] - - """ - Quantity of a product available for sale in one checkout. - """ - quantityAvailable( - """ - Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration. - """ - address: AddressInput - - """ - DEPRECATED: use `address` argument instead. This argument will be removed in Saleor 4.0.Two-letter ISO 3166-1 country code. When provided, the exact quantity from a warehouse operating in shipping zones that contain this country will be returned. Otherwise, it will return the maximum quantity from all shipping zones. - """ - countryCode: CountryCode - ): Int! + languageCode: LanguageCodeEnum! } """ -Represents product varaint channel listing. +Adds a gift card or a voucher to a checkout. """ -type ProductVariantChannelListing implements Node { +type CheckoutAddPromoCode { + """ + The checkout with the added gift card or voucher. + """ + checkout: Checkout + checkoutErrors: [CheckoutError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CheckoutError!]! +} + +""" +Update billing address in the existing checkout. +""" +type CheckoutBillingAddressUpdate { + """ + An updated checkout. + """ + checkout: Checkout + checkoutErrors: [CheckoutError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CheckoutError!]! +} + +""" +Completes the checkout. As a result a new order is created and a payment charge is made. This action requires a successful payment before it can be performed. In case additional confirmation step as 3D secure is required confirmationNeeded flag will be set to True and no order created until payment is confirmed with second call of this mutation. +""" +type CheckoutComplete { + """ + Placed order. + """ + order: Order + + """ + Set to true if payment needs to be confirmed before checkout is complete. + """ + confirmationNeeded: Boolean! + + """ + Confirmation data used to process additional authorization steps. + """ + confirmationData: JSONString + checkoutErrors: [CheckoutError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CheckoutError!]! +} + +type CheckoutCountableConnection { + """ + Pagination data for this connection. + """ + pageInfo: PageInfo! + edges: [CheckoutCountableEdge!]! + + """ + A total count of items in the collection. + """ + totalCount: Int +} + +type CheckoutCountableEdge { + """ + The item at the end of the edge. + """ + node: Checkout! + + """ + A cursor for use in pagination. + """ + cursor: String! +} + +""" +Create a new checkout. +""" +type CheckoutCreate { + """ + Whether the checkout was created or the current active one was returned. Refer to checkoutLinesAdd and checkoutLinesUpdate to merge a cart with an active checkout. + """ + created: Boolean + checkoutErrors: [CheckoutError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CheckoutError!]! + checkout: Checkout +} + +input CheckoutCreateInput { + """ + Slug of a channel in which to create a checkout. + """ + channel: String + + """ + A list of checkout lines, each containing information about an item in the checkout. + """ + lines: [CheckoutLineInput]! + + """ + The customer's email address. + """ + email: String + + """ + The mailing address to where the checkout will be shipped. Note: the address will be ignored if the checkout doesn't contain shippable items. + """ + shippingAddress: AddressInput + + """ + Billing address of the customer. + """ + billingAddress: AddressInput + + """ + Checkout language code. + """ + languageCode: LanguageCodeEnum +} + +""" +Sets the customer as the owner of the checkout. +""" +type CheckoutCustomerAttach { + """ + An updated checkout. + """ + checkout: Checkout + checkoutErrors: [CheckoutError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CheckoutError!]! +} + +""" +Removes the user assigned as the owner of the checkout. +""" +type CheckoutCustomerDetach { + """ + An updated checkout. + """ + checkout: Checkout + checkoutErrors: [CheckoutError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CheckoutError!]! +} + +""" +Updates email address in the existing checkout object. +""" +type CheckoutEmailUpdate { + """ + An updated checkout. + """ + checkout: Checkout + checkoutErrors: [CheckoutError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CheckoutError!]! +} + +type CheckoutError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """ + The error message. + """ + message: String + + """ + The error code. + """ + code: CheckoutErrorCode! + + """ + List of varint IDs which causes the error. + """ + variants: [ID!] +} + +""" +An enumeration. +""" +enum CheckoutErrorCode { + BILLING_ADDRESS_NOT_SET + CHECKOUT_NOT_FULLY_PAID + GRAPHQL_ERROR + PRODUCT_NOT_PUBLISHED + PRODUCT_UNAVAILABLE_FOR_PURCHASE + INSUFFICIENT_STOCK + INVALID + INVALID_SHIPPING_METHOD + NOT_FOUND + PAYMENT_ERROR + QUANTITY_GREATER_THAN_LIMIT + REQUIRED + SHIPPING_ADDRESS_NOT_SET + SHIPPING_METHOD_NOT_APPLICABLE + SHIPPING_METHOD_NOT_SET + SHIPPING_NOT_REQUIRED + TAX_ERROR + UNIQUE + VOUCHER_NOT_APPLICABLE + ZERO_QUANTITY + MISSING_CHANNEL_SLUG + CHANNEL_INACTIVE + UNAVAILABLE_VARIANT_IN_CHANNEL +} + +""" +Update language code in the existing checkout. +""" +type CheckoutLanguageCodeUpdate { + """ + An updated checkout. + """ + checkout: Checkout + checkoutErrors: [CheckoutError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CheckoutError!]! +} + +""" +Represents an item in the checkout. +""" +type CheckoutLine implements Node { + """ + The ID of the object. + """ + id: ID! + variant: ProductVariant! + quantity: Int! + + """ + The sum of the checkout line price, taxes and discounts. + """ + totalPrice: TaxedMoney + + """ + Indicates whether the item need to be delivered. + """ + requiresShipping: Boolean +} + +type CheckoutLineCountableConnection { + """ + Pagination data for this connection. + """ + pageInfo: PageInfo! + edges: [CheckoutLineCountableEdge!]! + + """ + A total count of items in the collection. + """ + totalCount: Int +} + +type CheckoutLineCountableEdge { + """ + The item at the end of the edge. + """ + node: CheckoutLine! + + """ + A cursor for use in pagination. + """ + cursor: String! +} + +""" +Deletes a CheckoutLine. +""" +type CheckoutLineDelete { + """ + An updated checkout. + """ + checkout: Checkout + checkoutErrors: [CheckoutError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CheckoutError!]! +} + +input CheckoutLineInput { + """ + The number of items purchased. + """ + quantity: Int! + + """ + ID of the product variant. + """ + variantId: ID! +} + +""" +Adds a checkout line to the existing checkout. +""" +type CheckoutLinesAdd { + """ + An updated checkout. + """ + checkout: Checkout + checkoutErrors: [CheckoutError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CheckoutError!]! +} + +""" +Updates checkout line in the existing checkout. +""" +type CheckoutLinesUpdate { + """ + An updated checkout. + """ + checkout: Checkout + checkoutErrors: [CheckoutError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CheckoutError!]! +} + +""" +Create a new payment for given checkout. +""" +type CheckoutPaymentCreate { + """ + Related checkout object. + """ + checkout: Checkout + + """ + A newly created payment. + """ + payment: Payment + paymentErrors: [PaymentError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [PaymentError!]! +} + +""" +Remove a gift card or a voucher from a checkout. +""" +type CheckoutRemovePromoCode { + """ + The checkout with the removed gift card or voucher. + """ + checkout: Checkout + checkoutErrors: [CheckoutError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CheckoutError!]! +} + +""" +Update shipping address in the existing checkout. +""" +type CheckoutShippingAddressUpdate { + """ + An updated checkout. + """ + checkout: Checkout + checkoutErrors: [CheckoutError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CheckoutError!]! +} + +""" +Updates the shipping address of the checkout. +""" +type CheckoutShippingMethodUpdate { + """ + An updated checkout. + """ + checkout: Checkout + checkoutErrors: [CheckoutError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CheckoutError!]! +} + +type ChoiceValue { + raw: String + verbose: String +} + +""" +Represents a collection of products. +""" +type Collection implements Node & ObjectWithMetadata { + seoTitle: String + seoDescription: String + + """ + The ID of the object. + """ + id: ID! + name: String! + description: JSONString + slug: String! + + """ + List of private metadata items.Requires proper staff permissions to access. + """ + privateMetadata: [MetadataItem]! + + """ + List of public metadata items. Can be accessed without permissions. + """ + metadata: [MetadataItem]! + + """ + Description of the collection (JSON). + """ + descriptionJson: JSONString + @deprecated( + reason: "Will be removed in Saleor 4.0. Use the `description` field instead." + ) + + """ + List of products in this collection. + """ + products( + """ + Filtering options for products. + """ + filter: ProductFilterInput + + """ + Sort products. + """ + sortBy: ProductOrder + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): ProductCountableConnection + backgroundImage( + """ + Size of the image. + """ + size: Int + ): Image + + """ + Returns translated collection fields for the given language code. + """ + translation( + """ + A language code to return the translation for collection. + """ + languageCode: LanguageCodeEnum! + ): CollectionTranslation + + """ + List of channels in which the collection is available. + """ + channelListings: [CollectionChannelListing!] +} + +""" +Adds products to a collection. +""" +type CollectionAddProducts { + """ + Collection to which products will be added. + """ + collection: Collection + collectionErrors: [CollectionError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CollectionError!]! +} + +""" +Deletes collections. +""" +type CollectionBulkDelete { + """ + Returns how many objects were affected. + """ + count: Int! + collectionErrors: [CollectionError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CollectionError!]! +} + +""" +Represents collection channel listing. +""" +type CollectionChannelListing implements Node { + publicationDate: Date + isPublished: Boolean! + """ The ID of the object. """ id: ID! channel: Channel! - price: Money +} + +type CollectionChannelListingError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String """ - Cost price of the variant. + The error message. """ - costPrice: Money + message: String """ - Gross margin percentage value. + The error code. """ - margin: Int + code: ProductErrorCode! + + """ + List of attributes IDs which causes the error. + """ + attributes: [ID!] + + """ + List of attribute values IDs which causes the error. + """ + values: [ID!] + + """ + List of channels IDs which causes the error. + """ + channels: [ID!] } """ -Represents availability of a variant in the storefront. +Manage collection's availability in channels. """ -type VariantPricingInfo { +type CollectionChannelListingUpdate { """ - Whether it is in sale or not. + An updated collection instance. """ - onSale: Boolean + collection: Collection + collectionChannelListingErrors: [CollectionChannelListingError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CollectionChannelListingError!]! +} + +input CollectionChannelListingUpdateInput { + """ + List of channels to which the collection should be assigned. + """ + addChannels: [PublishableChannelListingInput!] """ - The discount amount if in sale (null otherwise). + List of channels from which the collection should be unassigned. """ - discount: TaxedMoney + removeChannels: [ID!] +} + +type CollectionCountableConnection { + """ + Pagination data for this connection. + """ + pageInfo: PageInfo! + edges: [CollectionCountableEdge!]! """ - The discount amount in the local currency. + A total count of items in the collection. """ - discountLocalCurrency: TaxedMoney + totalCount: Int +} + +type CollectionCountableEdge { + """ + The item at the end of the edge. + """ + node: Collection! """ - The price, with any discount subtracted. + A cursor for use in pagination. """ - price: TaxedMoney - - """ - The price without any discount. - """ - priceUndiscounted: TaxedMoney - - """ - The discounted price in the local currency. - """ - priceLocalCurrency: TaxedMoney + cursor: String! } """ -Represents a monetary value with taxes. In cases where taxes were not applied, net and gross values will be equal. +Creates a new collection. """ -type TaxedMoney { - """ - Currency code. - """ - currency: String! - - """ - Amount of money including taxes. - """ - gross: Money! - - """ - Amount of money without taxes. - """ - net: Money! - - """ - Amount of taxes. - """ - tax: Money! +type CollectionCreate { + collectionErrors: [CollectionError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CollectionError!]! + collection: Collection } -input AddressInput { +input CollectionCreateInput { """ - Given name. + Informs whether a collection is published. """ - firstName: String + isPublished: Boolean """ - Family name. + Name of the collection. """ - lastName: String + name: String """ - Company or organization. + Slug of the collection. """ - companyName: String + slug: String """ - Address. + Description of the collection (JSON). """ - streetAddress1: String + description: JSONString """ - Address. + Background image file. """ - streetAddress2: String + backgroundImage: Upload """ - City. + Alt text for an image. """ - city: String + backgroundImageAlt: String """ - District. + Search engine optimization fields. """ - cityArea: String + seo: SeoInput """ - Postal code. + Publication date. ISO 8601 standard. """ - postalCode: String + publicationDate: Date """ - Country. + List of products to be added to the collection. """ - country: CountryCode + products: [ID] +} + +""" +Deletes a collection. +""" +type CollectionDelete { + collectionErrors: [CollectionError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CollectionError!]! + collection: Collection +} + +type CollectionError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String """ - State or province. + The error message. """ - countryArea: String + message: String """ - Phone number. + List of products IDs which causes the error. """ - phone: String + products: [ID!] + + """ + The error code. + """ + code: CollectionErrorCode! +} + +""" +An enumeration. +""" +enum CollectionErrorCode { + DUPLICATED_INPUT_ITEM + GRAPHQL_ERROR + INVALID + NOT_FOUND + REQUIRED + UNIQUE + CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT +} + +input CollectionFilterInput { + published: CollectionPublished + search: String + metadata: [MetadataInput] + ids: [ID] + + """ + Specifies the channel by which the data should be sorted. + """ + channel: String +} + +input CollectionInput { + """ + Informs whether a collection is published. + """ + isPublished: Boolean + + """ + Name of the collection. + """ + name: String + + """ + Slug of the collection. + """ + slug: String + + """ + Description of the collection (JSON). + """ + description: JSONString + + """ + Background image file. + """ + backgroundImage: Upload + + """ + Alt text for an image. + """ + backgroundImageAlt: String + + """ + Search engine optimization fields. + """ + seo: SeoInput + + """ + Publication date. ISO 8601 standard. + """ + publicationDate: Date +} + +enum CollectionPublished { + PUBLISHED + HIDDEN +} + +""" +Remove products from a collection. +""" +type CollectionRemoveProducts { + """ + Collection from which products will be removed. + """ + collection: Collection + collectionErrors: [CollectionError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CollectionError!]! +} + +""" +Reorder the products of a collection. +""" +type CollectionReorderProducts { + """ + Collection from which products are reordered. + """ + collection: Collection + collectionErrors: [CollectionError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CollectionError!]! +} + +enum CollectionSortField { + """ + Sort collections by name. + """ + NAME + + """ + Sort collections by availability. + """ + AVAILABILITY + + """ + Sort collections by product count. + """ + PRODUCT_COUNT + + """ + Sort collections by publication date. + """ + PUBLICATION_DATE +} + +input CollectionSortingInput { + """ + Specifies the direction in which to sort products. + """ + direction: OrderDirection! + + """ + Specifies the channel in which to sort the data. + """ + channel: String + + """ + Sort collections by the selected field. + """ + field: CollectionSortField! +} + +type CollectionTranslatableContent implements Node { + seoTitle: String + seoDescription: String + + """ + The ID of the object. + """ + id: ID! + name: String! + description: JSONString + + """ + Description of the collection (JSON). + """ + descriptionJson: JSONString + @deprecated( + reason: "Will be removed in Saleor 4.0. Use the `description` field instead." + ) + + """ + Returns translated collection fields for the given language code. + """ + translation( + """ + A language code to return the translation for collection. + """ + languageCode: LanguageCodeEnum! + ): CollectionTranslation + + """ + Represents a collection of products. + """ + collection: Collection +} + +""" +Creates/Updates translations for collection. +""" +type CollectionTranslate { + translationErrors: [TranslationError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [TranslationError!]! + collection: Collection +} + +type CollectionTranslation implements Node { + seoTitle: String + seoDescription: String + + """ + The ID of the object. + """ + id: ID! + name: String! + description: JSONString + + """ + Translation language. + """ + language: LanguageDisplay! + + """ + Translated description of the product (JSON). + """ + descriptionJson: JSONString + @deprecated( + reason: "Will be removed in Saleor 4.0. Use the `description` field instead." + ) +} + +""" +Updates a collection. +""" +type CollectionUpdate { + collectionErrors: [CollectionError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [CollectionError!]! + collection: Collection +} + +""" +Stores information about a single configuration field. +""" +type ConfigurationItem { + """ + Name of the field. + """ + name: String! + + """ + Current value of the field. + """ + value: String + + """ + Type of the field. + """ + type: ConfigurationTypeFieldEnum + + """ + Help text for the field. + """ + helpText: String + + """ + Label for the field. + """ + label: String +} + +input ConfigurationItemInput { + """ + Name of the field to update. + """ + name: String! + + """ + Value of the given field to update. + """ + value: String +} + +""" +An enumeration. +""" +enum ConfigurationTypeFieldEnum { + STRING + MULTILINE + BOOLEAN + SECRET + PASSWORD + SECRETMULTILINE +} + +""" +Confirm user account with token sent by email during registration. +""" +type ConfirmAccount { + """ + An activated user account. + """ + user: User + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! +} + +""" +Confirm the email change of the logged-in user. +""" +type ConfirmEmailChange { + """ + A user instance with a new email. + """ + user: User + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! } """ @@ -3857,2974 +3661,51 @@ enum CountryCode { ZW } -""" -Represents a custom attribute. -""" -type SelectedAttribute { +type CountryDisplay { """ - Name of an attribute displayed in the interface. + Country code. """ - attribute: Attribute! - - """ - Values of an attribute. - """ - values: [AttributeValue]! -} - -enum ReportingPeriod { - TODAY - THIS_MONTH -} - -""" -Represents a product image. -""" -type ProductImage { - """ - The ID of the image. - """ - id: ID! - - """ - The alt text of the image. - """ - alt: String - - """ - The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. - """ - sortOrder: Int - - """ - The URL of the image. - """ - url( - """ - Size of the image. - """ - size: Int - ): String! -} - -""" -Represents a product media. -""" -type ProductMedia implements Node { - """ - The ID of the object. - """ - id: ID! - sortOrder: Int - alt: String! - type: ProductMediaType! - oembedData: JSONString! - - """ - The URL of the media. - """ - url( - """ - Size of the image. - """ - size: Int - ): String! -} - -""" -An enumeration. -""" -enum ProductMediaType { - """ - An uploaded image or an URL to an image - """ - IMAGE - - """ - A URL to an external video - """ - VIDEO -} - -type ProductVariantTranslation implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - - """ - Translation language. - """ - language: LanguageDisplay! -} - -type DigitalContent implements Node & ObjectWithMetadata { - useDefaultSettings: Boolean! - automaticFulfillment: Boolean! - contentFile: String! - maxDownloads: Int - urlValidDays: Int - - """ - List of URLs for the digital variant. - """ - urls: [DigitalContentUrl] - - """ - The ID of the object. - """ - id: ID! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - Product variant assigned to digital content. - """ - productVariant: ProductVariant! -} - -type DigitalContentUrl implements Node { - content: DigitalContent! - created: DateTime! - downloadNum: Int! - - """ - The ID of the object. - """ - id: ID! - - """ - URL for digital content. - """ - url: String - - """ - UUID of digital content. - """ - token: UUID! -} - -scalar UUID - -""" -Represents stock. -""" -type Stock implements Node { - warehouse: Warehouse! - productVariant: ProductVariant! - - """ - Quantity of a product in the warehouse's possession, including the allocated stock that is waiting for shipment. - """ - quantity: Int! - - """ - The ID of the object. - """ - id: ID! - - """ - Quantity allocated for orders - """ - quantityAllocated: Int! -} - -""" -Represents availability of a product in the storefront. -""" -type ProductPricingInfo { - """ - Whether it is in sale or not. - """ - onSale: Boolean - - """ - The discount amount if in sale (null otherwise). - """ - discount: TaxedMoney - - """ - The discount amount in the local currency. - """ - discountLocalCurrency: TaxedMoney - - """ - The discounted price range of the product variants. - """ - priceRange: TaxedMoneyRange - - """ - The undiscounted price range of the product variants. - """ - priceRangeUndiscounted: TaxedMoneyRange - - """ - The discounted price range of the product variants in the local currency. - """ - priceRangeLocalCurrency: TaxedMoneyRange -} - -""" -Represents a range of monetary values. -""" -type TaxedMoneyRange { - """ - Lower bound of a price range. - """ - start: TaxedMoney - - """ - Upper bound of a price range. - """ - stop: TaxedMoney -} - -""" -Represents product channel listing. -""" -type ProductChannelListing implements Node { - """ - The ID of the object. - """ - id: ID! - publicationDate: Date - isPublished: Boolean! - channel: Channel! - visibleInListings: Boolean! - availableForPurchase: Date - - """ - The price of the cheapest variant (including discounts). - """ - discountedPrice: Money - - """ - Purchase cost of product. - """ - purchaseCost: MoneyRange - - """ - Range of margin percentage value. - """ - margin: Margin - - """ - Whether the product is available for purchase. - """ - isAvailableForPurchase: Boolean - - """ - Lists the storefront product's pricing, the current price and discounts, only meant for displaying. - """ - pricing( - """ - Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration. - """ - address: AddressInput - ): ProductPricingInfo -} - -""" -The `Date` scalar type represents a Date -value as specified by -[iso8601](https://en.wikipedia.org/wiki/ISO_8601). -""" -scalar Date - -type Margin { - start: Int - stop: Int -} - -""" -Represents a collection of products. -""" -type Collection implements Node & ObjectWithMetadata { - seoTitle: String - seoDescription: String - - """ - The ID of the object. - """ - id: ID! - name: String! - description: JSONString - slug: String! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - Description of the collection (JSON). - """ - descriptionJson: JSONString - @deprecated( - reason: "Will be removed in Saleor 4.0. Use the `description` field instead." - ) - - """ - List of products in this collection. - """ - products( - """ - Filtering options for products. - """ - filter: ProductFilterInput - - """ - Sort products. - """ - sortBy: ProductOrder - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): ProductCountableConnection - backgroundImage( - """ - Size of the image. - """ - size: Int - ): Image - - """ - Returns translated collection fields for the given language code. - """ - translation( - """ - A language code to return the translation for collection. - """ - languageCode: LanguageCodeEnum! - ): CollectionTranslation - - """ - List of channels in which the collection is available. - """ - channelListings: [CollectionChannelListing!] -} - -input ProductFilterInput { - isPublished: Boolean - collections: [ID] - categories: [ID] - hasCategory: Boolean - attributes: [AttributeInput] - stockAvailability: StockAvailability - productType: ID - stocks: ProductStockFilterInput - search: String - metadata: [MetadataInput] - price: PriceRangeInput - minimalPrice: PriceRangeInput - productTypes: [ID] - ids: [ID] - - """ - Specifies the channel by which the data should be sorted. - """ - channel: String -} - -input AttributeInput { - """ - Internal representation of an attribute name. - """ - slug: String! - - """ - [Deprecated] Internal representation of a value (unique per attribute). This field will be removed after 2020-07-31. - """ - value: String - - """ - Internal representation of a value (unique per attribute). - """ - values: [String] -} - -enum StockAvailability { - IN_STOCK - OUT_OF_STOCK -} - -input ProductStockFilterInput { - warehouseIds: [ID!] - quantity: IntRangeInput -} - -input IntRangeInput { - """ - Value greater than or equal to. - """ - gte: Int - - """ - Value less than or equal to. - """ - lte: Int -} - -input PriceRangeInput { - """ - Price greater than or equal to. - """ - gte: Float - - """ - Price less than or equal to. - """ - lte: Float -} - -input ProductOrder { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Specifies the channel in which to sort the data. - """ - channel: String - - """ - Sort product by the selected attribute's values. - Note: this doesn't take translations into account yet. - """ - attributeId: ID - - """ - Sort products by the selected field. - """ - field: ProductOrderField -} - -enum OrderDirection { - """ - Specifies an ascending sort order. - """ - ASC - - """ - Specifies a descending sort order. - """ - DESC -} - -enum ProductOrderField { - """ - Sort products by name. - """ - NAME - - """ - Sort products by rank. Note: This option is available only with the `search` filter. - """ - RANK - - """ - Sort products by price. - """ - PRICE - - """ - Sort products by a minimal price of a product's variant. - """ - MINIMAL_PRICE - - """ - Sort products by update date. - """ - DATE - - """ - Sort products by type. - """ - TYPE - - """ - Sort products by publication status. - """ - PUBLISHED - - """ - Sort products by publication date. - """ - PUBLICATION_DATE - - """ - Sort products by collection. Note: This option is available only for the `Collection.products` query. - """ - COLLECTION - - """ - Sort products by rating. - """ - RATING -} - -type CollectionTranslation implements Node { - seoTitle: String - seoDescription: String - - """ - The ID of the object. - """ - id: ID! - name: String! - description: JSONString - - """ - Translation language. - """ - language: LanguageDisplay! - - """ - Translated description of the product (JSON). - """ - descriptionJson: JSONString - @deprecated( - reason: "Will be removed in Saleor 4.0. Use the `description` field instead." - ) -} - -""" -Represents collection channel listing. -""" -type CollectionChannelListing implements Node { - publicationDate: Date - isPublished: Boolean! - - """ - The ID of the object. - """ - id: ID! - channel: Channel! -} - -type ProductTranslation implements Node { - """ - The ID of the object. - """ - id: ID! - seoTitle: String - seoDescription: String - name: String! - description: JSONString - - """ - Translation language. - """ - language: LanguageDisplay! - - """ - Translated description of the product (JSON). - """ - descriptionJson: JSONString - @deprecated( - reason: "Will be removed in Saleor 4.0. Use the `description` field instead." - ) -} - -""" -Represents user address data. -""" -type Address implements Node { - """ - The ID of the object. - """ - id: ID! - firstName: String! - lastName: String! - companyName: String! - streetAddress1: String! - streetAddress2: String! - city: String! - cityArea: String! - postalCode: String! - - """ - Shop's default country. - """ - country: CountryDisplay! - countryArea: String! - phone: String - - """ - Address is user's default shipping address. - """ - isDefaultShippingAddress: Boolean - - """ - Address is user's default billing address. - """ - isDefaultBillingAddress: Boolean -} - -type WarehouseCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [WarehouseCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type WarehouseCountableEdge { - """ - The item at the end of the edge. - """ - node: Warehouse! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -input WarehouseFilterInput { - search: String - ids: [ID] -} - -input WarehouseSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort warehouses by the selected field. - """ - field: WarehouseSortField! -} - -enum WarehouseSortField { - """ - Sort warehouses by name. - """ - NAME -} - -type TranslatableItemConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [TranslatableItemEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type TranslatableItemEdge { - """ - The item at the end of the edge. - """ - node: TranslatableItem! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -union TranslatableItem = - ProductTranslatableContent - | CollectionTranslatableContent - | CategoryTranslatableContent - | AttributeTranslatableContent - | AttributeValueTranslatableContent - | ProductVariantTranslatableContent - | PageTranslatableContent - | ShippingMethodTranslatableContent - | SaleTranslatableContent - | VoucherTranslatableContent - | MenuItemTranslatableContent - -type ProductTranslatableContent implements Node { - """ - The ID of the object. - """ - id: ID! - seoTitle: String - seoDescription: String - name: String! - description: JSONString - - """ - Description of the product (JSON). - """ - descriptionJson: JSONString - @deprecated( - reason: "Will be removed in Saleor 4.0. Use the `description` field instead." - ) - - """ - Returns translated product fields for the given language code. - """ - translation( - """ - A language code to return the translation for product. - """ - languageCode: LanguageCodeEnum! - ): ProductTranslation - - """ - Represents an individual item for sale in the storefront. - """ - product: Product -} - -type CollectionTranslatableContent implements Node { - seoTitle: String - seoDescription: String - - """ - The ID of the object. - """ - id: ID! - name: String! - description: JSONString - - """ - Description of the collection (JSON). - """ - descriptionJson: JSONString - @deprecated( - reason: "Will be removed in Saleor 4.0. Use the `description` field instead." - ) - - """ - Returns translated collection fields for the given language code. - """ - translation( - """ - A language code to return the translation for collection. - """ - languageCode: LanguageCodeEnum! - ): CollectionTranslation - - """ - Represents a collection of products. - """ - collection: Collection -} - -type CategoryTranslatableContent implements Node { - seoTitle: String - seoDescription: String - - """ - The ID of the object. - """ - id: ID! - name: String! - description: JSONString - - """ - Description of the category (JSON). - """ - descriptionJson: JSONString - @deprecated( - reason: "Will be removed in Saleor 4.0. Use the `description` field instead." - ) - - """ - Returns translated category fields for the given language code. - """ - translation( - """ - A language code to return the translation for category. - """ - languageCode: LanguageCodeEnum! - ): CategoryTranslation - - """ - Represents a single category of products. - """ - category: Category -} - -type AttributeTranslatableContent implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - - """ - Returns translated attribute fields for the given language code. - """ - translation( - """ - A language code to return the translation for attribute. - """ - languageCode: LanguageCodeEnum! - ): AttributeTranslation - - """ - Custom attribute of a product. - """ - attribute: Attribute -} - -type AttributeValueTranslatableContent implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - - """ - Returns translated attribute value fields for the given language code. - """ - translation( - """ - A language code to return the translation for attribute value. - """ - languageCode: LanguageCodeEnum! - ): AttributeValueTranslation - - """ - Represents a value of an attribute. - """ - attributeValue: AttributeValue -} - -type ProductVariantTranslatableContent implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - - """ - Returns translated product variant fields for the given language code. - """ - translation( - """ - A language code to return the translation for product variant. - """ - languageCode: LanguageCodeEnum! - ): ProductVariantTranslation - - """ - Represents a version of a product such as different size or color. - """ - productVariant: ProductVariant -} - -type PageTranslatableContent implements Node { - seoTitle: String - seoDescription: String - - """ - The ID of the object. - """ - id: ID! - title: String! - content: JSONString - - """ - Content of the page (JSON). - """ - contentJson: JSONString - @deprecated( - reason: "Will be removed in Saleor 4.0. Use the `content` field instead." - ) - - """ - Returns translated page fields for the given language code. - """ - translation( - """ - A language code to return the translation for page. - """ - languageCode: LanguageCodeEnum! - ): PageTranslation - - """ - ('A static page that can be manually added by a shop operator ', 'through the dashboard.') - """ - page: Page -} - -type PageTranslation implements Node { - seoTitle: String - seoDescription: String - - """ - The ID of the object. - """ - id: ID! - title: String! - content: JSONString - - """ - Translation language. - """ - language: LanguageDisplay! - - """ - Translated description of the page (JSON). - """ - contentJson: JSONString - @deprecated( - reason: "Will be removed in Saleor 4.0. Use the `content` field instead." - ) -} - -""" -A static page that can be manually added by a shop operator through the dashboard. -""" -type Page implements Node & ObjectWithMetadata { - seoTitle: String - seoDescription: String - - """ - The ID of the object. - """ - id: ID! - title: String! - content: JSONString - publicationDate: Date - isPublished: Boolean! - slug: String! - pageType: PageType! - created: DateTime! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - Content of the page (JSON). - """ - contentJson: JSONString! - @deprecated( - reason: "Will be removed in Saleor 4.0. Use the `content` field instead." - ) - - """ - Returns translated page fields for the given language code. - """ - translation( - """ - A language code to return the translation for page. - """ - languageCode: LanguageCodeEnum! - ): PageTranslation - - """ - List of attributes assigned to this product. - """ - attributes: [SelectedAttribute!]! -} - -""" -Represents a type of page. It defines what attributes are available to pages of this type. -""" -type PageType implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - name: String! - slug: String! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - Page attributes of that page type. - """ - attributes: [Attribute] - - """ - Attributes that can be assigned to the page type. - """ - availableAttributes( - filter: AttributeFilterInput - - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): AttributeCountableConnection - - """ - Whether page type has pages assigned. - """ - hasPages: Boolean -} - -type ShippingMethodTranslatableContent implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - description: JSONString - - """ - Returns translated shipping method fields for the given language code. - """ - translation( - """ - A language code to return the translation for shipping method. - """ - languageCode: LanguageCodeEnum! - ): ShippingMethodTranslation - - """ - Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. - """ - shippingMethod: ShippingMethod -} - -type SaleTranslatableContent implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - - """ - Returns translated sale fields for the given language code. - """ - translation( - """ - A language code to return the translation for sale. - """ - languageCode: LanguageCodeEnum! - ): SaleTranslation - - """ - Sales allow creating discounts for categories, collections or products and are visible to all the customers. - """ - sale: Sale -} - -type SaleTranslation implements Node { - """ - The ID of the object. - """ - id: ID! - name: String - - """ - Translation language. - """ - language: LanguageDisplay! -} - -""" -Sales allow creating discounts for categories, collections or products and are visible to all the customers. -""" -type Sale implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - type: SaleType! - startDate: DateTime! - endDate: DateTime - - """ - List of categories this sale applies to. - """ - categories( - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): CategoryCountableConnection - - """ - List of collections this sale applies to. - """ - collections( - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): CollectionCountableConnection - - """ - List of products this sale applies to. - """ - products( - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): ProductCountableConnection - - """ - Returns translated sale fields for the given language code. - """ - translation( - """ - A language code to return the translation for sale. - """ - languageCode: LanguageCodeEnum! - ): SaleTranslation - - """ - List of channels available for the sale. - """ - channelListings: [SaleChannelListing!] - - """ - Sale value. - """ - discountValue: Float - - """ - Currency code for sale. - """ - currency: String -} - -""" -An enumeration. -""" -enum SaleType { - """ - fixed - """ - FIXED - - """ - % - """ - PERCENTAGE -} - -type CollectionCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [CollectionCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type CollectionCountableEdge { - """ - The item at the end of the edge. - """ - node: Collection! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Represents sale channel listing. -""" -type SaleChannelListing implements Node { - """ - The ID of the object. - """ - id: ID! - channel: Channel! - discountValue: Float! - currency: String! -} - -type VoucherTranslatableContent implements Node { - """ - The ID of the object. - """ - id: ID! - name: String - - """ - Returns translated voucher fields for the given language code. - """ - translation( - """ - A language code to return the translation for voucher. - """ - languageCode: LanguageCodeEnum! - ): VoucherTranslation - - """ - Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. - """ - voucher: Voucher -} - -type VoucherTranslation implements Node { - """ - The ID of the object. - """ - id: ID! - name: String - - """ - Translation language. - """ - language: LanguageDisplay! -} - -""" -Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. -""" -type Voucher implements Node { - """ - The ID of the object. - """ - id: ID! - name: String - - """ - Determines a type of voucher. - """ - type: VoucherTypeEnum! code: String! - usageLimit: Int - used: Int! - startDate: DateTime! - endDate: DateTime - applyOncePerOrder: Boolean! - applyOncePerCustomer: Boolean! """ - Determines a type of discount for voucher - value or percentage + Country name. """ - discountValueType: DiscountValueTypeEnum! - minCheckoutItemsQuantity: Int + country: String! """ - List of categories this voucher applies to. + Country tax. """ - categories( - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): CategoryCountableConnection - - """ - List of collections this voucher applies to. - """ - collections( - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): CollectionCountableConnection - - """ - List of products this voucher applies to. - """ - products( - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): ProductCountableConnection - - """ - List of countries available for the shipping voucher. - """ - countries: [CountryDisplay] - - """ - Returns translated voucher fields for the given language code. - """ - translation( - """ - A language code to return the translation for voucher. - """ - languageCode: LanguageCodeEnum! - ): VoucherTranslation - - """ - Voucher value. - """ - discountValue: Float - - """ - Currency code for voucher. - """ - currency: String - - """ - Minimum order value to apply voucher. - """ - minSpent: Money - - """ - List of availability in channels for the voucher. - """ - channelListings: [VoucherChannelListing!] -} - -enum VoucherTypeEnum { - SHIPPING - ENTIRE_ORDER - SPECIFIC_PRODUCT -} - -enum DiscountValueTypeEnum { - FIXED - PERCENTAGE + vat: VAT } """ -Represents voucher channel listing. +Create JWT token. """ -type VoucherChannelListing implements Node { +type CreateToken { """ - The ID of the object. + JWT token, required to authenticate. """ - id: ID! - channel: Channel! - discountValue: Float! - currency: String! - minSpent: Money -} + token: String -type MenuItemTranslatableContent implements Node { """ - The ID of the object. + JWT refresh token, required to re-generate access token. """ - id: ID! - name: String! + refreshToken: String """ - Returns translated menu item fields for the given language code. + CSRF token required to re-generate access token. """ - translation( - """ - A language code to return the translation for menu item. - """ - languageCode: LanguageCodeEnum! - ): MenuItemTranslation + csrfToken: String """ - Represents a single item of the related menu. Can store categories, collection or pages. - """ - menuItem: MenuItem -} - -type MenuItemTranslation implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - - """ - Translation language. - """ - language: LanguageDisplay! -} - -""" -Represents a single item of the related menu. Can store categories, collection or pages. -""" -type MenuItem implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - name: String! - menu: Menu! - parent: MenuItem - category: Category - collection: Collection - page: Page - level: Int! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - children: [MenuItem] - - """ - URL to the menu item. - """ - url: String - - """ - Returns translated menu item fields for the given language code. - """ - translation( - """ - A language code to return the translation for menu item. - """ - languageCode: LanguageCodeEnum! - ): MenuItemTranslation -} - -""" -Represents a single menu - an object that is used to help navigate through the store. -""" -type Menu implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - name: String! - slug: String! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - items: [MenuItem] -} - -enum TranslatableKinds { - ATTRIBUTE - ATTRIBUTE_VALUE - CATEGORY - COLLECTION - MENU_ITEM - PAGE - PRODUCT - SALE - SHIPPING_METHOD - VARIANT - VOUCHER -} - -type StockCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [StockCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type StockCountableEdge { - """ - The item at the end of the edge. - """ - node: Stock! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -input StockFilterInput { - quantity: Float - search: String -} - -""" -Represents a shop resource containing general shop data and configuration. -""" -type Shop { - """ - List of available payment gateways. - """ - availablePaymentGateways( - """ - A currency for which gateways will be returned. - """ - currency: String - ): [PaymentGateway!]! - - """ - List of available external authentications. - """ - availableExternalAuthentications: [ExternalAuthentication!]! - - """ - Shipping methods that are available for the shop. - """ - availableShippingMethods( - """ - Slug of a channel for which the data should be returned. - """ - channel: String! - - """ - Address for which available shipping methods should be returned. - """ - address: AddressInput - ): [ShippingMethod] - - """ - List of countries available in the shop. - """ - countries( - """ - A language code to return the translation for. - """ - languageCode: LanguageCodeEnum - ): [CountryDisplay!]! - - """ - Shop's default country. - """ - defaultCountry: CountryDisplay - - """ - Default shop's email sender's name. - """ - defaultMailSenderName: String - - """ - Default shop's email sender's address. - """ - defaultMailSenderAddress: String - - """ - Shop's description. - """ - description: String - - """ - Shop's domain data. - """ - domain: Domain! - - """ - List of the shops's supported languages. - """ - languages: [LanguageDisplay]! - - """ - Shop's name. - """ - name: String! - - """ - Shop's navigation. - """ - navigation: Navigation - @deprecated( - reason: "Fetch menus using the `menu` query with `slug` parameter." - ) - - """ - List of available permissions. - """ - permissions: [Permission]! - - """ - List of possible phone prefixes. - """ - phonePrefixes: [String]! - - """ - Header text. - """ - headerText: String - - """ - Include taxes in prices. - """ - includeTaxesInPrices: Boolean! - - """ - Display prices with tax in store. - """ - displayGrossPrices: Boolean! - - """ - Charge taxes on shipping. - """ - chargeTaxesOnShipping: Boolean! - - """ - Enable inventory tracking. - """ - trackInventoryByDefault: Boolean - - """ - Default weight unit. - """ - defaultWeightUnit: WeightUnitsEnum - - """ - Returns translated shop fields for the given language code. - """ - translation( - """ - A language code to return the translation for shop. - """ - languageCode: LanguageCodeEnum! - ): ShopTranslation - - """ - Enable automatic fulfillment for all digital products. - """ - automaticFulfillmentDigitalProducts: Boolean - - """ - Default number of max downloads per digital content URL. - """ - defaultDigitalMaxDownloads: Int - - """ - Default number of days which digital content URL will be valid. - """ - defaultDigitalUrlValidDays: Int - - """ - Company address. - """ - companyAddress: Address - - """ - URL of a view where customers can set their password. - """ - customerSetPasswordUrl: String - - """ - List of staff notification recipients. - """ - staffNotificationRecipients: [StaffNotificationRecipient] - - """ - Resource limitations and current usage if any set for a shop - """ - limits: LimitInfo! - - """ - Saleor API version. - """ - version: String! -} - -""" -Available payment gateway backend with configuration necessary to setup client. -""" -type PaymentGateway { - """ - Payment gateway name. - """ - name: String! - - """ - Payment gateway ID. - """ - id: ID! - - """ - Payment gateway client configuration. - """ - config: [GatewayConfigLine!]! - - """ - Payment gateway supported currencies. - """ - currencies: [String]! -} - -""" -Payment gateway client configuration key and value pair. -""" -type GatewayConfigLine { - """ - Gateway config key. - """ - field: String! - - """ - Gateway config value for key. - """ - value: String -} - -type ExternalAuthentication { - """ - ID of external authentication plugin. - """ - id: String! - - """ - Name of external authentication plugin. - """ - name: String -} - -""" -Represents shop's domain. -""" -type Domain { - """ - The host name of the domain. - """ - host: String! - - """ - Inform if SSL is enabled. - """ - sslEnabled: Boolean! - - """ - Shop's absolute URL. - """ - url: String! -} - -""" -Represents shop's navigation menus. -""" -type Navigation { - """ - Main navigation bar. - """ - main: Menu - - """ - Secondary navigation bar. - """ - secondary: Menu -} - -type ShopTranslation implements Node { - """ - The ID of the object. - """ - id: ID! - headerText: String! - description: String! - - """ - Translation language. - """ - language: LanguageDisplay! -} - -""" -Represents a recipient of email notifications send by Saleor, such as notifications about new orders. Notifications can be assigned to staff users or arbitrary email addresses. -""" -type StaffNotificationRecipient implements Node { - """ - Returns a user subscribed to email notifications. + A user instance. """ user: User - - """ - Determines if a notification active. - """ - active: Boolean - - """ - The ID of the object. - """ - id: ID! - - """ - Returns email address of a user subscribed to email notifications. - """ - email: String -} - -""" -Represents user data. -""" -type User implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - lastLogin: DateTime - email: String! - firstName: String! - lastName: String! - isStaff: Boolean! - isActive: Boolean! - - """ - A note about the customer. - """ - note: String - dateJoined: DateTime! - defaultShippingAddress: Address - defaultBillingAddress: Address - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - List of all user's addresses. - """ - addresses: [Address] - - """ - Returns the last open checkout of this user. - """ - checkout: Checkout + accountErrors: [AccountError!]! @deprecated( - reason: "Use the `checkout_tokens` field to fetch the user checkouts." + reason: "Use errors field instead. This field will be removed in Saleor 4.0." ) - - """ - Returns the checkout UUID's assigned to this user. - """ - checkoutTokens( - """ - Slug of a channel for which the data should be returned. - """ - channel: String - ): [UUID!] - - """ - List of the user gift cards. - """ - giftCards( - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): GiftCardCountableConnection - - """ - List of user's orders. - """ - orders( - """ - Return the elements in the list that come before the specified cursor. - """ - before: String - - """ - Return the elements in the list that come after the specified cursor. - """ - after: String - - """ - Return the first n elements from the list. - """ - first: Int - - """ - Return the last n elements from the list. - """ - last: Int - ): OrderCountableConnection - - """ - List of user's permissions. - """ - permissions: [Permission] - @deprecated( - reason: "Will be removed in Saleor 2.11.Use the `userPermissions` instead." - ) - - """ - List of user's permissions. - """ - userPermissions: [UserPermission] - - """ - List of user's permission groups. - """ - permissionGroups: [Group] - - """ - List of user's permission groups which user can manage. - """ - editableGroups: [Group] - avatar( - """ - Size of the avatar. - """ - size: Int - ): Image - - """ - List of events associated with the user. - """ - events: [CustomerEvent] - - """ - List of stored payment sources. - """ - storedPaymentSources: [PaymentSource] - - """ - User language code. - """ - languageCode: LanguageCodeEnum! -} - -""" -Checkout object. -""" -type Checkout implements Node & ObjectWithMetadata { - created: DateTime! - lastChange: DateTime! - user: User - quantity: Int! - channel: Channel! - billingAddress: Address - shippingAddress: Address - note: String! - discount: Money - discountName: String - translatedDiscountName: String - voucherCode: String - - """ - List of gift cards associated with this checkout. - """ - giftCards: [GiftCard] - - """ - The ID of the object. - """ - id: ID! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - Shipping methods that can be used with this order. - """ - availableShippingMethods: [ShippingMethod]! - - """ - List of available payment gateways. - """ - availablePaymentGateways: [PaymentGateway!]! - - """ - Email of a customer. - """ - email: String! - - """ - Returns True, if checkout requires shipping. - """ - isShippingRequired: Boolean! - - """ - A list of checkout lines, each containing information about an item in the checkout. - """ - lines: [CheckoutLine] - - """ - The price of the shipping, with all the taxes included. - """ - shippingPrice: TaxedMoney - - """ - The shipping method related with checkout. - """ - shippingMethod: ShippingMethod - - """ - The price of the checkout before shipping, with taxes included. - """ - subtotalPrice: TaxedMoney - - """ - The checkout's token. - """ - token: UUID! - - """ - The sum of the the checkout line prices, with all the taxes,shipping costs, and discounts included. - """ - totalPrice: TaxedMoney - - """ - Checkout language code. - """ - languageCode: LanguageCodeEnum! -} - -""" -A gift card is a prepaid electronic payment card accepted in stores. They can be used during checkout by providing a valid gift card codes. -""" -type GiftCard implements Node { - """ - Gift card code. - """ - code: String - - """ - The customer who bought a gift card. - """ - user: User - created: DateTime! - startDate: Date! - endDate: Date - lastUsedOn: DateTime - isActive: Boolean! - initialBalance: Money - currentBalance: Money - - """ - The ID of the object. - """ - id: ID! - - """ - Code in format which allows displaying in a user interface. - """ - displayCode: String -} - -""" -Represents an item in the checkout. -""" -type CheckoutLine implements Node { - """ - The ID of the object. - """ - id: ID! - variant: ProductVariant! - quantity: Int! - - """ - The sum of the checkout line price, taxes and discounts. - """ - totalPrice: TaxedMoney - - """ - Indicates whether the item need to be delivered. - """ - requiresShipping: Boolean -} - -type GiftCardCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [GiftCardCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type GiftCardCountableEdge { - """ - The item at the end of the edge. - """ - node: GiftCard! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -type OrderCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [OrderCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type OrderCountableEdge { - """ - The item at the end of the edge. - """ - node: Order! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Represents an order in the shop. -""" -type Order implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - created: DateTime! - status: OrderStatus! - user: User - trackingClientId: String! - billingAddress: Address - shippingAddress: Address - shippingMethod: ShippingMethod - shippingMethodName: String - channel: Channel! - - """ - Total price of shipping. - """ - shippingPrice: TaxedMoney! - shippingTaxRate: Float! - token: String! - voucher: Voucher - - """ - List of user gift cards. - """ - giftCards: [GiftCard] - displayGrossPrices: Boolean! - customerNote: String! - weight: Weight - redirectUrl: String - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - List of shipments for the order. - """ - fulfillments: [Fulfillment]! - - """ - List of order lines. - """ - lines: [OrderLine]! - - """ - List of actions that can be performed in the current state of an order. - """ - actions: [OrderAction]! - - """ - Shipping methods that can be used with this order. - """ - availableShippingMethods: [ShippingMethod] - - """ - List of order invoices. - """ - invoices: [Invoice] - - """ - User-friendly number of an order. - """ - number: String - - """ - Informs if an order is fully paid. - """ - isPaid: Boolean! - - """ - Internal payment status. - """ - paymentStatus: PaymentChargeStatusEnum! - - """ - User-friendly payment status. - """ - paymentStatusDisplay: String! - - """ - List of payments for the order. - """ - payments: [Payment] - - """ - Total amount of the order. - """ - total: TaxedMoney! - - """ - Undiscounted total amount of the order. - """ - undiscountedTotal: TaxedMoney! - - """ - The sum of line prices not including shipping. - """ - subtotal: TaxedMoney! - - """ - User-friendly order status. - """ - statusDisplay: String - - """ - Informs whether a draft order can be finalized(turned into a regular order). - """ - canFinalize: Boolean! - - """ - Amount authorized for the order. - """ - totalAuthorized: Money! - - """ - Amount captured by payment. - """ - totalCaptured: Money! - - """ - List of events associated with the order. - """ - events: [OrderEvent] - - """ - The difference between the paid and the order total amount. - """ - totalBalance: Money! - - """ - Email address of the customer. - """ - userEmail: String - - """ - Returns True, if order requires shipping. - """ - isShippingRequired: Boolean! - languageCode: String! - @deprecated( - reason: "Use the `languageCodeEnum` field to fetch the language code. This field will be removed in Saleor 4.0." - ) - - """ - Order language code. - """ - languageCodeEnum: LanguageCodeEnum! - - """ - Returns applied discount. - """ - discount: Money - @deprecated( - reason: "Use discounts field. This field will be removed in Saleor 4.0." - ) - - """ - Discount name. - """ - discountName: String - @deprecated( - reason: "Use discounts field. This field will be removed in Saleor 4.0." - ) - - """ - Translated discount name. - """ - translatedDiscountName: String - @deprecated( - reason: "Use discounts field. This field will be removed in Saleor 4.0." - ) - - """ - List of all discounts assigned to the order. - """ - discounts: [OrderDiscount!] -} - -""" -An enumeration. -""" -enum OrderStatus { - """ - Draft - """ - DRAFT - - """ - Unconfirmed - """ - UNCONFIRMED - - """ - Unfulfilled - """ - UNFULFILLED - - """ - Partially fulfilled - """ - PARTIALLY_FULFILLED - - """ - Partially returned - """ - PARTIALLY_RETURNED - - """ - Returned - """ - RETURNED - - """ - Fulfilled - """ - FULFILLED - - """ - Canceled - """ - CANCELED -} - -""" -Represents order fulfillment. -""" -type Fulfillment implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - fulfillmentOrder: Int! - status: FulfillmentStatus! - trackingNumber: String! - created: DateTime! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - List of lines for the fulfillment. - """ - lines: [FulfillmentLine] - - """ - User-friendly fulfillment status. - """ - statusDisplay: String - - """ - Warehouse from fulfillment was fulfilled. - """ - warehouse: Warehouse -} - -""" -An enumeration. -""" -enum FulfillmentStatus { - """ - Fulfilled - """ - FULFILLED - - """ - Refunded - """ - REFUNDED - - """ - Returned - """ - RETURNED - - """ - Replaced - """ - REPLACED - - """ - Refunded and returned - """ - REFUNDED_AND_RETURNED - - """ - Canceled - """ - CANCELED -} - -""" -Represents line of the fulfillment. -""" -type FulfillmentLine implements Node { - """ - The ID of the object. - """ - id: ID! - quantity: Int! - orderLine: OrderLine -} - -""" -Represents order line of particular order. -""" -type OrderLine implements Node { - """ - The ID of the object. - """ - id: ID! - productName: String! - variantName: String! - productSku: String! - isShippingRequired: Boolean! - quantity: Int! - quantityFulfilled: Int! - unitDiscountReason: String - taxRate: Float! - digitalContentUrl: DigitalContentUrl - - """ - The main thumbnail for the ordered product. - """ - thumbnail( - """ - Size of thumbnail. - """ - size: Int - ): Image - - """ - Price of the single item in the order line. - """ - unitPrice: TaxedMoney! - - """ - Price of the single item in the order line without applied an order line discount. - """ - undiscountedUnitPrice: TaxedMoney! - - """ - The discount applied to the single order line. - """ - unitDiscount: Money! - - """ - Value of the discount. Can store fixed value or percent value - """ - unitDiscountValue: PositiveDecimal! - - """ - Price of the order line. - """ - totalPrice: TaxedMoney! - - """ - A purchased product variant. Note: this field may be null if the variant has been removed from stock at all. - """ - variant: ProductVariant - - """ - Product name in the customer's language - """ - translatedProductName: String! - - """ - Variant name in the customer's language - """ - translatedVariantName: String! - - """ - List of allocations across warehouses. - """ - allocations: [Allocation!] - - """ - Type of the discount: fixed or percent - """ - unitDiscountType: DiscountValueTypeEnum -} - -""" -Positive Decimal scalar implementation. - -Should be used in places where value must be positive. -""" -scalar PositiveDecimal - -""" -Represents allocation. -""" -type Allocation implements Node { - """ - The ID of the object. - """ - id: ID! - - """ - Quantity allocated for orders. - """ - quantity: Int! - - """ - The warehouse were items were allocated. - """ - warehouse: Warehouse! -} - -enum OrderAction { - """ - Represents the capture action. - """ - CAPTURE - - """ - Represents a mark-as-paid action. - """ - MARK_AS_PAID - - """ - Represents a refund action. - """ - REFUND - - """ - Represents a void action. - """ - VOID -} - -""" -Represents an Invoice. -""" -type Invoice implements ObjectWithMetadata & Job & Node { - """ - The ID of the object. - """ - id: ID! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - Job status. - """ - status: JobStatusEnum! - number: String - externalUrl: String - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - Created date time of job in ISO 8601 format. - """ - createdAt: DateTime! - - """ - Date time of job last update in ISO 8601 format. - """ - updatedAt: DateTime! - - """ - Job message. - """ - message: String - - """ - URL to download an invoice. - """ - url: String -} - -interface Job { - """ - Job status. - """ - status: JobStatusEnum! - - """ - Created date time of job in ISO 8601 format. - """ - createdAt: DateTime! - - """ - Date time of job last update in ISO 8601 format. - """ - updatedAt: DateTime! - - """ - Job message. - """ - message: String -} - -""" -An enumeration. -""" -enum JobStatusEnum { - PENDING - SUCCESS - FAILED - DELETED -} - -""" -An enumeration. -""" -enum PaymentChargeStatusEnum { - NOT_CHARGED - PENDING - PARTIALLY_CHARGED - FULLY_CHARGED - PARTIALLY_REFUNDED - FULLY_REFUNDED - REFUSED - CANCELLED -} - -""" -Represents a payment of a given type. -""" -type Payment implements Node { - """ - The ID of the object. - """ - id: ID! - gateway: String! - isActive: Boolean! - created: DateTime! - modified: DateTime! - token: String! - checkout: Checkout - order: Order - paymentMethodType: String! - customerIpAddress: String - - """ - Internal payment status. - """ - chargeStatus: PaymentChargeStatusEnum! - - """ - List of actions that can be performed in the current state of a payment. - """ - actions: [OrderAction]! - - """ - Total amount of the payment. - """ - total: Money - - """ - Total amount captured for this payment. - """ - capturedAmount: Money - - """ - List of all transactions within this payment. - """ - transactions: [Transaction] - - """ - Maximum amount of money that can be captured. - """ - availableCaptureAmount: Money - - """ - Maximum amount of money that can be refunded. - """ - availableRefundAmount: Money - - """ - The details of the card used for this payment. - """ - creditCard: CreditCard -} - -""" -An object representing a single payment. -""" -type Transaction implements Node { - """ - The ID of the object. - """ - id: ID! - created: DateTime! - payment: Payment! - token: String! - kind: TransactionKind! - isSuccess: Boolean! - error: String - gatewayResponse: JSONString! - - """ - Total amount of the transaction. - """ - amount: Money -} - -""" -An enumeration. -""" -enum TransactionKind { - """ - External reference - """ - EXTERNAL - - """ - Authorization - """ - AUTH - - """ - Pending - """ - PENDING - - """ - Action to confirm - """ - ACTION_TO_CONFIRM - - """ - Refund - """ - REFUND - - """ - Refund in progress - """ - REFUND_ONGOING - - """ - Capture - """ - CAPTURE - - """ - Void - """ - VOID - - """ - Confirm - """ - CONFIRM - - """ - Cancel - """ - CANCEL + errors: [AccountError!]! } type CreditCard { @@ -6855,333 +3736,42 @@ type CreditCard { } """ -History log of the order. +Deletes customers. """ -type OrderEvent implements Node { +type CustomerBulkDelete { """ - The ID of the object. + Returns how many objects were affected. """ - id: ID! + count: Int! + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! +} - """ - Date when event happened at in ISO 8601 format. - """ - date: DateTime - - """ - Order event type. - """ - type: OrderEventsEnum - - """ - User who performed the action. - """ +""" +Creates a new customer. +""" +type CustomerCreate { + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! user: User - - """ - Content of the event. - """ - message: String - - """ - Email of the customer. - """ - email: String - - """ - Type of an email sent to the customer. - """ - emailType: OrderEventsEmailsEnum - - """ - Amount of money. - """ - amount: Float - - """ - The payment ID from the payment gateway. - """ - paymentId: String - - """ - The payment gateway of the payment. - """ - paymentGateway: String - - """ - Number of items. - """ - quantity: Int - - """ - Composed ID of the Fulfillment. - """ - composedId: String - - """ - User-friendly number of an order. - """ - orderNumber: String - - """ - Number of an invoice related to the order. - """ - invoiceNumber: String - - """ - List of oversold lines names. - """ - oversoldItems: [String] - - """ - The concerned lines. - """ - lines: [OrderEventOrderLineObject] - - """ - The lines fulfilled. - """ - fulfilledItems: [FulfillmentLine] - - """ - The warehouse were items were restocked. - """ - warehouse: Warehouse - - """ - The transaction reference of captured payment. - """ - transactionReference: String - - """ - Define if shipping costs were included to the refund. - """ - shippingCostsIncluded: Boolean - - """ - The order which is related to this order. - """ - relatedOrder: Order - - """ - The discount applied to the order. - """ - discount: OrderEventDiscountObject } """ -An enumeration. +Deletes a customer. """ -enum OrderEventsEnum { - DRAFT_CREATED - DRAFT_CREATED_FROM_REPLACE - ADDED_PRODUCTS - REMOVED_PRODUCTS - PLACED - PLACED_FROM_DRAFT - OVERSOLD_ITEMS - CANCELED - ORDER_MARKED_AS_PAID - ORDER_FULLY_PAID - ORDER_REPLACEMENT_CREATED - ORDER_DISCOUNT_ADDED - ORDER_DISCOUNT_AUTOMATICALLY_UPDATED - ORDER_DISCOUNT_UPDATED - ORDER_DISCOUNT_DELETED - ORDER_LINE_DISCOUNT_UPDATED - ORDER_LINE_DISCOUNT_REMOVED - UPDATED_ADDRESS - EMAIL_SENT - CONFIRMED - PAYMENT_AUTHORIZED - PAYMENT_CAPTURED - EXTERNAL_SERVICE_NOTIFICATION - PAYMENT_REFUNDED - PAYMENT_VOIDED - PAYMENT_FAILED - INVOICE_REQUESTED - INVOICE_GENERATED - INVOICE_UPDATED - INVOICE_SENT - FULFILLMENT_CANCELED - FULFILLMENT_RESTOCKED_ITEMS - FULFILLMENT_FULFILLED_ITEMS - FULFILLMENT_REFUNDED - FULFILLMENT_RETURNED - FULFILLMENT_REPLACED - TRACKING_UPDATED - NOTE_ADDED - OTHER -} - -""" -An enumeration. -""" -enum OrderEventsEmailsEnum { - PAYMENT_CONFIRMATION - CONFIRMED - SHIPPING_CONFIRMATION - TRACKING_UPDATED - ORDER_CONFIRMATION - ORDER_CANCEL - ORDER_REFUND - FULFILLMENT_CONFIRMATION - DIGITAL_LINKS -} - -type OrderEventOrderLineObject { - """ - The variant quantity. - """ - quantity: Int - - """ - The order line. - """ - orderLine: OrderLine - - """ - The variant name. - """ - itemName: String - - """ - The discount applied to the order line. - """ - discount: OrderEventDiscountObject -} - -type OrderEventDiscountObject { - """ - Type of the discount: fixed or percent. - """ - valueType: DiscountValueTypeEnum! - - """ - Value of the discount. Can store fixed value or percent value. - """ - value: PositiveDecimal! - - """ - Explanation for the applied discount. - """ - reason: String - - """ - Returns amount of discount. - """ - amount: Money - - """ - Type of the discount: fixed or percent. - """ - oldValueType: DiscountValueTypeEnum - - """ - Value of the discount. Can store fixed value or percent value. - """ - oldValue: PositiveDecimal - - """ - Returns amount of discount. - """ - oldAmount: Money -} - -""" -Contains all details related to the applied discount to the order. -""" -type OrderDiscount implements Node { - """ - The ID of the object. - """ - id: ID! - type: OrderDiscountType! - - """ - Type of the discount: fixed or percent - """ - valueType: DiscountValueTypeEnum! - - """ - Value of the discount. Can store fixed value or percent value - """ - value: PositiveDecimal! - name: String - translatedName: String - - """ - Explanation for the applied discount. - """ - reason: String - - """ - Returns amount of discount. - """ - amount: Money! -} - -""" -An enumeration. -""" -enum OrderDiscountType { - """ - Voucher - """ - VOUCHER - - """ - Manual - """ - MANUAL -} - -type UserPermission { - """ - Internal code for permission. - """ - code: PermissionEnum! - - """ - Describe action(s) allowed to do by permission. - """ - name: String! - - """ - List of user permission groups which contains this permission. - """ - sourcePermissionGroups( - """ - ID of user whose groups should be returned. - """ - userId: ID! - ): [Group!] -} - -""" -Represents permission group data. -""" -type Group implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - - """ - List of group permissions - """ - permissions: [Permission] - - """ - List of group users - """ - users: [User] - - """ - True, if the currently authenticated user has rights to manage a group. - """ - userCanManage: Boolean! +type CustomerDelete { + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! + user: User } """ @@ -7248,52 +3838,173 @@ enum CustomerEventsEnum { NOTE_ADDED } -""" -Represents a payment source stored for user in payment gateway, such as credit card. -""" -type PaymentSource { - """ - Payment gateway name. - """ - gateway: String! - - """ - Stored credit card details if available. - """ - creditCardInfo: CreditCard -} - -type LimitInfo { - """ - Defines the current resource usage. - """ - currentUsage: Limits! - - """ - Defines the allowed maximum resource usage, null means unlimited. - """ - allowedUsage: Limits! -} - -type Limits { - channels: Int - orders: Int - productVariants: Int - staffUsers: Int - warehouses: Int -} - -""" -Order related settings from site settings. -""" -type OrderSettings { - automaticallyConfirmAllNewOrders: Boolean! -} - -input ShippingZoneFilterInput { +input CustomerFilterInput { + dateJoined: DateRangeInput + numberOfOrders: IntRangeInput + placedOrders: DateRangeInput search: String } +input CustomerInput { + """ + Billing address of the customer. + """ + defaultBillingAddress: AddressInput + + """ + Shipping address of the customer. + """ + defaultShippingAddress: AddressInput + + """ + Given name. + """ + firstName: String + + """ + Family name. + """ + lastName: String + + """ + The unique email address of the user. + """ + email: String + + """ + User account is active. + """ + isActive: Boolean + + """ + A note about the user. + """ + note: String + + """ + User language code. + """ + languageCode: LanguageCodeEnum +} + +""" +Updates an existing customer. +""" +type CustomerUpdate { + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! + user: User +} + +""" +The `Date` scalar type represents a Date +value as specified by +[iso8601](https://en.wikipedia.org/wiki/ISO_8601). +""" +scalar Date + +input DateRangeInput { + """ + Start date. + """ + gte: Date + + """ + End date. + """ + lte: Date +} + +""" +The `DateTime` scalar type represents a DateTime +value as specified by +[iso8601](https://en.wikipedia.org/wiki/ISO_8601). +""" +scalar DateTime + +input DateTimeRangeInput { + """ + Start date. + """ + gte: DateTime + + """ + End date. + """ + lte: DateTime +} + +""" +Deactivate all JWT tokens of the currently authenticated user. +""" +type DeactivateAllUserTokens { + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! +} + +""" +Delete metadata of an object. +""" +type DeleteMetadata { + metadataErrors: [MetadataError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [MetadataError!]! + item: ObjectWithMetadata +} + +""" +Delete object's private metadata. +""" +type DeletePrivateMetadata { + metadataErrors: [MetadataError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [MetadataError!]! + item: ObjectWithMetadata +} + +type DigitalContent implements Node & ObjectWithMetadata { + useDefaultSettings: Boolean! + automaticFulfillment: Boolean! + contentFile: String! + maxDownloads: Int + urlValidDays: Int + + """ + List of URLs for the digital variant. + """ + urls: [DigitalContentUrl] + + """ + The ID of the object. + """ + id: ID! + + """ + List of private metadata items.Requires proper staff permissions to access. + """ + privateMetadata: [MetadataItem]! + + """ + List of public metadata items. Can be accessed without permissions. + """ + metadata: [MetadataItem]! + + """ + Product variant assigned to digital content. + """ + productVariant: ProductVariant! +} + type DigitalContentCountableConnection { """ Pagination data for this connection. @@ -7319,669 +4030,172 @@ type DigitalContentCountableEdge { cursor: String! } -input CategoryFilterInput { - search: String - metadata: [MetadataInput] - ids: [ID] -} - -input CategorySortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Specifies the channel in which to sort the data. - """ - channel: String - - """ - Sort categories by the selected field. - """ - field: CategorySortField! -} - -enum CategorySortField { - """ - Sort categories by name. - """ - NAME - - """ - Sort categories by product count. - """ - PRODUCT_COUNT - - """ - Sort categories by subcategory count. - """ - SUBCATEGORY_COUNT -} - -input CollectionFilterInput { - published: CollectionPublished - search: String - metadata: [MetadataInput] - ids: [ID] - - """ - Specifies the channel by which the data should be sorted. - """ - channel: String -} - -enum CollectionPublished { - PUBLISHED - HIDDEN -} - -input CollectionSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Specifies the channel in which to sort the data. - """ - channel: String - - """ - Sort collections by the selected field. - """ - field: CollectionSortField! -} - -enum CollectionSortField { - """ - Sort collections by name. - """ - NAME - - """ - Sort collections by availability. - """ - AVAILABILITY - - """ - Sort collections by product count. - """ - PRODUCT_COUNT - - """ - Sort collections by publication date. - """ - PUBLICATION_DATE -} - -input ProductTypeFilterInput { - search: String - configurable: ProductTypeConfigurable - productType: ProductTypeEnum - metadata: [MetadataInput] - ids: [ID] -} - -enum ProductTypeConfigurable { - CONFIGURABLE - SIMPLE -} - -enum ProductTypeEnum { - DIGITAL - SHIPPABLE -} - -input ProductTypeSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort product types by the selected field. - """ - field: ProductTypeSortField! -} - -enum ProductTypeSortField { - """ - Sort products by name. - """ - NAME - - """ - Sort products by type. - """ - DIGITAL - - """ - Sort products by shipping. - """ - SHIPPING_REQUIRED -} - -type ProductVariantCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [ProductVariantCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type ProductVariantCountableEdge { - """ - The item at the end of the edge. - """ - node: ProductVariant! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -input ProductVariantFilterInput { - search: String - sku: [String] - metadata: [MetadataInput] -} - -type PaymentCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [PaymentCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type PaymentCountableEdge { - """ - The item at the end of the edge. - """ - node: Payment! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -input PaymentFilterInput { - checkouts: [ID] -} - -type PageCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [PageCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type PageCountableEdge { - """ - The item at the end of the edge. - """ - node: Page! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -input PageSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort pages by the selected field. - """ - field: PageSortField! -} - -enum PageSortField { - """ - Sort pages by title. - """ - TITLE - - """ - Sort pages by slug. - """ - SLUG - - """ - Sort pages by visibility. - """ - VISIBILITY - - """ - Sort pages by creation date. - """ - CREATION_DATE - - """ - Sort pages by publication date. - """ - PUBLICATION_DATE -} - -input PageFilterInput { - search: String - metadata: [MetadataInput] -} - -type PageTypeCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [PageTypeCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type PageTypeCountableEdge { - """ - The item at the end of the edge. - """ - node: PageType! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -input PageTypeSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort page types by the selected field. - """ - field: PageTypeSortField! -} - -enum PageTypeSortField { - """ - Sort page types by name. - """ - NAME - - """ - Sort page types by slug. - """ - SLUG -} - -input PageTypeFilterInput { - search: String -} - -type OrderEventCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [OrderEventCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type OrderEventCountableEdge { - """ - The item at the end of the edge. - """ - node: OrderEvent! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -input OrderSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort orders by the selected field. - """ - field: OrderSortField! -} - -enum OrderSortField { - """ - Sort orders by number. - """ - NUMBER - - """ - Sort orders by creation date. - """ - CREATION_DATE - - """ - Sort orders by customer. - """ - CUSTOMER - - """ - Sort orders by payment. - """ - PAYMENT - - """ - Sort orders by fulfillment status. - """ - FULFILLMENT_STATUS -} - -input OrderFilterInput { - paymentStatus: [PaymentChargeStatusEnum] - status: [OrderStatusFilter] - customer: String - created: DateRangeInput - search: String - metadata: [MetadataInput] - channels: [ID] -} - -enum OrderStatusFilter { - READY_TO_FULFILL - READY_TO_CAPTURE - UNFULFILLED - UNCONFIRMED - PARTIALLY_FULFILLED - FULFILLED - CANCELED -} - -input DateRangeInput { - """ - Start date. - """ - gte: Date - - """ - End date. - """ - lte: Date -} - -input OrderDraftFilterInput { - customer: String - created: DateRangeInput - search: String - metadata: [MetadataInput] - channels: [ID] -} - -type MenuCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [MenuCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type MenuCountableEdge { - """ - The item at the end of the edge. - """ - node: Menu! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -input MenuSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort menus by the selected field. - """ - field: MenuSortField! -} - -enum MenuSortField { - """ - Sort menus by name. - """ - NAME - - """ - Sort menus by items count. - """ - ITEMS_COUNT -} - -input MenuFilterInput { - search: String - slug: [String] - metadata: [MetadataInput] -} - -type MenuItemCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [MenuItemCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type MenuItemCountableEdge { - """ - The item at the end of the edge. - """ - node: MenuItem! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -input MenuItemSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort menu items by the selected field. - """ - field: MenuItemsSortField! -} - -enum MenuItemsSortField { - """ - Sort menu items by name. - """ - NAME -} - -input MenuItemFilterInput { - search: String - metadata: [MetadataInput] +""" +Create new digital content. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec +""" +type DigitalContentCreate { + variant: ProductVariant + content: DigitalContent + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! } """ -Plugin. +Remove digital content assigned to given variant. """ -type Plugin implements Node { +type DigitalContentDelete { + variant: ProductVariant + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! +} + +input DigitalContentInput { + """ + Use default digital content settings for this product. + """ + useDefaultSettings: Boolean! + + """ + Determines how many times a download link can be accessed by a customer. + """ + maxDownloads: Int + + """ + Determines for how many days a download link is active since it was generated. + """ + urlValidDays: Int + + """ + Overwrite default automatic_fulfillment setting for variant. + """ + automaticFulfillment: Boolean +} + +""" +Update digital content. +""" +type DigitalContentUpdate { + variant: ProductVariant + content: DigitalContent + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! +} + +input DigitalContentUploadInput { + """ + Use default digital content settings for this product. + """ + useDefaultSettings: Boolean! + + """ + Determines how many times a download link can be accessed by a customer. + """ + maxDownloads: Int + + """ + Determines for how many days a download link is active since it was generated. + """ + urlValidDays: Int + + """ + Overwrite default automatic_fulfillment setting for variant. + """ + automaticFulfillment: Boolean + + """ + Represents an file in a multipart request. + """ + contentFile: Upload! +} + +type DigitalContentUrl implements Node { + content: DigitalContent! + created: DateTime! + downloadNum: Int! + + """ + The ID of the object. + """ id: ID! - name: String! - description: String! - active: Boolean! - configuration: [ConfigurationItem] + + """ + URL for digital content. + """ + url: String + + """ + UUID of digital content. + """ + token: UUID! } """ -Stores information about a single configuration field. +Generate new URL to digital content. """ -type ConfigurationItem { +type DigitalContentUrlCreate { + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! + digitalContentUrl: DigitalContentUrl +} + +input DigitalContentUrlCreateInput { """ - Name of the field. + Digital content ID which URL will belong to. """ - name: String! + content: ID! +} + +type DiscountError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String """ - Current value of the field. + The error message. """ - value: String + message: String """ - Type of the field. + List of products IDs which causes the error. """ - type: ConfigurationTypeFieldEnum + products: [ID!] """ - Help text for the field. + The error code. """ - helpText: String + code: DiscountErrorCode! """ - Label for the field. + List of channels IDs which causes the error. """ - label: String + channels: [ID!] } """ An enumeration. """ -enum ConfigurationTypeFieldEnum { - STRING - MULTILINE - BOOLEAN - SECRET - PASSWORD - SECRETMULTILINE -} - -type PluginCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [PluginCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type PluginCountableEdge { - """ - The item at the end of the edge. - """ - node: Plugin! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -input PluginFilterInput { - active: Boolean - search: String -} - -input PluginSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort plugins by the selected field. - """ - field: PluginSortField! -} - -enum PluginSortField { - NAME - IS_ACTIVE -} - -type SaleCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [SaleCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type SaleCountableEdge { - """ - The item at the end of the edge. - """ - node: Sale! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -input SaleFilterInput { - status: [DiscountStatusEnum] - saleType: DiscountValueTypeEnum - started: DateTimeRangeInput - search: String +enum DiscountErrorCode { + ALREADY_EXISTS + GRAPHQL_ERROR + INVALID + NOT_FOUND + REQUIRED + UNIQUE + CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT + DUPLICATED_INPUT_ITEM } enum DiscountStatusEnum { @@ -7990,195 +4204,237 @@ enum DiscountStatusEnum { SCHEDULED } -input DateTimeRangeInput { - """ - Start date. - """ - gte: DateTime - - """ - End date. - """ - lte: DateTime -} - -input SaleSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Specifies the channel in which to sort the data. - """ - channel: String - - """ - Sort sales by the selected field. - """ - field: SaleSortField! -} - -enum SaleSortField { - """ - Sort sales by name. - """ - NAME - - """ - Sort sales by start date. - """ - START_DATE - - """ - Sort sales by end date. - """ - END_DATE - - """ - Sort sales by value. - """ - VALUE - - """ - Sort sales by type. - """ - TYPE -} - -type VoucherCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [VoucherCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type VoucherCountableEdge { - """ - The item at the end of the edge. - """ - node: Voucher! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -input VoucherFilterInput { - status: [DiscountStatusEnum] - timesUsed: IntRangeInput - discountType: [VoucherDiscountType] - started: DateTimeRangeInput - search: String -} - -enum VoucherDiscountType { +enum DiscountValueTypeEnum { FIXED PERCENTAGE - SHIPPING -} - -input VoucherSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Specifies the channel in which to sort the data. - """ - channel: String - - """ - Sort vouchers by the selected field. - """ - field: VoucherSortField! -} - -enum VoucherSortField { - """ - Sort vouchers by code. - """ - CODE - - """ - Sort vouchers by start date. - """ - START_DATE - - """ - Sort vouchers by end date. - """ - END_DATE - - """ - Sort vouchers by value. - """ - VALUE - - """ - Sort vouchers by type. - """ - TYPE - - """ - Sort vouchers by usage limit. - """ - USAGE_LIMIT - - """ - Sort vouchers by minimum spent amount. - """ - MINIMUM_SPENT_AMOUNT } """ -Represents a job data of exported file. +Represents shop's domain. """ -type ExportFile implements Node & Job { +type Domain { """ - The ID of the object. + The host name of the domain. """ - id: ID! - user: User - app: App + host: String! """ - Job status. + Inform if SSL is enabled. """ - status: JobStatusEnum! + sslEnabled: Boolean! """ - Created date time of job in ISO 8601 format. + Shop's absolute URL. """ - createdAt: DateTime! + url: String! +} + +""" +Deletes draft orders. +""" +type DraftOrderBulkDelete { + """ + Returns how many objects were affected. + """ + count: Int! + orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! +} + +""" +Completes creating an order. +""" +type DraftOrderComplete { + """ + Completed order. + """ + order: Order + orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! +} + +""" +Creates a new draft order. +""" +type DraftOrderCreate { + orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! + order: Order +} + +input DraftOrderCreateInput { + """ + Billing address of the customer. + """ + billingAddress: AddressInput + user: ID """ - Date time of job last update in ISO 8601 format. + Email address of the customer. """ - updatedAt: DateTime! + userEmail: String """ - Job message. + Discount amount for the order. + """ + discount: PositiveDecimal + + """ + Shipping address of the customer. + """ + shippingAddress: AddressInput + + """ + ID of a selected shipping method. + """ + shippingMethod: ID + + """ + ID of the voucher associated with the order. + """ + voucher: ID + + """ + A note from a customer. Visible by customers in the order summary. + """ + customerNote: String + + """ + ID of the channel associated with the order. + """ + channel: ID + + """ + URL of a view where users should be redirected to see the order details. URL in RFC 1808 format. + """ + redirectUrl: String + + """ + Variant line input consisting of variant ID and quantity of products. + """ + lines: [OrderLineCreateInput] +} + +""" +Deletes a draft order. +""" +type DraftOrderDelete { + orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! + order: Order +} + +input DraftOrderInput { + """ + Billing address of the customer. + """ + billingAddress: AddressInput + user: ID + + """ + Email address of the customer. + """ + userEmail: String + + """ + Discount amount for the order. + """ + discount: PositiveDecimal + + """ + Shipping address of the customer. + """ + shippingAddress: AddressInput + + """ + ID of a selected shipping method. + """ + shippingMethod: ID + + """ + ID of the voucher associated with the order. + """ + voucher: ID + + """ + A note from a customer. Visible by customers in the order summary. + """ + customerNote: String + + """ + ID of the channel associated with the order. + """ + channel: ID + + """ + URL of a view where users should be redirected to see the order details. URL in RFC 1808 format. + """ + redirectUrl: String +} + +""" +Deletes order lines. +""" +type DraftOrderLinesBulkDelete { + """ + Returns how many objects were affected. + """ + count: Int! + orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! +} + +""" +Updates a draft order. +""" +type DraftOrderUpdate { + orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! + order: Order +} + +type ExportError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """ + The error message. """ message: String """ - The URL of field to download. + The error code. """ - url: String + code: ExportErrorCode! +} - """ - List of events associated with the export. - """ - events: [ExportEvent!] +""" +An enumeration. +""" +enum ExportErrorCode { + INVALID + NOT_FOUND + REQUIRED } """ @@ -8228,6 +4484,48 @@ enum ExportEventsEnum { EXPORT_FAILED_INFO_SENT } +""" +Represents a job data of exported file. +""" +type ExportFile implements Node & Job { + """ + The ID of the object. + """ + id: ID! + user: User + app: App + + """ + Job status. + """ + status: JobStatusEnum! + + """ + Created date time of job in ISO 8601 format. + """ + createdAt: DateTime! + + """ + Date time of job last update in ISO 8601 format. + """ + updatedAt: DateTime! + + """ + Job message. + """ + message: String + + """ + The URL of field to download. + """ + url: String + + """ + List of events associated with the export. + """ + events: [ExportEvent!] +} + type ExportFileCountableConnection { """ Pagination data for this connection. @@ -8261,18 +4559,6 @@ input ExportFileFilterInput { app: String } -input ExportFileSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort export file by the selected field. - """ - field: ExportFileSortField! -} - enum ExportFileSortField { """ Sort export file by status. @@ -8290,121 +4576,495 @@ enum ExportFileSortField { UPDATED_AT } -type CheckoutCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [CheckoutCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type CheckoutCountableEdge { - """ - The item at the end of the edge. - """ - node: Checkout! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -type CheckoutLineCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [CheckoutLineCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type CheckoutLineCountableEdge { - """ - The item at the end of the edge. - """ - node: CheckoutLine! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -input AttributeSortingInput { +input ExportFileSortingInput { """ Specifies the direction in which to sort products. """ direction: OrderDirection! """ - Sort attributes by the selected field. + Sort export file by the selected field. """ - field: AttributeSortField! + field: ExportFileSortField! } -enum AttributeSortField { +input ExportInfoInput { """ - Sort attributes by name + List of attribute ids witch should be exported. """ - NAME + attributes: [ID!] """ - Sort attributes by slug + List of warehouse ids witch should be exported. """ - SLUG + warehouses: [ID!] """ - Sort attributes by the value required flag + List of channels ids which should be exported. """ - VALUE_REQUIRED + channels: [ID!] """ - Sort attributes by the variant only flag + List of product fields witch should be exported. """ - IS_VARIANT_ONLY - - """ - Sort attributes by visibility in the storefront - """ - VISIBLE_IN_STOREFRONT - - """ - Sort attributes by the filterable in storefront flag - """ - FILTERABLE_IN_STOREFRONT - - """ - Sort attributes by the filterable in dashboard flag - """ - FILTERABLE_IN_DASHBOARD - - """ - Sort attributes by their position in storefront - """ - STOREFRONT_SEARCH_POSITION - - """ - Sort attributes based on whether they can be displayed or not in a product grid. - """ - AVAILABLE_IN_GRID + fields: [ProductFieldEnum!] } """ -Represents ongoing installation of app. +Export products to csv file. """ -type AppInstallation implements Node & Job { - appName: String! - manifestUrl: String! +type ExportProducts { + """ + The newly created export file job which is responsible for export data. + """ + exportFile: ExportFile + exportErrors: [ExportError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ExportError!]! +} + +input ExportProductsInput { + """ + Determine which products should be exported. + """ + scope: ExportScope! + + """ + Filtering options for products. + """ + filter: ProductFilterInput + + """ + List of products IDS to export. + """ + ids: [ID!] + + """ + Input with info about fields which should be exported. + """ + exportInfo: ExportInfoInput + + """ + Type of exported file. + """ + fileType: FileTypesEnum! +} + +enum ExportScope { + """ + Export all products. + """ + ALL + + """ + Export products with given ids. + """ + IDS + + """ + Export the filtered products. + """ + FILTER +} + +type ExternalAuthentication { + """ + ID of external authentication plugin. + """ + id: String! + + """ + Name of external authentication plugin. + """ + name: String +} + +""" +Prepare external authentication url for user by custom plugin. +""" +type ExternalAuthenticationUrl { + """ + The data returned by authentication plugin. + """ + authenticationData: JSONString + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! +} + +""" +Logout user by custom plugin. +""" +type ExternalLogout { + """ + The data returned by authentication plugin. + """ + logoutData: JSONString + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! +} + +""" +Obtain external access tokens for user by custom plugin. +""" +type ExternalObtainAccessTokens { + """ + The token, required to authenticate. + """ + token: String + + """ + The refresh token, required to re-generate external access token. + """ + refreshToken: String + + """ + CSRF token required to re-generate external access token. + """ + csrfToken: String + + """ + A user instance. + """ + user: User + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! +} + +""" +Refresh user's access by custom plugin. +""" +type ExternalRefresh { + """ + The token, required to authenticate. + """ + token: String + + """ + The refresh token, required to re-generate external access token. + """ + refreshToken: String + + """ + CSRF token required to re-generate external access token. + """ + csrfToken: String + + """ + A user instance. + """ + user: User + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! +} + +""" +Verify external authentication data by plugin. +""" +type ExternalVerify { + """ + User assigned to data. + """ + user: User + + """ + Determine if authentication data is valid or not. + """ + isValid: Boolean! + + """ + External data. + """ + verifyData: JSONString + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! +} + +type File { + """ + The URL of the file. + """ + url: String! + + """ + Content type of the file. + """ + contentType: String +} + +""" +An enumeration. +""" +enum FileTypesEnum { + CSV + XLSX +} + +""" +Upload a file. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec +""" +type FileUpload { + uploadedFile: File + uploadErrors: [UploadError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [UploadError!]! +} + +""" +Represents order fulfillment. +""" +type Fulfillment implements Node & ObjectWithMetadata { + """ + The ID of the object. + """ + id: ID! + fulfillmentOrder: Int! + status: FulfillmentStatus! + trackingNumber: String! + created: DateTime! + + """ + List of private metadata items.Requires proper staff permissions to access. + """ + privateMetadata: [MetadataItem]! + + """ + List of public metadata items. Can be accessed without permissions. + """ + metadata: [MetadataItem]! + + """ + List of lines for the fulfillment. + """ + lines: [FulfillmentLine] + + """ + User-friendly fulfillment status. + """ + statusDisplay: String + + """ + Warehouse from fulfillment was fulfilled. + """ + warehouse: Warehouse +} + +""" +Cancels existing fulfillment and optionally restocks items. +""" +type FulfillmentCancel { + """ + A canceled fulfillment. + """ + fulfillment: Fulfillment + + """ + Order which fulfillment was cancelled. + """ + order: Order + orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! +} + +input FulfillmentCancelInput { + """ + ID of warehouse where items will be restock. + """ + warehouseId: ID! +} + +""" +Represents line of the fulfillment. +""" +type FulfillmentLine implements Node { + """ + The ID of the object. + """ + id: ID! + quantity: Int! + orderLine: OrderLine +} + +""" +Refund products. +""" +type FulfillmentRefundProducts { + """ + A refunded fulfillment. + """ + fulfillment: Fulfillment + + """ + Order which fulfillment was refunded. + """ + order: Order + orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! +} + +""" +Return products. +""" +type FulfillmentReturnProducts { + """ + A return fulfillment. + """ + returnFulfillment: Fulfillment + + """ + A replace fulfillment. + """ + replaceFulfillment: Fulfillment + + """ + Order which fulfillment was returned. + """ + order: Order + + """ + A draft order which was created for products with replace flag. + """ + replaceOrder: Order + orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! +} + +""" +An enumeration. +""" +enum FulfillmentStatus { + """ + Fulfilled + """ + FULFILLED + + """ + Refunded + """ + REFUNDED + + """ + Returned + """ + RETURNED + + """ + Replaced + """ + REPLACED + + """ + Refunded and returned + """ + REFUNDED_AND_RETURNED + + """ + Canceled + """ + CANCELED +} + +""" +Updates a fulfillment for an order. +""" +type FulfillmentUpdateTracking { + """ + A fulfillment with updated tracking. + """ + fulfillment: Fulfillment + + """ + Order for which fulfillment was updated. + """ + order: Order + orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! +} + +input FulfillmentUpdateTrackingInput { + """ + Fulfillment tracking number. + """ + trackingNumber: String + + """ + If true, send an email notification to the customer. + """ + notifyCustomer: Boolean = false +} + +""" +Payment gateway client configuration key and value pair. +""" +type GatewayConfigLine { + """ + Gateway config key. + """ + field: String! + + """ + Gateway config value for key. + """ + value: String +} + +""" +The `GenericScalar` scalar type represents a generic +GraphQL scalar value that could be: +String, Boolean, Int, Float, List or Object. +""" +scalar GenericScalar + +""" +A gift card is a prepaid electronic payment card accepted in stores. They can be used during checkout by providing a valid gift card codes. +""" +type GiftCard implements Node { + """ + Gift card code. + """ + code: String + + """ + The customer who bought a gift card. + """ + user: User + created: DateTime! + startDate: Date! + endDate: Date + lastUsedOn: DateTime + isActive: Boolean! + initialBalance: Money + currentBalance: Money """ The ID of the object. @@ -8412,170 +5072,192 @@ type AppInstallation implements Node & Job { id: ID! """ - Job status. + Code in format which allows displaying in a user interface. """ - status: JobStatusEnum! + displayCode: String +} + +""" +Activate a gift card. +""" +type GiftCardActivate { + """ + A gift card to activate. + """ + giftCard: GiftCard + giftCardErrors: [GiftCardError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [GiftCardError!]! +} + +type GiftCardCountableConnection { + """ + Pagination data for this connection. + """ + pageInfo: PageInfo! + edges: [GiftCardCountableEdge!]! """ - Created date time of job in ISO 8601 format. + A total count of items in the collection. """ - createdAt: DateTime! + totalCount: Int +} + +type GiftCardCountableEdge { + """ + The item at the end of the edge. + """ + node: GiftCard! """ - Date time of job last update in ISO 8601 format. + A cursor for use in pagination. """ - updatedAt: DateTime! + cursor: String! +} + +""" +Creates a new gift card. +""" +type GiftCardCreate { + giftCardErrors: [GiftCardError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [GiftCardError!]! + giftCard: GiftCard +} + +input GiftCardCreateInput { + """ + Start date of the gift card in ISO 8601 format. + """ + startDate: Date """ - Job message. + End date of the gift card in ISO 8601 format. + """ + endDate: Date + + """ + Value of the gift card. + """ + balance: PositiveDecimal + + """ + The customer's email of the gift card buyer. + """ + userEmail: String + + """ + Code to use the gift card. + """ + code: String +} + +""" +Deactivate a gift card. +""" +type GiftCardDeactivate { + """ + A gift card to deactivate. + """ + giftCard: GiftCard + giftCardErrors: [GiftCardError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [GiftCardError!]! +} + +type GiftCardError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """ + The error message. """ message: String + + """ + The error code. + """ + code: GiftCardErrorCode! } -type AppCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [AppCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int +""" +An enumeration. +""" +enum GiftCardErrorCode { + ALREADY_EXISTS + GRAPHQL_ERROR + INVALID + NOT_FOUND + REQUIRED + UNIQUE } -type AppCountableEdge { - """ - The item at the end of the edge. - """ - node: App! - - """ - A cursor for use in pagination. - """ - cursor: String! +""" +Update a gift card. +""" +type GiftCardUpdate { + giftCardErrors: [GiftCardError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [GiftCardError!]! + giftCard: GiftCard } -input AppFilterInput { - search: String - isActive: Boolean - type: AppTypeEnum +input GiftCardUpdateInput { + """ + Start date of the gift card in ISO 8601 format. + """ + startDate: Date + + """ + End date of the gift card in ISO 8601 format. + """ + endDate: Date + + """ + Value of the gift card. + """ + balance: PositiveDecimal + + """ + The customer's email of the gift card buyer. + """ + userEmail: String } -input AppSortingInput { +""" +Represents permission group data. +""" +type Group implements Node { """ - Specifies the direction in which to sort products. + The ID of the object. """ - direction: OrderDirection! + id: ID! + name: String! """ - Sort apps by the selected field. + List of group permissions """ - field: AppSortField! -} - -enum AppSortField { - """ - Sort apps by name. - """ - NAME + permissions: [Permission] """ - Sort apps by creation date. + List of group users """ - CREATION_DATE -} - -type AddressValidationData { - countryCode: String - countryName: String - addressFormat: String - addressLatinFormat: String - allowedFields: [String] - requiredFields: [String] - upperFields: [String] - countryAreaType: String - countryAreaChoices: [ChoiceValue] - cityType: String - cityChoices: [ChoiceValue] - cityAreaType: String - cityAreaChoices: [ChoiceValue] - postalCodeType: String - postalCodeMatchers: [String] - postalCodeExamples: [String] - postalCodePrefix: String -} - -type ChoiceValue { - raw: String - verbose: String -} - -type UserCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [UserCountableEdge!]! + users: [User] """ - A total count of items in the collection. + True, if the currently authenticated user has rights to manage a group. """ - totalCount: Int -} - -type UserCountableEdge { - """ - The item at the end of the edge. - """ - node: User! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -input CustomerFilterInput { - dateJoined: DateRangeInput - numberOfOrders: IntRangeInput - placedOrders: DateRangeInput - search: String -} - -input UserSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort users by the selected field. - """ - field: UserSortField! -} - -enum UserSortField { - """ - Sort users by first name. - """ - FIRST_NAME - - """ - Sort users by last name. - """ - LAST_NAME - - """ - Sort users by email. - """ - EMAIL - - """ - Sort users by order count. - """ - ORDER_COUNT + userCanManage: Boolean! } type GroupCountableConnection { @@ -8603,67 +5285,916 @@ type GroupCountableEdge { cursor: String! } -input PermissionGroupFilterInput { - search: String +""" +Represents an image. +""" +type Image { + """ + The URL of the image. + """ + url: String! + + """ + Alt text for an image. + """ + alt: String } -input PermissionGroupSortingInput { +input IntRangeInput { + """ + Value greater than or equal to. + """ + gte: Int + + """ + Value less than or equal to. + """ + lte: Int +} + +""" +Represents an Invoice. +""" +type Invoice implements ObjectWithMetadata & Job & Node { + """ + The ID of the object. + """ + id: ID! + + """ + List of public metadata items. Can be accessed without permissions. + """ + metadata: [MetadataItem]! + + """ + Job status. + """ + status: JobStatusEnum! + number: String + externalUrl: String + + """ + List of private metadata items.Requires proper staff permissions to access. + """ + privateMetadata: [MetadataItem]! + + """ + Created date time of job in ISO 8601 format. + """ + createdAt: DateTime! + + """ + Date time of job last update in ISO 8601 format. + """ + updatedAt: DateTime! + + """ + Job message. + """ + message: String + + """ + URL to download an invoice. + """ + url: String +} + +""" +Creates a ready to send invoice. +""" +type InvoiceCreate { + invoiceErrors: [InvoiceError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [InvoiceError!]! + invoice: Invoice +} + +input InvoiceCreateInput { + """ + Invoice number. + """ + number: String! + + """ + URL of an invoice to download. + """ + url: String! +} + +""" +Deletes an invoice. +""" +type InvoiceDelete { + invoiceErrors: [InvoiceError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [InvoiceError!]! + invoice: Invoice +} + +type InvoiceError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """ + The error message. + """ + message: String + + """ + The error code. + """ + code: InvoiceErrorCode! +} + +""" +An enumeration. +""" +enum InvoiceErrorCode { + REQUIRED + NOT_READY + URL_NOT_SET + EMAIL_NOT_SET + NUMBER_NOT_SET + NOT_FOUND + INVALID_STATUS +} + +""" +Request an invoice for the order using plugin. +""" +type InvoiceRequest { + """ + Order related to an invoice. + """ + order: Order + invoiceErrors: [InvoiceError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [InvoiceError!]! + invoice: Invoice +} + +""" +Requests deletion of an invoice. +""" +type InvoiceRequestDelete { + invoiceErrors: [InvoiceError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [InvoiceError!]! + invoice: Invoice +} + +""" +Send an invoice notification to the customer. +""" +type InvoiceSendNotification { + invoiceErrors: [InvoiceError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [InvoiceError!]! + invoice: Invoice +} + +""" +Updates an invoice. +""" +type InvoiceUpdate { + invoiceErrors: [InvoiceError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [InvoiceError!]! + invoice: Invoice +} + +""" +Allows use of a JSON String for input / output from the GraphQL schema. + +Use of this type is *not recommended* as you lose the benefits of having a defined, static +schema (one of the key benefits of GraphQL). +""" +scalar JSONString + +interface Job { + """ + Job status. + """ + status: JobStatusEnum! + + """ + Created date time of job in ISO 8601 format. + """ + createdAt: DateTime! + + """ + Date time of job last update in ISO 8601 format. + """ + updatedAt: DateTime! + + """ + Job message. + """ + message: String +} + +""" +An enumeration. +""" +enum JobStatusEnum { + PENDING + SUCCESS + FAILED + DELETED +} + +""" +An enumeration. +""" +enum LanguageCodeEnum { + AR + AZ + BG + BN + CA + CS + DA + DE + EL + EN + ES + ES_CO + ET + FA + FI + FR + HI + HU + HY + ID + IS + IT + JA + KA + KM + KO + LT + MN + MY + NB + NL + PL + PT + PT_BR + RO + RU + SK + SL + SQ + SR + SV + SW + TA + TH + TR + UK + VI + ZH_HANS + ZH_HANT +} + +type LanguageDisplay { + """ + ISO 639 representation of the language name. + """ + code: LanguageCodeEnum! + + """ + Full name of the language. + """ + language: String! +} + +type LimitInfo { + """ + Defines the current resource usage. + """ + currentUsage: Limits! + + """ + Defines the allowed maximum resource usage, null means unlimited. + """ + allowedUsage: Limits! +} + +type Limits { + channels: Int + orders: Int + productVariants: Int + staffUsers: Int + warehouses: Int +} + +""" +The manifest definition. +""" +type Manifest { + identifier: String! + version: String! + name: String! + about: String + permissions: [Permission] + appUrl: String + configurationUrl: String + tokenTargetUrl: String + dataPrivacy: String + dataPrivacyUrl: String + homepageUrl: String + supportUrl: String +} + +type Margin { + start: Int + stop: Int +} + +""" +Represents a single menu - an object that is used to help navigate through the store. +""" +type Menu implements Node & ObjectWithMetadata { + """ + The ID of the object. + """ + id: ID! + name: String! + slug: String! + + """ + List of private metadata items.Requires proper staff permissions to access. + """ + privateMetadata: [MetadataItem]! + + """ + List of public metadata items. Can be accessed without permissions. + """ + metadata: [MetadataItem]! + items: [MenuItem] +} + +""" +Deletes menus. +""" +type MenuBulkDelete { + """ + Returns how many objects were affected. + """ + count: Int! + menuErrors: [MenuError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [MenuError!]! +} + +type MenuCountableConnection { + """ + Pagination data for this connection. + """ + pageInfo: PageInfo! + edges: [MenuCountableEdge!]! + + """ + A total count of items in the collection. + """ + totalCount: Int +} + +type MenuCountableEdge { + """ + The item at the end of the edge. + """ + node: Menu! + + """ + A cursor for use in pagination. + """ + cursor: String! +} + +""" +Creates a new Menu. +""" +type MenuCreate { + menuErrors: [MenuError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [MenuError!]! + menu: Menu +} + +input MenuCreateInput { + """ + Name of the menu. + """ + name: String! + + """ + Slug of the menu. Will be generated if not provided. + """ + slug: String + + """ + List of menu items. + """ + items: [MenuItemInput] +} + +""" +Deletes a menu. +""" +type MenuDelete { + menuErrors: [MenuError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [MenuError!]! + menu: Menu +} + +type MenuError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """ + The error message. + """ + message: String + + """ + The error code. + """ + code: MenuErrorCode! +} + +""" +An enumeration. +""" +enum MenuErrorCode { + CANNOT_ASSIGN_NODE + GRAPHQL_ERROR + INVALID + INVALID_MENU_ITEM + NO_MENU_ITEM_PROVIDED + NOT_FOUND + REQUIRED + TOO_MANY_MENU_ITEMS + UNIQUE +} + +input MenuFilterInput { + search: String + slug: [String] + metadata: [MetadataInput] +} + +input MenuInput { + """ + Name of the menu. + """ + name: String + + """ + Slug of the menu. + """ + slug: String +} + +""" +Represents a single item of the related menu. Can store categories, collection or pages. +""" +type MenuItem implements Node & ObjectWithMetadata { + """ + The ID of the object. + """ + id: ID! + name: String! + menu: Menu! + parent: MenuItem + category: Category + collection: Collection + page: Page + level: Int! + + """ + List of private metadata items.Requires proper staff permissions to access. + """ + privateMetadata: [MetadataItem]! + + """ + List of public metadata items. Can be accessed without permissions. + """ + metadata: [MetadataItem]! + children: [MenuItem] + + """ + URL to the menu item. + """ + url: String + + """ + Returns translated menu item fields for the given language code. + """ + translation( + """ + A language code to return the translation for menu item. + """ + languageCode: LanguageCodeEnum! + ): MenuItemTranslation +} + +""" +Deletes menu items. +""" +type MenuItemBulkDelete { + """ + Returns how many objects were affected. + """ + count: Int! + menuErrors: [MenuError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [MenuError!]! +} + +type MenuItemCountableConnection { + """ + Pagination data for this connection. + """ + pageInfo: PageInfo! + edges: [MenuItemCountableEdge!]! + + """ + A total count of items in the collection. + """ + totalCount: Int +} + +type MenuItemCountableEdge { + """ + The item at the end of the edge. + """ + node: MenuItem! + + """ + A cursor for use in pagination. + """ + cursor: String! +} + +""" +Creates a new menu item. +""" +type MenuItemCreate { + menuErrors: [MenuError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [MenuError!]! + menuItem: MenuItem +} + +input MenuItemCreateInput { + """ + Name of the menu item. + """ + name: String! + + """ + URL of the pointed item. + """ + url: String + + """ + Category to which item points. + """ + category: ID + + """ + Collection to which item points. + """ + collection: ID + + """ + Page to which item points. + """ + page: ID + + """ + Menu to which item belongs. + """ + menu: ID! + + """ + ID of the parent menu. If empty, menu will be top level menu. + """ + parent: ID +} + +""" +Deletes a menu item. +""" +type MenuItemDelete { + menuErrors: [MenuError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [MenuError!]! + menuItem: MenuItem +} + +input MenuItemFilterInput { + search: String + metadata: [MetadataInput] +} + +input MenuItemInput { + """ + Name of the menu item. + """ + name: String + + """ + URL of the pointed item. + """ + url: String + + """ + Category to which item points. + """ + category: ID + + """ + Collection to which item points. + """ + collection: ID + + """ + Page to which item points. + """ + page: ID +} + +""" +Moves items of menus. +""" +type MenuItemMove { + """ + Assigned menu to move within. + """ + menu: Menu + menuErrors: [MenuError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [MenuError!]! +} + +input MenuItemMoveInput { + """ + The menu item ID to move. + """ + itemId: ID! + + """ + ID of the parent menu. If empty, menu will be top level menu. + """ + parentId: ID + + """ + The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. + """ + sortOrder: Int +} + +input MenuItemSortingInput { """ Specifies the direction in which to sort products. """ direction: OrderDirection! """ - Sort permission group by the selected field. + Sort menu items by the selected field. """ - field: PermissionGroupSortField! + field: MenuItemsSortField! } -enum PermissionGroupSortField { +type MenuItemTranslatableContent implements Node { """ - Sort permission group accounts by name. + The ID of the object. + """ + id: ID! + name: String! + + """ + Returns translated menu item fields for the given language code. + """ + translation( + """ + A language code to return the translation for menu item. + """ + languageCode: LanguageCodeEnum! + ): MenuItemTranslation + + """ + Represents a single item of the related menu. Can store categories, collection or pages. + """ + menuItem: MenuItem +} + +""" +Creates/Updates translations for Menu Item. +""" +type MenuItemTranslate { + translationErrors: [TranslationError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [TranslationError!]! + menuItem: MenuItem +} + +type MenuItemTranslation implements Node { + """ + The ID of the object. + """ + id: ID! + name: String! + + """ + Translation language. + """ + language: LanguageDisplay! +} + +""" +Updates a menu item. +""" +type MenuItemUpdate { + menuErrors: [MenuError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [MenuError!]! + menuItem: MenuItem +} + +enum MenuItemsSortField { + """ + Sort menu items by name. """ NAME } -input StaffUserInput { - status: StaffMemberStatus - search: String +enum MenuSortField { + """ + Sort menus by name. + """ + NAME + + """ + Sort menus by items count. + """ + ITEMS_COUNT } -enum StaffMemberStatus { +input MenuSortingInput { """ - User account has been activated. + Specifies the direction in which to sort products. """ - ACTIVE + direction: OrderDirection! """ - User account has not been activated yet. + Sort menus by the selected field. """ - DEACTIVATED + field: MenuSortField! } -union _Entity = - Address - | User - | Group - | App - | ProductVariant - | Product - | ProductType - | Collection - | Category - | ProductMedia - | ProductImage - | PageType +""" +Updates a menu. +""" +type MenuUpdate { + menuErrors: [MenuError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [MenuError!]! + menu: Menu +} + +type MetadataError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """ + The error message. + """ + message: String + + """ + The error code. + """ + code: MetadataErrorCode! +} """ -Anything +An enumeration. """ -scalar _Any +enum MetadataErrorCode { + GRAPHQL_ERROR + INVALID + NOT_FOUND + REQUIRED +} -type _Service { - sdl: String +input MetadataInput { + """ + Key of a metadata item. + """ + key: String! + + """ + Value of a metadata item. + """ + value: String! +} + +type MetadataItem { + """ + Key of a metadata item. + """ + key: String! + + """ + Value of a metadata item. + """ + value: String! +} + +""" +Represents amount of money in specific currency. +""" +type Money { + """ + Currency code. + """ + currency: String! + + """ + Amount of money. + """ + amount: Float! +} + +""" +Represents a range of amounts of money. +""" +type MoneyRange { + """ + Lower bound of a price range. + """ + start: Money + + """ + Upper bound of a price range. + """ + stop: Money +} + +input MoveProductInput { + """ + The ID of the product to move. + """ + productId: ID! + + """ + The relative sorting position of the product (from -inf to +inf) starting from the first given product's actual position.1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. + """ + sortOrder: Int } type Mutation { @@ -10965,11 +8496,6 @@ type Mutation { ID of the checkout. """ checkoutId: ID! - - """ - [Deprecated] The ID of the customer. To identify a customer you should authenticate with JWT. This field will be removed after 2020-07-31. - """ - customerId: ID ): CheckoutCustomerAttach """ @@ -11970,3529 +9496,492 @@ type Mutation { ): PermissionGroupDelete } -""" -Creates a new webhook subscription. -""" -type WebhookCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - webhookErrors: [WebhookError!]! - webhook: Webhook -} - -""" -Represents an error in the input of a mutation. -""" -type Error { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String -} - -type WebhookError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: WebhookErrorCode! -} - -""" -An enumeration. -""" -enum WebhookErrorCode { - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE -} - -input WebhookCreateInput { - """ - The name of the webhook. - """ - name: String - - """ - The url to receive the payload. - """ - targetUrl: String - - """ - The events that webhook wants to subscribe. - """ - events: [WebhookEventTypeEnum] - - """ - ID of the app to which webhook belongs. - """ - app: ID - - """ - Determine if webhook will be set active or not. - """ - isActive: Boolean - - """ - The secret key used to create a hash signature with each payload. - """ - secretKey: String -} - -""" -Deletes a webhook subscription. -""" -type WebhookDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - webhookErrors: [WebhookError!]! - webhook: Webhook -} - -""" -Updates a webhook subscription. -""" -type WebhookUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - webhookErrors: [WebhookError!]! - webhook: Webhook -} - -input WebhookUpdateInput { - """ - The new name of the webhook. - """ - name: String - - """ - The url to receive the payload. - """ - targetUrl: String - - """ - The events that webhook wants to subscribe. - """ - events: [WebhookEventTypeEnum] - - """ - ID of the app to which webhook belongs. - """ - app: ID - - """ - Determine if webhook will be set active or not. - """ - isActive: Boolean - - """ - Use to create a hash signature with each payload. - """ - secretKey: String -} - -""" -Creates new warehouse. -""" -type WarehouseCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - warehouseErrors: [WarehouseError!]! - warehouse: Warehouse -} - -type WarehouseError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: WarehouseErrorCode! -} - -""" -An enumeration. -""" -enum WarehouseErrorCode { - ALREADY_EXISTS - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE -} - -input WarehouseCreateInput { - """ - Warehouse slug. - """ - slug: String - - """ - Company name. - """ - companyName: String - - """ - The email address of the warehouse. - """ - email: String - - """ - Warehouse name. - """ - name: String! - - """ - Address of the warehouse. - """ - address: WarehouseAddressInput! - - """ - Shipping zones supported by the warehouse. - """ - shippingZones: [ID] -} - -input WarehouseAddressInput { - """ - Address. - """ - streetAddress1: String! - - """ - Address. - """ - streetAddress2: String - - """ - City. - """ - city: String! - - """ - District. - """ - cityArea: String - - """ - Postal code. - """ - postalCode: String - - """ - Country. - """ - country: CountryCode! - - """ - State or province. - """ - countryArea: String - - """ - Phone number. - """ - phone: String -} - -""" -Updates given warehouse. -""" -type WarehouseUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - warehouseErrors: [WarehouseError!]! - warehouse: Warehouse -} - -input WarehouseUpdateInput { - """ - Warehouse slug. - """ - slug: String - - """ - Company name. - """ - companyName: String - - """ - The email address of the warehouse. - """ - email: String - - """ - Warehouse name. - """ - name: String - - """ - Address of the warehouse. - """ - address: WarehouseAddressInput -} - -""" -Deletes selected warehouse. -""" -type WarehouseDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - warehouseErrors: [WarehouseError!]! - warehouse: Warehouse -} - -""" -Add shipping zone to given warehouse. -""" -type WarehouseShippingZoneAssign { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - warehouseErrors: [WarehouseError!]! - warehouse: Warehouse -} - -""" -Remove shipping zone from given warehouse. -""" -type WarehouseShippingZoneUnassign { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - warehouseErrors: [WarehouseError!]! - warehouse: Warehouse -} - -""" -Creates a new staff notification recipient. -""" -type StaffNotificationRecipientCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - shopErrors: [ShopError!]! - staffNotificationRecipient: StaffNotificationRecipient -} - -type ShopError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: ShopErrorCode! -} - -""" -An enumeration. -""" -enum ShopErrorCode { - ALREADY_EXISTS - CANNOT_FETCH_TAX_RATES - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE -} - -input StaffNotificationRecipientInput { - """ - The ID of the user subscribed to email notifications.. - """ - user: ID - - """ - Email address of a user subscribed to email notifications. - """ - email: String - - """ - Determines if a notification active. - """ - active: Boolean -} - -""" -Updates a staff notification recipient. -""" -type StaffNotificationRecipientUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - shopErrors: [ShopError!]! - staffNotificationRecipient: StaffNotificationRecipient -} - -""" -Delete staff notification recipient. -""" -type StaffNotificationRecipientDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - shopErrors: [ShopError!]! - staffNotificationRecipient: StaffNotificationRecipient -} - -""" -Updates site domain of the shop. -""" -type ShopDomainUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Updated shop. - """ - shop: Shop - shopErrors: [ShopError!]! -} - -input SiteDomainInput { - """ - Domain name for shop. - """ - domain: String - - """ - Shop site name. - """ - name: String -} - -""" -Updates shop settings. -""" -type ShopSettingsUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Updated shop. - """ - shop: Shop - shopErrors: [ShopError!]! -} - -input ShopSettingsInput { - """ - Header text. - """ - headerText: String - - """ - SEO description. - """ - description: String - - """ - Include taxes in prices. - """ - includeTaxesInPrices: Boolean - - """ - Display prices with tax in store. - """ - displayGrossPrices: Boolean - - """ - Charge taxes on shipping. - """ - chargeTaxesOnShipping: Boolean - - """ - Enable inventory tracking. - """ - trackInventoryByDefault: Boolean - - """ - Default weight unit. - """ - defaultWeightUnit: WeightUnitsEnum - - """ - Enable automatic fulfillment for all digital products. - """ - automaticFulfillmentDigitalProducts: Boolean - - """ - Default number of max downloads per digital content URL. - """ - defaultDigitalMaxDownloads: Int - - """ - Default number of days which digital content URL will be valid. - """ - defaultDigitalUrlValidDays: Int - - """ - Default email sender's name. - """ - defaultMailSenderName: String - - """ - Default email sender's address. - """ - defaultMailSenderAddress: String - - """ - URL of a view where customers can set their password. - """ - customerSetPasswordUrl: String -} - -""" -Fetch tax rates. -""" -type ShopFetchTaxRates { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Updated shop. - """ - shop: Shop - shopErrors: [ShopError!]! -} - -""" -Creates/Updates translations for Shop Settings. -""" -type ShopSettingsTranslate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Updated shop. - """ - shop: Shop - translationErrors: [TranslationError!]! -} - -type TranslationError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: TranslationErrorCode! -} - -""" -An enumeration. -""" -enum TranslationErrorCode { - GRAPHQL_ERROR - NOT_FOUND - REQUIRED -} - -input ShopSettingsTranslationInput { - headerText: String - description: String -} - -""" -Update the shop's address. If the `null` value is passed, the currently selected address will be deleted. -""" -type ShopAddressUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Updated shop. - """ - shop: Shop - shopErrors: [ShopError!]! -} - -""" -Update shop order settings. -""" -type OrderSettingsUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Order settings. - """ - orderSettings: OrderSettings - orderSettingsErrors: [OrderSettingsError!]! -} - -type OrderSettingsError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: OrderSettingsErrorCode! -} - -""" -An enumeration. -""" -enum OrderSettingsErrorCode { - INVALID -} - -input OrderSettingsUpdateInput { - """ - When disabled, all new orders from checkout will be marked as unconfirmed. When enabled orders from checkout will become unfulfilled immediately. - """ - automaticallyConfirmAllNewOrders: Boolean! -} - -""" -Manage shipping method's availability in channels. -""" -type ShippingMethodChannelListingUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - An updated shipping method instance. - """ - shippingMethod: ShippingMethod - shippingErrors: [ShippingError!]! -} - -type ShippingError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: ShippingErrorCode! - - """ - List of warehouse IDs which causes the error. - """ - warehouses: [ID!] - - """ - List of channels IDs which causes the error. - """ - channels: [ID!] -} - -""" -An enumeration. -""" -enum ShippingErrorCode { - ALREADY_EXISTS - GRAPHQL_ERROR - INVALID - MAX_LESS_THAN_MIN - NOT_FOUND - REQUIRED - UNIQUE - DUPLICATED_INPUT_ITEM -} - -input ShippingMethodChannelListingInput { - """ - List of channels to which the shipping method should be assigned. - """ - addChannels: [ShippingMethodChannelListingAddInput!] - - """ - List of channels from which the shipping method should be unassigned. - """ - removeChannels: [ID!] -} - -input ShippingMethodChannelListingAddInput { - """ - ID of a channel. - """ - channelId: ID! - - """ - Shipping price of the shipping method in this channel. - """ - price: PositiveDecimal - - """ - Minimum order price to use this shipping method. - """ - minimumOrderPrice: PositiveDecimal - - """ - Maximum order price to use this shipping method. - """ - maximumOrderPrice: PositiveDecimal -} - -""" -Creates a new shipping price. -""" -type ShippingPriceCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - A shipping zone to which the shipping method belongs. - """ - shippingZone: ShippingZone - shippingMethod: ShippingMethod - shippingErrors: [ShippingError!]! -} - -input ShippingPriceInput { - """ - Name of the shipping method. - """ - name: String - - """ - Shipping method description (JSON). - """ - description: JSONString - - """ - Minimum order weight to use this shipping method. - """ - minimumOrderWeight: WeightScalar - - """ - Maximum order weight to use this shipping method. - """ - maximumOrderWeight: WeightScalar - - """ - Maximum number of days for delivery. - """ - maximumDeliveryDays: Int - - """ - Minimal number of days for delivery. - """ - minimumDeliveryDays: Int - - """ - Shipping type: price or weight based. - """ - type: ShippingMethodTypeEnum - - """ - Shipping zone this method belongs to. - """ - shippingZone: ID - - """ - Postal code rules to add. - """ - addPostalCodeRules: [ShippingPostalCodeRulesCreateInputRange!] - - """ - Postal code rules to delete. - """ - deletePostalCodeRules: [ID!] - - """ - Inclusion type for currently assigned postal code rules. - """ - inclusionType: PostalCodeRuleInclusionTypeEnum -} - -scalar WeightScalar - -input ShippingPostalCodeRulesCreateInputRange { - """ - Start range of the postal code. - """ - start: String! - - """ - End range of the postal code. - """ - end: String -} - -""" -Deletes a shipping price. -""" -type ShippingPriceDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - A shipping method to delete. - """ - shippingMethod: ShippingMethod - - """ - A shipping zone to which the shipping method belongs. - """ - shippingZone: ShippingZone - shippingErrors: [ShippingError!]! -} - -""" -Deletes shipping prices. -""" -type ShippingPriceBulkDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Returns how many objects were affected. - """ - count: Int! - shippingErrors: [ShippingError!]! -} - -""" -Updates a new shipping price. -""" -type ShippingPriceUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - A shipping zone to which the shipping method belongs. - """ - shippingZone: ShippingZone - shippingMethod: ShippingMethod - shippingErrors: [ShippingError!]! -} - -""" -Creates/Updates translations for shipping method. -""" -type ShippingPriceTranslate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - translationErrors: [TranslationError!]! - shippingMethod: ShippingMethod -} - -input ShippingPriceTranslationInput { - name: String - - """ - Translated shipping method description (JSON). - """ - description: JSONString -} - -""" -Exclude products from shipping price. -""" -type ShippingPriceExcludeProducts { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - A shipping method with new list of excluded products. - """ - shippingMethod: ShippingMethod - shippingErrors: [ShippingError!]! -} - -input ShippingPriceExcludeProductsInput { - """ - List of products which will be excluded. - """ - products: [ID]! -} - -""" -Remove product from excluded list for shipping price. -""" -type ShippingPriceRemoveProductFromExclude { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - A shipping method with new list of excluded products. - """ - shippingMethod: ShippingMethod - shippingErrors: [ShippingError!]! -} - -""" -Creates a new shipping zone. -""" -type ShippingZoneCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - shippingErrors: [ShippingError!]! - shippingZone: ShippingZone -} - -input ShippingZoneCreateInput { - """ - Shipping zone's name. Visible only to the staff. - """ - name: String - - """ - Description of the shipping zone. - """ - description: String - - """ - List of countries in this shipping zone. - """ - countries: [String] - - """ - Default shipping zone will be used for countries not covered by other zones. - """ - default: Boolean - - """ - List of warehouses to assign to a shipping zone - """ - addWarehouses: [ID] - - """ - List of channels to assign to the shipping zone. - """ - addChannels: [ID!] -} - -""" -Deletes a shipping zone. -""" -type ShippingZoneDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - shippingErrors: [ShippingError!]! - shippingZone: ShippingZone -} - -""" -Deletes shipping zones. -""" -type ShippingZoneBulkDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Returns how many objects were affected. - """ - count: Int! - shippingErrors: [ShippingError!]! -} - -""" -Updates a new shipping zone. -""" -type ShippingZoneUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - shippingErrors: [ShippingError!]! - shippingZone: ShippingZone -} - -input ShippingZoneUpdateInput { - """ - Shipping zone's name. Visible only to the staff. - """ - name: String - - """ - Description of the shipping zone. - """ - description: String - - """ - List of countries in this shipping zone. - """ - countries: [String] - - """ - Default shipping zone will be used for countries not covered by other zones. - """ - default: Boolean - - """ - List of warehouses to assign to a shipping zone - """ - addWarehouses: [ID] - - """ - List of channels to assign to the shipping zone. - """ - addChannels: [ID!] - - """ - List of warehouses to unassign from a shipping zone - """ - removeWarehouses: [ID] - - """ - List of channels to unassign from the shipping zone. - """ - removeChannels: [ID!] -} - -""" -Assign attributes to a given product type. -""" -type ProductAttributeAssign { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - The updated product type. - """ - productType: ProductType - productErrors: [ProductError!]! -} - -type ProductError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: ProductErrorCode! - - """ - List of attributes IDs which causes the error. - """ - attributes: [ID!] - - """ - List of attribute values IDs which causes the error. - """ - values: [ID!] -} - -""" -An enumeration. -""" -enum ProductErrorCode { - ALREADY_EXISTS - ATTRIBUTE_ALREADY_ASSIGNED - ATTRIBUTE_CANNOT_BE_ASSIGNED - ATTRIBUTE_VARIANTS_DISABLED - DUPLICATED_INPUT_ITEM - GRAPHQL_ERROR - INVALID - PRODUCT_WITHOUT_CATEGORY - NOT_PRODUCTS_IMAGE - NOT_PRODUCTS_VARIANT - NOT_FOUND - REQUIRED - UNIQUE - VARIANT_NO_DIGITAL_CONTENT - CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT - PRODUCT_NOT_ASSIGNED_TO_CHANNEL - UNSUPPORTED_MEDIA_PROVIDER -} - -input ProductAttributeAssignInput { - """ - The ID of the attribute to assign. - """ - id: ID! - - """ - The attribute type to be assigned as. - """ - type: ProductAttributeType! -} - -enum ProductAttributeType { - PRODUCT - VARIANT -} - -""" -Un-assign attributes from a given product type. -""" -type ProductAttributeUnassign { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - The updated product type. - """ - productType: ProductType - productErrors: [ProductError!]! -} - -""" -Creates a new category. -""" -type CategoryCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - productErrors: [ProductError!]! - category: Category -} - -input CategoryInput { - """ - Category description (JSON). - """ - description: JSONString - - """ - Category name. - """ - name: String - - """ - Category slug. - """ - slug: String - - """ - Search engine optimization fields. - """ - seo: SeoInput - - """ - Background image file. - """ - backgroundImage: Upload - - """ - Alt text for a product media. - """ - backgroundImageAlt: String -} - -input SeoInput { - """ - SEO title. - """ - title: String - - """ - SEO description. - """ - description: 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. -""" -scalar Upload - -""" -Deletes a category. -""" -type CategoryDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - productErrors: [ProductError!]! - category: Category -} - -""" -Deletes categories. -""" -type CategoryBulkDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Returns how many objects were affected. - """ - count: Int! - productErrors: [ProductError!]! -} - -""" -Updates a category. -""" -type CategoryUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - productErrors: [ProductError!]! - category: Category -} - -""" -Creates/Updates translations for Category. -""" -type CategoryTranslate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - translationErrors: [TranslationError!]! - category: Category -} - -input TranslationInput { - seoTitle: String - seoDescription: String - name: String - description: JSONString -} - -""" -Adds products to a collection. -""" -type CollectionAddProducts { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Collection to which products will be added. - """ - collection: Collection - collectionErrors: [CollectionError!]! -} - -type CollectionError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - List of products IDs which causes the error. - """ - products: [ID!] - - """ - The error code. - """ - code: CollectionErrorCode! -} - -""" -An enumeration. -""" -enum CollectionErrorCode { - DUPLICATED_INPUT_ITEM - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE - CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT -} - -""" -Creates a new collection. -""" -type CollectionCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - collectionErrors: [CollectionError!]! - collection: Collection -} - -input CollectionCreateInput { - """ - Informs whether a collection is published. - """ - isPublished: Boolean - - """ - Name of the collection. - """ - name: String - - """ - Slug of the collection. - """ - slug: String - - """ - Description of the collection (JSON). - """ - description: JSONString - - """ - Background image file. - """ - backgroundImage: Upload - - """ - Alt text for an image. - """ - backgroundImageAlt: String - - """ - Search engine optimization fields. - """ - seo: SeoInput - - """ - Publication date. ISO 8601 standard. - """ - publicationDate: Date - - """ - List of products to be added to the collection. - """ - products: [ID] -} - -""" -Deletes a collection. -""" -type CollectionDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - collectionErrors: [CollectionError!]! - collection: Collection -} - -""" -Reorder the products of a collection. -""" -type CollectionReorderProducts { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Collection from which products are reordered. - """ - collection: Collection - collectionErrors: [CollectionError!]! -} - -input MoveProductInput { - """ - The ID of the product to move. - """ - productId: ID! - - """ - The relative sorting position of the product (from -inf to +inf) starting from the first given product's actual position.1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. - """ - sortOrder: Int -} - -""" -Deletes collections. -""" -type CollectionBulkDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Returns how many objects were affected. - """ - count: Int! - collectionErrors: [CollectionError!]! -} - -""" -Remove products from a collection. -""" -type CollectionRemoveProducts { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Collection from which products will be removed. - """ - collection: Collection - collectionErrors: [CollectionError!]! -} - -""" -Updates a collection. -""" -type CollectionUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - collectionErrors: [CollectionError!]! - collection: Collection -} - -input CollectionInput { - """ - Informs whether a collection is published. - """ - isPublished: Boolean - - """ - Name of the collection. - """ - name: String - - """ - Slug of the collection. - """ - slug: String - - """ - Description of the collection (JSON). - """ - description: JSONString - - """ - Background image file. - """ - backgroundImage: Upload - - """ - Alt text for an image. - """ - backgroundImageAlt: String - - """ - Search engine optimization fields. - """ - seo: SeoInput - - """ - Publication date. ISO 8601 standard. - """ - publicationDate: Date -} - -""" -Creates/Updates translations for collection. -""" -type CollectionTranslate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - translationErrors: [TranslationError!]! - collection: Collection -} - -""" -Manage collection's availability in channels. -""" -type CollectionChannelListingUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - An updated collection instance. - """ - collection: Collection - collectionChannelListingErrors: [CollectionChannelListingError!]! -} - -type CollectionChannelListingError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: ProductErrorCode! - - """ - List of attributes IDs which causes the error. - """ - attributes: [ID!] - - """ - List of attribute values IDs which causes the error. - """ - values: [ID!] - - """ - List of channels IDs which causes the error. - """ - channels: [ID!] -} - -input CollectionChannelListingUpdateInput { - """ - List of channels to which the collection should be assigned. - """ - addChannels: [PublishableChannelListingInput!] - - """ - List of channels from which the collection should be unassigned. - """ - removeChannels: [ID!] -} - -input PublishableChannelListingInput { - """ - ID of a channel. - """ - channelId: ID! - - """ - Determines if object is visible to customers. - """ - isPublished: Boolean - - """ - Publication date. ISO 8601 standard. - """ - publicationDate: Date -} - -""" -Creates a new product. -""" -type ProductCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - productErrors: [ProductError!]! - product: Product -} - -input ProductCreateInput { - """ - List of attributes. - """ - attributes: [AttributeValueInput!] - - """ - ID of the product's category. - """ - category: ID - - """ - Determine if taxes are being charged for the product. - """ - chargeTaxes: Boolean - - """ - List of IDs of collections that the product belongs to. - """ - collections: [ID!] - - """ - Product description (JSON). - """ - description: JSONString - - """ - Product name. - """ - name: String - - """ - Product slug. - """ - slug: String - - """ - Tax rate for enabled tax gateway. - """ - taxCode: String - - """ - Search engine optimization fields. - """ - seo: SeoInput - - """ - Weight of the Product. - """ - weight: WeightScalar - - """ - Defines the product rating value. - """ - rating: Float - - """ - ID of the type that product belongs to. - """ - productType: ID! -} - -input AttributeValueInput { - """ - ID of the selected attribute. - """ - id: ID - - """ - The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. - """ - values: [String] - - """ - URL of the file attribute. Every time, a new value is created. - """ - file: String - - """ - File content type. - """ - contentType: String - - """ - List of entity IDs that will be used as references. - """ - references: [ID!] - - """ - Text content in JSON format. - """ - richText: JSONString -} - -""" -Deletes a product. -""" -type ProductDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - productErrors: [ProductError!]! - product: Product -} - -""" -Deletes products. -""" -type ProductBulkDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Returns how many objects were affected. - """ - count: Int! - productErrors: [ProductError!]! -} - -""" -Updates an existing product. -""" -type ProductUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - productErrors: [ProductError!]! - product: Product -} - -input ProductInput { - """ - List of attributes. - """ - attributes: [AttributeValueInput!] - - """ - ID of the product's category. - """ - category: ID - - """ - Determine if taxes are being charged for the product. - """ - chargeTaxes: Boolean - - """ - List of IDs of collections that the product belongs to. - """ - collections: [ID!] - - """ - Product description (JSON). - """ - description: JSONString - - """ - Product name. - """ - name: String - - """ - Product slug. - """ - slug: String - - """ - Tax rate for enabled tax gateway. - """ - taxCode: String - - """ - Search engine optimization fields. - """ - seo: SeoInput - - """ - Weight of the Product. - """ - weight: WeightScalar - - """ - Defines the product rating value. - """ - rating: Float -} - -""" -Creates/Updates translations for Product. -""" -type ProductTranslate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - translationErrors: [TranslationError!]! - product: Product -} - -""" -Manage product's availability in channels. -""" -type ProductChannelListingUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - An updated product instance. - """ - product: Product - productChannelListingErrors: [ProductChannelListingError!]! -} - -type ProductChannelListingError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: ProductErrorCode! - - """ - List of attributes IDs which causes the error. - """ - attributes: [ID!] - - """ - List of attribute values IDs which causes the error. - """ - values: [ID!] - - """ - List of channels IDs which causes the error. - """ - channels: [ID!] - - """ - List of variants IDs which causes the error. - """ - variants: [ID!] -} - -input ProductChannelListingUpdateInput { - """ - List of channels to which the product should be assigned or updated. - """ - updateChannels: [ProductChannelListingAddInput!] - - """ - List of channels from which the product should be unassigned. - """ - removeChannels: [ID!] -} - -input ProductChannelListingAddInput { - """ - ID of a channel. - """ - channelId: ID! - - """ - Determines if object is visible to customers. - """ - isPublished: Boolean - - """ - Publication date. ISO 8601 standard. - """ - publicationDate: Date - - """ - Determines if product is visible in product listings (doesn't apply to product collections). - """ - visibleInListings: Boolean - - """ - Determine if product should be available for purchase. - """ - isAvailableForPurchase: Boolean - - """ - 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. - """ - availableForPurchaseDate: Date - - """ - List of variants to which the channel should be assigned. - """ - addVariants: [ID!] - - """ - List of variants from which the channel should be unassigned. - """ - removeVariants: [ID!] -} - -""" -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 -""" -type ProductMediaCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - product: Product - media: ProductMedia - productErrors: [ProductError!]! -} - -input ProductMediaCreateInput { - """ - Alt text for a product media. - """ - alt: String - - """ - Represents an image file in a multipart request. - """ - image: Upload - - """ - ID of an product. - """ - product: ID! - - """ - Represents an URL to an external media. - """ - mediaUrl: String -} - -""" -Reorder the variants of a product. Mutation updates updated_at on product and triggers PRODUCT_UPDATED webhook. -""" -type ProductVariantReorder { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - product: Product - productErrors: [ProductError!]! -} - -input ReorderInput { - """ - The ID of the item to move. - """ - id: ID! - - """ - The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. - """ - sortOrder: Int -} - -""" -Deletes a product media. -""" -type ProductMediaDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - product: Product - media: ProductMedia - productErrors: [ProductError!]! -} - -""" -Deletes product media. -""" -type ProductMediaBulkDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Returns how many objects were affected. - """ - count: Int! - productErrors: [ProductError!]! -} - -""" -Changes ordering of the product media. -""" -type ProductMediaReorder { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - product: Product - media: [ProductMedia!] - productErrors: [ProductError!]! -} - -""" -Updates a product media. -""" -type ProductMediaUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - product: Product - media: ProductMedia - productErrors: [ProductError!]! -} - -input ProductMediaUpdateInput { - """ - Alt text for a product media. - """ - alt: String -} - -""" -Creates a new product type. -""" -type ProductTypeCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - productErrors: [ProductError!]! - productType: ProductType -} - -input ProductTypeInput { - """ - Name of the product type. - """ - name: String - - """ - Product type slug. - """ - slug: String - - """ - Determines if product of this type has multiple variants. This option mainly simplifies product management in the dashboard. There is always at least one variant created under the hood. - """ - hasVariants: Boolean - - """ - List of attributes shared among all product variants. - """ - productAttributes: [ID] - - """ - List of attributes used to distinguish between different variants of a product. - """ - variantAttributes: [ID] - - """ - Determines if shipping is required for products of this variant. - """ - isShippingRequired: Boolean - - """ - Determines if products are digital. - """ - isDigital: Boolean - - """ - Weight of the ProductType items. - """ - weight: WeightScalar - - """ - Tax rate for enabled tax gateway. - """ - taxCode: String -} - -""" -Deletes a product type. -""" -type ProductTypeDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - productErrors: [ProductError!]! - productType: ProductType -} - -""" -Deletes product types. -""" -type ProductTypeBulkDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Returns how many objects were affected. - """ - count: Int! - productErrors: [ProductError!]! -} - -""" -Updates an existing product type. -""" -type ProductTypeUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - productErrors: [ProductError!]! - productType: ProductType -} - -""" -Reorder the attributes of a product type. -""" -type ProductTypeReorderAttributes { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Product type from which attributes are reordered. - """ - productType: ProductType - productErrors: [ProductError!]! -} - -""" -Reorder product attribute values. -""" -type ProductReorderAttributeValues { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Product from which attribute values are reordered. - """ - product: Product - productErrors: [ProductError!]! -} - -""" -Create new digital content. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec -""" -type DigitalContentCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - variant: ProductVariant - content: DigitalContent - productErrors: [ProductError!]! -} - -input DigitalContentUploadInput { - """ - Use default digital content settings for this product. - """ - useDefaultSettings: Boolean! - - """ - Determines how many times a download link can be accessed by a customer. - """ - maxDownloads: Int - - """ - Determines for how many days a download link is active since it was generated. - """ - urlValidDays: Int - - """ - Overwrite default automatic_fulfillment setting for variant. - """ - automaticFulfillment: Boolean - - """ - Represents an file in a multipart request. - """ - contentFile: Upload! -} - -""" -Remove digital content assigned to given variant. -""" -type DigitalContentDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - variant: ProductVariant - productErrors: [ProductError!]! -} - -""" -Update digital content. -""" -type DigitalContentUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - variant: ProductVariant - content: DigitalContent - productErrors: [ProductError!]! -} - -input DigitalContentInput { - """ - Use default digital content settings for this product. - """ - useDefaultSettings: Boolean! - - """ - Determines how many times a download link can be accessed by a customer. - """ - maxDownloads: Int - - """ - Determines for how many days a download link is active since it was generated. - """ - urlValidDays: Int - - """ - Overwrite default automatic_fulfillment setting for variant. - """ - automaticFulfillment: Boolean -} - -""" -Generate new URL to digital content. -""" -type DigitalContentUrlCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - productErrors: [ProductError!]! - digitalContentUrl: DigitalContentUrl -} - -input DigitalContentUrlCreateInput { - """ - Digital content ID which URL will belong to. - """ - content: ID! -} - -""" -Creates a new variant for a product. -""" -type ProductVariantCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - productErrors: [ProductError!]! - productVariant: ProductVariant -} - -input ProductVariantCreateInput { - """ - List of attributes specific to this variant. - """ - attributes: [AttributeValueInput]! - - """ - Stock keeping unit. - """ - sku: String - - """ - Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. - """ - trackInventory: Boolean - - """ - Weight of the Product Variant. - """ - weight: WeightScalar - - """ - Product ID of which type is the variant. - """ - product: ID! - - """ - Stocks of a product available for sale. - """ - stocks: [StockInput!] -} - -input StockInput { - """ - Warehouse in which stock is located. - """ - warehouse: ID! - - """ - Quantity of items available for sell. - """ - quantity: Int! -} - -""" -Deletes a product variant. -""" -type ProductVariantDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - productErrors: [ProductError!]! - productVariant: ProductVariant -} - -""" -Creates product variants for a given product. -""" -type ProductVariantBulkCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Returns how many objects were created. - """ - count: Int! - - """ - List of the created variants. - """ - productVariants: [ProductVariant!]! - bulkProductErrors: [BulkProductError!]! -} - -type BulkProductError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: ProductErrorCode! - - """ - List of attributes IDs which causes the error. - """ - attributes: [ID!] - - """ - List of attribute values IDs which causes the error. - """ - values: [ID!] - - """ - Index of an input list item that caused the error. - """ - index: Int - - """ - List of warehouse IDs which causes the error. - """ - warehouses: [ID!] - - """ - List of channel IDs which causes the error. - """ - channels: [ID!] -} - -input ProductVariantBulkCreateInput { - """ - List of attributes specific to this variant. - """ - attributes: [BulkAttributeValueInput]! - - """ - Stock keeping unit. - """ - sku: String! - - """ - Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. - """ - trackInventory: Boolean - - """ - Weight of the Product Variant. - """ - weight: WeightScalar - - """ - Stocks of a product available for sale. - """ - stocks: [StockInput!] - - """ - List of prices assigned to channels. - """ - channelListings: [ProductVariantChannelListingAddInput!] -} - -input BulkAttributeValueInput { - """ - ID of the selected attribute. - """ - id: ID - - """ - The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. - """ - values: [String]! -} - -input ProductVariantChannelListingAddInput { - """ - ID of a channel. - """ - channelId: ID! - - """ - Price of the particular variant in channel. - """ - price: PositiveDecimal! - - """ - Cost price of the variant in channel. - """ - costPrice: PositiveDecimal -} - -""" -Deletes product variants. -""" -type ProductVariantBulkDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Returns how many objects were affected. - """ - count: Int! - productErrors: [ProductError!]! -} - -""" -Creates stocks for product variant. -""" -type ProductVariantStocksCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Updated product variant. - """ - productVariant: ProductVariant - bulkStockErrors: [BulkStockError!]! -} - -type BulkStockError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: ProductErrorCode! - - """ - List of attributes IDs which causes the error. - """ - attributes: [ID!] - - """ - List of attribute values IDs which causes the error. - """ - values: [ID!] - - """ - Index of an input list item that caused the error. - """ - index: Int -} - -""" -Delete stocks from product variant. -""" -type ProductVariantStocksDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Updated product variant. - """ - productVariant: ProductVariant - stockErrors: [StockError!]! -} - -type StockError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: StockErrorCode! -} - -""" -An enumeration. -""" -enum StockErrorCode { - ALREADY_EXISTS - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE -} - -""" -Update stocks for product variant. -""" -type ProductVariantStocksUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Updated product variant. - """ - productVariant: ProductVariant - bulkStockErrors: [BulkStockError!]! -} - -""" -Updates an existing variant for product. -""" -type ProductVariantUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - productErrors: [ProductError!]! - productVariant: ProductVariant -} - -input ProductVariantInput { - """ - List of attributes specific to this variant. - """ - attributes: [AttributeValueInput] - - """ - Stock keeping unit. - """ - sku: String - - """ - Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. - """ - trackInventory: Boolean - - """ - Weight of the Product Variant. - """ - weight: WeightScalar -} - -""" -Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook. -""" -type ProductVariantSetDefault { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - product: Product - productErrors: [ProductError!]! -} - -""" -Creates/Updates translations for Product Variant. -""" -type ProductVariantTranslate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - translationErrors: [TranslationError!]! - productVariant: ProductVariant -} - input NameTranslationInput { name: String } -""" -Manage product variant prices in channels. -""" -type ProductVariantChannelListingUpdate { +enum NavigationType { """ - List of errors that occurred executing the mutation. + Main storefront navigation. """ - errors: [Error!]! + MAIN + + """ + Secondary storefront navigation. + """ + SECONDARY +} + +""" +An object with an ID +""" +interface Node { + """ + The ID of the object. + """ + id: ID! +} + +interface ObjectWithMetadata { + """ + List of private metadata items.Requires proper staff permissions to access. + """ + privateMetadata: [MetadataItem]! + + """ + List of public metadata items. Can be accessed without permissions. + """ + metadata: [MetadataItem]! +} + +""" +Represents an order in the shop. +""" +type Order implements Node & ObjectWithMetadata { + """ + The ID of the object. + """ + id: ID! + created: DateTime! + status: OrderStatus! + user: User + trackingClientId: String! + billingAddress: Address + shippingAddress: Address + shippingMethod: ShippingMethod + shippingMethodName: String + channel: Channel! + + """ + Total price of shipping. + """ + shippingPrice: TaxedMoney! + shippingTaxRate: Float! + token: String! + voucher: Voucher + + """ + List of user gift cards. + """ + giftCards: [GiftCard] + displayGrossPrices: Boolean! + customerNote: String! + weight: Weight + redirectUrl: String + + """ + List of private metadata items.Requires proper staff permissions to access. + """ + privateMetadata: [MetadataItem]! + + """ + List of public metadata items. Can be accessed without permissions. + """ + metadata: [MetadataItem]! + + """ + List of shipments for the order. + """ + fulfillments: [Fulfillment]! + + """ + List of order lines. + """ + lines: [OrderLine]! + + """ + List of actions that can be performed in the current state of an order. + """ + actions: [OrderAction]! + + """ + Shipping methods that can be used with this order. + """ + availableShippingMethods: [ShippingMethod] + + """ + List of order invoices. + """ + invoices: [Invoice] + + """ + User-friendly number of an order. + """ + number: String + + """ + Informs if an order is fully paid. + """ + isPaid: Boolean! + + """ + Internal payment status. + """ + paymentStatus: PaymentChargeStatusEnum! + + """ + User-friendly payment status. + """ + paymentStatusDisplay: String! + + """ + List of payments for the order. + """ + payments: [Payment] + + """ + Total amount of the order. + """ + total: TaxedMoney! + + """ + Undiscounted total amount of the order. + """ + undiscountedTotal: TaxedMoney! + + """ + The sum of line prices not including shipping. + """ + subtotal: TaxedMoney! + + """ + User-friendly order status. + """ + statusDisplay: String + + """ + Informs whether a draft order can be finalized(turned into a regular order). + """ + canFinalize: Boolean! + + """ + Amount authorized for the order. + """ + totalAuthorized: Money! + + """ + Amount captured by payment. + """ + totalCaptured: Money! + + """ + List of events associated with the order. + """ + events: [OrderEvent] + + """ + The difference between the paid and the order total amount. + """ + totalBalance: Money! + + """ + Email address of the customer. + """ + userEmail: String + + """ + Returns True, if order requires shipping. + """ + isShippingRequired: Boolean! + languageCode: String! @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Use the `languageCodeEnum` field to fetch the language code. This field will be removed in Saleor 4.0." ) """ - An updated product variant instance. + Order language code. """ - variant: ProductVariant - productChannelListingErrors: [ProductChannelListingError!]! -} + languageCodeEnum: LanguageCodeEnum! -""" -Reorder product variant attribute values. -""" -type ProductVariantReorderAttributeValues { """ - List of errors that occurred executing the mutation. + Returns applied discount. """ - errors: [Error!]! + discount: Money @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Use discounts field. This field will be removed in Saleor 4.0." ) """ - Product variant from which attribute values are reordered. + Discount name. """ - productVariant: ProductVariant - productErrors: [ProductError!]! -} - -""" -Assign an media to a product variant. -""" -type VariantMediaAssign { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! + discountName: String @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - productVariant: ProductVariant - media: ProductMedia - productErrors: [ProductError!]! -} - -""" -Unassign an media from a product variant. -""" -type VariantMediaUnassign { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - productVariant: ProductVariant - media: ProductMedia - productErrors: [ProductError!]! -} - -""" -Captures the authorized payment amount. -""" -type PaymentCapture { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Use discounts field. This field will be removed in Saleor 4.0." ) """ - Updated payment. + Translated discount name. """ - payment: Payment - paymentErrors: [PaymentError!]! -} - -type PaymentError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: PaymentErrorCode! -} - -""" -An enumeration. -""" -enum PaymentErrorCode { - BILLING_ADDRESS_NOT_SET - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE - PARTIAL_PAYMENT_NOT_ALLOWED - SHIPPING_ADDRESS_NOT_SET - INVALID_SHIPPING_METHOD - SHIPPING_METHOD_NOT_SET - PAYMENT_ERROR - NOT_SUPPORTED_GATEWAY -} - -""" -Refunds the captured payment amount. -""" -type PaymentRefund { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! + translatedDiscountName: String @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Use discounts field. This field will be removed in Saleor 4.0." ) """ - Updated payment. + List of all discounts assigned to the order. """ - payment: Payment - paymentErrors: [PaymentError!]! + discounts: [OrderDiscount!] +} + +enum OrderAction { + """ + Represents the capture action. + """ + CAPTURE + + """ + Represents a mark-as-paid action. + """ + MARK_AS_PAID + + """ + Represents a refund action. + """ + REFUND + + """ + Represents a void action. + """ + VOID } """ -Voids the authorized payment. +Adds note to the order. """ -type PaymentVoid { +type OrderAddNote { """ - List of errors that occurred executing the mutation. + Order with the note added. """ - errors: [Error!]! + order: Order + + """ + Order note created. + """ + event: OrderEvent + orderErrors: [OrderError!]! @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Use errors field instead. This field will be removed in Saleor 4.0." ) + errors: [OrderError!]! +} +input OrderAddNoteInput { """ - Updated payment. + Note message. """ - payment: Payment - paymentErrors: [PaymentError!]! + message: String! } """ -Initializes payment process when it is required by gateway. +Cancels orders. """ -type PaymentInitialize { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - initializedPayment: PaymentInitialized - paymentErrors: [PaymentError!]! -} - -""" -Server-side data generated by a payment gateway. Optional step when the payment provider requires an additional action to initialize payment session. -""" -type PaymentInitialized { - """ - ID of a payment gateway. - """ - gateway: String! - - """ - Payment gateway name. - """ - name: String! - - """ - Initialized data by gateway. - """ - data: JSONString -} - -""" -Creates a new page. -""" -type PageCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - pageErrors: [PageError!]! - page: Page -} - -type PageError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: PageErrorCode! - - """ - List of attributes IDs which causes the error. - """ - attributes: [ID!] - - """ - List of attribute values IDs which causes the error. - """ - values: [ID!] -} - -""" -An enumeration. -""" -enum PageErrorCode { - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE - DUPLICATED_INPUT_ITEM - ATTRIBUTE_ALREADY_ASSIGNED -} - -input PageCreateInput { - """ - Page internal name. - """ - slug: String - - """ - Page title. - """ - title: String - - """ - Page content in JSON format. - """ - content: JSONString - - """ - List of attributes. - """ - attributes: [AttributeValueInput!] - - """ - Determines if page is visible in the storefront. - """ - isPublished: Boolean - - """ - Publication date. ISO 8601 standard. - """ - publicationDate: String - - """ - Search engine optimization fields. - """ - seo: SeoInput - - """ - ID of the page type that page belongs to. - """ - pageType: ID! -} - -""" -Deletes a page. -""" -type PageDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - pageErrors: [PageError!]! - page: Page -} - -""" -Deletes pages. -""" -type PageBulkDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - +type OrderBulkCancel { """ Returns how many objects were affected. """ count: Int! - pageErrors: [PageError!]! -} - -""" -Publish pages. -""" -type PageBulkPublish { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! + orderErrors: [OrderError!]! @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Use errors field instead. This field will be removed in Saleor 4.0." ) - - """ - Returns how many objects were affected. - """ - count: Int! - pageErrors: [PageError!]! + errors: [OrderError!]! } """ -Updates an existing page. +Cancel an order. """ -type PageUpdate { +type OrderCancel { """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - pageErrors: [PageError!]! - page: Page -} - -input PageInput { - """ - Page internal name. - """ - slug: String - - """ - Page title. - """ - title: String - - """ - Page content in JSON format. - """ - content: JSONString - - """ - List of attributes. - """ - attributes: [AttributeValueInput!] - - """ - Determines if page is visible in the storefront. - """ - isPublished: Boolean - - """ - Publication date. ISO 8601 standard. - """ - publicationDate: String - - """ - Search engine optimization fields. - """ - seo: SeoInput -} - -""" -Creates/Updates translations for Page. -""" -type PageTranslate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - translationErrors: [TranslationError!]! - page: PageTranslatableContent -} - -input PageTranslationInput { - seoTitle: String - seoDescription: String - title: String - content: JSONString -} - -""" -Create a new page type. -""" -type PageTypeCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - pageErrors: [PageError!]! - pageType: PageType -} - -input PageTypeCreateInput { - """ - Name of the page type. - """ - name: String - - """ - Page type slug. - """ - slug: String - - """ - List of attribute IDs to be assigned to the page type. - """ - addAttributes: [ID!] -} - -""" -Update page type. -""" -type PageTypeUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - pageErrors: [PageError!]! - pageType: PageType -} - -input PageTypeUpdateInput { - """ - Name of the page type. - """ - name: String - - """ - Page type slug. - """ - slug: String - - """ - List of attribute IDs to be assigned to the page type. - """ - addAttributes: [ID!] - - """ - List of attribute IDs to be assigned to the page type. - """ - removeAttributes: [ID!] -} - -""" -Delete a page type. -""" -type PageTypeDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - pageErrors: [PageError!]! - pageType: PageType -} - -""" -Delete page types. -""" -type PageTypeBulkDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Returns how many objects were affected. - """ - count: Int! - pageErrors: [PageError!]! -} - -""" -Assign attributes to a given page type. -""" -type PageAttributeAssign { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - The updated page type. - """ - pageType: PageType - pageErrors: [PageError!]! -} - -""" -Unassign attributes from a given page type. -""" -type PageAttributeUnassign { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - The updated page type. - """ - pageType: PageType - pageErrors: [PageError!]! -} - -""" -Reorder the attributes of a page type. -""" -type PageTypeReorderAttributes { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Page type from which attributes are reordered. - """ - pageType: PageType - pageErrors: [PageError!]! -} - -""" -Reorder page attribute values. -""" -type PageReorderAttributeValues { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Page from which attribute values are reordered. - """ - page: Page - pageErrors: [PageError!]! -} - -""" -Completes creating an order. -""" -type DraftOrderComplete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Completed order. + Canceled order. """ order: Order orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! +} + +""" +Capture an order. +""" +type OrderCapture { + """ + Captured order. + """ + order: Order + orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! +} + +""" +Confirms an unconfirmed order by changing status to unfulfilled. +""" +type OrderConfirm { + order: Order + orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! +} + +type OrderCountableConnection { + """ + Pagination data for this connection. + """ + pageInfo: PageInfo! + edges: [OrderCountableEdge!]! + + """ + A total count of items in the collection. + """ + totalCount: Int +} + +type OrderCountableEdge { + """ + The item at the end of the edge. + """ + node: Order! + + """ + A cursor for use in pagination. + """ + cursor: String! +} + +enum OrderDirection { + """ + Specifies an ascending sort order. + """ + ASC + + """ + Specifies a descending sort order. + """ + DESC +} + +""" +Contains all details related to the applied discount to the order. +""" +type OrderDiscount implements Node { + """ + The ID of the object. + """ + id: ID! + type: OrderDiscountType! + + """ + Type of the discount: fixed or percent + """ + valueType: DiscountValueTypeEnum! + + """ + Value of the discount. Can store fixed value or percent value + """ + value: PositiveDecimal! + name: String + translatedName: String + + """ + Explanation for the applied discount. + """ + reason: String + + """ + Returns amount of discount. + """ + amount: Money! +} + +""" +Adds discount to the order. +""" +type OrderDiscountAdd { + """ + Order which has been discounted. + """ + order: Order + orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! +} + +input OrderDiscountCommonInput { + """ + Type of the discount: fixed or percent + """ + valueType: DiscountValueTypeEnum! + + """ + Value of the discount. Can store fixed value or percent value + """ + value: PositiveDecimal! + + """ + Explanation for the applied discount. + """ + reason: String +} + +""" +Remove discount from the order. +""" +type OrderDiscountDelete { + """ + Order which has removed discount. + """ + order: Order + orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! +} + +""" +An enumeration. +""" +enum OrderDiscountType { + """ + Voucher + """ + VOUCHER + + """ + Manual + """ + MANUAL +} + +""" +Update discount for the order. +""" +type OrderDiscountUpdate { + """ + Order which has been discounted. + """ + order: Order + orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! +} + +input OrderDraftFilterInput { + customer: String + created: DateRangeInput + search: String + metadata: [MetadataInput] + channels: [ID] } type OrderError { @@ -15563,297 +10052,278 @@ enum OrderErrorCode { } """ -Creates a new draft order. +History log of the order. """ -type DraftOrderCreate { +type OrderEvent implements Node { """ - List of errors that occurred executing the mutation. + The ID of the object. """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - orderErrors: [OrderError!]! - order: Order + id: ID! + + """ + Date when event happened at in ISO 8601 format. + """ + date: DateTime + + """ + Order event type. + """ + type: OrderEventsEnum + + """ + User who performed the action. + """ + user: User + + """ + Content of the event. + """ + message: String + + """ + Email of the customer. + """ + email: String + + """ + Type of an email sent to the customer. + """ + emailType: OrderEventsEmailsEnum + + """ + Amount of money. + """ + amount: Float + + """ + The payment ID from the payment gateway. + """ + paymentId: String + + """ + The payment gateway of the payment. + """ + paymentGateway: String + + """ + Number of items. + """ + quantity: Int + + """ + Composed ID of the Fulfillment. + """ + composedId: String + + """ + User-friendly number of an order. + """ + orderNumber: String + + """ + Number of an invoice related to the order. + """ + invoiceNumber: String + + """ + List of oversold lines names. + """ + oversoldItems: [String] + + """ + The concerned lines. + """ + lines: [OrderEventOrderLineObject] + + """ + The lines fulfilled. + """ + fulfilledItems: [FulfillmentLine] + + """ + The warehouse were items were restocked. + """ + warehouse: Warehouse + + """ + The transaction reference of captured payment. + """ + transactionReference: String + + """ + Define if shipping costs were included to the refund. + """ + shippingCostsIncluded: Boolean + + """ + The order which is related to this order. + """ + relatedOrder: Order + + """ + The discount applied to the order. + """ + discount: OrderEventDiscountObject } -input DraftOrderCreateInput { +type OrderEventCountableConnection { """ - Billing address of the customer. + Pagination data for this connection. """ - billingAddress: AddressInput - user: ID + pageInfo: PageInfo! + edges: [OrderEventCountableEdge!]! """ - Email address of the customer. + A total count of items in the collection. """ - userEmail: String - - """ - Discount amount for the order. - """ - discount: PositiveDecimal - - """ - Shipping address of the customer. - """ - shippingAddress: AddressInput - - """ - ID of a selected shipping method. - """ - shippingMethod: ID - - """ - ID of the voucher associated with the order. - """ - voucher: ID - - """ - A note from a customer. Visible by customers in the order summary. - """ - customerNote: String - - """ - ID of the channel associated with the order. - """ - channel: ID - - """ - URL of a view where users should be redirected to see the order details. URL in RFC 1808 format. - """ - redirectUrl: String - - """ - Variant line input consisting of variant ID and quantity of products. - """ - lines: [OrderLineCreateInput] + totalCount: Int } -input OrderLineCreateInput { +type OrderEventCountableEdge { """ - Number of variant items ordered. + The item at the end of the edge. """ - quantity: Int! + node: OrderEvent! """ - Product variant ID. + A cursor for use in pagination. """ - variantId: ID! + cursor: String! +} + +type OrderEventDiscountObject { + """ + Type of the discount: fixed or percent. + """ + valueType: DiscountValueTypeEnum! + + """ + Value of the discount. Can store fixed value or percent value. + """ + value: PositiveDecimal! + + """ + Explanation for the applied discount. + """ + reason: String + + """ + Returns amount of discount. + """ + amount: Money + + """ + Type of the discount: fixed or percent. + """ + oldValueType: DiscountValueTypeEnum + + """ + Value of the discount. Can store fixed value or percent value. + """ + oldValue: PositiveDecimal + + """ + Returns amount of discount. + """ + oldAmount: Money +} + +type OrderEventOrderLineObject { + """ + The variant quantity. + """ + quantity: Int + + """ + The order line. + """ + orderLine: OrderLine + + """ + The variant name. + """ + itemName: String + + """ + The discount applied to the order line. + """ + discount: OrderEventDiscountObject } """ -Deletes a draft order. +An enumeration. """ -type DraftOrderDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - orderErrors: [OrderError!]! - order: Order +enum OrderEventsEmailsEnum { + PAYMENT_CONFIRMATION + CONFIRMED + SHIPPING_CONFIRMATION + TRACKING_UPDATED + ORDER_CONFIRMATION + ORDER_CANCEL + ORDER_REFUND + FULFILLMENT_CONFIRMATION + DIGITAL_LINKS } """ -Deletes draft orders. +An enumeration. """ -type DraftOrderBulkDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Returns how many objects were affected. - """ - count: Int! - orderErrors: [OrderError!]! +enum OrderEventsEnum { + DRAFT_CREATED + DRAFT_CREATED_FROM_REPLACE + ADDED_PRODUCTS + REMOVED_PRODUCTS + PLACED + PLACED_FROM_DRAFT + OVERSOLD_ITEMS + CANCELED + ORDER_MARKED_AS_PAID + ORDER_FULLY_PAID + ORDER_REPLACEMENT_CREATED + ORDER_DISCOUNT_ADDED + ORDER_DISCOUNT_AUTOMATICALLY_UPDATED + ORDER_DISCOUNT_UPDATED + ORDER_DISCOUNT_DELETED + ORDER_LINE_DISCOUNT_UPDATED + ORDER_LINE_DISCOUNT_REMOVED + UPDATED_ADDRESS + EMAIL_SENT + CONFIRMED + PAYMENT_AUTHORIZED + PAYMENT_CAPTURED + EXTERNAL_SERVICE_NOTIFICATION + PAYMENT_REFUNDED + PAYMENT_VOIDED + PAYMENT_FAILED + INVOICE_REQUESTED + INVOICE_GENERATED + INVOICE_UPDATED + INVOICE_SENT + FULFILLMENT_CANCELED + FULFILLMENT_RESTOCKED_ITEMS + FULFILLMENT_FULFILLED_ITEMS + FULFILLMENT_REFUNDED + FULFILLMENT_RETURNED + FULFILLMENT_REPLACED + TRACKING_UPDATED + NOTE_ADDED + OTHER } -""" -Deletes order lines. -""" -type DraftOrderLinesBulkDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Returns how many objects were affected. - """ - count: Int! - orderErrors: [OrderError!]! -} - -""" -Updates a draft order. -""" -type DraftOrderUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - orderErrors: [OrderError!]! - order: Order -} - -input DraftOrderInput { - """ - Billing address of the customer. - """ - billingAddress: AddressInput - user: ID - - """ - Email address of the customer. - """ - userEmail: String - - """ - Discount amount for the order. - """ - discount: PositiveDecimal - - """ - Shipping address of the customer. - """ - shippingAddress: AddressInput - - """ - ID of a selected shipping method. - """ - shippingMethod: ID - - """ - ID of the voucher associated with the order. - """ - voucher: ID - - """ - A note from a customer. Visible by customers in the order summary. - """ - customerNote: String - - """ - ID of the channel associated with the order. - """ - channel: ID - - """ - URL of a view where users should be redirected to see the order details. URL in RFC 1808 format. - """ - redirectUrl: String -} - -""" -Adds note to the order. -""" -type OrderAddNote { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Order with the note added. - """ - order: Order - - """ - Order note created. - """ - event: OrderEvent - orderErrors: [OrderError!]! -} - -input OrderAddNoteInput { - """ - Note message. - """ - message: String! -} - -""" -Cancel an order. -""" -type OrderCancel { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Canceled order. - """ - order: Order - orderErrors: [OrderError!]! -} - -""" -Capture an order. -""" -type OrderCapture { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Captured order. - """ - order: Order - orderErrors: [OrderError!]! -} - -""" -Confirms an unconfirmed order by changing status to unfulfilled. -""" -type OrderConfirm { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - order: Order - orderErrors: [OrderError!]! +input OrderFilterInput { + paymentStatus: [PaymentChargeStatusEnum] + status: [OrderStatusFilter] + customer: String + created: DateRangeInput + search: String + metadata: [MetadataInput] + channels: [ID] } """ Creates new fulfillments for an order. """ type OrderFulfill { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - """ List of created fulfillments. """ @@ -15864,6 +10334,10 @@ type OrderFulfill { """ order: Order orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! } input OrderFulfillInput { @@ -15903,94 +10377,251 @@ input OrderFulfillStockInput { } """ -Cancels existing fulfillment and optionally restocks items. +Represents order line of particular order. """ -type FulfillmentCancel { +type OrderLine implements Node { """ - List of errors that occurred executing the mutation. + The ID of the object. """ - errors: [Error!]! + id: ID! + productName: String! + variantName: String! + productSku: String! + isShippingRequired: Boolean! + quantity: Int! + quantityFulfilled: Int! + unitDiscountReason: String + taxRate: Float! + digitalContentUrl: DigitalContentUrl + + """ + The main thumbnail for the ordered product. + """ + thumbnail( + """ + Size of thumbnail. + """ + size: Int + ): Image + + """ + Price of the single item in the order line. + """ + unitPrice: TaxedMoney! + + """ + Price of the single item in the order line without applied an order line discount. + """ + undiscountedUnitPrice: TaxedMoney! + + """ + The discount applied to the single order line. + """ + unitDiscount: Money! + + """ + Value of the discount. Can store fixed value or percent value + """ + unitDiscountValue: PositiveDecimal! + + """ + Price of the order line. + """ + totalPrice: TaxedMoney! + + """ + A purchased product variant. Note: this field may be null if the variant has been removed from stock at all. + """ + variant: ProductVariant + + """ + Product name in the customer's language + """ + translatedProductName: String! + + """ + Variant name in the customer's language + """ + translatedVariantName: String! + + """ + List of allocations across warehouses. + """ + allocations: [Allocation!] + + """ + Type of the discount: fixed or percent + """ + unitDiscountType: DiscountValueTypeEnum +} + +input OrderLineCreateInput { + """ + Number of variant items ordered. + """ + quantity: Int! + + """ + Product variant ID. + """ + variantId: ID! +} + +""" +Deletes an order line from an order. +""" +type OrderLineDelete { + """ + A related order. + """ + order: Order + + """ + An order line that was deleted. + """ + orderLine: OrderLine + orderErrors: [OrderError!]! @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Use errors field instead. This field will be removed in Saleor 4.0." ) + errors: [OrderError!]! +} + +""" +Remove discount applied to the order line. +""" +type OrderLineDiscountRemove { + """ + Order line which has removed discount. + """ + orderLine: OrderLine """ - A canceled fulfillment. - """ - fulfillment: Fulfillment - - """ - Order which fulfillment was cancelled. + Order which is related to line which has removed discount. """ order: Order orderErrors: [OrderError!]! -} - -input FulfillmentCancelInput { - """ - ID of warehouse where items will be restock. - """ - warehouseId: ID! -} - -""" -Updates a fulfillment for an order. -""" -type FulfillmentUpdateTracking { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Use errors field instead. This field will be removed in Saleor 4.0." ) + errors: [OrderError!]! +} + +""" +Update discount for the order line. +""" +type OrderLineDiscountUpdate { + """ + Order line which has been discounted. + """ + orderLine: OrderLine """ - A fulfillment with updated tracking. - """ - fulfillment: Fulfillment - - """ - Order for which fulfillment was updated. + Order which is related to the discounted line. """ order: Order orderErrors: [OrderError!]! -} - -input FulfillmentUpdateTrackingInput { - """ - Fulfillment tracking number. - """ - trackingNumber: String - - """ - If true, send an email notification to the customer. - """ - notifyCustomer: Boolean -} - -""" -Refund products. -""" -type FulfillmentRefundProducts { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Use errors field instead. This field will be removed in Saleor 4.0." ) + errors: [OrderError!]! +} +input OrderLineInput { """ - A refunded fulfillment. + Number of variant items ordered. """ - fulfillment: Fulfillment + quantity: Int! +} +""" +Updates an order line of an order. +""" +type OrderLineUpdate { """ - Order which fulfillment was refunded. + Related order. """ order: Order orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! + orderLine: OrderLine +} + +""" +Create order lines for an order. +""" +type OrderLinesCreate { + """ + Related order. + """ + order: Order + + """ + List of added order lines. + """ + orderLines: [OrderLine!] + orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! +} + +""" +Mark order as manually paid. +""" +type OrderMarkAsPaid { + """ + Order marked as paid. + """ + order: Order + orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! +} + +""" +Refund an order. +""" +type OrderRefund { + """ + A refunded order. + """ + order: Order + orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! +} + +input OrderRefundFulfillmentLineInput { + """ + The ID of the fulfillment line to refund. + """ + fulfillmentLineId: ID! + + """ + The number of items to be refunded. + """ + quantity: Int! +} + +input OrderRefundLineInput { + """ + The ID of the order line to refund. + """ + orderLineId: ID! + + """ + The number of items to be refunded. + """ + quantity: Int! } input OrderRefundProductsInput { @@ -16012,65 +10643,41 @@ input OrderRefundProductsInput { """ If true, Saleor will refund shipping costs. If amountToRefund is providedincludeShippingCosts will be ignored. """ - includeShippingCosts: Boolean + includeShippingCosts: Boolean = false } -input OrderRefundLineInput { +input OrderReturnFulfillmentLineInput { """ - The ID of the order line to refund. - """ - orderLineId: ID! - - """ - The number of items to be refunded. - """ - quantity: Int! -} - -input OrderRefundFulfillmentLineInput { - """ - The ID of the fulfillment line to refund. + The ID of the fulfillment line to return. """ fulfillmentLineId: ID! """ - The number of items to be refunded. + The number of items to be returned. """ quantity: Int! + + """ + Determines, if the line should be added to replace order. + """ + replace: Boolean = false } -""" -Return products. -""" -type FulfillmentReturnProducts { +input OrderReturnLineInput { """ - List of errors that occurred executing the mutation. + The ID of the order line to return. """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + orderLineId: ID! """ - A return fulfillment. + The number of items to be returned. """ - returnFulfillment: Fulfillment + quantity: Int! """ - A replace fulfillment. + Determines, if the line should be added to replace order. """ - replaceFulfillment: Fulfillment - - """ - Order which fulfillment was returned. - """ - order: Order - - """ - A draft order which was created for products with replace flag. - """ - replaceOrder: Order - orderErrors: [OrderError!]! + replace: Boolean = false } input OrderReturnProductsInput { @@ -16092,295 +10699,170 @@ input OrderReturnProductsInput { """ If true, Saleor will refund shipping costs. If amountToRefund is providedincludeShippingCosts will be ignored. """ - includeShippingCosts: Boolean + includeShippingCosts: Boolean = false """ If true, Saleor will call refund action for all lines. """ - refund: Boolean -} - -input OrderReturnLineInput { - """ - The ID of the order line to return. - """ - orderLineId: ID! - - """ - The number of items to be returned. - """ - quantity: Int! - - """ - Determines, if the line should be added to replace order. - """ - replace: Boolean -} - -input OrderReturnFulfillmentLineInput { - """ - The ID of the fulfillment line to return. - """ - fulfillmentLineId: ID! - - """ - The number of items to be returned. - """ - quantity: Int! - - """ - Determines, if the line should be added to replace order. - """ - replace: Boolean + refund: Boolean = false } """ -Create order lines for an order. +Order related settings from site settings. """ -type OrderLinesCreate { +type OrderSettings { + automaticallyConfirmAllNewOrders: Boolean! +} + +type OrderSettingsError { """ - List of errors that occurred executing the mutation. + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ - errors: [Error!]! + field: String + + """ + The error message. + """ + message: String + + """ + The error code. + """ + code: OrderSettingsErrorCode! +} + +""" +An enumeration. +""" +enum OrderSettingsErrorCode { + INVALID +} + +""" +Update shop order settings. +""" +type OrderSettingsUpdate { + """ + Order settings. + """ + orderSettings: OrderSettings + orderSettingsErrors: [OrderSettingsError!]! @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Use errors field instead. This field will be removed in Saleor 4.0." ) + errors: [OrderSettingsError!]! +} + +input OrderSettingsUpdateInput { + """ + When disabled, all new orders from checkout will be marked as unconfirmed. When enabled orders from checkout will become unfulfilled immediately. + """ + automaticallyConfirmAllNewOrders: Boolean! +} + +enum OrderSortField { + """ + Sort orders by number. + """ + NUMBER """ - Related order. + Sort orders by creation date. """ - order: Order + CREATION_DATE """ - List of added order lines. + Sort orders by customer. """ - orderLines: [OrderLine!] - orderErrors: [OrderError!]! + CUSTOMER + + """ + Sort orders by payment. + """ + PAYMENT + + """ + Sort orders by fulfillment status. + """ + FULFILLMENT_STATUS +} + +input OrderSortingInput { + """ + Specifies the direction in which to sort products. + """ + direction: OrderDirection! + + """ + Sort orders by the selected field. + """ + field: OrderSortField! } """ -Deletes an order line from an order. +An enumeration. """ -type OrderLineDelete { +enum OrderStatus { """ - List of errors that occurred executing the mutation. + Draft """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) + DRAFT """ - A related order. + Unconfirmed """ - order: Order + UNCONFIRMED """ - An order line that was deleted. + Unfulfilled """ - orderLine: OrderLine - orderErrors: [OrderError!]! + UNFULFILLED + + """ + Partially fulfilled + """ + PARTIALLY_FULFILLED + + """ + Partially returned + """ + PARTIALLY_RETURNED + + """ + Returned + """ + RETURNED + + """ + Fulfilled + """ + FULFILLED + + """ + Canceled + """ + CANCELED } -""" -Updates an order line of an order. -""" -type OrderLineUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Related order. - """ - order: Order - orderErrors: [OrderError!]! - orderLine: OrderLine -} - -input OrderLineInput { - """ - Number of variant items ordered. - """ - quantity: Int! -} - -""" -Adds discount to the order. -""" -type OrderDiscountAdd { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Order which has been discounted. - """ - order: Order - orderErrors: [OrderError!]! -} - -input OrderDiscountCommonInput { - """ - Type of the discount: fixed or percent - """ - valueType: DiscountValueTypeEnum! - - """ - Value of the discount. Can store fixed value or percent value - """ - value: PositiveDecimal! - - """ - Explanation for the applied discount. - """ - reason: String -} - -""" -Update discount for the order. -""" -type OrderDiscountUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Order which has been discounted. - """ - order: Order - orderErrors: [OrderError!]! -} - -""" -Remove discount from the order. -""" -type OrderDiscountDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Order which has removed discount. - """ - order: Order - orderErrors: [OrderError!]! -} - -""" -Update discount for the order line. -""" -type OrderLineDiscountUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Order line which has been discounted. - """ - orderLine: OrderLine - - """ - Order which is related to the discounted line. - """ - order: Order - orderErrors: [OrderError!]! -} - -""" -Remove discount applied to the order line. -""" -type OrderLineDiscountRemove { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Order line which has removed discount. - """ - orderLine: OrderLine - - """ - Order which is related to line which has removed discount. - """ - order: Order - orderErrors: [OrderError!]! -} - -""" -Mark order as manually paid. -""" -type OrderMarkAsPaid { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Order marked as paid. - """ - order: Order - orderErrors: [OrderError!]! -} - -""" -Refund an order. -""" -type OrderRefund { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - A refunded order. - """ - order: Order - orderErrors: [OrderError!]! +enum OrderStatusFilter { + READY_TO_FULFILL + READY_TO_CAPTURE + UNFULFILLED + UNCONFIRMED + PARTIALLY_FULFILLED + FULFILLED + CANCELED } """ Updates an order. """ type OrderUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! order: Order } @@ -16405,19 +10887,15 @@ input OrderUpdateInput { Updates a shipping method of the order. """ type OrderUpdateShipping { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - """ Order with updated shipping method. """ order: Order orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! } input OrderUpdateShippingInput { @@ -16431,56 +10909,222 @@ input OrderUpdateShippingInput { Void an order. """ type OrderVoid { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - """ A voided order. """ order: Order orderErrors: [OrderError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [OrderError!]! } """ -Cancels orders. +A static page that can be manually added by a shop operator through the dashboard. """ -type OrderBulkCancel { +type Page implements Node & ObjectWithMetadata { + seoTitle: String + seoDescription: String + """ - List of errors that occurred executing the mutation. + The ID of the object. """ - errors: [Error!]! + id: ID! + title: String! + content: JSONString + publicationDate: Date + isPublished: Boolean! + slug: String! + pageType: PageType! + created: DateTime! + + """ + List of private metadata items.Requires proper staff permissions to access. + """ + privateMetadata: [MetadataItem]! + + """ + List of public metadata items. Can be accessed without permissions. + """ + metadata: [MetadataItem]! + + """ + Content of the page (JSON). + """ + contentJson: JSONString! @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Will be removed in Saleor 4.0. Use the `content` field instead." ) + """ + Returns translated page fields for the given language code. + """ + translation( + """ + A language code to return the translation for page. + """ + languageCode: LanguageCodeEnum! + ): PageTranslation + + """ + List of attributes assigned to this product. + """ + attributes: [SelectedAttribute!]! +} + +""" +Assign attributes to a given page type. +""" +type PageAttributeAssign { + """ + The updated page type. + """ + pageType: PageType + pageErrors: [PageError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [PageError!]! +} + +""" +Unassign attributes from a given page type. +""" +type PageAttributeUnassign { + """ + The updated page type. + """ + pageType: PageType + pageErrors: [PageError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [PageError!]! +} + +""" +Deletes pages. +""" +type PageBulkDelete { """ Returns how many objects were affected. """ count: Int! - orderErrors: [OrderError!]! -} - -""" -Delete metadata of an object. -""" -type DeleteMetadata { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! + pageErrors: [PageError!]! @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Use errors field instead. This field will be removed in Saleor 4.0." ) - metadataErrors: [MetadataError!]! - item: ObjectWithMetadata + errors: [PageError!]! } -type MetadataError { +""" +Publish pages. +""" +type PageBulkPublish { + """ + Returns how many objects were affected. + """ + count: Int! + pageErrors: [PageError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [PageError!]! +} + +type PageCountableConnection { + """ + Pagination data for this connection. + """ + pageInfo: PageInfo! + edges: [PageCountableEdge!]! + + """ + A total count of items in the collection. + """ + totalCount: Int +} + +type PageCountableEdge { + """ + The item at the end of the edge. + """ + node: Page! + + """ + A cursor for use in pagination. + """ + cursor: String! +} + +""" +Creates a new page. +""" +type PageCreate { + pageErrors: [PageError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [PageError!]! + page: Page +} + +input PageCreateInput { + """ + Page internal name. + """ + slug: String + + """ + Page title. + """ + title: String + + """ + Page content in JSON format. + """ + content: JSONString + + """ + List of attributes. + """ + attributes: [AttributeValueInput!] + + """ + Determines if page is visible in the storefront. + """ + isPublished: Boolean + + """ + Publication date. ISO 8601 standard. + """ + publicationDate: String + + """ + Search engine optimization fields. + """ + seo: SeoInput + + """ + ID of the page type that page belongs to. + """ + pageType: ID! +} + +""" +Deletes a page. +""" +type PageDelete { + pageErrors: [PageError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [PageError!]! + page: Page +} + +type PageError { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -16494,420 +11138,590 @@ type MetadataError { """ The error code. """ - code: MetadataErrorCode! + code: PageErrorCode! + + """ + List of attributes IDs which causes the error. + """ + attributes: [ID!] + + """ + List of attribute values IDs which causes the error. + """ + values: [ID!] } """ An enumeration. """ -enum MetadataErrorCode { +enum PageErrorCode { GRAPHQL_ERROR INVALID NOT_FOUND REQUIRED -} - -""" -Delete object's private metadata. -""" -type DeletePrivateMetadata { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - metadataErrors: [MetadataError!]! - item: ObjectWithMetadata -} - -""" -Updates metadata of an object. -""" -type UpdateMetadata { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - metadataErrors: [MetadataError!]! - item: ObjectWithMetadata -} - -""" -Updates private metadata of an object. -""" -type UpdatePrivateMetadata { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - metadataErrors: [MetadataError!]! - item: ObjectWithMetadata -} - -""" -Assigns storefront's navigation menus. -""" -type AssignNavigation { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Assigned navigation menu. - """ - menu: Menu - menuErrors: [MenuError!]! -} - -type MenuError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: MenuErrorCode! -} - -""" -An enumeration. -""" -enum MenuErrorCode { - CANNOT_ASSIGN_NODE - GRAPHQL_ERROR - INVALID - INVALID_MENU_ITEM - NO_MENU_ITEM_PROVIDED - NOT_FOUND - REQUIRED - TOO_MANY_MENU_ITEMS UNIQUE + DUPLICATED_INPUT_ITEM + ATTRIBUTE_ALREADY_ASSIGNED } -enum NavigationType { - """ - Main storefront navigation. - """ - MAIN - - """ - Secondary storefront navigation. - """ - SECONDARY +input PageFilterInput { + search: String + metadata: [MetadataInput] } """ -Creates a new Menu. +The Relay compliant `PageInfo` type, containing data necessary to paginate this connection. """ -type MenuCreate { +type PageInfo { """ - List of errors that occurred executing the mutation. + When paginating forwards, are there more items? """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - menuErrors: [MenuError!]! - menu: Menu + hasNextPage: Boolean! + + """ + When paginating backwards, are there more items? + """ + hasPreviousPage: Boolean! + + """ + When paginating backwards, the cursor to continue. + """ + startCursor: String + + """ + When paginating forwards, the cursor to continue. + """ + endCursor: String } -input MenuCreateInput { +input PageInput { """ - Name of the menu. - """ - name: String! - - """ - Slug of the menu. Will be generated if not provided. + Page internal name. """ slug: String """ - List of menu items. + Page title. """ - items: [MenuItemInput] -} - -input MenuItemInput { - """ - Name of the menu item. - """ - name: String + title: String """ - URL of the pointed item. + Page content in JSON format. """ - url: String + content: JSONString """ - Category to which item points. + List of attributes. """ - category: ID + attributes: [AttributeValueInput!] """ - Collection to which item points. + Determines if page is visible in the storefront. """ - collection: ID + isPublished: Boolean """ - Page to which item points. + Publication date. ISO 8601 standard. """ - page: ID + publicationDate: String + + """ + Search engine optimization fields. + """ + seo: SeoInput } """ -Deletes a menu. +Reorder page attribute values. """ -type MenuDelete { +type PageReorderAttributeValues { """ - List of errors that occurred executing the mutation. + Page from which attribute values are reordered. """ - errors: [Error!]! + page: Page + pageErrors: [PageError!]! @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Use errors field instead. This field will be removed in Saleor 4.0." ) - menuErrors: [MenuError!]! - menu: Menu + errors: [PageError!]! } -""" -Deletes menus. -""" -type MenuBulkDelete { +enum PageSortField { """ - List of errors that occurred executing the mutation. + Sort pages by title. """ - errors: [Error!]! + TITLE + + """ + Sort pages by slug. + """ + SLUG + + """ + Sort pages by visibility. + """ + VISIBILITY + + """ + Sort pages by creation date. + """ + CREATION_DATE + + """ + Sort pages by publication date. + """ + PUBLICATION_DATE +} + +input PageSortingInput { + """ + Specifies the direction in which to sort products. + """ + direction: OrderDirection! + + """ + Sort pages by the selected field. + """ + field: PageSortField! +} + +type PageTranslatableContent implements Node { + seoTitle: String + seoDescription: String + + """ + The ID of the object. + """ + id: ID! + title: String! + content: JSONString + + """ + Content of the page (JSON). + """ + contentJson: JSONString @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Will be removed in Saleor 4.0. Use the `content` field instead." ) """ - Returns how many objects were affected. + Returns translated page fields for the given language code. """ - count: Int! - menuErrors: [MenuError!]! + translation( + """ + A language code to return the translation for page. + """ + languageCode: LanguageCodeEnum! + ): PageTranslation + + """ + ('A static page that can be manually added by a shop operator ', 'through the dashboard.') + """ + page: Page } """ -Updates a menu. +Creates/Updates translations for Page. """ -type MenuUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - menuErrors: [MenuError!]! - menu: Menu -} - -input MenuInput { - """ - Name of the menu. - """ - name: String - - """ - Slug of the menu. - """ - slug: String -} - -""" -Creates a new menu item. -""" -type MenuItemCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - menuErrors: [MenuError!]! - menuItem: MenuItem -} - -input MenuItemCreateInput { - """ - Name of the menu item. - """ - name: String! - - """ - URL of the pointed item. - """ - url: String - - """ - Category to which item points. - """ - category: ID - - """ - Collection to which item points. - """ - collection: ID - - """ - Page to which item points. - """ - page: ID - - """ - Menu to which item belongs. - """ - menu: ID! - - """ - ID of the parent menu. If empty, menu will be top level menu. - """ - parent: ID -} - -""" -Deletes a menu item. -""" -type MenuItemDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - menuErrors: [MenuError!]! - menuItem: MenuItem -} - -""" -Deletes menu items. -""" -type MenuItemBulkDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Returns how many objects were affected. - """ - count: Int! - menuErrors: [MenuError!]! -} - -""" -Updates a menu item. -""" -type MenuItemUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - menuErrors: [MenuError!]! - menuItem: MenuItem -} - -""" -Creates/Updates translations for Menu Item. -""" -type MenuItemTranslate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) +type PageTranslate { translationErrors: [TranslationError!]! - menuItem: MenuItem -} - -""" -Moves items of menus. -""" -type MenuItemMove { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Use errors field instead. This field will be removed in Saleor 4.0." ) - - """ - Assigned menu to move within. - """ - menu: Menu - menuErrors: [MenuError!]! + errors: [TranslationError!]! + page: PageTranslatableContent } -input MenuItemMoveInput { - """ - The menu item ID to move. - """ - itemId: ID! +type PageTranslation implements Node { + seoTitle: String + seoDescription: String """ - ID of the parent menu. If empty, menu will be top level menu. + The ID of the object. """ - parentId: ID + id: ID! + title: String! + content: JSONString """ - 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. + Translation language. """ - sortOrder: Int -} + language: LanguageDisplay! -""" -Request an invoice for the order using plugin. -""" -type InvoiceRequest { """ - List of errors that occurred executing the mutation. + Translated description of the page (JSON). """ - errors: [Error!]! + contentJson: JSONString @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Will be removed in Saleor 4.0. Use the `content` field instead." ) +} + +input PageTranslationInput { + seoTitle: String + seoDescription: String + title: String + content: JSONString +} + +""" +Represents a type of page. It defines what attributes are available to pages of this type. +""" +type PageType implements Node & ObjectWithMetadata { + """ + The ID of the object. + """ + id: ID! + name: String! + slug: String! """ - Order related to an invoice. + List of private metadata items.Requires proper staff permissions to access. """ + privateMetadata: [MetadataItem]! + + """ + List of public metadata items. Can be accessed without permissions. + """ + metadata: [MetadataItem]! + + """ + Page attributes of that page type. + """ + attributes: [Attribute] + + """ + Attributes that can be assigned to the page type. + """ + availableAttributes( + filter: AttributeFilterInput + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): AttributeCountableConnection + + """ + Whether page type has pages assigned. + """ + hasPages: Boolean +} + +""" +Delete page types. +""" +type PageTypeBulkDelete { + """ + Returns how many objects were affected. + """ + count: Int! + pageErrors: [PageError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [PageError!]! +} + +type PageTypeCountableConnection { + """ + Pagination data for this connection. + """ + pageInfo: PageInfo! + edges: [PageTypeCountableEdge!]! + + """ + A total count of items in the collection. + """ + totalCount: Int +} + +type PageTypeCountableEdge { + """ + The item at the end of the edge. + """ + node: PageType! + + """ + A cursor for use in pagination. + """ + cursor: String! +} + +""" +Create a new page type. +""" +type PageTypeCreate { + pageErrors: [PageError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [PageError!]! + pageType: PageType +} + +input PageTypeCreateInput { + """ + Name of the page type. + """ + name: String + + """ + Page type slug. + """ + slug: String + + """ + List of attribute IDs to be assigned to the page type. + """ + addAttributes: [ID!] +} + +""" +Delete a page type. +""" +type PageTypeDelete { + pageErrors: [PageError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [PageError!]! + pageType: PageType +} + +input PageTypeFilterInput { + search: String +} + +""" +Reorder the attributes of a page type. +""" +type PageTypeReorderAttributes { + """ + Page type from which attributes are reordered. + """ + pageType: PageType + pageErrors: [PageError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [PageError!]! +} + +enum PageTypeSortField { + """ + Sort page types by name. + """ + NAME + + """ + Sort page types by slug. + """ + SLUG +} + +input PageTypeSortingInput { + """ + Specifies the direction in which to sort products. + """ + direction: OrderDirection! + + """ + Sort page types by the selected field. + """ + field: PageTypeSortField! +} + +""" +Update page type. +""" +type PageTypeUpdate { + pageErrors: [PageError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [PageError!]! + pageType: PageType +} + +input PageTypeUpdateInput { + """ + Name of the page type. + """ + name: String + + """ + Page type slug. + """ + slug: String + + """ + List of attribute IDs to be assigned to the page type. + """ + addAttributes: [ID!] + + """ + List of attribute IDs to be assigned to the page type. + """ + removeAttributes: [ID!] +} + +""" +Updates an existing page. +""" +type PageUpdate { + pageErrors: [PageError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [PageError!]! + page: Page +} + +""" +Change the password of the logged in user. +""" +type PasswordChange { + """ + A user instance with a new password. + """ + user: User + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! +} + +""" +Represents a payment of a given type. +""" +type Payment implements Node { + """ + The ID of the object. + """ + id: ID! + gateway: String! + isActive: Boolean! + created: DateTime! + modified: DateTime! + token: String! + checkout: Checkout order: Order - invoiceErrors: [InvoiceError!]! - invoice: Invoice + paymentMethodType: String! + customerIpAddress: String + + """ + Internal payment status. + """ + chargeStatus: PaymentChargeStatusEnum! + + """ + List of actions that can be performed in the current state of a payment. + """ + actions: [OrderAction]! + + """ + Total amount of the payment. + """ + total: Money + + """ + Total amount captured for this payment. + """ + capturedAmount: Money + + """ + List of all transactions within this payment. + """ + transactions: [Transaction] + + """ + Maximum amount of money that can be captured. + """ + availableCaptureAmount: Money + + """ + Maximum amount of money that can be refunded. + """ + availableRefundAmount: Money + + """ + The details of the card used for this payment. + """ + creditCard: CreditCard } -type InvoiceError { +""" +Captures the authorized payment amount. +""" +type PaymentCapture { + """ + Updated payment. + """ + payment: Payment + paymentErrors: [PaymentError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [PaymentError!]! +} + +""" +An enumeration. +""" +enum PaymentChargeStatusEnum { + NOT_CHARGED + PENDING + PARTIALLY_CHARGED + FULLY_CHARGED + PARTIALLY_REFUNDED + FULLY_REFUNDED + REFUSED + CANCELLED +} + +type PaymentCountableConnection { + """ + Pagination data for this connection. + """ + pageInfo: PageInfo! + edges: [PaymentCountableEdge!]! + + """ + A total count of items in the collection. + """ + totalCount: Int +} + +type PaymentCountableEdge { + """ + The item at the end of the edge. + """ + node: Payment! + + """ + A cursor for use in pagination. + """ + cursor: String! +} + +type PaymentError { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -16921,280 +11735,371 @@ type InvoiceError { """ The error code. """ - code: InvoiceErrorCode! + code: PaymentErrorCode! } """ An enumeration. """ -enum InvoiceErrorCode { - REQUIRED - NOT_READY - URL_NOT_SET - EMAIL_NOT_SET - NUMBER_NOT_SET - NOT_FOUND - INVALID_STATUS -} - -""" -Requests deletion of an invoice. -""" -type InvoiceRequestDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - invoiceErrors: [InvoiceError!]! - invoice: Invoice -} - -""" -Creates a ready to send invoice. -""" -type InvoiceCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - invoiceErrors: [InvoiceError!]! - invoice: Invoice -} - -input InvoiceCreateInput { - """ - Invoice number. - """ - number: String! - - """ - URL of an invoice to download. - """ - url: String! -} - -""" -Deletes an invoice. -""" -type InvoiceDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - invoiceErrors: [InvoiceError!]! - invoice: Invoice -} - -""" -Updates an invoice. -""" -type InvoiceUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - invoiceErrors: [InvoiceError!]! - invoice: Invoice -} - -input UpdateInvoiceInput { - """ - Invoice number - """ - number: String - - """ - URL of an invoice to download. - """ - url: String -} - -""" -Send an invoice notification to the customer. -""" -type InvoiceSendNotification { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - invoiceErrors: [InvoiceError!]! - invoice: Invoice -} - -""" -Activate a gift card. -""" -type GiftCardActivate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - A gift card to activate. - """ - giftCard: GiftCard - giftCardErrors: [GiftCardError!]! -} - -type GiftCardError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: GiftCardErrorCode! -} - -""" -An enumeration. -""" -enum GiftCardErrorCode { - ALREADY_EXISTS +enum PaymentErrorCode { + BILLING_ADDRESS_NOT_SET GRAPHQL_ERROR INVALID NOT_FOUND REQUIRED UNIQUE + PARTIAL_PAYMENT_NOT_ALLOWED + SHIPPING_ADDRESS_NOT_SET + INVALID_SHIPPING_METHOD + SHIPPING_METHOD_NOT_SET + PAYMENT_ERROR + NOT_SUPPORTED_GATEWAY +} + +input PaymentFilterInput { + checkouts: [ID] } """ -Creates a new gift card. +Available payment gateway backend with configuration necessary to setup client. """ -type GiftCardCreate { +type PaymentGateway { """ - List of errors that occurred executing the mutation. + Payment gateway name. """ - errors: [Error!]! + name: String! + + """ + Payment gateway ID. + """ + id: ID! + + """ + Payment gateway client configuration. + """ + config: [GatewayConfigLine!]! + + """ + Payment gateway supported currencies. + """ + currencies: [String]! +} + +""" +Initializes payment process when it is required by gateway. +""" +type PaymentInitialize { + initializedPayment: PaymentInitialized + paymentErrors: [PaymentError!]! @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Use errors field instead. This field will be removed in Saleor 4.0." ) - giftCardErrors: [GiftCardError!]! - giftCard: GiftCard -} - -input GiftCardCreateInput { - """ - Start date of the gift card in ISO 8601 format. - """ - startDate: Date - - """ - End date of the gift card in ISO 8601 format. - """ - endDate: Date - - """ - Value of the gift card. - """ - balance: PositiveDecimal - - """ - The customer's email of the gift card buyer. - """ - userEmail: String - - """ - Code to use the gift card. - """ - code: String + errors: [PaymentError!]! } """ -Deactivate a gift card. +Server-side data generated by a payment gateway. Optional step when the payment provider requires an additional action to initialize payment session. """ -type GiftCardDeactivate { +type PaymentInitialized { """ - List of errors that occurred executing the mutation. + ID of a payment gateway. """ - errors: [Error!]! + gateway: String! + + """ + Payment gateway name. + """ + name: String! + + """ + Initialized data by gateway. + """ + data: JSONString +} + +input PaymentInput { + """ + A gateway to use with that payment. + """ + gateway: String! + + """ + Client-side generated payment token, representing customer's billing data in a secure manner. + """ + token: String + + """ + Total amount of the transaction, including all taxes and discounts. If no amount is provided, the checkout total will be used. + """ + amount: PositiveDecimal + + """ + URL of a storefront view where user should be redirected after requiring additional actions. Payment with additional actions will not be finished if this field is not provided. + """ + returnUrl: String +} + +""" +Refunds the captured payment amount. +""" +type PaymentRefund { + """ + Updated payment. + """ + payment: Payment + paymentErrors: [PaymentError!]! @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Use errors field instead. This field will be removed in Saleor 4.0." ) - - """ - A gift card to deactivate. - """ - giftCard: GiftCard - giftCardErrors: [GiftCardError!]! + errors: [PaymentError!]! } """ -Update a gift card. +Represents a payment source stored for user in payment gateway, such as credit card. """ -type GiftCardUpdate { +type PaymentSource { """ - List of errors that occurred executing the mutation. + Payment gateway name. """ - errors: [Error!]! + gateway: String! + + """ + Stored credit card details if available. + """ + creditCardInfo: CreditCard +} + +""" +Voids the authorized payment. +""" +type PaymentVoid { + """ + Updated payment. + """ + payment: Payment + paymentErrors: [PaymentError!]! @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Use errors field instead. This field will be removed in Saleor 4.0." ) - giftCardErrors: [GiftCardError!]! - giftCard: GiftCard -} - -input GiftCardUpdateInput { - """ - Start date of the gift card in ISO 8601 format. - """ - startDate: Date - - """ - End date of the gift card in ISO 8601 format. - """ - endDate: Date - - """ - Value of the gift card. - """ - balance: PositiveDecimal - - """ - The customer's email of the gift card buyer. - """ - userEmail: String + errors: [PaymentError!]! } """ -Update plugin configuration. +Represents a permission object in a friendly form. """ -type PluginUpdate { +type Permission { """ - List of errors that occurred executing the mutation. + Internal code for permission. """ - errors: [Error!]! + code: PermissionEnum! + + """ + Describe action(s) allowed to do by permission. + """ + name: String! +} + +""" +An enumeration. +""" +enum PermissionEnum { + MANAGE_USERS + MANAGE_STAFF + MANAGE_APPS + MANAGE_CHANNELS + MANAGE_DISCOUNTS + MANAGE_PLUGINS + MANAGE_GIFT_CARD + MANAGE_MENUS + MANAGE_ORDERS + MANAGE_PAGES + MANAGE_PAGE_TYPES_AND_ATTRIBUTES + MANAGE_PRODUCTS + MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES + MANAGE_SHIPPING + MANAGE_SETTINGS + MANAGE_TRANSLATIONS + MANAGE_CHECKOUTS +} + +""" +Create new permission group. +""" +type PermissionGroupCreate { + permissionGroupErrors: [PermissionGroupError!]! @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Use errors field instead. This field will be removed in Saleor 4.0." ) - plugin: Plugin - pluginsErrors: [PluginError!]! + errors: [PermissionGroupError!]! + group: Group +} + +input PermissionGroupCreateInput { + """ + List of permission code names to assign to this group. + """ + addPermissions: [PermissionEnum!] + + """ + List of users to assign to this group. + """ + addUsers: [ID!] + + """ + Group name. + """ + name: String! +} + +""" +Delete permission group. +""" +type PermissionGroupDelete { + permissionGroupErrors: [PermissionGroupError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [PermissionGroupError!]! + group: Group +} + +type PermissionGroupError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """ + The error message. + """ + message: String + + """ + The error code. + """ + code: PermissionGroupErrorCode! + + """ + List of permissions which causes the error. + """ + permissions: [PermissionEnum!] + + """ + List of user IDs which causes the error. + """ + users: [ID!] +} + +""" +An enumeration. +""" +enum PermissionGroupErrorCode { + ASSIGN_NON_STAFF_MEMBER + DUPLICATED_INPUT_ITEM + CANNOT_REMOVE_FROM_LAST_GROUP + LEFT_NOT_MANAGEABLE_PERMISSION + OUT_OF_SCOPE_PERMISSION + OUT_OF_SCOPE_USER + REQUIRED + UNIQUE +} + +input PermissionGroupFilterInput { + search: String +} + +enum PermissionGroupSortField { + """ + Sort permission group accounts by name. + """ + NAME +} + +input PermissionGroupSortingInput { + """ + Specifies the direction in which to sort products. + """ + direction: OrderDirection! + + """ + Sort permission group by the selected field. + """ + field: PermissionGroupSortField! +} + +""" +Update permission group. +""" +type PermissionGroupUpdate { + permissionGroupErrors: [PermissionGroupError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [PermissionGroupError!]! + group: Group +} + +input PermissionGroupUpdateInput { + """ + List of permission code names to assign to this group. + """ + addPermissions: [PermissionEnum!] + + """ + List of users to assign to this group. + """ + addUsers: [ID!] + + """ + Group name. + """ + name: String + + """ + List of permission code names to unassign from this group. + """ + removePermissions: [PermissionEnum!] + + """ + List of users to unassign from this group. + """ + removeUsers: [ID!] +} + +""" +Plugin. +""" +type Plugin implements Node { + id: ID! + name: String! + description: String! + active: Boolean! + configuration: [ConfigurationItem] +} + +type PluginCountableConnection { + """ + Pagination data for this connection. + """ + pageInfo: PageInfo! + edges: [PluginCountableEdge!]! + + """ + A total count of items in the collection. + """ + totalCount: Int +} + +type PluginCountableEdge { + """ + The item at the end of the edge. + """ + node: Plugin! + + """ + A cursor for use in pagination. + """ + cursor: String! } type PluginError { @@ -17226,6 +12131,40 @@ enum PluginErrorCode { UNIQUE } +input PluginFilterInput { + active: Boolean + search: String +} + +enum PluginSortField { + NAME + IS_ACTIVE +} + +input PluginSortingInput { + """ + Specifies the direction in which to sort products. + """ + direction: OrderDirection! + + """ + Sort plugins by the selected field. + """ + field: PluginSortField! +} + +""" +Update plugin configuration. +""" +type PluginUpdate { + plugin: Plugin + pluginsErrors: [PluginError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [PluginError!]! +} + input PluginUpdateInput { """ Indicates whether the plugin should be enabled. @@ -17238,34 +12177,334 @@ input PluginUpdateInput { configuration: [ConfigurationItemInput] } -input ConfigurationItemInput { +""" +Positive Decimal scalar implementation. + +Should be used in places where value must be positive. +""" +scalar PositiveDecimal + +""" +An enumeration. +""" +enum PostalCodeRuleInclusionTypeEnum { + INCLUDE + EXCLUDE +} + +input PriceRangeInput { """ - Name of the field to update. + Price greater than or equal to. """ + gte: Float + + """ + Price less than or equal to. + """ + lte: Float +} + +""" +Represents an individual item for sale in the storefront. +""" +type Product implements Node & ObjectWithMetadata { + """ + The ID of the object. + """ + id: ID! + seoTitle: String + seoDescription: String name: String! + description: JSONString + productType: ProductType! + slug: String! + category: Category + updatedAt: DateTime + chargeTaxes: Boolean! + weight: Weight + defaultVariant: ProductVariant + rating: Float """ - Value of the given field to update. + List of private metadata items.Requires proper staff permissions to access. """ - value: String -} + privateMetadata: [MetadataItem]! -""" -Creates a new sale. -""" -type SaleCreate { """ - List of errors that occurred executing the mutation. + List of public metadata items. Can be accessed without permissions. """ - errors: [Error!]! + metadata: [MetadataItem]! + + """ + Description of the product (JSON). + """ + descriptionJson: JSONString @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Will be removed in Saleor 4.0. Use the `description` field instead." ) - discountErrors: [DiscountError!]! - sale: Sale + + """ + The main thumbnail for a product. + """ + thumbnail( + """ + Size of thumbnail. + """ + size: Int + ): Image + + """ + Lists the storefront product's pricing, the current price and discounts, only meant for displaying. + """ + pricing( + """ + Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration. + """ + address: AddressInput + ): ProductPricingInfo + + """ + Whether the product is in stock and visible or not. + """ + isAvailable( + """ + Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration. + """ + address: AddressInput + ): Boolean + + """ + A type of tax. Assigned by enabled tax gateway + """ + taxType: TaxType + + """ + List of attributes assigned to this product. + """ + attributes: [SelectedAttribute!]! + + """ + List of availability in channels for the product. + """ + channelListings: [ProductChannelListing!] + + """ + Get a single product media by ID. + """ + mediaById( + """ + ID of a product media. + """ + id: ID + ): ProductMedia! + + """ + Get a single product image by ID. + """ + imageById( + """ + ID of a product image. + """ + id: ID + ): ProductImage + @deprecated( + reason: "Will be removed in Saleor 4.0. Use the `mediaById` field instead." + ) + + """ + List of variants for the product. + """ + variants: [ProductVariant] + + """ + List of media for the product. + """ + media: [ProductMedia!] + + """ + List of images for the product. + """ + images: [ProductImage] + @deprecated( + reason: "Will be removed in Saleor 4.0. Use the `media` field instead." + ) + + """ + List of collections for the product. + """ + collections: [Collection] + + """ + Returns translated product fields for the given language code. + """ + translation( + """ + A language code to return the translation for product. + """ + languageCode: LanguageCodeEnum! + ): ProductTranslation + + """ + Date when product is available for purchase. + """ + availableForPurchase: Date + + """ + Whether the product is available for purchase. + """ + isAvailableForPurchase: Boolean } -type DiscountError { +""" +Assign attributes to a given product type. +""" +type ProductAttributeAssign { + """ + The updated product type. + """ + productType: ProductType + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! +} + +input ProductAttributeAssignInput { + """ + The ID of the attribute to assign. + """ + id: ID! + + """ + The attribute type to be assigned as. + """ + type: ProductAttributeType! +} + +enum ProductAttributeType { + PRODUCT + VARIANT +} + +""" +Un-assign attributes from a given product type. +""" +type ProductAttributeUnassign { + """ + The updated product type. + """ + productType: ProductType + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! +} + +""" +Deletes products. +""" +type ProductBulkDelete { + """ + Returns how many objects were affected. + """ + count: Int! + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! +} + +""" +Represents product channel listing. +""" +type ProductChannelListing implements Node { + """ + The ID of the object. + """ + id: ID! + publicationDate: Date + isPublished: Boolean! + channel: Channel! + visibleInListings: Boolean! + availableForPurchase: Date + + """ + The price of the cheapest variant (including discounts). + """ + discountedPrice: Money + + """ + Purchase cost of product. + """ + purchaseCost: MoneyRange + + """ + Range of margin percentage value. + """ + margin: Margin + + """ + Whether the product is available for purchase. + """ + isAvailableForPurchase: Boolean + + """ + Lists the storefront product's pricing, the current price and discounts, only meant for displaying. + """ + pricing( + """ + Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration. + """ + address: AddressInput + ): ProductPricingInfo +} + +input ProductChannelListingAddInput { + """ + ID of a channel. + """ + channelId: ID! + + """ + Determines if object is visible to customers. + """ + isPublished: Boolean + + """ + Publication date. ISO 8601 standard. + """ + publicationDate: Date + + """ + Determines if product is visible in product listings (doesn't apply to product collections). + """ + visibleInListings: Boolean + + """ + Determine if product should be available for purchase. + """ + isAvailableForPurchase: Boolean + + """ + 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. + """ + availableForPurchaseDate: Date + + """ + List of variants to which the channel should be assigned. + """ + addVariants: [ID!] + + """ + List of variants from which the channel should be unassigned. + """ + removeVariants: [ID!] +} + +type ProductChannelListingError { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -17276,34 +12515,3378 @@ type DiscountError { """ message: String - """ - List of products IDs which causes the error. - """ - products: [ID!] - """ The error code. """ - code: DiscountErrorCode! + code: ProductErrorCode! + + """ + List of attributes IDs which causes the error. + """ + attributes: [ID!] + + """ + List of attribute values IDs which causes the error. + """ + values: [ID!] """ List of channels IDs which causes the error. """ channels: [ID!] + + """ + List of variants IDs which causes the error. + """ + variants: [ID!] +} + +""" +Manage product's availability in channels. +""" +type ProductChannelListingUpdate { + """ + An updated product instance. + """ + product: Product + productChannelListingErrors: [ProductChannelListingError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductChannelListingError!]! +} + +input ProductChannelListingUpdateInput { + """ + List of channels to which the product should be assigned or updated. + """ + updateChannels: [ProductChannelListingAddInput!] + + """ + List of channels from which the product should be unassigned. + """ + removeChannels: [ID!] +} + +type ProductCountableConnection { + """ + Pagination data for this connection. + """ + pageInfo: PageInfo! + edges: [ProductCountableEdge!]! + + """ + A total count of items in the collection. + """ + totalCount: Int +} + +type ProductCountableEdge { + """ + The item at the end of the edge. + """ + node: Product! + + """ + A cursor for use in pagination. + """ + cursor: String! +} + +""" +Creates a new product. +""" +type ProductCreate { + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! + product: Product +} + +input ProductCreateInput { + """ + List of attributes. + """ + attributes: [AttributeValueInput!] + + """ + ID of the product's category. + """ + category: ID + + """ + Determine if taxes are being charged for the product. + """ + chargeTaxes: Boolean + + """ + List of IDs of collections that the product belongs to. + """ + collections: [ID!] + + """ + Product description (JSON). + """ + description: JSONString + + """ + Product name. + """ + name: String + + """ + Product slug. + """ + slug: String + + """ + Tax rate for enabled tax gateway. + """ + taxCode: String + + """ + Search engine optimization fields. + """ + seo: SeoInput + + """ + Weight of the Product. + """ + weight: WeightScalar + + """ + Defines the product rating value. + """ + rating: Float + + """ + ID of the type that product belongs to. + """ + productType: ID! +} + +""" +Deletes a product. +""" +type ProductDelete { + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! + product: Product +} + +type ProductError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """ + The error message. + """ + message: String + + """ + The error code. + """ + code: ProductErrorCode! + + """ + List of attributes IDs which causes the error. + """ + attributes: [ID!] + + """ + List of attribute values IDs which causes the error. + """ + values: [ID!] } """ An enumeration. """ -enum DiscountErrorCode { +enum ProductErrorCode { ALREADY_EXISTS + ATTRIBUTE_ALREADY_ASSIGNED + ATTRIBUTE_CANNOT_BE_ASSIGNED + ATTRIBUTE_VARIANTS_DISABLED + DUPLICATED_INPUT_ITEM GRAPHQL_ERROR INVALID + PRODUCT_WITHOUT_CATEGORY + NOT_PRODUCTS_IMAGE + NOT_PRODUCTS_VARIANT NOT_FOUND REQUIRED UNIQUE + VARIANT_NO_DIGITAL_CONTENT CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT - DUPLICATED_INPUT_ITEM + PRODUCT_NOT_ASSIGNED_TO_CHANNEL + UNSUPPORTED_MEDIA_PROVIDER +} + +enum ProductFieldEnum { + NAME + DESCRIPTION + PRODUCT_TYPE + CATEGORY + PRODUCT_WEIGHT + COLLECTIONS + CHARGE_TAXES + PRODUCT_MEDIA + VARIANT_SKU + VARIANT_WEIGHT + VARIANT_MEDIA +} + +input ProductFilterInput { + isPublished: Boolean + collections: [ID] + categories: [ID] + hasCategory: Boolean + attributes: [AttributeInput] + stockAvailability: StockAvailability + stocks: ProductStockFilterInput + search: String + metadata: [MetadataInput] + price: PriceRangeInput + minimalPrice: PriceRangeInput + productTypes: [ID] + ids: [ID] + + """ + Specifies the channel by which the data should be sorted. + """ + channel: String +} + +""" +Represents a product image. +""" +type ProductImage { + """ + The ID of the image. + """ + id: ID! + + """ + The alt text of the image. + """ + alt: String + + """ + The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. + """ + sortOrder: Int + + """ + The URL of the image. + """ + url( + """ + Size of the image. + """ + size: Int + ): String! +} + +input ProductInput { + """ + List of attributes. + """ + attributes: [AttributeValueInput!] + + """ + ID of the product's category. + """ + category: ID + + """ + Determine if taxes are being charged for the product. + """ + chargeTaxes: Boolean + + """ + List of IDs of collections that the product belongs to. + """ + collections: [ID!] + + """ + Product description (JSON). + """ + description: JSONString + + """ + Product name. + """ + name: String + + """ + Product slug. + """ + slug: String + + """ + Tax rate for enabled tax gateway. + """ + taxCode: String + + """ + Search engine optimization fields. + """ + seo: SeoInput + + """ + Weight of the Product. + """ + weight: WeightScalar + + """ + Defines the product rating value. + """ + rating: Float +} + +""" +Represents a product media. +""" +type ProductMedia implements Node { + """ + The ID of the object. + """ + id: ID! + sortOrder: Int + alt: String! + type: ProductMediaType! + oembedData: JSONString! + + """ + The URL of the media. + """ + url( + """ + Size of the image. + """ + size: Int + ): String! +} + +""" +Deletes product media. +""" +type ProductMediaBulkDelete { + """ + Returns how many objects were affected. + """ + count: Int! + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! +} + +""" +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 +""" +type ProductMediaCreate { + product: Product + media: ProductMedia + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! +} + +input ProductMediaCreateInput { + """ + Alt text for a product media. + """ + alt: String + + """ + Represents an image file in a multipart request. + """ + image: Upload + + """ + ID of an product. + """ + product: ID! + + """ + Represents an URL to an external media. + """ + mediaUrl: String +} + +""" +Deletes a product media. +""" +type ProductMediaDelete { + product: Product + media: ProductMedia + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! +} + +""" +Changes ordering of the product media. +""" +type ProductMediaReorder { + product: Product + media: [ProductMedia!] + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! +} + +""" +An enumeration. +""" +enum ProductMediaType { + """ + An uploaded image or an URL to an image + """ + IMAGE + + """ + A URL to an external video + """ + VIDEO +} + +""" +Updates a product media. +""" +type ProductMediaUpdate { + product: Product + media: ProductMedia + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! +} + +input ProductMediaUpdateInput { + """ + Alt text for a product media. + """ + alt: String +} + +input ProductOrder { + """ + Specifies the direction in which to sort products. + """ + direction: OrderDirection! + + """ + Specifies the channel in which to sort the data. + """ + channel: String + + """ + Sort product by the selected attribute's values. + Note: this doesn't take translations into account yet. + """ + attributeId: ID + + """ + Sort products by the selected field. + """ + field: ProductOrderField +} + +enum ProductOrderField { + """ + Sort products by name. + """ + NAME + + """ + Sort products by rank. Note: This option is available only with the `search` filter. + """ + RANK + + """ + Sort products by price. + """ + PRICE + + """ + Sort products by a minimal price of a product's variant. + """ + MINIMAL_PRICE + + """ + Sort products by update date. + """ + DATE + + """ + Sort products by type. + """ + TYPE + + """ + Sort products by publication status. + """ + PUBLISHED + + """ + Sort products by publication date. + """ + PUBLICATION_DATE + + """ + Sort products by collection. Note: This option is available only for the `Collection.products` query. + """ + COLLECTION + + """ + Sort products by rating. + """ + RATING +} + +""" +Represents availability of a product in the storefront. +""" +type ProductPricingInfo { + """ + Whether it is in sale or not. + """ + onSale: Boolean + + """ + The discount amount if in sale (null otherwise). + """ + discount: TaxedMoney + + """ + The discount amount in the local currency. + """ + discountLocalCurrency: TaxedMoney + + """ + The discounted price range of the product variants. + """ + priceRange: TaxedMoneyRange + + """ + The undiscounted price range of the product variants. + """ + priceRangeUndiscounted: TaxedMoneyRange + + """ + The discounted price range of the product variants in the local currency. + """ + priceRangeLocalCurrency: TaxedMoneyRange +} + +""" +Reorder product attribute values. +""" +type ProductReorderAttributeValues { + """ + Product from which attribute values are reordered. + """ + product: Product + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! +} + +input ProductStockFilterInput { + warehouseIds: [ID!] + quantity: IntRangeInput +} + +type ProductTranslatableContent implements Node { + """ + The ID of the object. + """ + id: ID! + seoTitle: String + seoDescription: String + name: String! + description: JSONString + + """ + Description of the product (JSON). + """ + descriptionJson: JSONString + @deprecated( + reason: "Will be removed in Saleor 4.0. Use the `description` field instead." + ) + + """ + Returns translated product fields for the given language code. + """ + translation( + """ + A language code to return the translation for product. + """ + languageCode: LanguageCodeEnum! + ): ProductTranslation + + """ + Represents an individual item for sale in the storefront. + """ + product: Product +} + +""" +Creates/Updates translations for Product. +""" +type ProductTranslate { + translationErrors: [TranslationError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [TranslationError!]! + product: Product +} + +type ProductTranslation implements Node { + """ + The ID of the object. + """ + id: ID! + seoTitle: String + seoDescription: String + name: String! + description: JSONString + + """ + Translation language. + """ + language: LanguageDisplay! + + """ + Translated description of the product (JSON). + """ + descriptionJson: JSONString + @deprecated( + reason: "Will be removed in Saleor 4.0. Use the `description` field instead." + ) +} + +""" +Represents a type of product. It defines what attributes are available to products of this type. +""" +type ProductType implements Node & ObjectWithMetadata { + """ + The ID of the object. + """ + id: ID! + name: String! + slug: String! + hasVariants: Boolean! + isShippingRequired: Boolean! + isDigital: Boolean! + weight: Weight + + """ + List of private metadata items.Requires proper staff permissions to access. + """ + privateMetadata: [MetadataItem]! + + """ + List of public metadata items. Can be accessed without permissions. + """ + metadata: [MetadataItem]! + + """ + List of products of this type. + """ + products( + """ + Slug of a channel for which the data should be returned. + """ + channel: String + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): ProductCountableConnection + @deprecated( + reason: "Will be removed in Saleor 4.0. Use the top-level `products` query with the `productTypes` filter." + ) + + """ + A type of tax. Assigned by enabled tax gateway + """ + taxType: TaxType + + """ + Variant attributes of that product type. + """ + variantAttributes( + """ + Define scope of returned attributes. + """ + variantSelection: VariantAttributeScope + ): [Attribute] + + """ + Product attributes of that product type. + """ + productAttributes: [Attribute] + availableAttributes( + filter: AttributeFilterInput + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): AttributeCountableConnection +} + +""" +Deletes product types. +""" +type ProductTypeBulkDelete { + """ + Returns how many objects were affected. + """ + count: Int! + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! +} + +enum ProductTypeConfigurable { + CONFIGURABLE + SIMPLE +} + +type ProductTypeCountableConnection { + """ + Pagination data for this connection. + """ + pageInfo: PageInfo! + edges: [ProductTypeCountableEdge!]! + + """ + A total count of items in the collection. + """ + totalCount: Int +} + +type ProductTypeCountableEdge { + """ + The item at the end of the edge. + """ + node: ProductType! + + """ + A cursor for use in pagination. + """ + cursor: String! +} + +""" +Creates a new product type. +""" +type ProductTypeCreate { + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! + productType: ProductType +} + +""" +Deletes a product type. +""" +type ProductTypeDelete { + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! + productType: ProductType +} + +enum ProductTypeEnum { + DIGITAL + SHIPPABLE +} + +input ProductTypeFilterInput { + search: String + configurable: ProductTypeConfigurable + productType: ProductTypeEnum + metadata: [MetadataInput] + ids: [ID] +} + +input ProductTypeInput { + """ + Name of the product type. + """ + name: String + + """ + Product type slug. + """ + slug: String + + """ + Determines if product of this type has multiple variants. This option mainly simplifies product management in the dashboard. There is always at least one variant created under the hood. + """ + hasVariants: Boolean + + """ + List of attributes shared among all product variants. + """ + productAttributes: [ID] + + """ + List of attributes used to distinguish between different variants of a product. + """ + variantAttributes: [ID] + + """ + Determines if shipping is required for products of this variant. + """ + isShippingRequired: Boolean + + """ + Determines if products are digital. + """ + isDigital: Boolean + + """ + Weight of the ProductType items. + """ + weight: WeightScalar + + """ + Tax rate for enabled tax gateway. + """ + taxCode: String +} + +""" +Reorder the attributes of a product type. +""" +type ProductTypeReorderAttributes { + """ + Product type from which attributes are reordered. + """ + productType: ProductType + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! +} + +enum ProductTypeSortField { + """ + Sort products by name. + """ + NAME + + """ + Sort products by type. + """ + DIGITAL + + """ + Sort products by shipping. + """ + SHIPPING_REQUIRED +} + +input ProductTypeSortingInput { + """ + Specifies the direction in which to sort products. + """ + direction: OrderDirection! + + """ + Sort product types by the selected field. + """ + field: ProductTypeSortField! +} + +""" +Updates an existing product type. +""" +type ProductTypeUpdate { + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! + productType: ProductType +} + +""" +Updates an existing product. +""" +type ProductUpdate { + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! + product: Product +} + +""" +Represents a version of a product such as different size or color. +""" +type ProductVariant implements Node & ObjectWithMetadata { + """ + The ID of the object. + """ + id: ID! + name: String! + sku: String! + product: Product! + trackInventory: Boolean! + weight: Weight + + """ + List of private metadata items.Requires proper staff permissions to access. + """ + privateMetadata: [MetadataItem]! + + """ + List of public metadata items. Can be accessed without permissions. + """ + metadata: [MetadataItem]! + + """ + List of price information in channels for the product. + """ + channelListings: [ProductVariantChannelListing!] + + """ + Lists the storefront variant's pricing, the current price and discounts, only meant for displaying. + """ + pricing( + """ + Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration. + """ + address: AddressInput + ): VariantPricingInfo + + """ + List of attributes assigned to this variant. + """ + attributes( + """ + Define scope of returned attributes. + """ + variantSelection: VariantAttributeScope + ): [SelectedAttribute!]! + + """ + Cost price of the variant. + """ + costPrice: Money + + """ + Gross margin percentage value. + """ + margin: Int + + """ + Total quantity ordered. + """ + quantityOrdered: Int + + """ + Total revenue generated by a variant in given period of time. Note: this field should be queried using `reportProductSales` query as it uses optimizations suitable for such calculations. + """ + revenue(period: ReportingPeriod): TaxedMoney + + """ + List of images for the product variant. + """ + images: [ProductImage] + @deprecated( + reason: "Will be removed in Saleor 4.0. Use the `media` instead." + ) + + """ + List of media for the product variant. + """ + media: [ProductMedia!] + + """ + Returns translated product variant fields for the given language code. + """ + translation( + """ + A language code to return the translation for product variant. + """ + languageCode: LanguageCodeEnum! + ): ProductVariantTranslation + + """ + Digital content for the product variant. + """ + digitalContent: DigitalContent + + """ + Stocks for the product variant. + """ + stocks( + """ + Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration. + """ + address: AddressInput + + """ + DEPRECATED: use `address` argument instead. This argument will be removed in Saleor 4.0. Two-letter ISO 3166-1 country code. + """ + countryCode: CountryCode + ): [Stock] + + """ + Quantity of a product available for sale in one checkout. + """ + quantityAvailable( + """ + Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration. + """ + address: AddressInput + + """ + DEPRECATED: use `address` argument instead. This argument will be removed in Saleor 4.0.Two-letter ISO 3166-1 country code. When provided, the exact quantity from a warehouse operating in shipping zones that contain this country will be returned. Otherwise, it will return the maximum quantity from all shipping zones. + """ + countryCode: CountryCode + ): Int! +} + +""" +Creates product variants for a given product. +""" +type ProductVariantBulkCreate { + """ + Returns how many objects were created. + """ + count: Int! + + """ + List of the created variants. + """ + productVariants: [ProductVariant!]! + bulkProductErrors: [BulkProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [BulkProductError!]! +} + +input ProductVariantBulkCreateInput { + """ + List of attributes specific to this variant. + """ + attributes: [BulkAttributeValueInput]! + + """ + Stock keeping unit. + """ + sku: String! + + """ + Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. + """ + trackInventory: Boolean + + """ + Weight of the Product Variant. + """ + weight: WeightScalar + + """ + Stocks of a product available for sale. + """ + stocks: [StockInput!] + + """ + List of prices assigned to channels. + """ + channelListings: [ProductVariantChannelListingAddInput!] +} + +""" +Deletes product variants. +""" +type ProductVariantBulkDelete { + """ + Returns how many objects were affected. + """ + count: Int! + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! +} + +""" +Represents product varaint channel listing. +""" +type ProductVariantChannelListing implements Node { + """ + The ID of the object. + """ + id: ID! + channel: Channel! + price: Money + + """ + Cost price of the variant. + """ + costPrice: Money + + """ + Gross margin percentage value. + """ + margin: Int +} + +input ProductVariantChannelListingAddInput { + """ + ID of a channel. + """ + channelId: ID! + + """ + Price of the particular variant in channel. + """ + price: PositiveDecimal! + + """ + Cost price of the variant in channel. + """ + costPrice: PositiveDecimal +} + +""" +Manage product variant prices in channels. +""" +type ProductVariantChannelListingUpdate { + """ + An updated product variant instance. + """ + variant: ProductVariant + productChannelListingErrors: [ProductChannelListingError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductChannelListingError!]! +} + +type ProductVariantCountableConnection { + """ + Pagination data for this connection. + """ + pageInfo: PageInfo! + edges: [ProductVariantCountableEdge!]! + + """ + A total count of items in the collection. + """ + totalCount: Int +} + +type ProductVariantCountableEdge { + """ + The item at the end of the edge. + """ + node: ProductVariant! + + """ + A cursor for use in pagination. + """ + cursor: String! +} + +""" +Creates a new variant for a product. +""" +type ProductVariantCreate { + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! + productVariant: ProductVariant +} + +input ProductVariantCreateInput { + """ + List of attributes specific to this variant. + """ + attributes: [AttributeValueInput]! + + """ + Stock keeping unit. + """ + sku: String + + """ + Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. + """ + trackInventory: Boolean + + """ + Weight of the Product Variant. + """ + weight: WeightScalar + + """ + Product ID of which type is the variant. + """ + product: ID! + + """ + Stocks of a product available for sale. + """ + stocks: [StockInput!] +} + +""" +Deletes a product variant. +""" +type ProductVariantDelete { + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! + productVariant: ProductVariant +} + +input ProductVariantFilterInput { + search: String + sku: [String] + metadata: [MetadataInput] +} + +input ProductVariantInput { + """ + List of attributes specific to this variant. + """ + attributes: [AttributeValueInput] + + """ + Stock keeping unit. + """ + sku: String + + """ + Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. + """ + trackInventory: Boolean + + """ + Weight of the Product Variant. + """ + weight: WeightScalar +} + +""" +Reorder the variants of a product. Mutation updates updated_at on product and triggers PRODUCT_UPDATED webhook. +""" +type ProductVariantReorder { + product: Product + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! +} + +""" +Reorder product variant attribute values. +""" +type ProductVariantReorderAttributeValues { + """ + Product variant from which attribute values are reordered. + """ + productVariant: ProductVariant + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! +} + +""" +Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook. +""" +type ProductVariantSetDefault { + product: Product + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! +} + +""" +Creates stocks for product variant. +""" +type ProductVariantStocksCreate { + """ + Updated product variant. + """ + productVariant: ProductVariant + bulkStockErrors: [BulkStockError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [BulkStockError!]! +} + +""" +Delete stocks from product variant. +""" +type ProductVariantStocksDelete { + """ + Updated product variant. + """ + productVariant: ProductVariant + stockErrors: [StockError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [StockError!]! +} + +""" +Update stocks for product variant. +""" +type ProductVariantStocksUpdate { + """ + Updated product variant. + """ + productVariant: ProductVariant + bulkStockErrors: [BulkStockError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [BulkStockError!]! +} + +type ProductVariantTranslatableContent implements Node { + """ + The ID of the object. + """ + id: ID! + name: String! + + """ + Returns translated product variant fields for the given language code. + """ + translation( + """ + A language code to return the translation for product variant. + """ + languageCode: LanguageCodeEnum! + ): ProductVariantTranslation + + """ + Represents a version of a product such as different size or color. + """ + productVariant: ProductVariant +} + +""" +Creates/Updates translations for Product Variant. +""" +type ProductVariantTranslate { + translationErrors: [TranslationError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [TranslationError!]! + productVariant: ProductVariant +} + +type ProductVariantTranslation implements Node { + """ + The ID of the object. + """ + id: ID! + name: String! + + """ + Translation language. + """ + language: LanguageDisplay! +} + +""" +Updates an existing variant for product. +""" +type ProductVariantUpdate { + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! + productVariant: ProductVariant +} + +input PublishableChannelListingInput { + """ + ID of a channel. + """ + channelId: ID! + + """ + Determines if object is visible to customers. + """ + isPublished: Boolean + + """ + Publication date. ISO 8601 standard. + """ + publicationDate: Date +} + +type Query { + """ + Look up a webhook by ID. + """ + webhook( + """ + ID of the webhook. + """ + id: ID! + ): Webhook + + """ + List of all available webhook events. + """ + webhookEvents: [WebhookEvent] + + """ + Retrieve a sample payload for a given webhook event based on real data. It can be useful for some integrations where sample payload is required. + """ + webhookSamplePayload( + """ + Name of the requested event type. + """ + eventType: WebhookSampleEventTypeEnum! + ): JSONString + + """ + Look up a warehouse by ID. + """ + warehouse( + """ + ID of an warehouse + """ + id: ID! + ): Warehouse + + """ + List of warehouses. + """ + warehouses( + filter: WarehouseFilterInput + sortBy: WarehouseSortingInput + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): WarehouseCountableConnection + + """ + Returns a list of all translatable items of a given kind. + """ + translations( + """ + Kind of objects to retrieve. + """ + kind: TranslatableKinds! + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): TranslatableItemConnection + translation( + """ + ID of the object to retrieve. + """ + id: ID! + + """ + Kind of the object to retrieve. + """ + kind: TranslatableKinds! + ): TranslatableItem + + """ + Look up a stock by ID + """ + stock( + """ + ID of an warehouse + """ + id: ID! + ): Stock + + """ + List of stocks. + """ + stocks( + filter: StockFilterInput + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): StockCountableConnection + + """ + Return information about the shop. + """ + shop: Shop! + + """ + Order related settings from site settings. + """ + orderSettings: OrderSettings + + """ + Look up a shipping zone by ID. + """ + shippingZone( + """ + ID of the shipping zone. + """ + id: ID! + + """ + Slug of a channel for which the data should be returned. + """ + channel: String + ): ShippingZone + + """ + List of the shop's shipping zones. + """ + shippingZones( + """ + Filtering options for shipping zones. + """ + filter: ShippingZoneFilterInput + + """ + Slug of a channel for which the data should be returned. + """ + channel: String + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): ShippingZoneCountableConnection + + """ + Look up digital content by ID. + """ + digitalContent( + """ + ID of the digital content. + """ + id: ID! + ): DigitalContent + + """ + List of digital content. + """ + digitalContents( + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): DigitalContentCountableConnection + + """ + List of the shop's categories. + """ + categories( + """ + Filtering options for categories. + """ + filter: CategoryFilterInput + + """ + Sort categories. + """ + sortBy: CategorySortingInput + + """ + Filter categories by the nesting level in the category tree. + """ + level: Int + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): CategoryCountableConnection + + """ + Look up a category by ID or slug. + """ + category( + """ + ID of the category. + """ + id: ID + + """ + Slug of the category + """ + slug: String + ): Category + + """ + Look up a collection by ID. + """ + collection( + """ + ID of the collection. + """ + id: ID + + """ + Slug of the category + """ + slug: String + + """ + Slug of a channel for which the data should be returned. + """ + channel: String + ): Collection + + """ + List of the shop's collections. + """ + collections( + """ + Filtering options for collections. + """ + filter: CollectionFilterInput + + """ + Sort collections. + """ + sortBy: CollectionSortingInput + + """ + Slug of a channel for which the data should be returned. + """ + channel: String + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): CollectionCountableConnection + + """ + Look up a product by ID. + """ + product( + """ + ID of the product. + """ + id: ID + + """ + Slug of the product. + """ + slug: String + + """ + Slug of a channel for which the data should be returned. + """ + channel: String + ): Product + + """ + List of the shop's products. + """ + products( + """ + Filtering options for products. + """ + filter: ProductFilterInput + + """ + Sort products. + """ + sortBy: ProductOrder + + """ + Slug of a channel for which the data should be returned. + """ + channel: String + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): ProductCountableConnection + + """ + Look up a product type by ID. + """ + productType( + """ + ID of the product type. + """ + id: ID! + ): ProductType + + """ + List of the shop's product types. + """ + productTypes( + """ + Filtering options for product types. + """ + filter: ProductTypeFilterInput + + """ + Sort product types. + """ + sortBy: ProductTypeSortingInput + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): ProductTypeCountableConnection + + """ + Look up a product variant by ID or SKU. + """ + productVariant( + """ + ID of the product variant. + """ + id: ID + + """ + Sku of the product variant. + """ + sku: String + + """ + Slug of a channel for which the data should be returned. + """ + channel: String + ): ProductVariant + + """ + List of product variants. + """ + productVariants( + """ + Filter product variants by given IDs. + """ + ids: [ID] + + """ + Slug of a channel for which the data should be returned. + """ + channel: String + + """ + Filtering options for product variant. + """ + filter: ProductVariantFilterInput + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): ProductVariantCountableConnection + + """ + List of top selling products. + """ + reportProductSales( + """ + Span of time. + """ + period: ReportingPeriod! + + """ + Slug of a channel for which the data should be returned. + """ + channel: String! + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): ProductVariantCountableConnection + + """ + Look up a payment by ID. + """ + payment( + """ + ID of the payment. + """ + id: ID! + ): Payment + + """ + List of payments. + """ + payments( + """ + Filtering options for payments. + """ + filter: PaymentFilterInput + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): PaymentCountableConnection + + """ + Look up a page by ID or slug. + """ + page( + """ + ID of the page. + """ + id: ID + + """ + The slug of the page. + """ + slug: String + ): Page + + """ + List of the shop's pages. + """ + pages( + """ + Sort pages. + """ + sortBy: PageSortingInput + + """ + Filtering options for pages. + """ + filter: PageFilterInput + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): PageCountableConnection + + """ + Look up a page type by ID. + """ + pageType( + """ + ID of the page type. + """ + id: ID! + ): PageType + + """ + List of the page types. + """ + pageTypes( + """ + Sort page types. + """ + sortBy: PageTypeSortingInput + + """ + Filtering options for page types. + """ + filter: PageTypeFilterInput + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): PageTypeCountableConnection + + """ + List of activity events to display on homepage (at the moment it only contains order-events). + """ + homepageEvents( + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): OrderEventCountableConnection + + """ + Look up an order by ID. + """ + order( + """ + ID of an order. + """ + id: ID! + ): Order + + """ + List of orders. + """ + orders( + """ + Sort orders. + """ + sortBy: OrderSortingInput + + """ + Filtering options for orders. + """ + filter: OrderFilterInput + + """ + Slug of a channel for which the data should be returned. + """ + channel: String + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): OrderCountableConnection + + """ + List of draft orders. + """ + draftOrders( + """ + Sort draft orders. + """ + sortBy: OrderSortingInput + + """ + Filtering options for draft orders. + """ + filter: OrderDraftFilterInput + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): OrderCountableConnection + + """ + Return the total sales amount from a specific period. + """ + ordersTotal( + """ + A period of time. + """ + period: ReportingPeriod + + """ + Slug of a channel for which the data should be returned. + """ + channel: String + ): TaxedMoney + + """ + Look up an order by token. + """ + orderByToken( + """ + The order's token. + """ + token: UUID! + ): Order + + """ + Look up a navigation menu by ID or name. + """ + menu( + """ + Slug of a channel for which the data should be returned. + """ + channel: String + + """ + ID of the menu. + """ + id: ID + + """ + The menu's name. + """ + name: String + + """ + The menu's slug. + """ + slug: String + ): Menu + + """ + List of the storefront's menus. + """ + menus( + """ + Slug of a channel for which the data should be returned. + """ + channel: String + + """ + Sort menus. + """ + sortBy: MenuSortingInput + + """ + Filtering options for menus. + """ + filter: MenuFilterInput + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): MenuCountableConnection + + """ + Look up a menu item by ID. + """ + menuItem( + """ + ID of the menu item. + """ + id: ID! + + """ + Slug of a channel for which the data should be returned. + """ + channel: String + ): MenuItem + + """ + List of the storefronts's menu items. + """ + menuItems( + """ + Slug of a channel for which the data should be returned. + """ + channel: String + + """ + Sort menus items. + """ + sortBy: MenuItemSortingInput + + """ + Filtering options for menu items. + """ + filter: MenuItemFilterInput + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): MenuItemCountableConnection + + """ + Look up a gift card by ID. + """ + giftCard( + """ + ID of the gift card. + """ + id: ID! + ): GiftCard + + """ + List of gift cards. + """ + giftCards( + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): GiftCardCountableConnection + + """ + Look up a plugin by ID. + """ + plugin( + """ + ID of the plugin. + """ + id: ID! + ): Plugin + + """ + List of plugins. + """ + plugins( + """ + Filtering options for plugins. + """ + filter: PluginFilterInput + + """ + Sort plugins. + """ + sortBy: PluginSortingInput + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): PluginCountableConnection + + """ + Look up a sale by ID. + """ + sale( + """ + ID of the sale. + """ + id: ID! + + """ + Slug of a channel for which the data should be returned. + """ + channel: String + ): Sale + + """ + List of the shop's sales. + """ + sales( + """ + Filtering options for sales. + """ + filter: SaleFilterInput + + """ + Sort sales. + """ + sortBy: SaleSortingInput + + """ + Search sales by name, value or type. + """ + query: String + + """ + Slug of a channel for which the data should be returned. + """ + channel: String + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): SaleCountableConnection + + """ + Look up a voucher by ID. + """ + voucher( + """ + ID of the voucher. + """ + id: ID! + + """ + Slug of a channel for which the data should be returned. + """ + channel: String + ): Voucher + + """ + List of the shop's vouchers. + """ + vouchers( + """ + Filtering options for vouchers. + """ + filter: VoucherFilterInput + + """ + Sort voucher. + """ + sortBy: VoucherSortingInput + + """ + Search vouchers by name or code. + """ + query: String + + """ + Slug of a channel for which the data should be returned. + """ + channel: String + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): VoucherCountableConnection + + """ + Look up a export file by ID. + """ + exportFile( + """ + ID of the export file job. + """ + id: ID! + ): ExportFile + + """ + List of export files. + """ + exportFiles( + """ + Filtering options for export files. + """ + filter: ExportFileFilterInput + + """ + Sort export files. + """ + sortBy: ExportFileSortingInput + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): ExportFileCountableConnection + + """ + List of all tax rates available from tax gateway. + """ + taxTypes: [TaxType] + + """ + Look up a checkout by token and slug of channel. + """ + checkout( + """ + The checkout's token. + """ + token: UUID + ): Checkout + + """ + List of checkouts. + """ + checkouts( + """ + Slug of a channel for which the data should be returned. + """ + channel: String + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): CheckoutCountableConnection + + """ + Look up a checkout line by ID. + """ + checkoutLine( + """ + ID of the checkout line. + """ + id: ID + ): CheckoutLine + + """ + List of checkout lines. + """ + checkoutLines( + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): CheckoutLineCountableConnection + + """ + Look up a channel by ID. + """ + channel( + """ + ID of the channel. + """ + id: ID + ): Channel + + """ + List of all channels. + """ + channels: [Channel!] + + """ + List of the shop's attributes. + """ + attributes( + """ + Filtering options for attributes. + """ + filter: AttributeFilterInput + + """ + Sorting options for attributes. + """ + sortBy: AttributeSortingInput + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): AttributeCountableConnection + + """ + Look up an attribute by ID. + """ + attribute( + """ + ID of the attribute. + """ + id: ID + + """ + Slug of the attribute. + """ + slug: String + ): Attribute + + """ + List of all apps installations + """ + appsInstallations: [AppInstallation!]! + + """ + List of the apps. + """ + apps( + """ + Filtering options for apps. + """ + filter: AppFilterInput + + """ + Sort apps. + """ + sortBy: AppSortingInput + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): AppCountableConnection + + """ + Look up an app by ID. If ID is not provided, return the currently authenticated app. + """ + app( + """ + ID of the app. + """ + id: ID + ): App + + """ + Returns address validation rules. + """ + addressValidationRules( + """ + Two-letter ISO 3166-1 country code. + """ + countryCode: CountryCode! + + """ + Designation of a region, province or state. + """ + countryArea: String + + """ + City or a town name. + """ + city: String + + """ + Sublocality like a district. + """ + cityArea: String + ): AddressValidationData + + """ + Look up an address by ID. + """ + address( + """ + ID of an address. + """ + id: ID! + ): Address + + """ + List of the shop's customers. + """ + customers( + """ + Filtering options for customers. + """ + filter: CustomerFilterInput + + """ + Sort customers. + """ + sortBy: UserSortingInput + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): UserCountableConnection + + """ + List of permission groups. + """ + permissionGroups( + """ + Filtering options for permission groups. + """ + filter: PermissionGroupFilterInput + + """ + Sort permission groups. + """ + sortBy: PermissionGroupSortingInput + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): GroupCountableConnection + + """ + Look up permission group by ID. + """ + permissionGroup( + """ + ID of the group. + """ + id: ID! + ): Group + + """ + Return the currently authenticated user. + """ + me: User + + """ + List of the shop's staff users. + """ + staffUsers( + """ + Filtering options for staff users. + """ + filter: StaffUserInput + + """ + Sort staff users. + """ + sortBy: UserSortingInput + + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): UserCountableConnection + + """ + Look up a user by ID or email address. + """ + user( + """ + ID of the user. + """ + id: ID + + """ + Email address of the user. + """ + email: String + ): User + _entities(representations: [_Any]): [_Entity] + _service: _Service +} + +""" +Represents a reduced VAT rate for a particular type of goods. +""" +type ReducedRate { + """ + Reduced VAT rate in percent. + """ + rate: Float! + + """ + A type of goods. + """ + rateType: TaxRateType! +} + +""" +Refresh JWT token. Mutation tries to take refreshToken from the input.If it fails it will try to take refreshToken from the http-only cookie -refreshToken. csrfToken is required when refreshToken is provided as a cookie. +""" +type RefreshToken { + """ + JWT token, required to authenticate. + """ + token: String + + """ + A user instance. + """ + user: User + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! +} + +input ReorderInput { + """ + The ID of the item to move. + """ + id: ID! + + """ + The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. + """ + sortOrder: Int +} + +enum ReportingPeriod { + TODAY + THIS_MONTH +} + +""" +Request email change of the logged in user. +""" +type RequestEmailChange { + """ + A user instance. + """ + user: User + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! +} + +""" +Sends an email with the account password modification link. +""" +type RequestPasswordReset { + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! +} + +""" +Sales allow creating discounts for categories, collections or products and are visible to all the customers. +""" +type Sale implements Node { + """ + The ID of the object. + """ + id: ID! + name: String! + type: SaleType! + startDate: DateTime! + endDate: DateTime + + """ + List of categories this sale applies to. + """ + categories( + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): CategoryCountableConnection + + """ + List of collections this sale applies to. + """ + collections( + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): CollectionCountableConnection + + """ + List of products this sale applies to. + """ + products( + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): ProductCountableConnection + + """ + Returns translated sale fields for the given language code. + """ + translation( + """ + A language code to return the translation for sale. + """ + languageCode: LanguageCodeEnum! + ): SaleTranslation + + """ + List of channels available for the sale. + """ + channelListings: [SaleChannelListing!] + + """ + Sale value. + """ + discountValue: Float + + """ + Currency code for sale. + """ + currency: String +} + +""" +Adds products, categories, collections to a voucher. +""" +type SaleAddCatalogues { + """ + Sale of which catalogue IDs will be modified. + """ + sale: Sale + discountErrors: [DiscountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [DiscountError!]! +} + +""" +Deletes sales. +""" +type SaleBulkDelete { + """ + Returns how many objects were affected. + """ + count: Int! + discountErrors: [DiscountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [DiscountError!]! +} + +""" +Represents sale channel listing. +""" +type SaleChannelListing implements Node { + """ + The ID of the object. + """ + id: ID! + channel: Channel! + discountValue: Float! + currency: String! +} + +input SaleChannelListingAddInput { + """ + ID of a channel. + """ + channelId: ID! + + """ + The value of the discount. + """ + discountValue: PositiveDecimal! +} + +input SaleChannelListingInput { + """ + List of channels to which the sale should be assigned. + """ + addChannels: [SaleChannelListingAddInput!] + + """ + List of channels from which the sale should be unassigned. + """ + removeChannels: [ID!] +} + +""" +Manage sale's availability in channels. +""" +type SaleChannelListingUpdate { + """ + An updated sale instance. + """ + sale: Sale + discountErrors: [DiscountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [DiscountError!]! +} + +type SaleCountableConnection { + """ + Pagination data for this connection. + """ + pageInfo: PageInfo! + edges: [SaleCountableEdge!]! + + """ + A total count of items in the collection. + """ + totalCount: Int +} + +type SaleCountableEdge { + """ + The item at the end of the edge. + """ + node: Sale! + + """ + A cursor for use in pagination. + """ + cursor: String! +} + +""" +Creates a new sale. +""" +type SaleCreate { + discountErrors: [DiscountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [DiscountError!]! + sale: Sale +} + +""" +Deletes a sale. +""" +type SaleDelete { + discountErrors: [DiscountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [DiscountError!]! + sale: Sale +} + +input SaleFilterInput { + status: [DiscountStatusEnum] + saleType: DiscountValueTypeEnum + started: DateTimeRangeInput + search: String } input SaleInput { @@ -17348,183 +15931,2620 @@ input SaleInput { endDate: DateTime } -""" -Deletes a sale. -""" -type SaleDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - discountErrors: [DiscountError!]! - sale: Sale -} - -""" -Deletes sales. -""" -type SaleBulkDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Returns how many objects were affected. - """ - count: Int! - discountErrors: [DiscountError!]! -} - -""" -Updates a sale. -""" -type SaleUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - discountErrors: [DiscountError!]! - sale: Sale -} - -""" -Adds products, categories, collections to a voucher. -""" -type SaleAddCatalogues { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Sale of which catalogue IDs will be modified. - """ - sale: Sale - discountErrors: [DiscountError!]! -} - -input CatalogueInput { - """ - Products related to the discount. - """ - products: [ID] - - """ - Categories related to the discount. - """ - categories: [ID] - - """ - Collections related to the discount. - """ - collections: [ID] -} - """ Removes products, categories, collections from a sale. """ type SaleRemoveCatalogues { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - """ Sale of which catalogue IDs will be modified. """ sale: Sale discountErrors: [DiscountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [DiscountError!]! +} + +enum SaleSortField { + """ + Sort sales by name. + """ + NAME + + """ + Sort sales by start date. + """ + START_DATE + + """ + Sort sales by end date. + """ + END_DATE + + """ + Sort sales by value. + """ + VALUE + + """ + Sort sales by type. + """ + TYPE +} + +input SaleSortingInput { + """ + Specifies the direction in which to sort products. + """ + direction: OrderDirection! + + """ + Specifies the channel in which to sort the data. + """ + channel: String + + """ + Sort sales by the selected field. + """ + field: SaleSortField! +} + +type SaleTranslatableContent implements Node { + """ + The ID of the object. + """ + id: ID! + name: String! + + """ + Returns translated sale fields for the given language code. + """ + translation( + """ + A language code to return the translation for sale. + """ + languageCode: LanguageCodeEnum! + ): SaleTranslation + + """ + Sales allow creating discounts for categories, collections or products and are visible to all the customers. + """ + sale: Sale } """ Creates/updates translations for a sale. """ type SaleTranslate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) translationErrors: [TranslationError!]! - sale: Sale -} - -""" -Manage sale's availability in channels. -""" -type SaleChannelListingUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Use errors field instead. This field will be removed in Saleor 4.0." ) - - """ - An updated sale instance. - """ + errors: [TranslationError!]! sale: Sale +} + +type SaleTranslation implements Node { + """ + The ID of the object. + """ + id: ID! + name: String + + """ + Translation language. + """ + language: LanguageDisplay! +} + +""" +An enumeration. +""" +enum SaleType { + """ + fixed + """ + FIXED + + """ + % + """ + PERCENTAGE +} + +""" +Updates a sale. +""" +type SaleUpdate { discountErrors: [DiscountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [DiscountError!]! + sale: Sale } -input SaleChannelListingInput { +""" +Represents a custom attribute. +""" +type SelectedAttribute { """ - List of channels to which the sale should be assigned. + Name of an attribute displayed in the interface. """ - addChannels: [SaleChannelListingAddInput!] + attribute: Attribute! """ - List of channels from which the sale should be unassigned. + Values of an attribute. """ - removeChannels: [ID!] + values: [AttributeValue]! } -input SaleChannelListingAddInput { +input SeoInput { + """ + SEO title. + """ + title: String + + """ + SEO description. + """ + description: String +} + +""" +Sets the user's password from the token sent by email using the RequestPasswordReset mutation. +""" +type SetPassword { + """ + JWT token, required to authenticate. + """ + token: String + + """ + JWT refresh token, required to re-generate access token. + """ + refreshToken: String + + """ + CSRF token required to re-generate access token. + """ + csrfToken: String + + """ + A user instance. + """ + user: User + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! +} + +type ShippingError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """ + The error message. + """ + message: String + + """ + The error code. + """ + code: ShippingErrorCode! + + """ + List of warehouse IDs which causes the error. + """ + warehouses: [ID!] + + """ + List of channels IDs which causes the error. + """ + channels: [ID!] +} + +""" +An enumeration. +""" +enum ShippingErrorCode { + ALREADY_EXISTS + GRAPHQL_ERROR + INVALID + MAX_LESS_THAN_MIN + NOT_FOUND + REQUIRED + UNIQUE + DUPLICATED_INPUT_ITEM +} + +""" +Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. +""" +type ShippingMethod implements Node & ObjectWithMetadata { + """ + The ID of the object. + """ + id: ID! + name: String! + description: JSONString + minimumOrderWeight: Weight + maximumOrderWeight: Weight + maximumDeliveryDays: Int + minimumDeliveryDays: Int + + """ + List of private metadata items.Requires proper staff permissions to access. + """ + privateMetadata: [MetadataItem]! + + """ + List of public metadata items. Can be accessed without permissions. + """ + metadata: [MetadataItem]! + + """ + Type of the shipping method. + """ + type: ShippingMethodTypeEnum + + """ + Returns translated shipping method fields for the given language code. + """ + translation( + """ + A language code to return the translation for shipping method. + """ + languageCode: LanguageCodeEnum! + ): ShippingMethodTranslation + + """ + List of channels available for the method. + """ + channelListings: [ShippingMethodChannelListing!] + + """ + The price of the cheapest variant (including discounts). + """ + price: Money + + """ + The price of the cheapest variant (including discounts). + """ + maximumOrderPrice: Money + + """ + The price of the cheapest variant (including discounts). + """ + minimumOrderPrice: Money + + """ + Postal code ranges rule of exclusion or inclusion of the shipping method. + """ + postalCodeRules: [ShippingMethodPostalCodeRule] + + """ + List of excluded products for the shipping method. + """ + excludedProducts( + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): ProductCountableConnection +} + +""" +Represents shipping method channel listing. +""" +type ShippingMethodChannelListing implements Node { + """ + The ID of the object. + """ + id: ID! + channel: Channel! + minimumOrderPrice: Money + maximumOrderPrice: Money + price: Money +} + +input ShippingMethodChannelListingAddInput { """ ID of a channel. """ channelId: ID! """ - The value of the discount. + Shipping price of the shipping method in this channel. """ - discountValue: PositiveDecimal! + price: PositiveDecimal + + """ + Minimum order price to use this shipping method. + """ + minimumOrderPrice: PositiveDecimal + + """ + Maximum order price to use this shipping method. + """ + maximumOrderPrice: PositiveDecimal +} + +input ShippingMethodChannelListingInput { + """ + List of channels to which the shipping method should be assigned. + """ + addChannels: [ShippingMethodChannelListingAddInput!] + + """ + List of channels from which the shipping method should be unassigned. + """ + removeChannels: [ID!] +} + +""" +Manage shipping method's availability in channels. +""" +type ShippingMethodChannelListingUpdate { + """ + An updated shipping method instance. + """ + shippingMethod: ShippingMethod + shippingErrors: [ShippingError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ShippingError!]! +} + +""" +Represents shipping method postal code rule. +""" +type ShippingMethodPostalCodeRule implements Node { + """ + Start address range. + """ + start: String + + """ + End address range. + """ + end: String + + """ + Inclusion type of the postal code rule. + """ + inclusionType: PostalCodeRuleInclusionTypeEnum + + """ + The ID of the object. + """ + id: ID! +} + +type ShippingMethodTranslatableContent implements Node { + """ + The ID of the object. + """ + id: ID! + name: String! + description: JSONString + + """ + Returns translated shipping method fields for the given language code. + """ + translation( + """ + A language code to return the translation for shipping method. + """ + languageCode: LanguageCodeEnum! + ): ShippingMethodTranslation + + """ + Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. + """ + shippingMethod: ShippingMethod +} + +type ShippingMethodTranslation implements Node { + """ + The ID of the object. + """ + id: ID! + name: String + description: JSONString + + """ + Translation language. + """ + language: LanguageDisplay! +} + +""" +An enumeration. +""" +enum ShippingMethodTypeEnum { + PRICE + WEIGHT +} + +input ShippingPostalCodeRulesCreateInputRange { + """ + Start range of the postal code. + """ + start: String! + + """ + End range of the postal code. + """ + end: String +} + +""" +Deletes shipping prices. +""" +type ShippingPriceBulkDelete { + """ + Returns how many objects were affected. + """ + count: Int! + shippingErrors: [ShippingError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ShippingError!]! +} + +""" +Creates a new shipping price. +""" +type ShippingPriceCreate { + """ + A shipping zone to which the shipping method belongs. + """ + shippingZone: ShippingZone + shippingMethod: ShippingMethod + shippingErrors: [ShippingError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ShippingError!]! +} + +""" +Deletes a shipping price. +""" +type ShippingPriceDelete { + """ + A shipping method to delete. + """ + shippingMethod: ShippingMethod + + """ + A shipping zone to which the shipping method belongs. + """ + shippingZone: ShippingZone + shippingErrors: [ShippingError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ShippingError!]! +} + +""" +Exclude products from shipping price. +""" +type ShippingPriceExcludeProducts { + """ + A shipping method with new list of excluded products. + """ + shippingMethod: ShippingMethod + shippingErrors: [ShippingError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ShippingError!]! +} + +input ShippingPriceExcludeProductsInput { + """ + List of products which will be excluded. + """ + products: [ID]! +} + +input ShippingPriceInput { + """ + Name of the shipping method. + """ + name: String + + """ + Shipping method description (JSON). + """ + description: JSONString + + """ + Minimum order weight to use this shipping method. + """ + minimumOrderWeight: WeightScalar + + """ + Maximum order weight to use this shipping method. + """ + maximumOrderWeight: WeightScalar + + """ + Maximum number of days for delivery. + """ + maximumDeliveryDays: Int + + """ + Minimal number of days for delivery. + """ + minimumDeliveryDays: Int + + """ + Shipping type: price or weight based. + """ + type: ShippingMethodTypeEnum + + """ + Shipping zone this method belongs to. + """ + shippingZone: ID + + """ + Postal code rules to add. + """ + addPostalCodeRules: [ShippingPostalCodeRulesCreateInputRange!] + + """ + Postal code rules to delete. + """ + deletePostalCodeRules: [ID!] + + """ + Inclusion type for currently assigned postal code rules. + """ + inclusionType: PostalCodeRuleInclusionTypeEnum +} + +""" +Remove product from excluded list for shipping price. +""" +type ShippingPriceRemoveProductFromExclude { + """ + A shipping method with new list of excluded products. + """ + shippingMethod: ShippingMethod + shippingErrors: [ShippingError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ShippingError!]! +} + +""" +Creates/Updates translations for shipping method. +""" +type ShippingPriceTranslate { + translationErrors: [TranslationError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [TranslationError!]! + shippingMethod: ShippingMethod +} + +input ShippingPriceTranslationInput { + name: String + + """ + Translated shipping method description (JSON). + """ + description: JSONString +} + +""" +Updates a new shipping price. +""" +type ShippingPriceUpdate { + """ + A shipping zone to which the shipping method belongs. + """ + shippingZone: ShippingZone + shippingMethod: ShippingMethod + shippingErrors: [ShippingError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ShippingError!]! +} + +""" +Represents a shipping zone in the shop. Zones are the concept used only for grouping shipping methods in the dashboard, and are never exposed to the customers directly. +""" +type ShippingZone implements Node & ObjectWithMetadata { + """ + The ID of the object. + """ + id: ID! + name: String! + default: Boolean! + + """ + List of private metadata items.Requires proper staff permissions to access. + """ + privateMetadata: [MetadataItem]! + + """ + List of public metadata items. Can be accessed without permissions. + """ + metadata: [MetadataItem]! + + """ + Lowest and highest prices for the shipping. + """ + priceRange: MoneyRange + + """ + List of countries available for the method. + """ + countries: [CountryDisplay] + + """ + List of shipping methods available for orders shipped to countries within this shipping zone. + """ + shippingMethods: [ShippingMethod] + + """ + List of warehouses for shipping zone. + """ + warehouses: [Warehouse!]! + + """ + List of channels for shipping zone. + """ + channels: [Channel!]! + + """ + Description of a shipping zone. + """ + description: String +} + +""" +Deletes shipping zones. +""" +type ShippingZoneBulkDelete { + """ + Returns how many objects were affected. + """ + count: Int! + shippingErrors: [ShippingError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ShippingError!]! +} + +type ShippingZoneCountableConnection { + """ + Pagination data for this connection. + """ + pageInfo: PageInfo! + edges: [ShippingZoneCountableEdge!]! + + """ + A total count of items in the collection. + """ + totalCount: Int +} + +type ShippingZoneCountableEdge { + """ + The item at the end of the edge. + """ + node: ShippingZone! + + """ + A cursor for use in pagination. + """ + cursor: String! +} + +""" +Creates a new shipping zone. +""" +type ShippingZoneCreate { + shippingErrors: [ShippingError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ShippingError!]! + shippingZone: ShippingZone +} + +input ShippingZoneCreateInput { + """ + Shipping zone's name. Visible only to the staff. + """ + name: String + + """ + Description of the shipping zone. + """ + description: String + + """ + List of countries in this shipping zone. + """ + countries: [String] + + """ + Default shipping zone will be used for countries not covered by other zones. + """ + default: Boolean + + """ + List of warehouses to assign to a shipping zone + """ + addWarehouses: [ID] + + """ + List of channels to assign to the shipping zone. + """ + addChannels: [ID!] +} + +""" +Deletes a shipping zone. +""" +type ShippingZoneDelete { + shippingErrors: [ShippingError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ShippingError!]! + shippingZone: ShippingZone +} + +input ShippingZoneFilterInput { + search: String +} + +""" +Updates a new shipping zone. +""" +type ShippingZoneUpdate { + shippingErrors: [ShippingError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ShippingError!]! + shippingZone: ShippingZone +} + +input ShippingZoneUpdateInput { + """ + Shipping zone's name. Visible only to the staff. + """ + name: String + + """ + Description of the shipping zone. + """ + description: String + + """ + List of countries in this shipping zone. + """ + countries: [String] + + """ + Default shipping zone will be used for countries not covered by other zones. + """ + default: Boolean + + """ + List of warehouses to assign to a shipping zone + """ + addWarehouses: [ID] + + """ + List of channels to assign to the shipping zone. + """ + addChannels: [ID!] + + """ + List of warehouses to unassign from a shipping zone + """ + removeWarehouses: [ID] + + """ + List of channels to unassign from the shipping zone. + """ + removeChannels: [ID!] +} + +""" +Represents a shop resource containing general shop data and configuration. +""" +type Shop { + """ + List of available payment gateways. + """ + availablePaymentGateways( + """ + A currency for which gateways will be returned. + """ + currency: String + ): [PaymentGateway!]! + + """ + List of available external authentications. + """ + availableExternalAuthentications: [ExternalAuthentication!]! + + """ + Shipping methods that are available for the shop. + """ + availableShippingMethods( + """ + Slug of a channel for which the data should be returned. + """ + channel: String! + + """ + Address for which available shipping methods should be returned. + """ + address: AddressInput + ): [ShippingMethod] + + """ + List of countries available in the shop. + """ + countries( + """ + A language code to return the translation for. + """ + languageCode: LanguageCodeEnum + ): [CountryDisplay!]! + + """ + Shop's default country. + """ + defaultCountry: CountryDisplay + + """ + Default shop's email sender's name. + """ + defaultMailSenderName: String + + """ + Default shop's email sender's address. + """ + defaultMailSenderAddress: String + + """ + Shop's description. + """ + description: String + + """ + Shop's domain data. + """ + domain: Domain! + + """ + List of the shops's supported languages. + """ + languages: [LanguageDisplay]! + + """ + Shop's name. + """ + name: String! + + """ + List of available permissions. + """ + permissions: [Permission]! + + """ + List of possible phone prefixes. + """ + phonePrefixes: [String]! + + """ + Header text. + """ + headerText: String + + """ + Include taxes in prices. + """ + includeTaxesInPrices: Boolean! + + """ + Display prices with tax in store. + """ + displayGrossPrices: Boolean! + + """ + Charge taxes on shipping. + """ + chargeTaxesOnShipping: Boolean! + + """ + Enable inventory tracking. + """ + trackInventoryByDefault: Boolean + + """ + Default weight unit. + """ + defaultWeightUnit: WeightUnitsEnum + + """ + Returns translated shop fields for the given language code. + """ + translation( + """ + A language code to return the translation for shop. + """ + languageCode: LanguageCodeEnum! + ): ShopTranslation + + """ + Enable automatic fulfillment for all digital products. + """ + automaticFulfillmentDigitalProducts: Boolean + + """ + Default number of max downloads per digital content URL. + """ + defaultDigitalMaxDownloads: Int + + """ + Default number of days which digital content URL will be valid. + """ + defaultDigitalUrlValidDays: Int + + """ + Company address. + """ + companyAddress: Address + + """ + URL of a view where customers can set their password. + """ + customerSetPasswordUrl: String + + """ + List of staff notification recipients. + """ + staffNotificationRecipients: [StaffNotificationRecipient] + + """ + Resource limitations and current usage if any set for a shop + """ + limits: LimitInfo! + + """ + Saleor API version. + """ + version: String! +} + +""" +Update the shop's address. If the `null` value is passed, the currently selected address will be deleted. +""" +type ShopAddressUpdate { + """ + Updated shop. + """ + shop: Shop + shopErrors: [ShopError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ShopError!]! +} + +""" +Updates site domain of the shop. +""" +type ShopDomainUpdate { + """ + Updated shop. + """ + shop: Shop + shopErrors: [ShopError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ShopError!]! +} + +type ShopError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """ + The error message. + """ + message: String + + """ + The error code. + """ + code: ShopErrorCode! +} + +""" +An enumeration. +""" +enum ShopErrorCode { + ALREADY_EXISTS + CANNOT_FETCH_TAX_RATES + GRAPHQL_ERROR + INVALID + NOT_FOUND + REQUIRED + UNIQUE +} + +""" +Fetch tax rates. +""" +type ShopFetchTaxRates { + """ + Updated shop. + """ + shop: Shop + shopErrors: [ShopError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ShopError!]! +} + +input ShopSettingsInput { + """ + Header text. + """ + headerText: String + + """ + SEO description. + """ + description: String + + """ + Include taxes in prices. + """ + includeTaxesInPrices: Boolean + + """ + Display prices with tax in store. + """ + displayGrossPrices: Boolean + + """ + Charge taxes on shipping. + """ + chargeTaxesOnShipping: Boolean + + """ + Enable inventory tracking. + """ + trackInventoryByDefault: Boolean + + """ + Default weight unit. + """ + defaultWeightUnit: WeightUnitsEnum + + """ + Enable automatic fulfillment for all digital products. + """ + automaticFulfillmentDigitalProducts: Boolean + + """ + Default number of max downloads per digital content URL. + """ + defaultDigitalMaxDownloads: Int + + """ + Default number of days which digital content URL will be valid. + """ + defaultDigitalUrlValidDays: Int + + """ + Default email sender's name. + """ + defaultMailSenderName: String + + """ + Default email sender's address. + """ + defaultMailSenderAddress: String + + """ + URL of a view where customers can set their password. + """ + customerSetPasswordUrl: String +} + +""" +Creates/Updates translations for Shop Settings. +""" +type ShopSettingsTranslate { + """ + Updated shop. + """ + shop: Shop + translationErrors: [TranslationError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [TranslationError!]! +} + +input ShopSettingsTranslationInput { + headerText: String + description: String +} + +""" +Updates shop settings. +""" +type ShopSettingsUpdate { + """ + Updated shop. + """ + shop: Shop + shopErrors: [ShopError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ShopError!]! +} + +type ShopTranslation implements Node { + """ + The ID of the object. + """ + id: ID! + headerText: String! + description: String! + + """ + Translation language. + """ + language: LanguageDisplay! +} + +input SiteDomainInput { + """ + Domain name for shop. + """ + domain: String + + """ + Shop site name. + """ + name: String +} + +""" +Deletes staff users. +""" +type StaffBulkDelete { + """ + Returns how many objects were affected. + """ + count: Int! + staffErrors: [StaffError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [StaffError!]! +} + +""" +Creates a new staff user. +""" +type StaffCreate { + staffErrors: [StaffError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [StaffError!]! + user: User +} + +input StaffCreateInput { + """ + Given name. + """ + firstName: String + + """ + Family name. + """ + lastName: String + + """ + The unique email address of the user. + """ + email: String + + """ + User account is active. + """ + isActive: Boolean + + """ + A note about the user. + """ + note: String + + """ + List of permission group IDs to which user should be assigned. + """ + addGroups: [ID!] + + """ + URL of a view where users should be redirected to set the password. URL in RFC 1808 format. + """ + redirectUrl: String +} + +""" +Deletes a staff user. +""" +type StaffDelete { + staffErrors: [StaffError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [StaffError!]! + user: User +} + +type StaffError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """ + The error message. + """ + message: String + + """ + The error code. + """ + code: AccountErrorCode! + + """ + List of permissions which causes the error. + """ + permissions: [PermissionEnum!] + + """ + List of permission group IDs which cause the error. + """ + groups: [ID!] + + """ + List of user IDs which causes the error. + """ + users: [ID!] +} + +enum StaffMemberStatus { + """ + User account has been activated. + """ + ACTIVE + + """ + User account has not been activated yet. + """ + DEACTIVATED +} + +""" +Represents a recipient of email notifications send by Saleor, such as notifications about new orders. Notifications can be assigned to staff users or arbitrary email addresses. +""" +type StaffNotificationRecipient implements Node { + """ + Returns a user subscribed to email notifications. + """ + user: User + + """ + Determines if a notification active. + """ + active: Boolean + + """ + The ID of the object. + """ + id: ID! + + """ + Returns email address of a user subscribed to email notifications. + """ + email: String +} + +""" +Creates a new staff notification recipient. +""" +type StaffNotificationRecipientCreate { + shopErrors: [ShopError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ShopError!]! + staffNotificationRecipient: StaffNotificationRecipient +} + +""" +Delete staff notification recipient. +""" +type StaffNotificationRecipientDelete { + shopErrors: [ShopError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ShopError!]! + staffNotificationRecipient: StaffNotificationRecipient +} + +input StaffNotificationRecipientInput { + """ + The ID of the user subscribed to email notifications.. + """ + user: ID + + """ + Email address of a user subscribed to email notifications. + """ + email: String + + """ + Determines if a notification active. + """ + active: Boolean +} + +""" +Updates a staff notification recipient. +""" +type StaffNotificationRecipientUpdate { + shopErrors: [ShopError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ShopError!]! + staffNotificationRecipient: StaffNotificationRecipient +} + +""" +Updates an existing staff user. +""" +type StaffUpdate { + staffErrors: [StaffError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [StaffError!]! + user: User +} + +input StaffUpdateInput { + """ + Given name. + """ + firstName: String + + """ + Family name. + """ + lastName: String + + """ + The unique email address of the user. + """ + email: String + + """ + User account is active. + """ + isActive: Boolean + + """ + A note about the user. + """ + note: String + + """ + List of permission group IDs to which user should be assigned. + """ + addGroups: [ID!] + + """ + List of permission group IDs from which user should be unassigned. + """ + removeGroups: [ID!] +} + +input StaffUserInput { + status: StaffMemberStatus + search: String +} + +""" +Represents stock. +""" +type Stock implements Node { + warehouse: Warehouse! + productVariant: ProductVariant! + + """ + Quantity of a product in the warehouse's possession, including the allocated stock that is waiting for shipment. + """ + quantity: Int! + + """ + The ID of the object. + """ + id: ID! + + """ + Quantity allocated for orders + """ + quantityAllocated: Int! +} + +enum StockAvailability { + IN_STOCK + OUT_OF_STOCK +} + +type StockCountableConnection { + """ + Pagination data for this connection. + """ + pageInfo: PageInfo! + edges: [StockCountableEdge!]! + + """ + A total count of items in the collection. + """ + totalCount: Int +} + +type StockCountableEdge { + """ + The item at the end of the edge. + """ + node: Stock! + + """ + A cursor for use in pagination. + """ + cursor: String! +} + +type StockError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """ + The error message. + """ + message: String + + """ + The error code. + """ + code: StockErrorCode! +} + +""" +An enumeration. +""" +enum StockErrorCode { + ALREADY_EXISTS + GRAPHQL_ERROR + INVALID + NOT_FOUND + REQUIRED + UNIQUE +} + +input StockFilterInput { + quantity: Float + search: String +} + +input StockInput { + """ + Warehouse in which stock is located. + """ + warehouse: ID! + + """ + Quantity of items available for sell. + """ + quantity: Int! +} + +""" +An enumeration. +""" +enum TaxRateType { + ACCOMMODATION + ADMISSION_TO_CULTURAL_EVENTS + ADMISSION_TO_ENTERTAINMENT_EVENTS + ADMISSION_TO_SPORTING_EVENTS + ADVERTISING + AGRICULTURAL_SUPPLIES + BABY_FOODSTUFFS + BIKES + BOOKS + CHILDRENS_CLOTHING + DOMESTIC_FUEL + DOMESTIC_SERVICES + E_BOOKS + FOODSTUFFS + HOTELS + MEDICAL + NEWSPAPERS + PASSENGER_TRANSPORT + PHARMACEUTICALS + PROPERTY_RENOVATIONS + RESTAURANTS + SOCIAL_HOUSING + STANDARD + WATER + WINE +} + +""" +Representation of tax types fetched from tax gateway. +""" +type TaxType { + """ + Description of the tax type. + """ + description: String + + """ + External tax code used to identify given tax group. + """ + taxCode: String +} + +""" +Represents a monetary value with taxes. In cases where taxes were not applied, net and gross values will be equal. +""" +type TaxedMoney { + """ + Currency code. + """ + currency: String! + + """ + Amount of money including taxes. + """ + gross: Money! + + """ + Amount of money without taxes. + """ + net: Money! + + """ + Amount of taxes. + """ + tax: Money! +} + +""" +Represents a range of monetary values. +""" +type TaxedMoneyRange { + """ + Lower bound of a price range. + """ + start: TaxedMoney + + """ + Upper bound of a price range. + """ + stop: TaxedMoney +} + +""" +An object representing a single payment. +""" +type Transaction implements Node { + """ + The ID of the object. + """ + id: ID! + created: DateTime! + payment: Payment! + token: String! + kind: TransactionKind! + isSuccess: Boolean! + error: String + gatewayResponse: JSONString! + + """ + Total amount of the transaction. + """ + amount: Money +} + +""" +An enumeration. +""" +enum TransactionKind { + """ + External reference + """ + EXTERNAL + + """ + Authorization + """ + AUTH + + """ + Pending + """ + PENDING + + """ + Action to confirm + """ + ACTION_TO_CONFIRM + + """ + Refund + """ + REFUND + + """ + Refund in progress + """ + REFUND_ONGOING + + """ + Capture + """ + CAPTURE + + """ + Void + """ + VOID + + """ + Confirm + """ + CONFIRM + + """ + Cancel + """ + CANCEL +} + +union TranslatableItem = + ProductTranslatableContent + | CollectionTranslatableContent + | CategoryTranslatableContent + | AttributeTranslatableContent + | AttributeValueTranslatableContent + | ProductVariantTranslatableContent + | PageTranslatableContent + | ShippingMethodTranslatableContent + | SaleTranslatableContent + | VoucherTranslatableContent + | MenuItemTranslatableContent + +type TranslatableItemConnection { + """ + Pagination data for this connection. + """ + pageInfo: PageInfo! + edges: [TranslatableItemEdge!]! + + """ + A total count of items in the collection. + """ + totalCount: Int +} + +type TranslatableItemEdge { + """ + The item at the end of the edge. + """ + node: TranslatableItem! + + """ + A cursor for use in pagination. + """ + cursor: String! +} + +enum TranslatableKinds { + ATTRIBUTE + ATTRIBUTE_VALUE + CATEGORY + COLLECTION + MENU_ITEM + PAGE + PRODUCT + SALE + SHIPPING_METHOD + VARIANT + VOUCHER +} + +type TranslationError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """ + The error message. + """ + message: String + + """ + The error code. + """ + code: TranslationErrorCode! +} + +""" +An enumeration. +""" +enum TranslationErrorCode { + GRAPHQL_ERROR + NOT_FOUND + REQUIRED +} + +input TranslationInput { + seoTitle: String + seoDescription: String + name: String + description: JSONString +} + +scalar UUID + +input UpdateInvoiceInput { + """ + Invoice number + """ + number: String + + """ + URL of an invoice to download. + """ + url: String +} + +""" +Updates metadata of an object. +""" +type UpdateMetadata { + metadataErrors: [MetadataError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [MetadataError!]! + item: ObjectWithMetadata +} + +""" +Updates private metadata of an object. +""" +type UpdatePrivateMetadata { + metadataErrors: [MetadataError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [MetadataError!]! + item: ObjectWithMetadata +} + +""" +Variables of this type must be set to null in mutations. They will be replaced with a filename from a following multipart part containing a binary file. See: https://github.com/jaydenseric/graphql-multipart-request-spec. +""" +scalar Upload + +type UploadError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """ + The error message. + """ + message: String + + """ + The error code. + """ + code: UploadErrorCode! +} + +""" +An enumeration. +""" +enum UploadErrorCode { + GRAPHQL_ERROR +} + +""" +Represents user data. +""" +type User implements Node & ObjectWithMetadata { + """ + The ID of the object. + """ + id: ID! + lastLogin: DateTime + email: String! + firstName: String! + lastName: String! + isStaff: Boolean! + isActive: Boolean! + + """ + A note about the customer. + """ + note: String + dateJoined: DateTime! + defaultShippingAddress: Address + defaultBillingAddress: Address + + """ + List of private metadata items.Requires proper staff permissions to access. + """ + privateMetadata: [MetadataItem]! + + """ + List of public metadata items. Can be accessed without permissions. + """ + metadata: [MetadataItem]! + + """ + List of all user's addresses. + """ + addresses: [Address] + + """ + Returns the last open checkout of this user. + """ + checkout: Checkout + @deprecated( + reason: "Will be removed in Saleor 4.0. Use the `checkout_tokens` field to fetch the user checkouts." + ) + + """ + Returns the checkout UUID's assigned to this user. + """ + checkoutTokens( + """ + Slug of a channel for which the data should be returned. + """ + channel: String + ): [UUID!] + + """ + List of the user gift cards. + """ + giftCards( + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): GiftCardCountableConnection + + """ + List of user's orders. + """ + orders( + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): OrderCountableConnection + + """ + List of user's permissions. + """ + userPermissions: [UserPermission] + + """ + List of user's permission groups. + """ + permissionGroups: [Group] + + """ + List of user's permission groups which user can manage. + """ + editableGroups: [Group] + avatar( + """ + Size of the avatar. + """ + size: Int + ): Image + + """ + List of events associated with the user. + """ + events: [CustomerEvent] + + """ + List of stored payment sources. + """ + storedPaymentSources: [PaymentSource] + + """ + User language code. + """ + languageCode: LanguageCodeEnum! +} + +""" +Deletes a user avatar. Only for staff members. +""" +type UserAvatarDelete { + """ + An updated user instance. + """ + user: User + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! +} + +""" +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 +""" +type UserAvatarUpdate { + """ + An updated user instance. + """ + user: User + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! +} + +""" +Activate or deactivate users. +""" +type UserBulkSetActive { + """ + Returns how many objects were affected. + """ + count: Int! + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! +} + +type UserCountableConnection { + """ + Pagination data for this connection. + """ + pageInfo: PageInfo! + edges: [UserCountableEdge!]! + + """ + A total count of items in the collection. + """ + totalCount: Int +} + +type UserCountableEdge { + """ + The item at the end of the edge. + """ + node: User! + + """ + A cursor for use in pagination. + """ + cursor: String! +} + +input UserCreateInput { + """ + Billing address of the customer. + """ + defaultBillingAddress: AddressInput + + """ + Shipping address of the customer. + """ + defaultShippingAddress: AddressInput + + """ + Given name. + """ + firstName: String + + """ + Family name. + """ + lastName: String + + """ + The unique email address of the user. + """ + email: String + + """ + User account is active. + """ + isActive: Boolean + + """ + A note about the user. + """ + note: String + + """ + User language code. + """ + languageCode: LanguageCodeEnum + + """ + URL of a view where users should be redirected to set the password. URL in RFC 1808 format. + """ + redirectUrl: String +} + +type UserPermission { + """ + Internal code for permission. + """ + code: PermissionEnum! + + """ + Describe action(s) allowed to do by permission. + """ + name: String! + + """ + List of user permission groups which contains this permission. + """ + sourcePermissionGroups( + """ + ID of user whose groups should be returned. + """ + userId: ID! + ): [Group!] +} + +enum UserSortField { + """ + Sort users by first name. + """ + FIRST_NAME + + """ + Sort users by last name. + """ + LAST_NAME + + """ + Sort users by email. + """ + EMAIL + + """ + Sort users by order count. + """ + ORDER_COUNT +} + +input UserSortingInput { + """ + Specifies the direction in which to sort products. + """ + direction: OrderDirection! + + """ + Sort users by the selected field. + """ + field: UserSortField! +} + +""" +Represents a VAT rate for a country. +""" +type VAT { + """ + Country code. + """ + countryCode: String! + + """ + Standard VAT rate in percent. + """ + standardRate: Float + + """ + Country's VAT rate exceptions for specific types of goods. + """ + reducedRates: [ReducedRate]! +} + +enum VariantAttributeScope { + ALL + VARIANT_SELECTION + NOT_VARIANT_SELECTION +} + +""" +Assign an media to a product variant. +""" +type VariantMediaAssign { + productVariant: ProductVariant + media: ProductMedia + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! +} + +""" +Unassign an media from a product variant. +""" +type VariantMediaUnassign { + productVariant: ProductVariant + media: ProductMedia + productErrors: [ProductError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [ProductError!]! +} + +""" +Represents availability of a variant in the storefront. +""" +type VariantPricingInfo { + """ + Whether it is in sale or not. + """ + onSale: Boolean + + """ + The discount amount if in sale (null otherwise). + """ + discount: TaxedMoney + + """ + The discount amount in the local currency. + """ + discountLocalCurrency: TaxedMoney + + """ + The price, with any discount subtracted. + """ + price: TaxedMoney + + """ + The price without any discount. + """ + priceUndiscounted: TaxedMoney + + """ + The discounted price in the local currency. + """ + priceLocalCurrency: TaxedMoney +} + +""" +Verify JWT token. +""" +type VerifyToken { + """ + User assigned to token. + """ + user: User + + """ + Determine if token is valid or not. + """ + isValid: Boolean! + + """ + JWT payload. + """ + payload: GenericScalar + accountErrors: [AccountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [AccountError!]! +} + +""" +Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. +""" +type Voucher implements Node { + """ + The ID of the object. + """ + id: ID! + name: String + + """ + Determines a type of voucher. + """ + type: VoucherTypeEnum! + code: String! + usageLimit: Int + used: Int! + startDate: DateTime! + endDate: DateTime + applyOncePerOrder: Boolean! + applyOncePerCustomer: Boolean! + + """ + Determines a type of discount for voucher - value or percentage + """ + discountValueType: DiscountValueTypeEnum! + minCheckoutItemsQuantity: Int + + """ + List of categories this voucher applies to. + """ + categories( + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): CategoryCountableConnection + + """ + List of collections this voucher applies to. + """ + collections( + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): CollectionCountableConnection + + """ + List of products this voucher applies to. + """ + products( + """ + Return the elements in the list that come before the specified cursor. + """ + before: String + + """ + Return the elements in the list that come after the specified cursor. + """ + after: String + + """ + Return the first n elements from the list. + """ + first: Int + + """ + Return the last n elements from the list. + """ + last: Int + ): ProductCountableConnection + + """ + List of countries available for the shipping voucher. + """ + countries: [CountryDisplay] + + """ + Returns translated voucher fields for the given language code. + """ + translation( + """ + A language code to return the translation for voucher. + """ + languageCode: LanguageCodeEnum! + ): VoucherTranslation + + """ + Voucher value. + """ + discountValue: Float + + """ + Currency code for voucher. + """ + currency: String + + """ + Minimum order value to apply voucher. + """ + minSpent: Money + + """ + List of availability in channels for the voucher. + """ + channelListings: [VoucherChannelListing!] +} + +""" +Adds products, categories, collections to a voucher. +""" +type VoucherAddCatalogues { + """ + Voucher of which catalogue IDs will be modified. + """ + voucher: Voucher + discountErrors: [DiscountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [DiscountError!]! +} + +""" +Deletes vouchers. +""" +type VoucherBulkDelete { + """ + Returns how many objects were affected. + """ + count: Int! + discountErrors: [DiscountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [DiscountError!]! +} + +""" +Represents voucher channel listing. +""" +type VoucherChannelListing implements Node { + """ + The ID of the object. + """ + id: ID! + channel: Channel! + discountValue: Float! + currency: String! + minSpent: Money +} + +input VoucherChannelListingAddInput { + """ + ID of a channel. + """ + channelId: ID! + + """ + Value of the voucher. + """ + discountValue: PositiveDecimal + + """ + Min purchase amount required to apply the voucher. + """ + minAmountSpent: PositiveDecimal +} + +input VoucherChannelListingInput { + """ + List of channels to which the voucher should be assigned. + """ + addChannels: [VoucherChannelListingAddInput!] + + """ + List of channels from which the voucher should be unassigned. + """ + removeChannels: [ID!] +} + +""" +Manage voucher's availability in channels. +""" +type VoucherChannelListingUpdate { + """ + An updated voucher instance. + """ + voucher: Voucher + discountErrors: [DiscountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [DiscountError!]! +} + +type VoucherCountableConnection { + """ + Pagination data for this connection. + """ + pageInfo: PageInfo! + edges: [VoucherCountableEdge!]! + + """ + A total count of items in the collection. + """ + totalCount: Int +} + +type VoucherCountableEdge { + """ + The item at the end of the edge. + """ + node: Voucher! + + """ + A cursor for use in pagination. + """ + cursor: String! } """ Creates a new voucher. """ type VoucherCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) discountErrors: [DiscountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [DiscountError!]! voucher: Voucher } +""" +Deletes a voucher. +""" +type VoucherDelete { + discountErrors: [DiscountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [DiscountError!]! + voucher: Voucher +} + +enum VoucherDiscountType { + FIXED + PERCENTAGE + SHIPPING +} + +input VoucherFilterInput { + status: [DiscountStatusEnum] + timesUsed: IntRangeInput + discountType: [VoucherDiscountType] + started: DateTimeRangeInput + search: String +} + input VoucherInput { """ Voucher type: PRODUCT, CATEGORY SHIPPING or ENTIRE_ORDER. @@ -17597,2473 +18617,296 @@ input VoucherInput { usageLimit: Int } -""" -Deletes a voucher. -""" -type VoucherDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - discountErrors: [DiscountError!]! - voucher: Voucher -} - -""" -Deletes vouchers. -""" -type VoucherBulkDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Returns how many objects were affected. - """ - count: Int! - discountErrors: [DiscountError!]! -} - -""" -Updates a voucher. -""" -type VoucherUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - discountErrors: [DiscountError!]! - voucher: Voucher -} - -""" -Adds products, categories, collections to a voucher. -""" -type VoucherAddCatalogues { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Voucher of which catalogue IDs will be modified. - """ - voucher: Voucher - discountErrors: [DiscountError!]! -} - """ Removes products, categories, collections from a voucher. """ type VoucherRemoveCatalogues { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - """ Voucher of which catalogue IDs will be modified. """ voucher: Voucher discountErrors: [DiscountError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [DiscountError!]! +} + +enum VoucherSortField { + """ + Sort vouchers by code. + """ + CODE + + """ + Sort vouchers by start date. + """ + START_DATE + + """ + Sort vouchers by end date. + """ + END_DATE + + """ + Sort vouchers by value. + """ + VALUE + + """ + Sort vouchers by type. + """ + TYPE + + """ + Sort vouchers by usage limit. + """ + USAGE_LIMIT + + """ + Sort vouchers by minimum spent amount. + """ + MINIMUM_SPENT_AMOUNT +} + +input VoucherSortingInput { + """ + Specifies the direction in which to sort products. + """ + direction: OrderDirection! + + """ + Specifies the channel in which to sort the data. + """ + channel: String + + """ + Sort vouchers by the selected field. + """ + field: VoucherSortField! +} + +type VoucherTranslatableContent implements Node { + """ + The ID of the object. + """ + id: ID! + name: String + + """ + Returns translated voucher fields for the given language code. + """ + translation( + """ + A language code to return the translation for voucher. + """ + languageCode: LanguageCodeEnum! + ): VoucherTranslation + + """ + Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. + """ + voucher: Voucher } """ Creates/Updates translations for Voucher. """ type VoucherTranslate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) translationErrors: [TranslationError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [TranslationError!]! voucher: Voucher } -""" -Manage voucher's availability in channels. -""" -type VoucherChannelListingUpdate { +type VoucherTranslation implements Node { """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - An updated voucher instance. - """ - voucher: Voucher - discountErrors: [DiscountError!]! -} - -input VoucherChannelListingInput { - """ - List of channels to which the voucher should be assigned. - """ - addChannels: [VoucherChannelListingAddInput!] - - """ - List of channels from which the voucher should be unassigned. - """ - removeChannels: [ID!] -} - -input VoucherChannelListingAddInput { - """ - ID of a channel. - """ - channelId: ID! - - """ - Value of the voucher. - """ - discountValue: PositiveDecimal - - """ - Min purchase amount required to apply the voucher. - """ - minAmountSpent: PositiveDecimal -} - -""" -Export products to csv file. -""" -type ExportProducts { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - The newly created export file job which is responsible for export data. - """ - exportFile: ExportFile - exportErrors: [ExportError!]! -} - -type ExportError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: ExportErrorCode! -} - -""" -An enumeration. -""" -enum ExportErrorCode { - INVALID - NOT_FOUND - REQUIRED -} - -input ExportProductsInput { - """ - Determine which products should be exported. - """ - scope: ExportScope! - - """ - Filtering options for products. - """ - filter: ProductFilterInput - - """ - List of products IDS to export. - """ - ids: [ID!] - - """ - Input with info about fields which should be exported. - """ - exportInfo: ExportInfoInput - - """ - Type of exported file. - """ - fileType: FileTypesEnum! -} - -enum ExportScope { - """ - Export all products. - """ - ALL - - """ - Export products with given ids. - """ - IDS - - """ - Export the filtered products. - """ - FILTER -} - -input ExportInfoInput { - """ - List of attribute ids witch should be exported. - """ - attributes: [ID!] - - """ - List of warehouse ids witch should be exported. - """ - warehouses: [ID!] - - """ - List of channels ids which should be exported. - """ - channels: [ID!] - - """ - List of product fields witch should be exported. - """ - fields: [ProductFieldEnum!] -} - -enum ProductFieldEnum { - NAME - DESCRIPTION - PRODUCT_TYPE - CATEGORY - VISIBLE - PRODUCT_WEIGHT - COLLECTIONS - CHARGE_TAXES - PRODUCT_MEDIA - VARIANT_SKU - VARIANT_WEIGHT - VARIANT_MEDIA -} - -""" -An enumeration. -""" -enum FileTypesEnum { - CSV - XLSX -} - -""" -Upload a file. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec -""" -type FileUpload { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - uploadedFile: File - uploadErrors: [UploadError!]! -} - -type UploadError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: UploadErrorCode! -} - -""" -An enumeration. -""" -enum UploadErrorCode { - GRAPHQL_ERROR -} - -""" -Adds a gift card or a voucher to a checkout. -""" -type CheckoutAddPromoCode { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - The checkout with the added gift card or voucher. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! -} - -type CheckoutError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: CheckoutErrorCode! - - """ - List of varint IDs which causes the error. - """ - variants: [ID!] -} - -""" -An enumeration. -""" -enum CheckoutErrorCode { - BILLING_ADDRESS_NOT_SET - CHECKOUT_NOT_FULLY_PAID - GRAPHQL_ERROR - PRODUCT_NOT_PUBLISHED - PRODUCT_UNAVAILABLE_FOR_PURCHASE - INSUFFICIENT_STOCK - INVALID - INVALID_SHIPPING_METHOD - NOT_FOUND - PAYMENT_ERROR - QUANTITY_GREATER_THAN_LIMIT - REQUIRED - SHIPPING_ADDRESS_NOT_SET - SHIPPING_METHOD_NOT_APPLICABLE - SHIPPING_METHOD_NOT_SET - SHIPPING_NOT_REQUIRED - TAX_ERROR - UNIQUE - VOUCHER_NOT_APPLICABLE - ZERO_QUANTITY - MISSING_CHANNEL_SLUG - CHANNEL_INACTIVE - UNAVAILABLE_VARIANT_IN_CHANNEL -} - -""" -Update billing address in the existing checkout. -""" -type CheckoutBillingAddressUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - An updated checkout. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! -} - -""" -Completes the checkout. As a result a new order is created and a payment charge is made. This action requires a successful payment before it can be performed. In case additional confirmation step as 3D secure is required confirmationNeeded flag will be set to True and no order created until payment is confirmed with second call of this mutation. -""" -type CheckoutComplete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Placed order. - """ - order: Order - - """ - Set to true if payment needs to be confirmed before checkout is complete. - """ - confirmationNeeded: Boolean! - - """ - Confirmation data used to process additional authorization steps. - """ - confirmationData: JSONString - checkoutErrors: [CheckoutError!]! -} - -""" -Create a new checkout. -""" -type CheckoutCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Whether the checkout was created or the current active one was returned. Refer to checkoutLinesAdd and checkoutLinesUpdate to merge a cart with an active checkout. - """ - created: Boolean - checkoutErrors: [CheckoutError!]! - checkout: Checkout -} - -input CheckoutCreateInput { - """ - Slug of a channel in which to create a checkout. - """ - channel: String - - """ - A list of checkout lines, each containing information about an item in the checkout. - """ - lines: [CheckoutLineInput]! - - """ - The customer's email address. - """ - email: String - - """ - The mailing address to where the checkout will be shipped. Note: the address will be ignored if the checkout doesn't contain shippable items. - """ - shippingAddress: AddressInput - - """ - Billing address of the customer. - """ - billingAddress: AddressInput - - """ - Checkout language code. - """ - languageCode: LanguageCodeEnum -} - -input CheckoutLineInput { - """ - The number of items purchased. - """ - quantity: Int! - - """ - ID of the product variant. - """ - variantId: ID! -} - -""" -Sets the customer as the owner of the checkout. -""" -type CheckoutCustomerAttach { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - An updated checkout. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! -} - -""" -Removes the user assigned as the owner of the checkout. -""" -type CheckoutCustomerDetach { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - An updated checkout. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! -} - -""" -Updates email address in the existing checkout object. -""" -type CheckoutEmailUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - An updated checkout. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! -} - -""" -Deletes a CheckoutLine. -""" -type CheckoutLineDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - An updated checkout. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! -} - -""" -Adds a checkout line to the existing checkout. -""" -type CheckoutLinesAdd { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - An updated checkout. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! -} - -""" -Updates checkout line in the existing checkout. -""" -type CheckoutLinesUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - An updated checkout. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! -} - -""" -Remove a gift card or a voucher from a checkout. -""" -type CheckoutRemovePromoCode { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - The checkout with the removed gift card or voucher. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! -} - -""" -Create a new payment for given checkout. -""" -type CheckoutPaymentCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Related checkout object. - """ - checkout: Checkout - - """ - A newly created payment. - """ - payment: Payment - paymentErrors: [PaymentError!]! -} - -input PaymentInput { - """ - A gateway to use with that payment. - """ - gateway: String! - - """ - Client-side generated payment token, representing customer's billing data in a secure manner. - """ - token: String - - """ - Total amount of the transaction, including all taxes and discounts. If no amount is provided, the checkout total will be used. - """ - amount: PositiveDecimal - - """ - URL of a storefront view where user should be redirected after requiring additional actions. Payment with additional actions will not be finished if this field is not provided. - """ - returnUrl: String -} - -""" -Update shipping address in the existing checkout. -""" -type CheckoutShippingAddressUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - An updated checkout. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! -} - -""" -Updates the shipping address of the checkout. -""" -type CheckoutShippingMethodUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - An updated checkout. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! -} - -""" -Update language code in the existing checkout. -""" -type CheckoutLanguageCodeUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - An updated checkout. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! -} - -""" -Creates new channel. -""" -type ChannelCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - channelErrors: [ChannelError!]! - channel: Channel -} - -type ChannelError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: ChannelErrorCode! - - """ - List of shipping zone IDs which causes the error. - """ - shippingZones: [ID!] -} - -""" -An enumeration. -""" -enum ChannelErrorCode { - ALREADY_EXISTS - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE - CHANNEL_TARGET_ID_MUST_BE_DIFFERENT - CHANNELS_CURRENCY_MUST_BE_THE_SAME - CHANNEL_WITH_ORDERS - DUPLICATED_INPUT_ITEM -} - -input ChannelCreateInput { - """ - isActive flag. - """ - isActive: Boolean - - """ - Name of the channel. - """ - name: String! - - """ - Slug of the channel. - """ - slug: String! - - """ - Currency of the channel. - """ - currencyCode: String! - - """ - List of shipping zones to assign to the channel. - """ - addShippingZones: [ID!] -} - -""" -Update a channel. -""" -type ChannelUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - channelErrors: [ChannelError!]! - channel: Channel -} - -input ChannelUpdateInput { - """ - isActive flag. - """ - isActive: Boolean - - """ - Name of the channel. + The ID of the object. """ + id: ID! name: String """ - Slug of the channel. + Translation language. """ - slug: String - - """ - List of shipping zones to assign to the channel. - """ - addShippingZones: [ID!] - - """ - List of shipping zones to unassign from the channel. - """ - removeShippingZones: [ID!] + language: LanguageDisplay! } -""" -Delete a channel. Orders associated with the deleted channel will be moved to the target channel. Checkouts, product availability, and pricing will be removed. -""" -type ChannelDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - channelErrors: [ChannelError!]! - channel: Channel -} - -input ChannelDeleteInput { - """ - ID of channel to migrate orders from origin channel. - """ - targetChannel: ID! -} - -""" -Activate a channel. -""" -type ChannelActivate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Activated channel. - """ - channel: Channel - channelErrors: [ChannelError!]! -} - -""" -Deactivate a channel. -""" -type ChannelDeactivate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Deactivated channel. - """ - channel: Channel - channelErrors: [ChannelError!]! -} - -""" -Creates an attribute. -""" -type AttributeCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - attribute: Attribute - attributeErrors: [AttributeError!]! -} - -type AttributeError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: AttributeErrorCode! -} - -""" -An enumeration. -""" -enum AttributeErrorCode { - ALREADY_EXISTS - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE -} - -input AttributeCreateInput { - """ - The input type to use for entering attribute values in the dashboard. - """ - inputType: AttributeInputTypeEnum - - """ - The entity type which can be used as a reference. - """ - entityType: AttributeEntityTypeEnum - - """ - Name of an attribute displayed in the interface. - """ - name: String! - - """ - Internal representation of an attribute name. - """ - slug: String - - """ - The attribute type. - """ - type: AttributeTypeEnum! - - """ - List of attribute's values. - """ - values: [AttributeValueCreateInput] - - """ - Whether the attribute requires values to be passed or not. - """ - valueRequired: Boolean - - """ - Whether the attribute is for variants only. - """ - isVariantOnly: Boolean - - """ - Whether the attribute should be visible or not in storefront. - """ - visibleInStorefront: Boolean - - """ - Whether the attribute can be filtered in storefront. - """ - filterableInStorefront: Boolean - - """ - Whether the attribute can be filtered in dashboard. - """ - filterableInDashboard: Boolean - - """ - The position of the attribute in the storefront navigation (0 by default). - """ - storefrontSearchPosition: Int - - """ - Whether the attribute can be displayed in the admin product list. - """ - availableInGrid: Boolean -} - -input AttributeValueCreateInput { - """ - Name of a value displayed in the interface. - """ - name: String! - - """ - Represents the value of the attribute value. - """ - value: String - - """ - Represents the text (JSON) of the attribute value. - """ - richText: JSONString -} - -""" -Deletes an attribute. -""" -type AttributeDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - attributeErrors: [AttributeError!]! - attribute: Attribute -} - -""" -Updates attribute. -""" -type AttributeUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - attribute: Attribute - attributeErrors: [AttributeError!]! -} - -input AttributeUpdateInput { - """ - Name of an attribute displayed in the interface. - """ - name: String - - """ - Internal representation of an attribute name. - """ - slug: String - - """ - IDs of values to be removed from this attribute. - """ - removeValues: [ID] - - """ - New values to be created for this attribute. - """ - addValues: [AttributeValueCreateInput] - - """ - Whether the attribute requires values to be passed or not. - """ - valueRequired: Boolean - - """ - Whether the attribute is for variants only. - """ - isVariantOnly: Boolean - - """ - Whether the attribute should be visible or not in storefront. - """ - visibleInStorefront: Boolean - - """ - Whether the attribute can be filtered in storefront. - """ - filterableInStorefront: Boolean - - """ - Whether the attribute can be filtered in dashboard. - """ - filterableInDashboard: Boolean - - """ - The position of the attribute in the storefront navigation (0 by default). - """ - storefrontSearchPosition: Int - - """ - Whether the attribute can be displayed in the admin product list. - """ - availableInGrid: Boolean -} - -""" -Creates/Updates translations for attribute. -""" -type AttributeTranslate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - translationErrors: [TranslationError!]! - attribute: Attribute -} - -""" -Deletes attributes. -""" -type AttributeBulkDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Returns how many objects were affected. - """ - count: Int! - attributeErrors: [AttributeError!]! -} - -""" -Deletes values of attributes. -""" -type AttributeValueBulkDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Returns how many objects were affected. - """ - count: Int! - attributeErrors: [AttributeError!]! -} - -""" -Creates a value for an attribute. -""" -type AttributeValueCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - The updated attribute. - """ - attribute: Attribute - attributeErrors: [AttributeError!]! - attributeValue: AttributeValue -} - -""" -Deletes a value of an attribute. -""" -type AttributeValueDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - The updated attribute. - """ - attribute: Attribute - attributeErrors: [AttributeError!]! - attributeValue: AttributeValue -} - -""" -Updates value of an attribute. -""" -type AttributeValueUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - The updated attribute. - """ - attribute: Attribute - attributeErrors: [AttributeError!]! - attributeValue: AttributeValue -} - -""" -Creates/Updates translations for attribute value. -""" -type AttributeValueTranslate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - translationErrors: [TranslationError!]! - attributeValue: AttributeValue -} - -input AttributeValueTranslationInput { - name: String - richText: JSONString -} - -""" -Reorder the values of an attribute. -""" -type AttributeReorderValues { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Attribute from which values are reordered. - """ - attribute: Attribute - attributeErrors: [AttributeError!]! -} - -""" -Creates a new app. -""" -type AppCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - The newly created authentication token. - """ - authToken: String - appErrors: [AppError!]! - app: App -} - -type AppError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: AppErrorCode! - - """ - List of permissions which causes the error. - """ - permissions: [PermissionEnum!] -} - -""" -An enumeration. -""" -enum AppErrorCode { - FORBIDDEN - GRAPHQL_ERROR - INVALID - INVALID_STATUS - INVALID_PERMISSION - INVALID_URL_FORMAT - INVALID_MANIFEST_FORMAT - MANIFEST_URL_CANT_CONNECT - NOT_FOUND - REQUIRED - UNIQUE - OUT_OF_SCOPE_APP - OUT_OF_SCOPE_PERMISSION -} - -input AppInput { - """ - Name of the app. - """ - name: String - - """ - DEPRECATED: Use the `appActivate` and `appDeactivate` mutations instead. This field will be removed after 2020-07-31. - """ - isActive: Boolean - - """ - List of permission code names to assign to this app. - """ - permissions: [PermissionEnum] -} - -""" -Updates an existing app. -""" -type AppUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - appErrors: [AppError!]! - app: App -} - -""" -Deletes an app. -""" -type AppDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - appErrors: [AppError!]! - app: App -} - -""" -Creates a new token. -""" -type AppTokenCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - The newly created authentication token. - """ - authToken: String - appErrors: [AppError!]! - appToken: AppToken -} - -input AppTokenInput { - """ - Name of the token. - """ - name: String - - """ - ID of app. - """ - app: ID! -} - -""" -Deletes an authentication token assigned to app. -""" -type AppTokenDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - appErrors: [AppError!]! - appToken: AppToken -} - -""" -Verify provided app token. -""" -type AppTokenVerify { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Determine if token is valid or not. - """ - valid: Boolean! - appErrors: [AppError!]! -} - -""" -Install new app by using app manifest. -""" -type AppInstall { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - appErrors: [AppError!]! - appInstallation: AppInstallation -} - -input AppInstallInput { - """ - Name of the app to install. - """ - appName: String - - """ - Url to app's manifest in JSON format. - """ - manifestUrl: String - - """ - Determine if app will be set active or not. - """ - activateAfterInstallation: Boolean - - """ - List of permission code names to assign to this app. - """ - permissions: [PermissionEnum] -} - -""" -Retry failed installation of new app. -""" -type AppRetryInstall { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - appErrors: [AppError!]! - appInstallation: AppInstallation -} - -""" -Delete failed installation. -""" -type AppDeleteFailedInstallation { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - appErrors: [AppError!]! - appInstallation: AppInstallation -} - -""" -Fetch and validate manifest. -""" -type AppFetchManifest { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - manifest: Manifest - appErrors: [AppError!]! -} - -""" -The manifest definition. -""" -type Manifest { - identifier: String! - version: String! - name: String! - about: String - permissions: [Permission] - appUrl: String - configurationUrl: String - tokenTargetUrl: String - dataPrivacy: String - dataPrivacyUrl: String - homepageUrl: String - supportUrl: String -} - -""" -Activate the app. -""" -type AppActivate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - appErrors: [AppError!]! - app: App -} - -""" -Deactivate the app. -""" -type AppDeactivate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - appErrors: [AppError!]! - app: App -} - -""" -Create JWT token. -""" -type CreateToken { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - JWT token, required to authenticate. - """ - token: String - - """ - JWT refresh token, required to re-generate access token. - """ - refreshToken: String - - """ - CSRF token required to re-generate access token. - """ - csrfToken: String - - """ - A user instance. - """ - user: User - accountErrors: [AccountError!]! -} - -type AccountError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: AccountErrorCode! -} - -""" -An enumeration. -""" -enum AccountErrorCode { - ACTIVATE_OWN_ACCOUNT - ACTIVATE_SUPERUSER_ACCOUNT - DUPLICATED_INPUT_ITEM - DEACTIVATE_OWN_ACCOUNT - DEACTIVATE_SUPERUSER_ACCOUNT - DELETE_NON_STAFF_USER - DELETE_OWN_ACCOUNT - DELETE_STAFF_ACCOUNT - DELETE_SUPERUSER_ACCOUNT - GRAPHQL_ERROR - INACTIVE - INVALID - INVALID_PASSWORD - LEFT_NOT_MANAGEABLE_PERMISSION - INVALID_CREDENTIALS - NOT_FOUND - OUT_OF_SCOPE_USER - OUT_OF_SCOPE_GROUP - OUT_OF_SCOPE_PERMISSION - PASSWORD_ENTIRELY_NUMERIC - PASSWORD_TOO_COMMON - PASSWORD_TOO_SHORT - PASSWORD_TOO_SIMILAR - REQUIRED - UNIQUE - JWT_SIGNATURE_EXPIRED - JWT_INVALID_TOKEN - JWT_DECODE_ERROR - JWT_MISSING_TOKEN - JWT_INVALID_CSRF_TOKEN -} - -""" -Refresh JWT token. Mutation tries to take refreshToken from the input.If it fails it will try to take refreshToken from the http-only cookie -refreshToken. csrfToken is required when refreshToken is provided as a cookie. -""" -type RefreshToken { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - JWT token, required to authenticate. - """ - token: String - - """ - A user instance. - """ - user: User - accountErrors: [AccountError!]! -} - -""" -Verify JWT token. -""" -type VerifyToken { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - User assigned to token. - """ - user: User - - """ - Determine if token is valid or not. - """ - isValid: Boolean! - - """ - JWT payload. - """ - payload: GenericScalar - accountErrors: [AccountError!]! -} - -""" -The `GenericScalar` scalar type represents a generic -GraphQL scalar value that could be: -String, Boolean, Int, Float, List or Object. -""" -scalar GenericScalar - -""" -Deactivate all JWT tokens of the currently authenticated user. -""" -type DeactivateAllUserTokens { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - accountErrors: [AccountError!]! -} - -""" -Prepare external authentication url for user by custom plugin. -""" -type ExternalAuthenticationUrl { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - The data returned by authentication plugin. - """ - authenticationData: JSONString - accountErrors: [AccountError!]! -} - -""" -Obtain external access tokens for user by custom plugin. -""" -type ExternalObtainAccessTokens { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - The token, required to authenticate. - """ - token: String - - """ - The refresh token, required to re-generate external access token. - """ - refreshToken: String - - """ - CSRF token required to re-generate external access token. - """ - csrfToken: String - - """ - A user instance. - """ - user: User - accountErrors: [AccountError!]! -} - -""" -Refresh user's access by custom plugin. -""" -type ExternalRefresh { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - The token, required to authenticate. - """ - token: String - - """ - The refresh token, required to re-generate external access token. - """ - refreshToken: String - - """ - CSRF token required to re-generate external access token. - """ - csrfToken: String - - """ - A user instance. - """ - user: User - accountErrors: [AccountError!]! -} - -""" -Logout user by custom plugin. -""" -type ExternalLogout { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - The data returned by authentication plugin. - """ - logoutData: JSONString - accountErrors: [AccountError!]! -} - -""" -Verify external authentication data by plugin. -""" -type ExternalVerify { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - User assigned to data. - """ - user: User - - """ - Determine if authentication data is valid or not. - """ - isValid: Boolean! - - """ - External data. - """ - verifyData: JSONString - accountErrors: [AccountError!]! -} - -""" -Sends an email with the account password modification link. -""" -type RequestPasswordReset { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - accountErrors: [AccountError!]! -} - -""" -Confirm user account with token sent by email during registration. -""" -type ConfirmAccount { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - An activated user account. - """ - user: User - accountErrors: [AccountError!]! -} - -""" -Sets the user's password from the token sent by email using the RequestPasswordReset mutation. -""" -type SetPassword { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - JWT token, required to authenticate. - """ - token: String - - """ - JWT refresh token, required to re-generate access token. - """ - refreshToken: String - - """ - CSRF token required to re-generate access token. - """ - csrfToken: String - - """ - A user instance. - """ - user: User - accountErrors: [AccountError!]! -} - -""" -Change the password of the logged in user. -""" -type PasswordChange { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - A user instance with a new password. - """ - user: User - accountErrors: [AccountError!]! -} - -""" -Request email change of the logged in user. -""" -type RequestEmailChange { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - A user instance. - """ - user: User - accountErrors: [AccountError!]! -} - -""" -Confirm the email change of the logged-in user. -""" -type ConfirmEmailChange { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - A user instance with a new email. - """ - user: User - accountErrors: [AccountError!]! -} - -""" -Create a new address for the customer. -""" -type AccountAddressCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - A user instance for which the address was created. - """ - user: User - accountErrors: [AccountError!]! - address: Address -} - -""" -An enumeration. -""" -enum AddressTypeEnum { - BILLING +enum VoucherTypeEnum { SHIPPING + ENTIRE_ORDER + SPECIFIC_PRODUCT } """ -Updates an address of the logged-in user. +Updates a voucher. """ -type AccountAddressUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! +type VoucherUpdate { + discountErrors: [DiscountError!]! @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Use errors field instead. This field will be removed in Saleor 4.0." ) - - """ - A user object for which the address was edited. - """ - user: User - accountErrors: [AccountError!]! - address: Address + errors: [DiscountError!]! + voucher: Voucher } """ -Delete an address of the logged-in user. +Represents warehouse. """ -type AccountAddressDelete { +type Warehouse implements Node & ObjectWithMetadata { """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - A user instance for which the address was deleted. - """ - user: User - accountErrors: [AccountError!]! - address: Address -} - -""" -Sets a default address for the authenticated user. -""" -type AccountSetDefaultAddress { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - An updated user instance. - """ - user: User - accountErrors: [AccountError!]! -} - -""" -Register a new user. -""" -type AccountRegister { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Informs whether users need to confirm their email address. - """ - requiresConfirmation: Boolean - accountErrors: [AccountError!]! - user: User -} - -input AccountRegisterInput { - """ - The email address of the user. + The ID of the object. """ + id: ID! + name: String! + slug: String! + companyName: String! + shippingZones( + before: String + after: String + first: Int + last: Int + ): ShippingZoneCountableConnection! + address: Address! email: String! """ - Password. + List of private metadata items.Requires proper staff permissions to access. """ - password: String! + privateMetadata: [MetadataItem]! """ - Base of frontend URL that will be needed to create confirmation URL. + List of public metadata items. Can be accessed without permissions. """ - redirectUrl: String + metadata: [MetadataItem]! +} + +input WarehouseAddressInput { + """ + Address. + """ + streetAddress1: String! """ - User language code. + Address. """ - languageCode: LanguageCodeEnum + streetAddress2: String """ - User public metadata. + City. """ - metadata: [MetadataInput!] + city: String! + + """ + District. + """ + cityArea: String + + """ + Postal code. + """ + postalCode: String + + """ + Country. + """ + country: CountryCode! + + """ + State or province. + """ + countryArea: String + + """ + Phone number. + """ + phone: String +} + +type WarehouseCountableConnection { + """ + Pagination data for this connection. + """ + pageInfo: PageInfo! + edges: [WarehouseCountableEdge!]! + + """ + A total count of items in the collection. + """ + totalCount: Int +} + +type WarehouseCountableEdge { + """ + The item at the end of the edge. + """ + node: Warehouse! + + """ + A cursor for use in pagination. + """ + cursor: String! } """ -Updates the account of the logged-in user. +Creates new warehouse. """ -type AccountUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! +type WarehouseCreate { + warehouseErrors: [WarehouseError!]! @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Use errors field instead. This field will be removed in Saleor 4.0." ) - accountErrors: [AccountError!]! - user: User + errors: [WarehouseError!]! + warehouse: Warehouse } -input AccountInput { +input WarehouseCreateInput { """ - Given name. + Warehouse slug. """ - firstName: String + slug: String """ - Family name. + Company name. """ - lastName: String + companyName: String """ - Billing address of the customer. - """ - defaultBillingAddress: AddressInput - - """ - Shipping address of the customer. - """ - defaultShippingAddress: AddressInput - - """ - User language code. - """ - languageCode: LanguageCodeEnum -} - -""" -Sends an email with the account removal link for the logged-in user. -""" -type AccountRequestDeletion { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - accountErrors: [AccountError!]! -} - -""" -Remove user account. -""" -type AccountDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - accountErrors: [AccountError!]! - user: User -} - -""" -Creates user address. -""" -type AddressCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - A user instance for which the address was created. - """ - user: User - accountErrors: [AccountError!]! - address: Address -} - -""" -Updates an address. -""" -type AddressUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - A user object for which the address was edited. - """ - user: User - accountErrors: [AccountError!]! - address: Address -} - -""" -Deletes an address. -""" -type AddressDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - A user instance for which the address was deleted. - """ - user: User - accountErrors: [AccountError!]! - address: Address -} - -""" -Sets a default address for the given user. -""" -type AddressSetDefault { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - An updated user instance. - """ - user: User - accountErrors: [AccountError!]! -} - -""" -Creates a new customer. -""" -type CustomerCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - accountErrors: [AccountError!]! - user: User -} - -input UserCreateInput { - """ - Billing address of the customer. - """ - defaultBillingAddress: AddressInput - - """ - Shipping address of the customer. - """ - defaultShippingAddress: AddressInput - - """ - Given name. - """ - firstName: String - - """ - Family name. - """ - lastName: String - - """ - The unique email address of the user. + The email address of the warehouse. """ email: String """ - User account is active. + Warehouse name. """ - isActive: Boolean + name: String! """ - A note about the user. + Address of the warehouse. """ - note: String + address: WarehouseAddressInput! """ - User language code. + Shipping zones supported by the warehouse. """ - languageCode: LanguageCodeEnum - - """ - URL of a view where users should be redirected to set the password. URL in RFC 1808 format. - """ - redirectUrl: String + shippingZones: [ID] } """ -Updates an existing customer. +Deletes selected warehouse. """ -type CustomerUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! +type WarehouseDelete { + warehouseErrors: [WarehouseError!]! @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." + reason: "Use errors field instead. This field will be removed in Saleor 4.0." ) - accountErrors: [AccountError!]! - user: User + errors: [WarehouseError!]! + warehouse: Warehouse } -input CustomerInput { - """ - Billing address of the customer. - """ - defaultBillingAddress: AddressInput - - """ - Shipping address of the customer. - """ - defaultShippingAddress: AddressInput - - """ - Given name. - """ - firstName: String - - """ - Family name. - """ - lastName: String - - """ - The unique email address of the user. - """ - email: String - - """ - User account is active. - """ - isActive: Boolean - - """ - A note about the user. - """ - note: String - - """ - User language code. - """ - languageCode: LanguageCodeEnum -} - -""" -Deletes a customer. -""" -type CustomerDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - accountErrors: [AccountError!]! - user: User -} - -""" -Deletes customers. -""" -type CustomerBulkDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Returns how many objects were affected. - """ - count: Int! - accountErrors: [AccountError!]! -} - -""" -Creates a new staff user. -""" -type StaffCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - staffErrors: [StaffError!]! - user: User -} - -type StaffError { +type WarehouseError { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -20077,330 +18920,478 @@ type StaffError { """ The error code. """ - code: AccountErrorCode! - - """ - List of permissions which causes the error. - """ - permissions: [PermissionEnum!] - - """ - List of permission group IDs which cause the error. - """ - groups: [ID!] - - """ - List of user IDs which causes the error. - """ - users: [ID!] -} - -input StaffCreateInput { - """ - Given name. - """ - firstName: String - - """ - Family name. - """ - lastName: String - - """ - The unique email address of the user. - """ - email: String - - """ - User account is active. - """ - isActive: Boolean - - """ - A note about the user. - """ - note: String - - """ - List of permission group IDs to which user should be assigned. - """ - addGroups: [ID!] - - """ - URL of a view where users should be redirected to set the password. URL in RFC 1808 format. - """ - redirectUrl: String -} - -""" -Updates an existing staff user. -""" -type StaffUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - staffErrors: [StaffError!]! - user: User -} - -input StaffUpdateInput { - """ - Given name. - """ - firstName: String - - """ - Family name. - """ - lastName: String - - """ - The unique email address of the user. - """ - email: String - - """ - User account is active. - """ - isActive: Boolean - - """ - A note about the user. - """ - note: String - - """ - List of permission group IDs to which user should be assigned. - """ - addGroups: [ID!] - - """ - List of permission group IDs from which user should be unassigned. - """ - removeGroups: [ID!] -} - -""" -Deletes a staff user. -""" -type StaffDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - staffErrors: [StaffError!]! - user: User -} - -""" -Deletes staff users. -""" -type StaffBulkDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Returns how many objects were affected. - """ - count: Int! - staffErrors: [StaffError!]! -} - -""" -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 -""" -type UserAvatarUpdate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - An updated user instance. - """ - user: User - accountErrors: [AccountError!]! -} - -""" -Deletes a user avatar. Only for staff members. -""" -type UserAvatarDelete { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - An updated user instance. - """ - user: User - accountErrors: [AccountError!]! -} - -""" -Activate or deactivate users. -""" -type UserBulkSetActive { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - - """ - Returns how many objects were affected. - """ - count: Int! - accountErrors: [AccountError!]! -} - -""" -Create new permission group. -""" -type PermissionGroupCreate { - """ - List of errors that occurred executing the mutation. - """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - permissionGroupErrors: [PermissionGroupError!]! - group: Group -} - -type PermissionGroupError { - """ - Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. - """ - field: String - - """ - The error message. - """ - message: String - - """ - The error code. - """ - code: PermissionGroupErrorCode! - - """ - List of permissions which causes the error. - """ - permissions: [PermissionEnum!] - - """ - List of user IDs which causes the error. - """ - users: [ID!] + code: WarehouseErrorCode! } """ An enumeration. """ -enum PermissionGroupErrorCode { - ASSIGN_NON_STAFF_MEMBER - DUPLICATED_INPUT_ITEM - CANNOT_REMOVE_FROM_LAST_GROUP - LEFT_NOT_MANAGEABLE_PERMISSION - OUT_OF_SCOPE_PERMISSION - OUT_OF_SCOPE_USER +enum WarehouseErrorCode { + ALREADY_EXISTS + GRAPHQL_ERROR + INVALID + NOT_FOUND REQUIRED UNIQUE } -input PermissionGroupCreateInput { +input WarehouseFilterInput { + search: String + ids: [ID] +} + +""" +Add shipping zone to given warehouse. +""" +type WarehouseShippingZoneAssign { + warehouseErrors: [WarehouseError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [WarehouseError!]! + warehouse: Warehouse +} + +""" +Remove shipping zone from given warehouse. +""" +type WarehouseShippingZoneUnassign { + warehouseErrors: [WarehouseError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [WarehouseError!]! + warehouse: Warehouse +} + +enum WarehouseSortField { """ - List of permission code names to assign to this group. + Sort warehouses by name. """ - addPermissions: [PermissionEnum!] + NAME +} + +input WarehouseSortingInput { + """ + Specifies the direction in which to sort products. + """ + direction: OrderDirection! """ - List of users to assign to this group. + Sort warehouses by the selected field. """ - addUsers: [ID!] + field: WarehouseSortField! +} + +""" +Updates given warehouse. +""" +type WarehouseUpdate { + warehouseErrors: [WarehouseError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [WarehouseError!]! + warehouse: Warehouse +} + +input WarehouseUpdateInput { + """ + Warehouse slug. + """ + slug: String """ - Group name. + Company name. + """ + companyName: String + + """ + The email address of the warehouse. + """ + email: String + + """ + Warehouse name. + """ + name: String + + """ + Address of the warehouse. + """ + address: WarehouseAddressInput +} + +""" +Webhook. +""" +type Webhook implements Node { + name: String! + targetUrl: String! + isActive: Boolean! + secretKey: String + + """ + The ID of the object. + """ + id: ID! + + """ + List of webhook events. + """ + events: [WebhookEvent!]! + app: App! +} + +""" +Creates a new webhook subscription. +""" +type WebhookCreate { + webhookErrors: [WebhookError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [WebhookError!]! + webhook: Webhook +} + +input WebhookCreateInput { + """ + The name of the webhook. + """ + name: String + + """ + The url to receive the payload. + """ + targetUrl: String + + """ + The events that webhook wants to subscribe. + """ + events: [WebhookEventTypeEnum] + + """ + ID of the app to which webhook belongs. + """ + app: ID + + """ + Determine if webhook will be set active or not. + """ + isActive: Boolean + + """ + The secret key used to create a hash signature with each payload. + """ + secretKey: String +} + +""" +Deletes a webhook subscription. +""" +type WebhookDelete { + webhookErrors: [WebhookError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [WebhookError!]! + webhook: Webhook +} + +type WebhookError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """ + The error message. + """ + message: String + + """ + The error code. + """ + code: WebhookErrorCode! +} + +""" +An enumeration. +""" +enum WebhookErrorCode { + GRAPHQL_ERROR + INVALID + NOT_FOUND + REQUIRED + UNIQUE +} + +""" +Webhook event. +""" +type WebhookEvent { + """ + Internal name of the event type. + """ + eventType: WebhookEventTypeEnum! + + """ + Display name of the event. """ name: String! } """ -Update permission group. +Enum determining type of webhook. """ -type PermissionGroupUpdate { +enum WebhookEventTypeEnum { """ - List of errors that occurred executing the mutation. + All the events. """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - permissionGroupErrors: [PermissionGroupError!]! - group: Group + ANY_EVENTS + + """ + A new order is placed. + """ + ORDER_CREATED + + """ + 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 + + """ + Payment is made and an order is fully paid. + """ + ORDER_FULLY_PAID + + """ + An order is updated; triggered for all changes related to an order; covers all other order webhooks, except for ORDER_CREATED. + """ + ORDER_UPDATED + + """ + An order is cancelled. + """ + ORDER_CANCELLED + + """ + An order is fulfilled. + """ + ORDER_FULFILLED + + """ + An invoice for order requested. + """ + INVOICE_REQUESTED + + """ + An invoice is deleted. + """ + INVOICE_DELETED + + """ + Invoice has been sent. + """ + INVOICE_SENT + + """ + A new customer account is created. + """ + CUSTOMER_CREATED + + """ + A customer account is updated. + """ + CUSTOMER_UPDATED + + """ + A new product is created. + """ + PRODUCT_CREATED + + """ + A product is updated. + """ + PRODUCT_UPDATED + + """ + A product is deleted. + """ + PRODUCT_DELETED + + """ + A new product variant is created. + """ + PRODUCT_VARIANT_CREATED + + """ + A product variant is updated. + """ + PRODUCT_VARIANT_UPDATED + + """ + A product variant is deleted. + """ + PRODUCT_VARIANT_DELETED + + """ + A new checkout is created. + """ + CHECKOUT_CREATED + + """ + A checkout is updated. It also triggers all updates related to the checkout. + """ + CHECKOUT_UPDATED + + """ + A new fulfillment is created. + """ + FULFILLMENT_CREATED + + """ + User notification triggered. + """ + NOTIFY_USER + + """ + A new page is created. + """ + PAGE_CREATED + + """ + A page is updated. + """ + PAGE_UPDATED + + """ + A page is deleted. + """ + PAGE_DELETED } -input PermissionGroupUpdateInput { - """ - List of permission code names to assign to this group. - """ - addPermissions: [PermissionEnum!] +""" +An enumeration. +""" +enum WebhookSampleEventTypeEnum { + ORDER_CREATED + ORDER_CONFIRMED + ORDER_FULLY_PAID + ORDER_UPDATED + ORDER_CANCELLED + ORDER_FULFILLED + INVOICE_REQUESTED + INVOICE_DELETED + INVOICE_SENT + CUSTOMER_CREATED + CUSTOMER_UPDATED + PRODUCT_CREATED + PRODUCT_UPDATED + PRODUCT_DELETED + PRODUCT_VARIANT_CREATED + PRODUCT_VARIANT_UPDATED + PRODUCT_VARIANT_DELETED + CHECKOUT_CREATED + CHECKOUT_UPDATED + FULFILLMENT_CREATED + NOTIFY_USER + PAGE_CREATED + PAGE_UPDATED + PAGE_DELETED +} - """ - List of users to assign to this group. - """ - addUsers: [ID!] +""" +Updates a webhook subscription. +""" +type WebhookUpdate { + webhookErrors: [WebhookError!]! + @deprecated( + reason: "Use errors field instead. This field will be removed in Saleor 4.0." + ) + errors: [WebhookError!]! + webhook: Webhook +} +input WebhookUpdateInput { """ - Group name. + The new name of the webhook. """ name: String """ - List of permission code names to unassign from this group. + The url to receive the payload. """ - removePermissions: [PermissionEnum!] + targetUrl: String """ - List of users to unassign from this group. + The events that webhook wants to subscribe. """ - removeUsers: [ID!] + events: [WebhookEventTypeEnum] + + """ + ID of the app to which webhook belongs. + """ + app: ID + + """ + Determine if webhook will be set active or not. + """ + isActive: Boolean + + """ + Use to create a hash signature with each payload. + """ + secretKey: String } """ -Delete permission group. +Represents weight value in a specific weight unit. """ -type PermissionGroupDelete { +type Weight { """ - List of errors that occurred executing the mutation. + Weight unit. """ - errors: [Error!]! - @deprecated( - reason: "Use typed errors with error codes. This field will be removed after 2020-07-31." - ) - permissionGroupErrors: [PermissionGroupError!]! - group: Group + unit: WeightUnitsEnum! + + """ + Weight value. + """ + value: Float! +} + +scalar WeightScalar + +""" +An enumeration. +""" +enum WeightUnitsEnum { + KG + LB + OZ + G +} + +""" +Anything +""" +scalar _Any + +union _Entity = + Address + | User + | Group + | App + | ProductVariant + | Product + | ProductType + | Collection + | Category + | ProductMedia + | ProductImage + | PageType + +type _Service { + sdl: String }