UNPKG

@saleor/sdk

Version:
1,465 lines (1,322 loc) 357 kB
export type Maybe<T> = T | null; export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] }; export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> }; export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: string; String: string; 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. * * 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). */ JSONString: any; /** * Positive Decimal scalar implementation. * * Should be used in places where value must be positive. */ PositiveDecimal: 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; WeightScalar: any; /** Anything */ _Any: any; }; /** Create a new address for the customer. */ export type AccountAddressCreate = { /** A user instance for which the address was created. */ user: Maybe<User>; /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ accountErrors: Array<AccountError>; errors: Array<AccountError>; address: Maybe<Address>; }; /** Delete an address of the logged-in user. */ export type AccountAddressDelete = { /** A user instance for which the address was deleted. */ user: Maybe<User>; /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ accountErrors: Array<AccountError>; errors: Array<AccountError>; address: Maybe<Address>; }; /** Updates an address of the logged-in user. */ export type AccountAddressUpdate = { /** A user object for which the address was edited. */ user: Maybe<User>; /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ accountErrors: Array<AccountError>; errors: Array<AccountError>; address: Maybe<Address>; }; /** Remove user account. */ export type AccountDelete = { /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ accountErrors: Array<AccountError>; errors: Array<AccountError>; user: Maybe<User>; }; export 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: Maybe<Scalars['String']>; /** The error message. */ message: Maybe<Scalars['String']>; /** The error code. */ code: AccountErrorCode; /** A type of address that causes the error. */ addressType: Maybe<AddressTypeEnum>; }; /** An enumeration. */ export type 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' | 'CHANNEL_INACTIVE' | 'MISSING_CHANNEL_SLUG'; export type AccountInput = { /** Given name. */ firstName?: Maybe<Scalars['String']>; /** Family name. */ lastName?: Maybe<Scalars['String']>; /** Billing address of the customer. */ defaultBillingAddress?: Maybe<AddressInput>; /** Shipping address of the customer. */ defaultShippingAddress?: Maybe<AddressInput>; /** User language code. */ languageCode?: Maybe<LanguageCodeEnum>; }; /** Register a new user. */ export type AccountRegister = { /** Informs whether users need to confirm their email address. */ requiresConfirmation: Maybe<Scalars['Boolean']>; /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ accountErrors: Array<AccountError>; errors: Array<AccountError>; user: Maybe<User>; }; 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<Scalars['String']>; /** User language code. */ languageCode?: Maybe<LanguageCodeEnum>; /** User public metadata. */ metadata?: Maybe<Array<MetadataInput>>; /** Slug of a channel which will be used to notify users. Optional when only one channel exists. */ channel?: Maybe<Scalars['String']>; }; /** Sends an email with the account removal link for the logged-in user. */ export type AccountRequestDeletion = { /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ accountErrors: Array<AccountError>; errors: Array<AccountError>; }; /** Sets a default address for the authenticated user. */ export type AccountSetDefaultAddress = { /** An updated user instance. */ user: Maybe<User>; /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ accountErrors: Array<AccountError>; errors: Array<AccountError>; }; /** Updates the account of the logged-in user. */ export type AccountUpdate = { /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ accountErrors: Array<AccountError>; errors: Array<AccountError>; user: Maybe<User>; }; /** Represents user address data. */ export type Address = Node & { /** 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<Scalars['String']>; /** Address is user's default shipping address. */ isDefaultShippingAddress: Maybe<Scalars['Boolean']>; /** Address is user's default billing address. */ isDefaultBillingAddress: Maybe<Scalars['Boolean']>; }; /** Creates user address. */ export type AddressCreate = { /** A user instance for which the address was created. */ user: Maybe<User>; /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ accountErrors: Array<AccountError>; errors: Array<AccountError>; address: Maybe<Address>; }; /** Deletes an address. */ export type AddressDelete = { /** A user instance for which the address was deleted. */ user: Maybe<User>; /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ accountErrors: Array<AccountError>; errors: Array<AccountError>; address: Maybe<Address>; }; export type AddressInput = { /** Given name. */ firstName?: Maybe<Scalars['String']>; /** Family name. */ lastName?: Maybe<Scalars['String']>; /** Company or organization. */ companyName?: Maybe<Scalars['String']>; /** Address. */ streetAddress1?: Maybe<Scalars['String']>; /** Address. */ streetAddress2?: Maybe<Scalars['String']>; /** City. */ city?: Maybe<Scalars['String']>; /** District. */ cityArea?: Maybe<Scalars['String']>; /** Postal code. */ postalCode?: Maybe<Scalars['String']>; /** Country. */ country?: Maybe<CountryCode>; /** State or province. */ countryArea?: Maybe<Scalars['String']>; /** Phone number. */ phone?: Maybe<Scalars['String']>; }; /** Sets a default address for the given user. */ export type AddressSetDefault = { /** An updated user instance. */ user: Maybe<User>; /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ accountErrors: Array<AccountError>; errors: Array<AccountError>; }; /** An enumeration. */ export type AddressTypeEnum = | 'BILLING' | 'SHIPPING'; /** Updates an address. */ export type AddressUpdate = { /** A user object for which the address was edited. */ user: Maybe<User>; /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ accountErrors: Array<AccountError>; errors: Array<AccountError>; address: Maybe<Address>; }; export type AddressValidationData = { countryCode: Maybe<Scalars['String']>; countryName: Maybe<Scalars['String']>; addressFormat: Maybe<Scalars['String']>; addressLatinFormat: Maybe<Scalars['String']>; allowedFields: Maybe<Array<Maybe<Scalars['String']>>>; requiredFields: Maybe<Array<Maybe<Scalars['String']>>>; upperFields: Maybe<Array<Maybe<Scalars['String']>>>; countryAreaType: Maybe<Scalars['String']>; countryAreaChoices: Maybe<Array<Maybe<ChoiceValue>>>; cityType: Maybe<Scalars['String']>; cityChoices: Maybe<Array<Maybe<ChoiceValue>>>; cityAreaType: Maybe<Scalars['String']>; cityAreaChoices: Maybe<Array<Maybe<ChoiceValue>>>; postalCodeType: Maybe<Scalars['String']>; postalCodeMatchers: Maybe<Array<Maybe<Scalars['String']>>>; postalCodeExamples: Maybe<Array<Maybe<Scalars['String']>>>; postalCodePrefix: Maybe<Scalars['String']>; }; /** Represents allocation. */ export type Allocation = Node & { /** The ID of the object. */ id: Scalars['ID']; /** Quantity allocated for orders. */ quantity: Scalars['Int']; /** The warehouse were items were allocated. */ warehouse: Warehouse; }; /** Represents app data. */ export type App = Node & ObjectWithMetadata & { /** The ID of the object. */ id: Scalars['ID']; /** Name of the app. */ name: Maybe<Scalars['String']>; /** The date and time when the app was created. */ created: Maybe<Scalars['DateTime']>; /** Determine if app will be set active or not. */ isActive: Maybe<Scalars['Boolean']>; /** List of the app's permissions. */ permissions: Maybe<Array<Maybe<Permission>>>; /** Last 4 characters of the tokens. */ tokens: Maybe<Array<Maybe<AppToken>>>; /** List of private metadata items.Requires proper staff permissions to access. */ privateMetadata: Array<Maybe<MetadataItem>>; /** List of public metadata items. Can be accessed without permissions. */ metadata: Array<Maybe<MetadataItem>>; /** Type of the app. */ type: Maybe<AppTypeEnum>; /** List of webhooks assigned to this app. */ webhooks: Maybe<Array<Maybe<Webhook>>>; /** Description of this app. */ aboutApp: Maybe<Scalars['String']>; /** Description of the data privacy defined for this app. */ dataPrivacy: Maybe<Scalars['String']>; /** Url to details about the privacy policy on the app owner page. */ dataPrivacyUrl: Maybe<Scalars['String']>; /** Homepage of the app. */ homepageUrl: Maybe<Scalars['String']>; /** Support page for the app. */ supportUrl: Maybe<Scalars['String']>; /** Url to iframe with the configuration for the app. */ configurationUrl: Maybe<Scalars['String']>; /** Url to iframe with the app. */ appUrl: Maybe<Scalars['String']>; /** Version number of the app. */ version: Maybe<Scalars['String']>; /** JWT token used to authenticate by thridparty app. */ accessToken: Maybe<Scalars['String']>; }; /** Activate the app. */ export type AppActivate = { /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ appErrors: Array<AppError>; errors: Array<AppError>; app: Maybe<App>; }; export type AppCountableConnection = { /** Pagination data for this connection. */ pageInfo: PageInfo; edges: Array<AppCountableEdge>; /** A total count of items in the collection. */ totalCount: Maybe<Scalars['Int']>; }; export type 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 = { /** The newly created authentication token. */ authToken: Maybe<Scalars['String']>; /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ appErrors: Array<AppError>; errors: Array<AppError>; app: Maybe<App>; }; /** Deactivate the app. */ export type AppDeactivate = { /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ appErrors: Array<AppError>; errors: Array<AppError>; app: Maybe<App>; }; /** Deletes an app. */ export type AppDelete = { /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ appErrors: Array<AppError>; errors: Array<AppError>; app: Maybe<App>; }; /** Delete failed installation. */ export type AppDeleteFailedInstallation = { /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ appErrors: Array<AppError>; errors: Array<AppError>; appInstallation: Maybe<AppInstallation>; }; export 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: Maybe<Scalars['String']>; /** The error message. */ message: Maybe<Scalars['String']>; /** The error code. */ code: AppErrorCode; /** List of permissions which causes the error. */ permissions: Maybe<Array<PermissionEnum>>; }; /** An enumeration. */ export type 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. */ export type AppFetchManifest = { manifest: Maybe<Manifest>; /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ appErrors: Array<AppError>; errors: Array<AppError>; }; export type AppFilterInput = { search?: Maybe<Scalars['String']>; isActive?: Maybe<Scalars['Boolean']>; type?: Maybe<AppTypeEnum>; }; export type AppInput = { /** Name of the app. */ name?: Maybe<Scalars['String']>; /** List of permission code names to assign to this app. */ permissions?: Maybe<Array<Maybe<PermissionEnum>>>; }; /** Install new app by using app manifest. */ export type AppInstall = { /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ appErrors: Array<AppError>; errors: Array<AppError>; appInstallation: Maybe<AppInstallation>; }; export type AppInstallInput = { /** Name of the app to install. */ appName?: Maybe<Scalars['String']>; /** Url to app's manifest in JSON format. */ manifestUrl?: Maybe<Scalars['String']>; /** Determine if app will be set active or not. */ activateAfterInstallation?: Maybe<Scalars['Boolean']>; /** List of permission code names to assign to this app. */ permissions?: Maybe<Array<Maybe<PermissionEnum>>>; }; /** Represents ongoing installation of app. */ export type AppInstallation = Node & Job & { 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<Scalars['String']>; }; /** Retry failed installation of new app. */ export type AppRetryInstall = { /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ appErrors: Array<AppError>; errors: Array<AppError>; appInstallation: Maybe<AppInstallation>; }; export type AppSortField = /** Sort apps by name. */ | 'NAME' /** Sort apps by creation date. */ | '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. */ export type AppToken = Node & { /** Name of the authenticated token. */ name: Maybe<Scalars['String']>; /** Last 4 characters of the token. */ authToken: Maybe<Scalars['String']>; /** The ID of the object. */ id: Scalars['ID']; }; /** Creates a new token. */ export type AppTokenCreate = { /** The newly created authentication token. */ authToken: Maybe<Scalars['String']>; /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ appErrors: Array<AppError>; errors: Array<AppError>; appToken: Maybe<AppToken>; }; /** Deletes an authentication token assigned to app. */ export type AppTokenDelete = { /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ appErrors: Array<AppError>; errors: Array<AppError>; appToken: Maybe<AppToken>; }; export type AppTokenInput = { /** Name of the token. */ name?: Maybe<Scalars['String']>; /** ID of app. */ app: Scalars['ID']; }; /** Verify provided app token. */ export type 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<AppError>; errors: Array<AppError>; }; /** Enum determining type of your App. */ export type AppTypeEnum = /** Local Saleor App. The app is fully manageable from dashboard. You can change assigned permissions, add webhooks, or authentication token */ | 'LOCAL' /** Third party external App. Installation is fully automated. Saleor uses a defined App manifest to gather all required information. */ | 'THIRDPARTY'; /** Updates an existing app. */ export type AppUpdate = { /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ appErrors: Array<AppError>; errors: Array<AppError>; app: Maybe<App>; }; /** An enumeration. */ export type AreaUnitsEnum = | 'SQ_CM' | 'SQ_M' | 'SQ_KM' | 'SQ_FT' | 'SQ_YD' | 'SQ_INCH'; /** Assigns storefront's navigation menus. */ export type AssignNavigation = { /** Assigned navigation menu. */ menu: Maybe<Menu>; /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ menuErrors: Array<MenuError>; errors: Array<MenuError>; }; /** Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. */ export type Attribute = Node & ObjectWithMetadata & { /** The ID of the object. */ id: Scalars['ID']; productTypes: ProductTypeCountableConnection; productVariantTypes: ProductTypeCountableConnection; /** List of private metadata items.Requires proper staff permissions to access. */ privateMetadata: Array<Maybe<MetadataItem>>; /** List of public metadata items. Can be accessed without permissions. */ metadata: Array<Maybe<MetadataItem>>; /** The input type to use for entering attribute values in the dashboard. */ inputType: Maybe<AttributeInputTypeEnum>; /** The entity type which can be used as a reference. */ entityType: Maybe<AttributeEntityTypeEnum>; /** Name of an attribute displayed in the interface. */ name: Maybe<Scalars['String']>; /** Internal representation of an attribute name. */ slug: Maybe<Scalars['String']>; /** The attribute type. */ type: Maybe<AttributeTypeEnum>; /** The unit of attribute values. */ unit: Maybe<MeasurementUnitsEnum>; /** List of attribute's values. */ choices: Maybe<AttributeValueCountableConnection>; /** Whether the attribute requires values to be passed or not. */ valueRequired: Scalars['Boolean']; /** Whether the attribute should be visible or not in storefront. */ visibleInStorefront: Scalars['Boolean']; /** Whether the attribute can be filtered in storefront. */ filterableInStorefront: Scalars['Boolean']; /** Whether the attribute can be filtered in dashboard. */ filterableInDashboard: Scalars['Boolean']; /** Whether the attribute can be displayed in the admin product list. */ availableInGrid: Scalars['Boolean']; /** Returns translated attribute fields for the given language code. */ translation: Maybe<AttributeTranslation>; /** The position of the attribute in the storefront navigation (0 by default). */ storefrontSearchPosition: Scalars['Int']; }; /** Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. */ export type AttributeProductTypesArgs = { before?: Maybe<Scalars['String']>; after?: Maybe<Scalars['String']>; first?: Maybe<Scalars['Int']>; last?: Maybe<Scalars['Int']>; }; /** Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. */ export type AttributeProductVariantTypesArgs = { before?: Maybe<Scalars['String']>; after?: Maybe<Scalars['String']>; first?: Maybe<Scalars['Int']>; last?: Maybe<Scalars['Int']>; }; /** Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. */ export type AttributeChoicesArgs = { sortBy?: Maybe<AttributeChoicesSortingInput>; filter?: Maybe<AttributeValueFilterInput>; before?: Maybe<Scalars['String']>; after?: Maybe<Scalars['String']>; first?: Maybe<Scalars['Int']>; last?: Maybe<Scalars['Int']>; }; /** Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. */ export type AttributeTranslationArgs = { languageCode: LanguageCodeEnum; }; /** Deletes attributes. */ export type 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<AttributeError>; errors: Array<AttributeError>; }; export type AttributeChoicesSortField = /** Sort attribute choice by name. */ | 'NAME' /** Sort attribute choice by slug. */ | 'SLUG'; export type AttributeChoicesSortingInput = { /** Specifies the direction in which to sort products. */ direction: OrderDirection; /** Sort attribute choices by the selected field. */ field: AttributeChoicesSortField; }; export type AttributeCountableConnection = { /** Pagination data for this connection. */ pageInfo: PageInfo; edges: Array<AttributeCountableEdge>; /** A total count of items in the collection. */ totalCount: Maybe<Scalars['Int']>; }; export type AttributeCountableEdge = { /** The item at the end of the edge. */ node: Attribute; /** A cursor for use in pagination. */ cursor: Scalars['String']; }; /** Creates an attribute. */ export type AttributeCreate = { attribute: Maybe<Attribute>; /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ attributeErrors: Array<AttributeError>; errors: Array<AttributeError>; }; export type AttributeCreateInput = { /** The input type to use for entering attribute values in the dashboard. */ inputType?: Maybe<AttributeInputTypeEnum>; /** The entity type which can be used as a reference. */ entityType?: Maybe<AttributeEntityTypeEnum>; /** Name of an attribute displayed in the interface. */ name: Scalars['String']; /** Internal representation of an attribute name. */ slug?: Maybe<Scalars['String']>; /** The attribute type. */ type: AttributeTypeEnum; /** The unit of attribute values. */ unit?: Maybe<MeasurementUnitsEnum>; /** List of attribute's values. */ values?: Maybe<Array<Maybe<AttributeValueCreateInput>>>; /** Whether the attribute requires values to be passed or not. */ valueRequired?: Maybe<Scalars['Boolean']>; /** Whether the attribute is for variants only. */ isVariantOnly?: Maybe<Scalars['Boolean']>; /** Whether the attribute should be visible or not in storefront. */ visibleInStorefront?: Maybe<Scalars['Boolean']>; /** Whether the attribute can be filtered in storefront. */ filterableInStorefront?: Maybe<Scalars['Boolean']>; /** Whether the attribute can be filtered in dashboard. */ filterableInDashboard?: Maybe<Scalars['Boolean']>; /** The position of the attribute in the storefront navigation (0 by default). */ storefrontSearchPosition?: Maybe<Scalars['Int']>; /** Whether the attribute can be displayed in the admin product list. */ availableInGrid?: Maybe<Scalars['Boolean']>; }; /** Deletes an attribute. */ export type AttributeDelete = { /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ attributeErrors: Array<AttributeError>; errors: Array<AttributeError>; attribute: Maybe<Attribute>; }; /** An enumeration. */ export type AttributeEntityTypeEnum = | 'PAGE' | 'PRODUCT'; export 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: Maybe<Scalars['String']>; /** The error message. */ message: Maybe<Scalars['String']>; /** The error code. */ code: AttributeErrorCode; }; /** An enumeration. */ export type AttributeErrorCode = | 'ALREADY_EXISTS' | 'GRAPHQL_ERROR' | 'INVALID' | 'NOT_FOUND' | 'REQUIRED' | 'UNIQUE'; export type AttributeFilterInput = { valueRequired?: Maybe<Scalars['Boolean']>; isVariantOnly?: Maybe<Scalars['Boolean']>; visibleInStorefront?: Maybe<Scalars['Boolean']>; filterableInStorefront?: Maybe<Scalars['Boolean']>; filterableInDashboard?: Maybe<Scalars['Boolean']>; availableInGrid?: Maybe<Scalars['Boolean']>; metadata?: Maybe<Array<Maybe<MetadataFilter>>>; search?: Maybe<Scalars['String']>; ids?: Maybe<Array<Maybe<Scalars['ID']>>>; type?: Maybe<AttributeTypeEnum>; inCollection?: Maybe<Scalars['ID']>; inCategory?: Maybe<Scalars['ID']>; }; export type AttributeInput = { /** Internal representation of an attribute name. */ slug: Scalars['String']; /** Internal representation of a value (unique per attribute). */ values?: Maybe<Array<Maybe<Scalars['String']>>>; /** The range that the returned values should be in. */ valuesRange?: Maybe<IntRangeInput>; /** The boolean value of the attribute. */ boolean?: Maybe<Scalars['Boolean']>; }; /** An enumeration. */ export type AttributeInputTypeEnum = | 'DROPDOWN' | 'MULTISELECT' | 'FILE' | 'REFERENCE' | 'NUMERIC' | 'RICH_TEXT' | 'BOOLEAN'; /** Reorder the values of an attribute. */ export type AttributeReorderValues = { /** Attribute from which values are reordered. */ attribute: Maybe<Attribute>; /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ attributeErrors: Array<AttributeError>; errors: Array<AttributeError>; }; export type 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'; 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 & { /** The ID of the object. */ id: Scalars['ID']; name: Scalars['String']; /** Returns translated attribute fields for the given language code. */ translation: Maybe<AttributeTranslation>; /** * Custom attribute of a product. * @deprecated Will be removed in Saleor 4.0. Get model fields from the root level. */ attribute: Maybe<Attribute>; }; export type AttributeTranslatableContentTranslationArgs = { languageCode: LanguageCodeEnum; }; /** Creates/Updates translations for attribute. */ export type AttributeTranslate = { /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ translationErrors: Array<TranslationError>; errors: Array<TranslationError>; attribute: Maybe<Attribute>; }; export type AttributeTranslation = Node & { /** The ID of the object. */ id: Scalars['ID']; name: Scalars['String']; /** Translation language. */ language: LanguageDisplay; }; /** An enumeration. */ export type AttributeTypeEnum = | 'PRODUCT_TYPE' | 'PAGE_TYPE'; /** Updates attribute. */ export type AttributeUpdate = { attribute: Maybe<Attribute>; /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ attributeErrors: Array<AttributeError>; errors: Array<AttributeError>; }; export type AttributeUpdateInput = { /** Name of an attribute displayed in the interface. */ name?: Maybe<Scalars['String']>; /** Internal representation of an attribute name. */ slug?: Maybe<Scalars['String']>; /** The unit of attribute values. */ unit?: Maybe<MeasurementUnitsEnum>; /** IDs of values to be removed from this attribute. */ removeValues?: Maybe<Array<Maybe<Scalars['ID']>>>; /** New values to be created for this attribute. */ addValues?: Maybe<Array<Maybe<AttributeValueCreateInput>>>; /** Whether the attribute requires values to be passed or not. */ valueRequired?: Maybe<Scalars['Boolean']>; /** Whether the attribute is for variants only. */ isVariantOnly?: Maybe<Scalars['Boolean']>; /** Whether the attribute should be visible or not in storefront. */ visibleInStorefront?: Maybe<Scalars['Boolean']>; /** Whether the attribute can be filtered in storefront. */ filterableInStorefront?: Maybe<Scalars['Boolean']>; /** Whether the attribute can be filtered in dashboard. */ filterableInDashboard?: Maybe<Scalars['Boolean']>; /** The position of the attribute in the storefront navigation (0 by default). */ storefrontSearchPosition?: Maybe<Scalars['Int']>; /** Whether the attribute can be displayed in the admin product list. */ availableInGrid?: Maybe<Scalars['Boolean']>; }; /** Represents a value of an attribute. */ export type AttributeValue = Node & { /** The ID of the object. */ id: Scalars['ID']; /** Name of a value displayed in the interface. */ name: Maybe<Scalars['String']>; /** Internal representation of a value (unique per attribute). */ slug: Maybe<Scalars['String']>; /** Represents the value of the attribute value. */ value: Maybe<Scalars['String']>; /** Returns translated attribute value fields for the given language code. */ translation: Maybe<AttributeValueTranslation>; /** The input type to use for entering attribute values in the dashboard. */ inputType: Maybe<AttributeInputTypeEnum>; /** The ID of the attribute reference. */ reference: Maybe<Scalars['ID']>; /** Represents file URL and content type (if attribute value is a file). */ file: Maybe<File>; /** Represents the text (JSON) of the attribute value. */ richText: Maybe<Scalars['JSONString']>; /** Represents the boolean value of the attribute value. */ boolean: Maybe<Scalars['Boolean']>; }; /** Represents a value of an attribute. */ export type AttributeValueTranslationArgs = { languageCode: LanguageCodeEnum; }; /** Deletes values of attributes. */ export type 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<AttributeError>; errors: Array<AttributeError>; }; export type AttributeValueCountableConnection = { /** Pagination data for this connection. */ pageInfo: PageInfo; edges: Array<AttributeValueCountableEdge>; /** A total count of items in the collection. */ totalCount: Maybe<Scalars['Int']>; }; export type AttributeValueCountableEdge = { /** The item at the end of the edge. */ node: AttributeValue; /** A cursor for use in pagination. */ cursor: Scalars['String']; }; /** Creates a value for an attribute. */ export type AttributeValueCreate = { /** The updated attribute. */ attribute: Maybe<Attribute>; /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ attributeErrors: Array<AttributeError>; errors: Array<AttributeError>; attributeValue: Maybe<AttributeValue>; }; export type AttributeValueCreateInput = { /** Name of a value displayed in the interface. */ name: Scalars['String']; /** Represents the value of the attribute value. */ value?: Maybe<Scalars['String']>; /** Represents the text (JSON) of the attribute value. */ richText?: Maybe<Scalars['JSONString']>; }; /** Deletes a value of an attribute. */ export type AttributeValueDelete = { /** The updated attribute. */ attribute: Maybe<Attribute>; /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ attributeErrors: Array<AttributeError>; errors: Array<AttributeError>; attributeValue: Maybe<AttributeValue>; }; export type AttributeValueFilterInput = { search?: Maybe<Scalars['String']>; }; export type AttributeValueInput = { /** ID of the selected attribute. */ id?: Maybe<Scalars['ID']>; /** The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. */ values?: Maybe<Array<Scalars['String']>>; /** URL of the file attribute. Every time, a new value is created. */ file?: Maybe<Scalars['String']>; /** File content type. */ contentType?: Maybe<Scalars['String']>; /** List of entity IDs that will be used as references. */ references?: Maybe<Array<Scalars['ID']>>; /** Text content in JSON format. */ richText?: Maybe<Scalars['JSONString']>; /** Represents the boolean value of the attribute value. */ boolean?: Maybe<Scalars['Boolean']>; }; export type AttributeValueTranslatableContent = Node & { /** The ID of the object. */ id: Scalars['ID']; name: Scalars['String']; /** Returns translated attribute value fields for the given language code. */ translation: Maybe<AttributeValueTranslation>; /** * Represents a value of an attribute. * @deprecated Will be removed in Saleor 4.0. Get model fields from the root level. */ attributeValue: Maybe<AttributeValue>; }; export type AttributeValueTranslatableContentTranslationArgs = { languageCode: LanguageCodeEnum; }; /** Creates/Updates translations for attribute value. */ export type AttributeValueTranslate = { /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ translationErrors: Array<TranslationError>; errors: Array<TranslationError>; attributeValue: Maybe<AttributeValue>; }; export type AttributeValueTranslation = Node & { /** The ID of the object. */ id: Scalars['ID']; name: Scalars['String']; richText: Maybe<Scalars['JSONString']>; /** Translation language. */ language: LanguageDisplay; }; export type AttributeValueTranslationInput = { name?: Maybe<Scalars['String']>; richText?: Maybe<Scalars['JSONString']>; }; /** Updates value of an attribute. */ export type AttributeValueUpdate = { /** The updated attribute. */ attribute: Maybe<Attribute>; /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ attributeErrors: Array<AttributeError>; errors: Array<AttributeError>; attributeValue: Maybe<AttributeValue>; }; export type BulkAttributeValueInput = { /** ID of the selected attribute. */ id?: Maybe<Scalars['ID']>; /** The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. */ values: Array<Scalars['String']>; }; export 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: Maybe<Scalars['String']>; /** The error message. */ message: Maybe<Scalars['String']>; /** The error code. */ code: ProductErrorCode; /** List of attributes IDs which causes the error. */ attributes: Maybe<Array<Scalars['ID']>>; /** List of attribute values IDs which causes the error. */ values: Maybe<Array<Scalars['ID']>>; /** Index of an input list item that caused the error. */ index: Maybe<Scalars['Int']>; /** List of warehouse IDs which causes the error. */ warehouses: Maybe<Array<Scalars['ID']>>; /** List of channel IDs which causes the error. */ channels: Maybe<Array<Scalars['ID']>>; }; export 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: Maybe<Scalars['String']>; /** The error message. */ message: Maybe<Scalars['String']>; /** The error code. */ code: ProductErrorCode; /** List of attributes IDs which causes the error. */ attributes: Maybe<Array<Scalars['ID']>>; /** List of attribute values IDs which causes the error. */ values: Maybe<Array<Scalars['ID']>>; /** Index of an input list item that caused the error. */ index: Maybe<Scalars['Int']>; }; export type CatalogueInput = { /** Products related to the discount. */ products?: Maybe<Array<Maybe<Scalars['ID']>>>; /** Categories related to the discount. */ categories?: Maybe<Array<Maybe<Scalars['ID']>>>; /** Collections related to the discount. */ collections?: Maybe<Array<Maybe<Scalars['ID']>>>; }; /** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ export type Category = Node & ObjectWithMetadata & { /** The ID of the object. */ id: Scalars['ID']; seoTitle: Maybe<Scalars['String']>; seoDescription: Maybe<Scalars['String']>; name: Scalars['String']; description: Maybe<Scalars['JSONString']>; slug: Scalars['String']; parent: Maybe<Category>; level: Scalars['Int']; /** List of private metadata items.Requires proper staff permissions to access. */ privateMetadata: Array<Maybe<MetadataItem>>; /** List of public metadata items. Can be accessed without permissions. */ metadata: Array<Maybe<MetadataItem>>; /** * Description of the category (JSON). * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. */ descriptionJson: Maybe<Scalars['JSONString']>; /** List of ancestors of the category. */ ancestors: Maybe<CategoryCountableConnection>; /** List of products in the category. */ products: Maybe<ProductCountableConnection>; /** List of children of the category. */ children: Maybe<CategoryCountableConnection>; backgroundImage: Maybe<Image>; /** Returns translated category fields for the given language code. */ translation: Maybe<CategoryTranslation>; }; /** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ export type CategoryAncestorsArgs = { before?: Maybe<Scalars['String']>; after?: Maybe<Scalars['String']>; first?: Maybe<Scalars['Int']>; last?: Maybe<Scalars['Int']>; }; /** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ export type CategoryProductsArgs = { channel?: Maybe<Scalars['String']>; before?: Maybe<Scalars['String']>; after?: Maybe<Scalars['String']>; first?: Maybe<Scalars['Int']>; last?: Maybe<Scalars['Int']>; }; /** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ export type CategoryChildrenArgs = { before?: Maybe<Scalars['String']>; after?: Maybe<Scalars['String']>; first?: Maybe<Scalars['Int']>; last?: Maybe<Scalars['Int']>; }; /** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ export type CategoryBackgroundImageArgs = { size?: Maybe<Scalars['Int']>; }; /** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ export type CategoryTranslationArgs = { languageCode: LanguageCodeEnum; }; /** Deletes categories. */ export type 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<ProductError>; errors: Array<ProductError>; }; export type CategoryCountableConnection = { /** Pagination data for this connection. */ pageInfo: PageInfo; edges: Array<CategoryCountableEdge>; /** A total count of items in the collection. */ totalCount: Maybe<Scalars['Int']>; }; export type CategoryCountableEdge = { /** The item at the end of the edge. */ node: Category; /** A cursor for use in pagination. */ cursor: Scalars['String']; }; /** Creates a new category. */ export type CategoryCreate = { /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ productErrors: Array<ProductError>; errors: Array<ProductError>; category: Maybe<Category>; }; /** Deletes a category. */ export type CategoryDelete = { /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ productErrors: Array<ProductError>; errors: Array<ProductError>; category: Maybe<Category>; }; export type CategoryFilterInput = { search?: Maybe<Scalars['String']>; metadata?: Maybe<Array<Maybe<MetadataFilter>>>; ids?: Maybe<Array<Maybe<Scalars['ID']>>>; }; export type CategoryInput = { /** Category description (JSON). */ description?: Maybe<Scalars['JSONString']>; /** Category name. */ name?: Maybe<Scalars['String']>; /** Category slug. */ slug?: Maybe<Scalars['String']>; /** Search engine optimization fields. */ seo?: Maybe<SeoInput>; /** Background image file. */ backgroundImage?: Maybe<Scalars['Upload']>; /** Alt text for a product media. */ backgroundImageAlt?: Maybe<Scalars['String']>; }; export type CategorySortField = /** Sort categories by name. */ | 'NAME' /** Sort categories by product count. */ | 'PRODUCT_COUNT' /** Sort categories by subcategory count. */ | 'SUBCATEGORY_COUNT'; export type CategorySortingInput = { /** Specifies the direction in which to sort products. */ direction: OrderDirection; /** Sort categories by the selected field. */ field: CategorySortField; }; export type CategoryTranslatableContent = Node & { /** The ID of the object. */ id: Scalars['ID']; seoTitle: Maybe<Scalars['String']>; seoDescription: Maybe<Scalars['String']>; name: Scalars['String']; description: Maybe<Scalars['JSONString']>; /** * Description of the category (JSON). * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. */ descriptionJson: Maybe<Scalars['JSONString']>; /** Returns translated category fields for the given language code. */ translation: Maybe<CategoryTranslation>; /** * Represents a single category of products. * @deprecated Will be removed in Saleor 4.0. Get model fields from the root level. */ category: Maybe<Category>; }; export type CategoryTranslatableContentTranslationArgs = { languageCode: LanguageCodeEnum; }; /** Creates/Updates translations for Category. */ export type CategoryTranslate = { /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ translationErrors: Array<TranslationError>; errors: Array<TranslationError>; category: Maybe<Category>; }; export type CategoryTranslation = Node & { /** The ID of the object. */ id: Scalars['ID']; seoTitle: Maybe<Scalars['String']>; seoDescription: Maybe<Scalars['String']>; name: Maybe<Scalars['String']>; description: Maybe<Scalars['JSONString']>; /** 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<Scalars['JSONString']>; }; /** Updates a category. */ export type CategoryUpdate = { /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ productErrors: Array<ProductError>; errors: Array<ProductError>; category: Maybe<Category>; }; /** Represents channel. */ export type Channel = Node & { /** 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']; }; /** Activate a channel. */ export type ChannelActivate = { /** Activated channel. */ channel: Maybe<Channel>; /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ channelErrors: Array<ChannelError>; errors: Array<ChannelError>; }; /** Creates new channel. */ export type ChannelCreate = { /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ channelErrors: Array<ChannelError>; errors: Array<ChannelError>; channel: Maybe<Channel>; }; export type ChannelCreateInput = { /** isActive flag. */ isActive?: Maybe<Scalars['Boolean']>; /** 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<Array<Scalars['ID']>>; }; /** Deactivate a channel. */ export type ChannelDeactivate = { /** Deactivated channel. */ channel: Maybe<Channel>; /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ channelErrors: Array<ChannelError>; errors: Array<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. */ export type ChannelDelete = { /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ channelErrors: Array<ChannelError>; errors: Array<ChannelError>; channel: Maybe<Channel>; }; export type ChannelDeleteInput = { /** ID of channel to migrate orders from origin channel. */ channelId: Scalars['ID']; }; export 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: Maybe<Scalars['String']>; /** The error message. */ message: Maybe<Scalars['String']>; /** The error code. */ code: ChannelErrorCode; /** List of shipping zone IDs which causes the error. */ shippingZones: Maybe<Array<Scalars['ID']>>; }; /** An enumeration. */ export type ChannelErrorCode = | 'ALREADY_EXISTS' | 'GRAPHQL_ERROR' | 'INVALID' | 'NOT_FOUND' | 'REQUIRED' | 'UNIQUE' | 'CHANNELS_CURRENCY_MUST_BE_THE_SAME' | 'CHANNEL_WITH_ORDERS' | 'DUPLICATED_INPUT_ITEM'; /** Update a channel. */ export type ChannelUpdate = { /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ channelErrors: Array<ChannelError>; errors: Array<ChannelError>; channel: Maybe<Channel>; }; export type ChannelUpdateInput = { /** isActive flag. */ isActive?: Maybe<Scalars['Boolean']>; /** Name of the channel. */ name?: Maybe<Scalars['String']>; /** Slug of the channel. */ slug?: Maybe<Scalars['String']>; /** List of shipping zones to assign to the channel. */ addShippingZones?: Maybe<Array<Scalars['ID']>>; /** List of shipping zones to unassign from the channel. */ removeShippingZones?: Maybe<Array<Scalars['ID']>>; }; /** Checkout object. */ export type Checkout = Node & ObjectWithMetadata & { created: Scalars['DateTime']; lastChange: Scalars['DateTime']; user: Maybe<User>; channel: Channel; billingAddress: Maybe<Address>; shippingAddress: Maybe<Address>; note: Scalars['String']; discount: Maybe<Money>; discountName: Maybe<Scalars['String']>; translatedDiscountName: Maybe<Scalars['String']>; voucherCode: Maybe<Scalars['String']>; /** List of gift cards associated with this checkout. */ giftCards: Maybe<Array<Maybe<GiftCard>>>; /** The ID of the object. */ id: Scalars['ID']; /** List of private metadata items.Requires proper staff permissions to access. */ privateMetadata: Array<Maybe<MetadataItem>>; /** List of public metadata items. Can be accessed without permissions. */ metadata: Array<Maybe<MetadataItem>>; /** Shipping methods that can be used with this order. */ availableShippingMethods: Array<Maybe<Shippi