@saleor/sdk
Version:
Saleor TS SDK
1,168 lines (1,167 loc) • 385 kB
TypeScript
export declare type Maybe<T> = T | null;
export declare type Exact<T extends {
[key: string]: unknown;
}> = {
[K in keyof T]: T[K];
};
export declare type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
[SubKey in K]?: Maybe<T[SubKey]>;
};
export declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare type AddressTypeEnum = 'BILLING' | 'SHIPPING';
/** Updates an address. */
export declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare type AppFilterInput = {
search?: Maybe<Scalars['String']>;
isActive?: Maybe<Scalars['Boolean']>;
type?: Maybe<AppTypeEnum>;
};
export declare 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 declare 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 declare 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 declare 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 declare 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 declare type AppSortField =
/** Sort apps by name. */
'NAME'
/** Sort apps by creation date. */
| 'CREATION_DATE';
export declare type AppSortingInput = {
/** Specifies the direction in which to sort products. */
direction: OrderDirection;
/** Sort apps by the selected field. */
field: AppSortField;
};
/** Represents token data. */
export declare 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 declare 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 declare 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 declare type AppTokenInput = {
/** Name of the token. */
name?: Maybe<Scalars['String']>;
/** ID of app. */
app: Scalars['ID'];
};
/** Verify provided app token. */
export declare 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 declare 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 declare 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 declare type AreaUnitsEnum = 'SQ_CM' | 'SQ_M' | 'SQ_KM' | 'SQ_FT' | 'SQ_YD' | 'SQ_INCH';
/** Assigns storefront's navigation menus. */
export declare 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 declare 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 declare 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 declare 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 declare 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 declare type AttributeTranslationArgs = {
languageCode: LanguageCodeEnum;
};
/** Deletes attributes. */
export declare 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 declare type AttributeChoicesSortField =
/** Sort attribute choice by name. */
'NAME'
/** Sort attribute choice by slug. */
| 'SLUG';
export declare type AttributeChoicesSortingInput = {
/** Specifies the direction in which to sort products. */
direction: OrderDirection;
/** Sort attribute choices by the selected field. */
field: AttributeChoicesSortField;
};
export declare 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 declare 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 declare 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 declare 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 declare 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 declare type AttributeEntityTypeEnum = 'PAGE' | 'PRODUCT';
export declare 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 declare type AttributeErrorCode = 'ALREADY_EXISTS' | 'GRAPHQL_ERROR' | 'INVALID' | 'NOT_FOUND' | 'REQUIRED' | 'UNIQUE';
export declare 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 declare 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 declare type AttributeInputTypeEnum = 'DROPDOWN' | 'MULTISELECT' | 'FILE' | 'REFERENCE' | 'NUMERIC' | 'RICH_TEXT' | 'BOOLEAN';
/** Reorder the values of an attribute. */
export declare 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 declare 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 declare type AttributeSortingInput = {
/** Specifies the direction in which to sort products. */
direction: OrderDirection;
/** Sort attributes by the selected field. */
field: AttributeSortField;
};
export declare 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 declare type AttributeTranslatableContentTranslationArgs = {
languageCode: LanguageCodeEnum;
};
/** Creates/Updates translations for attribute. */
export declare 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 declare type AttributeTranslation = Node & {
/** The ID of the object. */
id: Scalars['ID'];
name: Scalars['String'];
/** Translation language. */
language: LanguageDisplay;
};
/** An enumeration. */
export declare type AttributeTypeEnum = 'PRODUCT_TYPE' | 'PAGE_TYPE';
/** Updates attribute. */
export declare 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 declare 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 declare 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 declare type AttributeValueTranslationArgs = {
languageCode: LanguageCodeEnum;
};
/** Deletes values of attributes. */
export declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare type AttributeValueFilterInput = {
search?: Maybe<Scalars['String']>;
};
export declare 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 declare 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 declare type AttributeValueTranslatableContentTranslationArgs = {
languageCode: LanguageCodeEnum;
};
/** Creates/Updates translations for attribute value. */
export declare 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 declare type AttributeValueTranslation = Node & {
/** The ID of the object. */
id: Scalars['ID'];
name: Scalars['String'];
richText: Maybe<Scalars['JSONString']>;
/** Translation language. */
language: LanguageDisplay;
};
export declare type AttributeValueTranslationInput = {
name?: Maybe<Scalars['String']>;
richText?: Maybe<Scalars['JSONString']>;
};
/** Updates value of an attribute. */
export declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare type CategoryTranslationArgs = {
languageCode: LanguageCodeEnum;
};
/** Deletes categories. */
export declare 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 declare 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 declare 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 declare 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 declare 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 declare type CategoryFilterInput = {
search?: Maybe<Scalars['String']>;
metadata?: Maybe<Array<Maybe<MetadataFilter>>>;
ids?: Maybe<Array<Maybe<Scalars['ID']>>>;
};
export declare 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 declare type CategorySortField =
/** Sort categories by name. */
'NAME'
/** Sort categories by product count. */
| 'PRODUCT_COUNT'
/** Sort categories by subcategory count. */
| 'SUBCATEGORY_COUNT';
export declare type CategorySortingInput = {
/** Specifies the direction in which to sort products. */
direction: OrderDirection;
/** Sort categories by the selected field. */
field: CategorySortField;
};
export declare 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 declare type CategoryTranslatableContentTranslationArgs = {
languageCode: LanguageCodeEnum;
};
/** Creates/Updates translations for Category. */
export declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare type ChannelCreateInput = {