Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add more doc categories (#12399)

Marcin Gębalaea2e4916b537
diff --git a/saleor/graphql/account/enums.py b/saleor/graphql/account/enums.py
index 4a584e06aa..d642f9e29e 100644
--- a/saleor/graphql/account/enums.py
+++ b/saleor/graphql/account/enums.py
@@ -9,7 +9,9 @@ from ..core.types import BaseEnum
from ..core.utils import str_to_enum
AddressTypeEnum = to_enum(AddressType, type_name="AddressTypeEnum")
+
CustomerEventsEnum = to_enum(CustomerEvents)
+CustomerEventsEnum.doc_category = DOC_CATEGORY_USERS
CountryCodeEnum = graphene.Enum(
diff --git a/saleor/graphql/account/mutations/base.py b/saleor/graphql/account/mutations/base.py
index ed5111113f..a5b4653a36 100644
--- a/saleor/graphql/account/mutations/base.py
+++ b/saleor/graphql/account/mutations/base.py
@@ -459,6 +459,9 @@ class UserInput(BaseInputObjectType):
is_active = graphene.Boolean(required=False, description="User account is active.")
note = graphene.String(description="A note about the user.")
+ class Meta:
+ doc_category = DOC_CATEGORY_USERS
+
class UserAddressInput(BaseInputObjectType):
default_billing_address = AddressInput(
@@ -468,6 +471,9 @@ class UserAddressInput(BaseInputObjectType):
description="Shipping address of the customer."
)
+ class Meta:
+ doc_category = DOC_CATEGORY_USERS
+
class CustomerInput(UserInput, UserAddressInput):
language_code = graphene.Field(
@@ -477,6 +483,9 @@ class CustomerInput(UserInput, UserAddressInput):
description="External ID of the customer." + ADDED_IN_310, required=False
)
+ class Meta:
+ doc_category = DOC_CATEGORY_USERS
+
class UserCreateInput(CustomerInput):
redirect_url = graphene.String(
@@ -492,6 +501,9 @@ class UserCreateInput(CustomerInput):
)
)
+ class Meta:
+ doc_category = DOC_CATEGORY_USERS
+
class BaseCustomerCreate(ModelMutation, I18nMixin):
"""Base mutation for customer create used by staff and account."""
diff --git a/saleor/graphql/account/mutations/permission_group.py b/saleor/graphql/account/mutations/permission_group.py
index 8da72fa02a..9466898a68 100644
--- a/saleor/graphql/account/mutations/permission_group.py
+++ b/saleor/graphql/account/mutations/permission_group.py
@@ -23,13 +23,13 @@ from ...core import ResolveInfo
from ...core.doc_category import DOC_CATEGORY_USERS
from ...core.enums import PermissionEnum
from ...core.mutations import ModelDeleteMutation, ModelMutation
-from ...core.types import NonNullList, PermissionGroupError
+from ...core.types import BaseInputObjectType, NonNullList, PermissionGroupError
from ...plugins.dataloaders import get_plugin_manager_promise
from ...utils.validators import check_for_duplicates
from ..types import Group
-class PermissionGroupInput(graphene.InputObjectType):
+class PermissionGroupInput(BaseInputObjectType):
add_permissions = NonNullList(
PermissionEnum,
description="List of permission code names to assign to this group.",
@@ -41,10 +41,16 @@ class PermissionGroupInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_USERS
+
class PermissionGroupCreateInput(PermissionGroupInput):
name = graphene.String(description="Group name.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_USERS
+
class PermissionGroupCreate(ModelMutation):
class Arguments:
@@ -198,6 +204,9 @@ class PermissionGroupUpdateInput(PermissionGroupInput):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_USERS
+
class PermissionGroupUpdate(PermissionGroupCreate):
class Arguments:
diff --git a/saleor/graphql/account/types.py b/saleor/graphql/account/types.py
index 83058f8ec3..88bc754889 100644
--- a/saleor/graphql/account/types.py
+++ b/saleor/graphql/account/types.py
@@ -32,6 +32,7 @@ from ..core.fields import ConnectionField, PermissionsField
from ..core.scalars import UUID
from ..core.tracing import traced_resolver
from ..core.types import (
+ BaseInputObjectType,
BaseObjectType,
CountryDisplay,
Image,
@@ -54,7 +55,7 @@ from .enums import CountryCodeEnum, CustomerEventsEnum
from .utils import can_user_manage_group, get_groups_which_user_can_manage
-class AddressInput(graphene.InputObjectType):
+class AddressInput(BaseInputObjectType):
first_name = graphene.String(description="Given name.")
last_name = graphene.String(description="Family name.")
company_name = graphene.String(description="Company or organization.")
@@ -96,7 +97,6 @@ class Address(ModelObjectType[models.Address]):
interfaces = [relay.Node, ObjectWithMetadata]
model = models.Address
metadata_since = ADDED_IN_310
- doc_category = DOC_CATEGORY_USERS
@staticmethod
def resolve_country(root: models.Address, _info: ResolveInfo):
diff --git a/saleor/graphql/app/enums.py b/saleor/graphql/app/enums.py
index 7465a89793..2bf4783c88 100644
--- a/saleor/graphql/app/enums.py
+++ b/saleor/graphql/app/enums.py
@@ -1,4 +1,5 @@
from ...app.types import AppExtensionMount, AppExtensionTarget, AppType
+from ..core.doc_category import DOC_CATEGORY_APPS
from ..core.enums import to_enum
@@ -20,9 +21,14 @@ def description(enum):
AppTypeEnum = to_enum(AppType, description=description)
+AppTypeEnum.doc_category = DOC_CATEGORY_APPS
+
AppExtensionMountEnum = to_enum(
AppExtensionMount, description=AppExtensionMount.__doc__
)
+AppExtensionMountEnum.doc_category = DOC_CATEGORY_APPS
+
AppExtensionTargetEnum = to_enum(
AppExtensionTarget, description=AppExtensionTarget.__doc__
)
+AppExtensionTargetEnum.doc_category = DOC_CATEGORY_APPS
diff --git a/saleor/graphql/attribute/enums.py b/saleor/graphql/attribute/enums.py
index d239adbb00..190d9623f3 100644
--- a/saleor/graphql/attribute/enums.py
+++ b/saleor/graphql/attribute/enums.py
@@ -1,14 +1,21 @@
import graphene
from ...attribute import AttributeEntityType, AttributeInputType, AttributeType
+from ..core.doc_category import DOC_CATEGORY_ATTRIBUTES
from ..core.enums import to_enum
from ..core.utils import str_to_enum
AttributeInputTypeEnum = to_enum(AttributeInputType)
+AttributeInputTypeEnum.doc_category = DOC_CATEGORY_ATTRIBUTES
+
AttributeTypeEnum = to_enum(AttributeType)
+AttributeTypeEnum.doc_category = DOC_CATEGORY_ATTRIBUTES
+
AttributeEntityTypeEnum = to_enum(AttributeEntityType)
+AttributeEntityTypeEnum.doc_category = DOC_CATEGORY_ATTRIBUTES
AttributeEntityTypeEnum = graphene.Enum(
"AttributeEntityTypeEnum",
[(str_to_enum(name.upper()), code) for code, name in AttributeEntityType.CHOICES],
)
+AttributeEntityTypeEnum.doc_category = DOC_CATEGORY_ATTRIBUTES
diff --git a/saleor/graphql/channel/enums.py b/saleor/graphql/channel/enums.py
index 3095eea7b7..a28b07303d 100644
--- a/saleor/graphql/channel/enums.py
+++ b/saleor/graphql/channel/enums.py
@@ -1,4 +1,5 @@
from ...channel import AllocationStrategy, MarkAsPaidStrategy
+from ..core.doc_category import DOC_CATEGORY_CHANNELS, DOC_CATEGORY_PRODUCTS
from ..core.enums import to_enum
AllocationStrategyEnum = to_enum(
@@ -6,9 +7,11 @@ AllocationStrategyEnum = to_enum(
type_name="AllocationStrategyEnum",
description=AllocationStrategy.__doc__,
)
+AllocationStrategyEnum.doc_category = DOC_CATEGORY_PRODUCTS
MarkAsPaidStrategyEnum = to_enum(
MarkAsPaidStrategy,
type_name="MarkAsPaidStrategyEnum",
description=MarkAsPaidStrategy.__doc__,
)
+MarkAsPaidStrategyEnum.doc_category = DOC_CATEGORY_CHANNELS
diff --git a/saleor/graphql/channel/mutations/channel_create.py b/saleor/graphql/channel/mutations/channel_create.py
index 321674c03f..ce06e25cc7 100644
--- a/saleor/graphql/channel/mutations/channel_create.py
+++ b/saleor/graphql/channel/mutations/channel_create.py
@@ -15,14 +15,19 @@ from ...core.descriptions import (
ADDED_IN_313,
PREVIEW_FEATURE,
)
+from ...core.doc_category import (
+ DOC_CATEGORY_CHANNELS,
+ DOC_CATEGORY_ORDERS,
+ DOC_CATEGORY_PRODUCTS,
+)
from ...core.mutations import ModelMutation
-from ...core.types import ChannelError, NonNullList
+from ...core.types import BaseInputObjectType, ChannelError, NonNullList
from ...plugins.dataloaders import get_plugin_manager_promise
from ..enums import AllocationStrategyEnum, MarkAsPaidStrategyEnum
from ..types import Channel
-class StockSettingsInput(graphene.InputObjectType):
+class StockSettingsInput(BaseInputObjectType):
allocation_strategy = AllocationStrategyEnum(
description=(
"Allocation strategy options. Strategy defines the preference "
@@ -31,8 +36,11 @@ class StockSettingsInput(graphene.InputObjectType):
required=True,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
-class OrderSettingsInput(graphene.InputObjectType):
+class OrderSettingsInput(BaseInputObjectType):
automatically_confirm_all_new_orders = graphene.Boolean(
required=False,
description="When disabled, all new orders from checkout "
@@ -57,8 +65,11 @@ class OrderSettingsInput(graphene.InputObjectType):
),
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
-class ChannelInput(graphene.InputObjectType):
+class ChannelInput(BaseInputObjectType):
is_active = graphene.Boolean(description="isActive flag.")
stock_settings = graphene.Field(
StockSettingsInput,
@@ -83,6 +94,9 @@ class ChannelInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_CHANNELS
+
class ChannelCreateInput(ChannelInput):
name = graphene.String(description="Name of the channel.", required=True)
@@ -101,6 +115,9 @@ class ChannelCreateInput(ChannelInput):
required=True,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_CHANNELS
+
class ChannelCreate(ModelMutation):
class Arguments:
diff --git a/saleor/graphql/channel/mutations/channel_delete.py b/saleor/graphql/channel/mutations/channel_delete.py
index e3fb3b5fb5..3fa03fe939 100644
--- a/saleor/graphql/channel/mutations/channel_delete.py
+++ b/saleor/graphql/channel/mutations/channel_delete.py
@@ -10,19 +10,23 @@ from ....core.tracing import traced_atomic_transaction
from ....order.models import Order
from ....permission.enums import ChannelPermissions
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_CHANNELS
from ...core.mutations import ModelDeleteMutation
-from ...core.types import ChannelError
+from ...core.types import BaseInputObjectType, ChannelError
from ...plugins.dataloaders import get_plugin_manager_promise
from ..types import Channel
from ..utils import delete_invalid_warehouse_to_shipping_zone_relations
-class ChannelDeleteInput(graphene.InputObjectType):
+class ChannelDeleteInput(BaseInputObjectType):
channel_id = graphene.ID(
required=True,
description="ID of channel to migrate orders from origin channel.",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_CHANNELS
+
class ChannelDelete(ModelDeleteMutation):
class Arguments:
diff --git a/saleor/graphql/channel/mutations/channel_update.py b/saleor/graphql/channel/mutations/channel_update.py
index a44dcc407a..1e66fd29bc 100644
--- a/saleor/graphql/channel/mutations/channel_update.py
+++ b/saleor/graphql/channel/mutations/channel_update.py
@@ -12,6 +12,7 @@ from ....shipping.tasks import (
from ...account.enums import CountryCodeEnum
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_31, ADDED_IN_35, PREVIEW_FEATURE
+from ...core.doc_category import DOC_CATEGORY_CHANNELS
from ...core.mutations import ModelMutation
from ...core.types import ChannelError, NonNullList
from ...plugins.dataloaders import get_plugin_manager_promise
@@ -44,6 +45,9 @@ class ChannelUpdateInput(ChannelInput):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_CHANNELS
+
class ChannelUpdate(ModelMutation):
class Arguments:
diff --git a/saleor/graphql/checkout/enums.py b/saleor/graphql/checkout/enums.py
index 4328996405..f2bcb3ef8a 100644
--- a/saleor/graphql/checkout/enums.py
+++ b/saleor/graphql/checkout/enums.py
@@ -1,7 +1,9 @@
import graphene
from ...checkout import error_codes
+from ..core.doc_category import DOC_CATEGORY_ORDERS
OrderCreateFromCheckoutErrorCode = graphene.Enum.from_enum(
error_codes.OrderCreateFromCheckoutErrorCode
)
+OrderCreateFromCheckoutErrorCode.doc_category = DOC_CATEGORY_ORDERS
diff --git a/saleor/graphql/checkout/filters.py b/saleor/graphql/checkout/filters.py
index f952f351ab..a006266276 100644
--- a/saleor/graphql/checkout/filters.py
+++ b/saleor/graphql/checkout/filters.py
@@ -7,6 +7,7 @@ from ...account.models import User
from ...checkout.models import Checkout
from ...payment.models import Payment
from ..channel.types import Channel
+from ..core.doc_category import DOC_CATEGORY_CHECKOUT
from ..core.filters import (
GlobalIDMultipleChoiceFilter,
ListObjectTypeFilter,
@@ -119,4 +120,5 @@ class CheckoutFilter(MetadataFilterBase):
class CheckoutFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_CHECKOUT
filterset_class = CheckoutFilter
diff --git a/saleor/graphql/checkout/sorters.py b/saleor/graphql/checkout/sorters.py
index eaafec9054..c3c8a26f2b 100644
--- a/saleor/graphql/checkout/sorters.py
+++ b/saleor/graphql/checkout/sorters.py
@@ -1,15 +1,18 @@
-import graphene
from django.db.models import CharField, ExpressionWrapper, OuterRef, QuerySet, Subquery
from ...payment.models import Payment
-from ..core.types import SortInputObjectType
+from ..core.doc_category import DOC_CATEGORY_CHECKOUT
+from ..core.types import BaseEnum, SortInputObjectType
-class CheckoutSortField(graphene.Enum):
+class CheckoutSortField(BaseEnum):
CREATION_DATE = ["created_at", "pk"]
CUSTOMER = ["billing_address__last_name", "billing_address__first_name", "pk"]
PAYMENT = ["last_charge_status", "pk"]
+ class Meta:
+ doc_category = DOC_CATEGORY_CHECKOUT
+
@property
def description(self):
if self.name in CheckoutSortField.__enum__._member_names_:
@@ -31,5 +34,6 @@ class CheckoutSortField(graphene.Enum):
class CheckoutSortingInput(SortInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_CHECKOUT
sort_enum = CheckoutSortField
type_name = "checkouts"
diff --git a/saleor/graphql/checkout/types.py b/saleor/graphql/checkout/types.py
index 9f8d0b9533..025367036f 100644
--- a/saleor/graphql/checkout/types.py
+++ b/saleor/graphql/checkout/types.py
@@ -33,10 +33,11 @@ from ..core.descriptions import (
DEPRECATED_IN_3X_FIELD,
PREVIEW_FEATURE,
)
+from ..core.doc_category import DOC_CATEGORY_PAYMENTS
from ..core.enums import LanguageCodeEnum
from ..core.scalars import UUID
from ..core.tracing import traced_resolver
-from ..core.types import ModelObjectType, Money, NonNullList, TaxedMoney
+from ..core.types import BaseObjectType, ModelObjectType, Money, NonNullList, TaxedMoney
from ..core.utils import str_to_enum
from ..decorators import one_of_permissions_required
from ..discount.dataloaders import DiscountsByDateTimeLoader
@@ -73,15 +74,16 @@ from .dataloaders import (
from .utils import prevent_sync_event_circular_query
-class GatewayConfigLine(graphene.ObjectType):
+class GatewayConfigLine(BaseObjectType):
field = graphene.String(required=True, description="Gateway config key.")
value = graphene.String(description="Gateway config value for key.")
class Meta:
description = "Payment gateway client configuration key and value pair."
+ doc_category = DOC_CATEGORY_PAYMENTS
-class PaymentGateway(graphene.ObjectType):
+class PaymentGateway(BaseObjectType):
name = graphene.String(required=True, description="Payment gateway name.")
id = graphene.ID(required=True, description="Payment gateway ID.")
config = NonNullList(
@@ -100,6 +102,7 @@ class PaymentGateway(graphene.ObjectType):
"Available payment gateway backend with configuration "
"necessary to setup client."
)
+ doc_category = DOC_CATEGORY_PAYMENTS
class CheckoutLine(ModelObjectType[models.CheckoutLine]):
diff --git a/saleor/graphql/core/doc_category.py b/saleor/graphql/core/doc_category.py
index 9a74bf0ea8..19acaa6530 100644
--- a/saleor/graphql/core/doc_category.py
+++ b/saleor/graphql/core/doc_category.py
@@ -38,6 +38,7 @@ DOC_CATEGORY_MAP = {
"giftcard.GiftCard": DOC_CATEGORY_GIFT_CARDS,
"giftcard.GiftCardTag": DOC_CATEGORY_GIFT_CARDS,
"giftcard.GiftEvent": DOC_CATEGORY_GIFT_CARDS,
+ "order.OrderGrantedRefund": DOC_CATEGORY_ORDERS,
"order.Order": DOC_CATEGORY_ORDERS,
"order.OrderLine": DOC_CATEGORY_ORDERS,
"order.OrderEvent": DOC_CATEGORY_ORDERS,
@@ -52,9 +53,11 @@ DOC_CATEGORY_MAP = {
"product.Category": DOC_CATEGORY_PRODUCTS,
"product.Collection": DOC_CATEGORY_PRODUCTS,
"product.Product": DOC_CATEGORY_PRODUCTS,
+ "product.ProductChannelListing": DOC_CATEGORY_PRODUCTS,
"product.ProductMedia": DOC_CATEGORY_PRODUCTS,
"product.ProductType": DOC_CATEGORY_PRODUCTS,
"product.ProductVariant": DOC_CATEGORY_PRODUCTS,
+ "product.ProductVariantChannelListing": DOC_CATEGORY_PRODUCTS,
"shipping.ShippingMethodChannelListing": DOC_CATEGORY_SHIPPING,
"shipping.ShippingMethod": DOC_CATEGORY_SHIPPING,
"shipping.ShippingZone": DOC_CATEGORY_SHIPPING,
diff --git a/saleor/graphql/core/enums.py b/saleor/graphql/core/enums.py
index bbed2c0324..ff07a4d229 100644
--- a/saleor/graphql/core/enums.py
+++ b/saleor/graphql/core/enums.py
@@ -32,6 +32,21 @@ from ...thumbnail import ThumbnailFormat
from ...warehouse import error_codes as warehouse_error_codes
from ...webhook import error_codes as webhook_error_codes
from ..notifications import error_codes as external_notifications_error_codes
+from .doc_category import (
+ DOC_CATEGORY_APPS,
+ DOC_CATEGORY_ATTRIBUTES,
+ DOC_CATEGORY_CHANNELS,
+ DOC_CATEGORY_CHECKOUT,
+ DOC_CATEGORY_DISCOUNTS,
+ DOC_CATEGORY_GIFT_CARDS,
+ DOC_CATEGORY_ORDERS,
+ DOC_CATEGORY_PAGES,
+ DOC_CATEGORY_PAYMENTS,
+ DOC_CATEGORY_PRODUCTS,
+ DOC_CATEGORY_SHIPPING,
+ DOC_CATEGORY_USERS,
+ DOC_CATEGORY_WEBHOOKS,
+)
from .utils import str_to_enum
@@ -89,7 +104,10 @@ LanguageCodeEnum = graphene.Enum(
JobStatusEnum = to_enum(JobStatus)
+
PermissionEnum = graphene.Enum("PermissionEnum", get_permissions_enum_list())
+PermissionEnum.doc_category = DOC_CATEGORY_USERS
+
TimePeriodTypeEnum = to_enum(TimePeriodType)
ThumbnailFormatEnum = to_enum(ThumbnailFormat)
@@ -130,71 +148,133 @@ def error_policy_enum_description(enum):
ErrorPolicyEnum = to_enum(ErrorPolicy, description=error_policy_enum_description)
AccountErrorCode = graphene.Enum.from_enum(account_error_codes.AccountErrorCode)
+AccountErrorCode.doc_category = DOC_CATEGORY_USERS
+
AppErrorCode = graphene.Enum.from_enum(app_error_codes.AppErrorCode)
+AppErrorCode.doc_category = DOC_CATEGORY_APPS
+
AttributeErrorCode = graphene.Enum.from_enum(attribute_error_codes.AttributeErrorCode)
+AttributeErrorCode.doc_category = DOC_CATEGORY_ATTRIBUTES
+
ChannelErrorCode = graphene.Enum.from_enum(channel_error_codes.ChannelErrorCode)
+ChannelErrorCode.doc_category = DOC_CATEGORY_CHANNELS
+
CheckoutErrorCode = graphene.Enum.from_enum(checkout_error_codes.CheckoutErrorCode)
+CheckoutErrorCode.doc_category = DOC_CATEGORY_CHECKOUT
+
CustomerBulkUpdateErrorCode = graphene.Enum.from_enum(
account_error_codes.CustomerBulkUpdateErrorCode
)
+CustomerBulkUpdateErrorCode.doc_category = DOC_CATEGORY_USERS
ExternalNotificationTriggerErrorCode = graphene.Enum.from_enum(
external_notifications_error_codes.ExternalNotificationErrorCodes
)
ExportErrorCode = graphene.Enum.from_enum(csv_error_codes.ExportErrorCode)
+
DiscountErrorCode = graphene.Enum.from_enum(discount_error_codes.DiscountErrorCode)
+DiscountErrorCode.doc_category = DOC_CATEGORY_DISCOUNTS
+
PluginErrorCode = graphene.Enum.from_enum(plugin_error_codes.PluginErrorCode)
+
GiftCardErrorCode = graphene.Enum.from_enum(giftcard_error_codes.GiftCardErrorCode)
+GiftCardErrorCode.doc_category = DOC_CATEGORY_GIFT_CARDS
+
MenuErrorCode = graphene.Enum.from_enum(menu_error_codes.MenuErrorCode)
+
OrderSettingsErrorCode = graphene.Enum.from_enum(
site_error_codes.OrderSettingsErrorCode
)
+OrderSettingsErrorCode.doc_category = DOC_CATEGORY_ORDERS
+
GiftCardSettingsErrorCode = graphene.Enum.from_enum(
site_error_codes.GiftCardSettingsErrorCode
)
+GiftCardSettingsErrorCode.doc_category = DOC_CATEGORY_GIFT_CARDS
+
MetadataErrorCode = graphene.Enum.from_enum(core_error_codes.MetadataErrorCode)
+
OrderErrorCode = graphene.Enum.from_enum(order_error_codes.OrderErrorCode)
+OrderErrorCode.doc_category = DOC_CATEGORY_ORDERS
+
InvoiceErrorCode = graphene.Enum.from_enum(invoice_error_codes.InvoiceErrorCode)
+
PageErrorCode = graphene.Enum.from_enum(page_error_codes.PageErrorCode)
+PageErrorCode.doc_category = DOC_CATEGORY_PAGES
+
PaymentErrorCode = graphene.Enum.from_enum(payment_error_codes.PaymentErrorCode)
+PaymentErrorCode.doc_category = DOC_CATEGORY_PAYMENTS
TransactionCreateErrorCode = graphene.Enum.from_enum(
payment_error_codes.TransactionCreateErrorCode
)
+TransactionCreateErrorCode.doc_category = DOC_CATEGORY_PAYMENTS
+
TransactionUpdateErrorCode = graphene.Enum.from_enum(
payment_error_codes.TransactionUpdateErrorCode
)
+TransactionUpdateErrorCode.doc_category = DOC_CATEGORY_PAYMENTS
+
TransactionRequestActionErrorCode = graphene.Enum.from_enum(
payment_error_codes.TransactionRequestActionErrorCode
)
+TransactionRequestActionErrorCode.doc_category = DOC_CATEGORY_PAYMENTS
+
TransactionEventReportErrorCode = graphene.Enum.from_enum(
payment_error_codes.TransactionEventReportErrorCode
)
+TransactionEventReportErrorCode.doc_category = DOC_CATEGORY_PAYMENTS
PermissionGroupErrorCode = graphene.Enum.from_enum(
account_error_codes.PermissionGroupErrorCode
)
+PermissionGroupErrorCode.doc_category = DOC_CATEGORY_USERS
+
ProductErrorCode = graphene.Enum.from_enum(product_error_codes.ProductErrorCode)
+ProductErrorCode.doc_category = DOC_CATEGORY_PRODUCTS
+
ProductBulkCreateErrorCode = graphene.Enum.from_enum(
product_error_codes.ProductBulkCreateErrorCode
)
+ProductBulkCreateErrorCode.doc_category = DOC_CATEGORY_PRODUCTS
+
ProductVariantBulkErrorCode = graphene.Enum.from_enum(
product_error_codes.ProductVariantBulkErrorCode
)
+ProductVariantBulkErrorCode.doc_category = DOC_CATEGORY_PRODUCTS
+
CollectionErrorCode = graphene.Enum.from_enum(product_error_codes.CollectionErrorCode)
+CollectionErrorCode.doc_category = DOC_CATEGORY_PRODUCTS
+
ShopErrorCode = graphene.Enum.from_enum(core_error_codes.ShopErrorCode)
+
ShippingErrorCode = graphene.Enum.from_enum(shipping_error_codes.ShippingErrorCode)
+ShippingErrorCode.doc_category = DOC_CATEGORY_SHIPPING
+
StockErrorCode = graphene.Enum.from_enum(warehouse_error_codes.StockErrorCode)
+StockErrorCode.doc_category = DOC_CATEGORY_PRODUCTS
+
StockBulkUpdateErrorCode = graphene.Enum.from_enum(
warehouse_error_codes.StockBulkUpdateErrorCode
)
+StockBulkUpdateErrorCode.doc_category = DOC_CATEGORY_PRODUCTS
+
UploadErrorCode = graphene.Enum.from_enum(core_error_codes.UploadErrorCode)
+
WarehouseErrorCode = graphene.Enum.from_enum(warehouse_error_codes.WarehouseErrorCode)
-WebhookErrorCode = graphene.Enum.from_enum(webhook_error_codes.WebhookErrorCode)
+WarehouseErrorCode.doc_category = DOC_CATEGORY_PRODUCTS
+
TranslationErrorCode = graphene.Enum.from_enum(core_error_codes.TranslationErrorCode)
+
+WebhookErrorCode = graphene.Enum.from_enum(webhook_error_codes.WebhookErrorCode)
+WebhookErrorCode.doc_category = DOC_CATEGORY_WEBHOOKS
+
WebhookDryRunErrorCode = graphene.Enum.from_enum(
webhook_error_codes.WebhookDryRunErrorCode
)
+WebhookDryRunErrorCode.doc_category = DOC_CATEGORY_WEBHOOKS
+
WebhookTriggerErrorCode = graphene.Enum.from_enum(
webhook_error_codes.WebhookTriggerErrorCode
)
+WebhookTriggerErrorCode.doc_category = DOC_CATEGORY_WEBHOOKS
diff --git a/saleor/graphql/core/types/common.py b/saleor/graphql/core/types/common.py
index ca3a1cc488..07d2f03342 100644
--- a/saleor/graphql/core/types/common.py
+++ b/saleor/graphql/core/types/common.py
@@ -6,7 +6,22 @@ from django.core.files.storage import default_storage
from ....core.utils import build_absolute_uri
from ...account.enums import AddressTypeEnum
-from ...core.doc_category import DOC_CATEGORY_USERS
+from ...core.doc_category import (
+ DOC_CATEGORY_APPS,
+ DOC_CATEGORY_ATTRIBUTES,
+ DOC_CATEGORY_CHANNELS,
+ DOC_CATEGORY_CHECKOUT,
+ DOC_CATEGORY_DISCOUNTS,
+ DOC_CATEGORY_GIFT_CARDS,
+ DOC_CATEGORY_ORDERS,
+ DOC_CATEGORY_PAGES,
+ DOC_CATEGORY_PAYMENTS,
+ DOC_CATEGORY_PRODUCTS,
+ DOC_CATEGORY_SHIPPING,
+ DOC_CATEGORY_TAXES,
+ DOC_CATEGORY_USERS,
+ DOC_CATEGORY_WEBHOOKS,
+)
from ..descriptions import (
ADDED_IN_36,
ADDED_IN_312,
@@ -158,10 +173,16 @@ class AppError(Error):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_APPS
+
class AttributeError(Error):
code = AttributeErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_ATTRIBUTES
+
class StaffError(AccountError):
permissions = NonNullList(
@@ -180,6 +201,9 @@ class StaffError(AccountError):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_USERS
+
class ChannelError(Error):
code = ChannelErrorCode(description="The error code.", required=True)
@@ -194,6 +218,9 @@ class ChannelError(Error):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_CHANNELS
+
class CheckoutError(Error):
code = CheckoutErrorCode(description="The error code.", required=True)
@@ -211,6 +238,9 @@ class CheckoutError(Error):
description="A type of address that causes the error.", required=False
)
+ class Meta:
+ doc_category = DOC_CATEGORY_CHECKOUT
+
class CustomerBulkUpdateError(BulkError):
code = CustomerBulkUpdateErrorCode(description="The error code.", required=True)
@@ -222,6 +252,9 @@ class ProductWithoutVariantError(Error):
description="List of products IDs which causes the error.",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class DiscountError(ProductWithoutVariantError):
code = DiscountErrorCode(description="The error code.", required=True)
@@ -231,6 +264,9 @@ class DiscountError(ProductWithoutVariantError):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_DISCOUNTS
+
class ExportError(Error):
code = ExportErrorCode(description="The error code.", required=True)
@@ -249,10 +285,16 @@ class MenuError(Error):
class OrderSettingsError(Error):
code = OrderSettingsErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
class GiftCardSettingsError(Error):
code = GiftCardSettingsErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_GIFT_CARDS
+
class MetadataError(Error):
code = MetadataErrorCode(description="The error code.", required=True)
@@ -278,6 +320,9 @@ class OrderError(Error):
description="A type of address that causes the error.", required=False
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
class InvoiceError(Error):
code = InvoiceErrorCode(description="The error code.", required=True)
@@ -296,6 +341,9 @@ class PermissionGroupError(Error):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_USERS
+
class ProductError(Error):
code = ProductErrorCode(description="The error code.", required=True)
@@ -310,10 +358,16 @@ class ProductError(Error):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class CollectionError(ProductWithoutVariantError):
code = CollectionErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class ProductChannelListingError(ProductError):
channels = NonNullList(
@@ -327,6 +381,9 @@ class ProductChannelListingError(ProductError):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class CollectionChannelListingError(ProductError):
channels = NonNullList(
@@ -335,6 +392,9 @@ class CollectionChannelListingError(ProductError):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class BulkProductError(ProductError):
index = graphene.Int(
@@ -351,6 +411,9 @@ class BulkProductError(ProductError):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class ProductBulkCreateError(BulkError):
code = ProductBulkCreateErrorCode(description="The error code.", required=True)
@@ -409,6 +472,9 @@ class ProductVariantBulkError(Error):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class ShopError(Error):
code = ShopErrorCode(description="The error code.", required=True)
@@ -427,6 +493,9 @@ class ShippingError(Error):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_SHIPPING
+
class PageError(Error):
code = PageErrorCode(description="The error code.", required=True)
@@ -441,6 +510,9 @@ class PageError(Error):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PAGES
+
class PaymentError(Error):
code = PaymentErrorCode(description="The error code.", required=True)
@@ -450,20 +522,32 @@ class PaymentError(Error):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PAYMENTS
+
class TransactionCreateError(Error):
code = TransactionCreateErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_PAYMENTS
+
class TransactionUpdateError(Error):
code = TransactionUpdateErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_PAYMENTS
+
class TransactionRequestActionError(Error):
code = TransactionRequestActionErrorCode(
description="The error code.", required=True
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PAYMENTS
+
class TransactionEventReportError(Error):
code = TransactionEventReportErrorCode(description="The error code.", required=True)
@@ -477,6 +561,9 @@ class GiftCardError(Error):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_GIFT_CARDS
+
class PluginError(Error):
code = PluginErrorCode(description="The error code.", required=True)
@@ -485,16 +572,25 @@ class PluginError(Error):
class StockError(Error):
code = StockErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class BulkStockError(ProductError):
index = graphene.Int(
description="Index of an input list item that caused the error."
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class StockBulkUpdateError(Error):
code = StockBulkUpdateErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class UploadError(Error):
code = UploadErrorCode(description="The error code.", required=True)
@@ -508,18 +604,30 @@ class WarehouseError(Error):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class WebhookError(Error):
code = WebhookErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_WEBHOOKS
+
class WebhookDryRunError(Error):
code = WebhookDryRunErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_WEBHOOKS
+
class WebhookTriggerError(Error):
code = WebhookTriggerErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_WEBHOOKS
+
class TranslationError(Error):
code = TranslationErrorCode(description="The error code.", required=True)
@@ -596,7 +704,7 @@ class TimePeriodInputType(graphene.InputObjectType):
type = TimePeriodTypeEnum(description="The type of the period.", required=True)
-class TaxType(graphene.ObjectType):
+class TaxType(BaseObjectType):
"""Representation of tax types fetched from tax gateway."""
description = graphene.String(description="Description of the tax type.")
@@ -604,6 +712,9 @@ class TaxType(graphene.ObjectType):
description="External tax code used to identify given tax group."
)
+ class Meta:
+ doc_category = DOC_CATEGORY_TAXES
+
class Job(graphene.Interface):
status = JobStatusEnum(description="Job status.", required=True)
diff --git a/saleor/graphql/core/types/event.py b/saleor/graphql/core/types/event.py
index ae74ce1d16..5d07a43e27 100644
--- a/saleor/graphql/core/types/event.py
+++ b/saleor/graphql/core/types/event.py
@@ -1,8 +1,16 @@
-from graphene import ObjectType
from graphene.types.objecttype import ObjectTypeOptions
+from ..doc_category import DOC_CATEGORY_MAP
+from ..types import BaseObjectType
-class SubscriptionObjectType(ObjectType):
+# Rewrite original map to use model to category mapping, with the app name skipped,
+# so that it can be used with root_type from SubscriptionObjectType.
+DOC_CATEGORY_MODEL_MAP = {
+ key.split(".")[1]: value for key, value in DOC_CATEGORY_MAP.items()
+}
+
+
+class SubscriptionObjectType(BaseObjectType):
class Meta:
abstract = True
@@ -20,4 +28,11 @@ class SubscriptionObjectType(ObjectType):
_meta.root_type = root_type
_meta.enable_dry_run = enable_dry_run
+ if (
+ "doc_category" not in options
+ and root_type
+ and root_type in DOC_CATEGORY_MODEL_MAP
+ ):
+ options["doc_category"] = DOC_CATEGORY_MODEL_MAP[root_type]
+
super().__init_subclass_with_meta__(_meta=_meta, **options)
diff --git a/saleor/graphql/core/types/taxes.py b/saleor/graphql/core/types/taxes.py
index 9d47cac756..a4528194a0 100644
--- a/saleor/graphql/core/types/taxes.py
+++ b/saleor/graphql/core/types/taxes.py
@@ -21,6 +21,8 @@ from ...checkout.dataloaders import (
CheckoutLinesByCheckoutTokenLoader,
CheckoutLinesInfoByCheckoutTokenLoader,
)
+from ...core.doc_category import DOC_CATEGORY_TAXES
+from ...core.types import BaseObjectType
from ...discount.dataloaders import (
DiscountsByDateTimeLoader,
OrderDiscountsByOrderIDLoader,
@@ -66,7 +68,7 @@ class TaxSourceLine(graphene.Union):
return super(TaxSourceLine, cls).resolve_type(instance, info)
-class TaxableObjectLine(graphene.ObjectType):
+class TaxableObjectLine(BaseObjectType):
source_line = graphene.Field(
TaxSourceLine,
required=True,
@@ -88,6 +90,9 @@ class TaxableObjectLine(graphene.ObjectType):
Money, description="Price of the order line.", required=True
)
+ class Meta:
+ doc_category = DOC_CATEGORY_TAXES
+
@staticmethod
def resolve_variant_name(root: Union[CheckoutLine, OrderLine], info: ResolveInfo):
if isinstance(root, CheckoutLine):
@@ -289,17 +294,18 @@ class TaxableObjectLine(graphene.ObjectType):
return root.base_unit_price * root.quantity
-class TaxableObjectDiscount(graphene.ObjectType):
+class TaxableObjectDiscount(BaseObjectType):
name = graphene.String(description="The name of the discount.")
amount = graphene.Field(
Money, description="The amount of the discount.", required=True
)
class Meta:
+ doc_category = DOC_CATEGORY_TAXES
description = "Taxable object discount."
-class TaxableObject(graphene.ObjectType):
+class TaxableObject(BaseObjectType):
source_object = graphene.Field(
TaxSourceObject,
required=True,
@@ -328,6 +334,7 @@ class TaxableObject(graphene.ObjectType):
class Meta:
description = "Taxable object."
+ doc_category = DOC_CATEGORY_TAXES
@staticmethod
def resolve_channel(root: Union[Checkout, Order], info: ResolveInfo):
diff --git a/saleor/graphql/csv/enums.py b/saleor/graphql/csv/enums.py
index 34a3c096e5..5e028be0b7 100644
--- a/saleor/graphql/csv/enums.py
+++ b/saleor/graphql/csv/enums.py
@@ -1,17 +1,20 @@
-import graphene
-
from ...csv import ExportEvents, FileTypes
-from ...graphql.core.enums import to_enum
+from ..core.doc_category import DOC_CATEGORY_PRODUCTS
+from ..core.enums import to_enum
+from ..core.types import BaseEnum
ExportEventEnum = to_enum(ExportEvents)
FileTypeEnum = to_enum(FileTypes)
-class ExportScope(graphene.Enum):
+class ExportScope(BaseEnum):
ALL = "all"
IDS = "ids"
FILTER = "filter"
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
@property
def description(self):
# pylint: disable=no-member
@@ -25,7 +28,7 @@ class ExportScope(graphene.Enum):
raise ValueError(f"Unsupported enum value: {self.value}")
-class ProductFieldEnum(graphene.Enum):
+class ProductFieldEnum(BaseEnum):
NAME = "name"
DESCRIPTION = "description"
PRODUCT_TYPE = "product type"
@@ -38,3 +41,6 @@ class ProductFieldEnum(graphene.Enum):
VARIANT_SKU = "variant sku"
VARIANT_WEIGHT = "variant weight"
VARIANT_MEDIA = "variant media"
+
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
diff --git a/saleor/graphql/csv/mutations/export_gift_cards.py b/saleor/graphql/csv/mutations/export_gift_cards.py
index f663eec978..c66863a699 100644
--- a/saleor/graphql/csv/mutations/export_gift_cards.py
+++ b/saleor/graphql/csv/mutations/export_gift_cards.py
@@ -7,14 +7,15 @@ from ....permission.enums import GiftcardPermissions
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_31, PREVIEW_FEATURE
-from ...core.types import ExportError, NonNullList
+from ...core.doc_category import DOC_CATEGORY_GIFT_CARDS
+from ...core.types import BaseInputObjectType, ExportError, NonNullList
from ...giftcard.filters import GiftCardFilterInput
from ...giftcard.types import GiftCard
from ..enums import ExportScope, FileTypeEnum
from .base_export import BaseExportMutation
-class ExportGiftCardsInput(graphene.InputObjectType):
+class ExportGiftCardsInput(BaseInputObjectType):
scope = ExportScope(
description="Determine which gift cards should be exported.", required=True
)
@@ -28,6 +29,9 @@ class ExportGiftCardsInput(graphene.InputObjectType):
)
file_type = FileTypeEnum(description="Type of exported file.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_GIFT_CARDS
+
class ExportGiftCards(BaseExportMutation):
class Arguments:
@@ -37,6 +41,7 @@ class ExportGiftCards(BaseExportMutation):
class Meta:
description = "Export gift cards to csv file." + ADDED_IN_31 + PREVIEW_FEATURE
+ doc_category = DOC_CATEGORY_GIFT_CARDS
permissions = (GiftcardPermissions.MANAGE_GIFT_CARD,)
error_type_class = ExportError
diff --git a/saleor/graphql/csv/mutations/export_products.py b/saleor/graphql/csv/mutations/export_products.py
index a9836ce10b..cdb88d946e 100644
--- a/saleor/graphql/csv/mutations/export_products.py
+++ b/saleor/graphql/csv/mutations/export_products.py
@@ -8,7 +8,8 @@ from ...app.dataloaders import get_app_promise
from ...attribute.types import Attribute
from ...channel.types import Channel
from ...core import ResolveInfo
-from ...core.types import ExportError, NonNullList
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
+from ...core.types import BaseInputObjectType, ExportError, NonNullList
from ...product.filters import ProductFilterInput
from ...product.types import Product
from ...warehouse.types import Warehouse
@@ -16,7 +17,7 @@ from ..enums import ExportScope, FileTypeEnum, ProductFieldEnum
from .base_export import BaseExportMutation
-class ExportInfoInput(graphene.InputObjectType):
+class ExportInfoInput(BaseInputObjectType):
attributes = NonNullList(
graphene.ID,
description="List of attribute ids witch should be exported.",
@@ -34,8 +35,11 @@ class ExportInfoInput(graphene.InputObjectType):
description="List of product fields witch should be exported.",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
-class ExportProductsInput(graphene.InputObjectType):
+class ExportProductsInput(BaseInputObjectType):
scope = ExportScope(
description="Determine which products should be exported.", required=True
)
@@ -53,6 +57,9 @@ class ExportProductsInput(graphene.InputObjectType):
)
file_type = FileTypeEnum(description="Type of exported file.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class ExportProducts(BaseExportMutation):
class Arguments:
@@ -62,6 +69,7 @@ class ExportProducts(BaseExportMutation):
class Meta:
description = "Export products to csv file."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = ExportError
error_type_field = "export_errors"
diff --git a/saleor/graphql/discount/enums.py b/saleor/graphql/discount/enums.py
index 65e25cb0aa..d7db3eebb1 100644
--- a/saleor/graphql/discount/enums.py
+++ b/saleor/graphql/discount/enums.py
@@ -1,34 +1,50 @@
-import graphene
-
from ...discount import DiscountValueType, OrderDiscountType, VoucherType
+from ..core.doc_category import DOC_CATEGORY_DISCOUNTS
from ..core.enums import to_enum
+from ..core.types import BaseEnum
OrderDiscountTypeEnum = to_enum(OrderDiscountType, type_name="OrderDiscountType")
+OrderDiscountTypeEnum.doc_category = DOC_CATEGORY_DISCOUNTS
-class SaleType(graphene.Enum):
+class SaleType(BaseEnum):
FIXED = DiscountValueType.FIXED
PERCENTAGE = DiscountValueType.PERCENTAGE
+ class Meta:
+ doc_category = DOC_CATEGORY_DISCOUNTS
+
-class DiscountValueTypeEnum(graphene.Enum):
+class DiscountValueTypeEnum(BaseEnum):
FIXED = DiscountValueType.FIXED
PERCENTAGE = DiscountValueType.PERCENTAGE
+ class Meta:
+ doc_category = DOC_CATEGORY_DISCOUNTS
+
-class VoucherTypeEnum(graphene.Enum):
+class VoucherTypeEnum(BaseEnum):
SHIPPING = VoucherType.SHIPPING
ENTIRE_ORDER = VoucherType.ENTIRE_ORDER
SPECIFIC_PRODUCT = VoucherType.SPECIFIC_PRODUCT
+ class Meta:
+ doc_category = DOC_CATEGORY_DISCOUNTS
-class DiscountStatusEnum(graphene.Enum):
+
+class DiscountStatusEnum(BaseEnum):
ACTIVE = "active"
EXPIRED = "expired"
SCHEDULED = "scheduled"
+ class Meta:
+ doc_category = DOC_CATEGORY_DISCOUNTS
+
-class VoucherDiscountType(graphene.Enum):
+class VoucherDiscountType(BaseEnum):
FIXED = "fixed"
PERCENTAGE = "percentage"
SHIPPING = "shipping"
+
+ class Meta:
+ doc_category = DOC_CATEGORY_DISCOUNTS
diff --git a/saleor/graphql/discount/mutations/sale_add_catalogues.py b/saleor/graphql/discount/mutations/sale_add_catalogues.py
index 4f9a1ac682..8d7fbe94d1 100644
--- a/saleor/graphql/discount/mutations/sale_add_catalogues.py
+++ b/saleor/graphql/discount/mutations/sale_add_catalogues.py
@@ -6,7 +6,7 @@ from ....discount.utils import fetch_catalogue_info
from ....permission.enums import DiscountPermissions
from ...channel import ChannelContext
from ...core import ResolveInfo
-from ...core.doc_category import DOC_CATEGORY_PRODUCTS
+from ...core.doc_category import DOC_CATEGORY_DISCOUNTS
from ...core.types import DiscountError
from ...plugins.dataloaders import get_plugin_manager_promise
from ..types import Sale
@@ -17,7 +17,7 @@ from .utils import convert_catalogue_info_to_global_ids
class SaleAddCatalogues(SaleBaseCatalogueMutation):
class Meta:
description = "Adds products, categories, collections to a voucher."
- doc_category = DOC_CATEGORY_PRODUCTS
+ doc_category = DOC_CATEGORY_DISCOUNTS
permissions = (DiscountPermissions.MANAGE_DISCOUNTS,)
error_type_class = DiscountError
error_type_field = "discount_errors"
diff --git a/saleor/graphql/discount/mutations/sale_channel_listing_update.py b/saleor/graphql/discount/mutations/sale_channel_listing_update.py
index 533dbbac5c..5fade142b0 100644
--- a/saleor/graphql/discount/mutations/sale_channel_listing_update.py
+++ b/saleor/graphql/discount/mutations/sale_channel_listing_update.py
@@ -13,7 +13,7 @@ from ....product.tasks import update_products_discounted_prices_of_discount_task
from ...channel import ChannelContext
from ...channel.mutations import BaseChannelListingMutation
from ...core import ResolveInfo
-from ...core.doc_category import DOC_CATEGORY_PRODUCTS
+from ...core.doc_category import DOC_CATEGORY_DISCOUNTS
from ...core.scalars import PositiveDecimal
from ...core.types import BaseInputObjectType, DiscountError, NonNullList
from ...core.validators import validate_price_precision
@@ -31,7 +31,7 @@ class SaleChannelListingAddInput(BaseInputObjectType):
)
class Meta:
- doc_category = DOC_CATEGORY_PRODUCTS
+ doc_category = DOC_CATEGORY_DISCOUNTS
class SaleChannelListingInput(BaseInputObjectType):
@@ -47,7 +47,7 @@ class SaleChannelListingInput(BaseInputObjectType):
)
class Meta:
- doc_category = DOC_CATEGORY_PRODUCTS
+ doc_category = DOC_CATEGORY_DISCOUNTS
class SaleChannelListingUpdate(BaseChannelListingMutation):
@@ -62,7 +62,7 @@ class SaleChannelListingUpdate(BaseChannelListingMutation):
class Meta:
description = "Manage sale's availability in channels."
- doc_category = DOC_CATEGORY_PRODUCTS
+ doc_category = DOC_CATEGORY_DISCOUNTS
permissions = (DiscountPermissions.MANAGE_DISCOUNTS,)
error_type_class = DiscountError
error_type_field = "discount_errors"
diff --git a/saleor/graphql/discount/mutations/sale_create.py b/saleor/graphql/discount/mutations/sale_create.py
index d38ce55511..2125a81eca 100644
--- a/saleor/graphql/discount/mutations/sale_create.py
+++ b/saleor/graphql/discount/mutations/sale_create.py
@@ -13,7 +13,7 @@ from ....product.tasks import update_products_discounted_prices_of_discount_task
from ...channel import ChannelContext
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_31
-from ...core.doc_category import DOC_CATEGORY_PRODUCTS
+from ...core.doc_category import DOC_CATEGORY_DISCOUNTS
from ...core.mutations import ModelMutation
from ...core.scalars import PositiveDecimal
from ...core.types import BaseInputObjectType, DiscountError, NonNullList
@@ -65,7 +65,7 @@ class SaleInput(BaseInputObjectType):
)
class Meta:
- doc_category = DOC_CATEGORY_PRODUCTS
+ doc_category = DOC_CATEGORY_DISCOUNTS
class SaleCreate(SaleUpdateDiscountedPriceMixin, ModelMutation):
diff --git a/saleor/graphql/discount/mutations/sale_remove_catalogues.py b/saleor/graphql/discount/mutations/sale_remove_catalogues.py
index aa65d65ef3..f0e435c4ca 100644
--- a/saleor/graphql/discount/mutations/sale_remove_catalogues.py
+++ b/saleor/graphql/discount/mutations/sale_remove_catalogues.py
@@ -6,7 +6,7 @@ from ....discount.utils import fetch_catalogue_info
from ....graphql.channel import ChannelContext
from ....permission.enums import DiscountPermissions
from ...core import ResolveInfo
-from ...core.doc_category import DOC_CATEGORY_PRODUCTS
+from ...core.doc_category import DOC_CATEGORY_DISCOUNTS
from ...core.types import DiscountError
from ...plugins.dataloaders import get_plugin_manager_promise
from ..types import Sale
@@ -17,7 +17,7 @@ from .utils import convert_catalogue_info_to_global_ids
class SaleRemoveCatalogues(SaleBaseCatalogueMutation):
class Meta:
description = "Removes products, categories, collections from a sale."
- doc_category = DOC_CATEGORY_PRODUCTS
+ doc_category = DOC_CATEGORY_DISCOUNTS
permissions = (DiscountPermissions.MANAGE_DISCOUNTS,)
error_type_class = DiscountError
error_type_field = "discount_errors"
diff --git a/saleor/graphql/discount/mutations/voucher_add_catalogues.py b/saleor/graphql/discount/mutations/voucher_add_catalogues.py
index bbfc3af9be..53f853f9a0 100644
--- a/saleor/graphql/discount/mutations/voucher_add_catalogues.py
+++ b/saleor/graphql/discount/mutations/voucher_add_catalogues.py
@@ -4,7 +4,7 @@ from ....permission.enums import DiscountPermissions
from ...channel import ChannelContext
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_31
-from ...core.doc_category import DOC_CATEGORY_PRODUCTS
+from ...core.doc_category import DOC_CATEGORY_DISCOUNTS
from ...core.types import BaseInputObjectType, DiscountError, NonNullList
from ...plugins.dataloaders import get_plugin_manager_promise
from ..types import Voucher
@@ -32,7 +32,7 @@ class CatalogueInput(BaseInputObjectType):
)
class Meta:
- doc_category = DOC_CATEGORY_PRODUCTS
+ doc_category = DOC_CATEGORY_DISCOUNTS
class VoucherBaseCatalogueMutation(BaseDiscountCatalogueMutation):
@@ -61,7 +61,7 @@ class VoucherBaseCatalogueMutation(BaseDiscountCatalogueMutation):
class VoucherAddCatalogues(VoucherBaseCatalogueMutation):
class Meta:
description = "Adds products, categories, collections to a voucher."
- doc_category = DOC_CATEGORY_PRODUCTS
+ doc_category = DOC_CATEGORY_DISCOUNTS
permissions = (DiscountPermissions.MANAGE_DISCOUNTS,)
error_type_class = DiscountError
error_type_field = "discount_errors"
diff --git a/saleor/graphql/discount/mutations/voucher_channel_listing_update.py b/saleor/graphql/discount/mutations/voucher_channel_listing_update.py
index 8b01f80c5b..5200b5b2ae 100644
--- a/saleor/graphql/discount/mutations/voucher_channel_listing_update.py
+++ b/saleor/graphql/discount/mutations/voucher_channel_listing_update.py
@@ -11,7 +11,7 @@ from ....permission.enums import DiscountPermissions
from ...channel import ChannelContext
from ...channel.mutations import BaseChannelListingMutation
from ...core import ResolveInfo
-from ...core.doc_category import DOC_CATEGORY_PRODUCTS
+from ...core.doc_category import DOC_CATEGORY_DISCOUNTS
from ...core.scalars import PositiveDecimal
from ...core.types import BaseInputObjectType, DiscountError, NonNullList
from ...core.validators import validate_price_precision
@@ -27,7 +27,7 @@ class VoucherChannelListingAddInput(BaseInputObjectType):
)
class Meta:
- doc_category = DOC_CATEGORY_PRODUCTS
+ doc_category = DOC_CATEGORY_DISCOUNTS
class VoucherChannelListingInput(BaseInputObjectType):
@@ -43,7 +43,7 @@ class VoucherChannelListingInput(BaseInputObjectType):
)
class Meta:
- doc_category = DOC_CATEGORY_PRODUCTS
+ doc_category = DOC_CATEGORY_DISCOUNTS
class VoucherChannelListingUpdate(BaseChannelListingMutation):
@@ -58,7 +58,7 @@ class VoucherChannelListingUpdate(BaseChannelListingMutation):
class Meta:
description = "Manage voucher's availability in channels."
- doc_category = DOC_CATEGORY_PRODUCTS
+ doc_category = DOC_CATEGORY_DISCOUNTS
permissions = (DiscountPermissions.MANAGE_DISCOUNTS,)
error_type_class = DiscountError
error_type_field = "discount_errors"
diff --git a/saleor/graphql/discount/mutations/voucher_create.py b/saleor/graphql/discount/mutations/voucher_create.py
index b625fd1388..0693dafcca 100644
--- a/saleor/graphql/discount/mutations/voucher_create.py
+++ b/saleor/graphql/discount/mutations/voucher_create.py
@@ -8,15 +8,16 @@ from ....permission.enums import DiscountPermissions
from ...channel import ChannelContext
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_31
+from ...core.doc_category import DOC_CATEGORY_DISCOUNTS
from ...core.mutations import ModelMutation
-from ...core.types import DiscountError, NonNullList
+from ...core.types import BaseInputObjectType, DiscountError, NonNullList
from ...core.validators import validate_end_is_after_start
from ...plugins.dataloaders import get_plugin_manager_promise
from ..enums import DiscountValueTypeEnum, VoucherTypeEnum
from ..types import Voucher
-class VoucherInput(graphene.InputObjectType):
+class VoucherInput(BaseInputObjectType):
type = VoucherTypeEnum(
description="Voucher type: PRODUCT, CATEGORY SHIPPING or ENTIRE_ORDER."
)
@@ -69,6 +70,9 @@ class VoucherInput(graphene.InputObjectType):
description="Limit number of times this voucher can be used in total."
)
+ class Meta:
+ doc_category = DOC_CATEGORY_DISCOUNTS
+
class VoucherCreate(ModelMutation):
class Arguments:
diff --git a/saleor/graphql/discount/mutations/voucher_remove_catalogues.py b/saleor/graphql/discount/mutations/voucher_remove_catalogues.py
index c86bac9796..45d1e6585f 100644
--- a/saleor/graphql/discount/mutations/voucher_remove_catalogues.py
+++ b/saleor/graphql/discount/mutations/voucher_remove_catalogues.py
@@ -1,6 +1,6 @@
from ....permission.enums import DiscountPermissions
from ...core import ResolveInfo
-from ...core.doc_category import DOC_CATEGORY_PRODUCTS
+from ...core.doc_category import DOC_CATEGORY_DISCOUNTS
from ...core.types import DiscountError
from ...plugins.dataloaders import get_plugin_manager_promise
from ..types import Voucher
@@ -10,7 +10,7 @@ from .voucher_add_catalogues import VoucherBaseCatalogueMutation
class VoucherRemoveCatalogues(VoucherBaseCatalogueMutation):
class Meta:
description = "Removes products, categories, collections from a voucher."
- doc_category = DOC_CATEGORY_PRODUCTS
+ doc_category = DOC_CATEGORY_DISCOUNTS
permissions = (DiscountPermissions.MANAGE_DISCOUNTS,)
error_type_class = DiscountError
error_type_field = "discount_errors"
diff --git a/saleor/graphql/discount/schema.py b/saleor/graphql/discount/schema.py
index f339204ab8..7576deabe5 100644
--- a/saleor/graphql/discount/schema.py
+++ b/saleor/graphql/discount/schema.py
@@ -30,11 +30,13 @@ from .types import Sale, SaleCountableConnection, Voucher, VoucherCountableConne
class VoucherFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_DISCOUNTS
filterset_class = VoucherFilter
class SaleFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_DISCOUNTS
filterset_class = SaleFilter
diff --git a/saleor/graphql/discount/sorters.py b/saleor/graphql/discount/sorters.py
index 1f11764557..18a2c3b395 100644
--- a/saleor/graphql/discount/sorters.py
+++ b/saleor/graphql/discount/sorters.py
@@ -2,10 +2,11 @@ import graphene
from django.db.models import Min, Q, QuerySet
from ..core.descriptions import CHANNEL_REQUIRED
-from ..core.types import ChannelSortInputObjectType
+from ..core.doc_category import DOC_CATEGORY_DISCOUNTS
+from ..core.types import BaseEnum, ChannelSortInputObjectType
-class SaleSortField(graphene.Enum):
+class SaleSortField(BaseEnum):
NAME = ["name", "pk"]
START_DATE = ["start_date", "name", "pk"]
END_DATE = ["end_date", "name", "pk"]
@@ -14,6 +15,9 @@ class SaleSortField(graphene.Enum):
CREATED_AT = ["created_at", "name", "pk"]
LAST_MODIFIED_AT = ["updated_at", "name", "pk"]
+ class Meta:
+ doc_category = DOC_CATEGORY_DISCOUNTS
+
@property
def description(self):
descrption_extras = {
@@ -39,6 +43,7 @@ class SaleSortField(graphene.Enum):
class SaleSortingInput(ChannelSortInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_DISCOUNTS
sort_enum = SaleSortField
type_name = "sales"
@@ -52,6 +57,9 @@ class VoucherSortField(graphene.Enum):
USAGE_LIMIT = ["usage_limit", "name", "code"]
MINIMUM_SPENT_AMOUNT = ["min_spent_amount", "name", "code"]
+ class Meta:
+ doc_category = DOC_CATEGORY_DISCOUNTS
+
@property
def description(self):
descrption_extras = {
@@ -87,5 +95,6 @@ class VoucherSortField(graphene.Enum):
class VoucherSortingInput(ChannelSortInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_DISCOUNTS
sort_enum = VoucherSortField
type_name = "vouchers"
diff --git a/saleor/graphql/giftcard/enums.py b/saleor/graphql/giftcard/enums.py
index 98a31bdff9..1d056ceeed 100644
--- a/saleor/graphql/giftcard/enums.py
+++ b/saleor/graphql/giftcard/enums.py
@@ -1,4 +1,6 @@
from ...giftcard import GiftCardEvents
+from ..core.doc_category import DOC_CATEGORY_GIFT_CARDS
from ..core.enums import to_enum
GiftCardEventsEnum = to_enum(GiftCardEvents)
+GiftCardEventsEnum.doc_category = DOC_CATEGORY_GIFT_CARDS
diff --git a/saleor/graphql/giftcard/filters.py b/saleor/graphql/giftcard/filters.py
index 9543865431..8024fd9663 100644
--- a/saleor/graphql/giftcard/filters.py
+++ b/saleor/graphql/giftcard/filters.py
@@ -10,13 +10,19 @@ from ...account import models as account_models
from ...giftcard import models
from ...order import models as order_models
from ...product import models as product_models
+from ..core.doc_category import DOC_CATEGORY_GIFT_CARDS
from ..core.filters import (
GlobalIDMultipleChoiceFilter,
ListObjectTypeFilter,
MetadataFilterBase,
ObjectTypeFilter,
)
-from ..core.types import FilterInputObjectType, NonNullList, PriceRangeInput
+from ..core.types import (
+ BaseInputObjectType,
+ FilterInputObjectType,
+ NonNullList,
+ PriceRangeInput,
+)
from ..utils import resolve_global_ids_to_primary_keys
from .enums import GiftCardEventsEnum
@@ -117,6 +123,7 @@ def check_currency_in_filter_data(filter_data: dict):
class GiftCardFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_GIFT_CARDS
filterset_class = GiftCardFilter
@@ -154,10 +161,13 @@ def _get_order_pks(order_ids: List[str]):
).values_list("id", flat=True)
-class GiftCardEventFilterInput(graphene.InputObjectType):
+class GiftCardEventFilterInput(BaseInputObjectType):
type = graphene.Argument(GiftCardEventsEnum)
orders = NonNullList(graphene.ID)
+ class Meta:
+ doc_category = DOC_CATEGORY_GIFT_CARDS
+
def filter_gift_card_tag_search(qs, _, value):
if not value:
@@ -171,4 +181,5 @@ class GiftCardTagFilter(django_filters.FilterSet):
class GiftCardTagFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_GIFT_CARDS
filterset_class = GiftCardTagFilter
diff --git a/saleor/graphql/giftcard/sorters.py b/saleor/graphql/giftcard/sorters.py
index 7c9311278a..aeb9c7e468 100644
--- a/saleor/graphql/giftcard/sorters.py
+++ b/saleor/graphql/giftcard/sorters.py
@@ -1,15 +1,17 @@
-import graphene
-
from ..core.descriptions import ADDED_IN_38
-from ..core.types import SortInputObjectType
+from ..core.doc_category import DOC_CATEGORY_GIFT_CARDS
+from ..core.types import BaseEnum, SortInputObjectType
-class GiftCardSortField(graphene.Enum):
+class GiftCardSortField(BaseEnum):
PRODUCT = ["product__name", "product__slug"]
USED_BY = ["used_by__first_name", "used_by__last_name", "created_at"]
CURRENT_BALANCE = ["current_balance_amount", "created_at"]
CREATED_AT = ["created_at", "id"]
+ class Meta:
+ doc_category = DOC_CATEGORY_GIFT_CARDS
+
@property
def description(self):
if self.name in GiftCardSortField.__enum__._member_names_:
@@ -23,5 +25,6 @@ class GiftCardSortField(graphene.Enum):
class GiftCardSortingInput(SortInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_GIFT_CARDS
sort_enum = GiftCardSortField
type_name = "gift cards"
diff --git a/saleor/graphql/giftcard/types.py b/saleor/graphql/giftcard/types.py
index deef1032e5..0a5a7a104e 100644
--- a/saleor/graphql/giftcard/types.py
+++ b/saleor/graphql/giftcard/types.py
@@ -20,10 +20,11 @@ from ..channel import ChannelContext
from ..channel.dataloaders import ChannelByIdLoader
from ..core.connection import CountableConnection
from ..core.descriptions import ADDED_IN_31, DEPRECATED_IN_3X_FIELD, PREVIEW_FEATURE
+from ..core.doc_category import DOC_CATEGORY_GIFT_CARDS
from ..core.fields import PermissionsField
from ..core.scalars import Date
from ..core.tracing import traced_resolver
-from ..core.types import ModelObjectType, Money, NonNullList
+from ..core.types import BaseObjectType, ModelObjectType, Money, NonNullList
from ..meta.types import ObjectWithMetadata
from ..order.dataloaders import OrderByIdLoader
from ..product.dataloaders.products import ProductByIdLoader
@@ -40,7 +41,7 @@ from .filters import (
)
-class GiftCardEventBalance(graphene.ObjectType):
+class GiftCardEventBalance(BaseObjectType):
initial_balance = graphene.Field(
Money,
description="Initial balance of the gift card.",
@@ -59,6 +60,9 @@ class GiftCardEventBalance(graphene.ObjectType):
description="Previous current balance of the gift card.",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_GIFT_CARDS
+
class GiftCardEvent(ModelObjectType[models.GiftCardEvent]):
id = graphene.GlobalID(required=True)
diff --git a/saleor/graphql/order/enums.py b/saleor/graphql/order/enums.py
index d56f66fef6..44a617b3c1 100644
--- a/saleor/graphql/order/enums.py
+++ b/saleor/graphql/order/enums.py
@@ -1,6 +1,5 @@
import graphene
-from ...graphql.core.enums import to_enum
from ...order import (
FulfillmentStatus,
OrderAuthorizeStatus,
@@ -12,6 +11,9 @@ from ...order import (
error_codes,
)
from ..core.descriptions import PREVIEW_FEATURE_DEPRECATED_IN_313_FIELD
+from ..core.doc_category import DOC_CATEGORY_ORDERS
+from ..core.enums import to_enum
+from ..core.types import BaseEnum
def order_event_enum_description(enum):
@@ -31,26 +33,42 @@ def order_event_enum_description(enum):
FulfillmentStatusEnum = to_enum(FulfillmentStatus, type_name="FulfillmentStatus")
+FulfillmentStatusEnum.doc_category = DOC_CATEGORY_ORDERS
+
OrderEventsEnum = to_enum(OrderEvents, description=order_event_enum_description)
+OrderEventsEnum.doc_category = DOC_CATEGORY_ORDERS
+
OrderEventsEmailsEnum = to_enum(OrderEventsEmails)
+OrderEventsEmailsEnum.doc_category = DOC_CATEGORY_ORDERS
+
OrderOriginEnum = to_enum(OrderOrigin)
+OrderOriginEnum.doc_category = DOC_CATEGORY_ORDERS
+
OrderStatusEnum = to_enum(OrderStatus, type_name="OrderStatus")
+OrderStatusEnum.doc_category = DOC_CATEGORY_ORDERS
+
OrderAuthorizeStatusEnum = to_enum(
OrderAuthorizeStatus, description=OrderAuthorizeStatus.__doc__
)
+OrderAuthorizeStatusEnum.doc_category = DOC_CATEGORY_ORDERS
+
OrderChargeStatusEnum = to_enum(
OrderChargeStatus, description=OrderChargeStatus.__doc__
)
+OrderChargeStatusEnum.doc_category = DOC_CATEGORY_ORDERS
OrderGrantRefundCreateErrorCode = graphene.Enum.from_enum(
error_codes.OrderGrantRefundCreateErrorCode
)
+OrderGrantRefundCreateErrorCode.doc_category = DOC_CATEGORY_ORDERS
+
OrderGrantRefundUpdateErrorCode = graphene.Enum.from_enum(
error_codes.OrderGrantRefundUpdateErrorCode
)
+OrderGrantRefundUpdateErrorCode.doc_category = DOC_CATEGORY_ORDERS
-class OrderStatusFilter(graphene.Enum):
+class OrderStatusFilter(BaseEnum):
READY_TO_FULFILL = "ready_to_fulfill"
READY_TO_CAPTURE = "ready_to_capture"
UNFULFILLED = "unfulfilled"
@@ -58,3 +76,6 @@ class OrderStatusFilter(graphene.Enum):
PARTIALLY_FULFILLED = "partially fulfilled"
FULFILLED = "fulfilled"
CANCELED = "canceled"
+
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
diff --git a/saleor/graphql/order/mutations/order_grant_refund_create.py b/saleor/graphql/order/mutations/order_grant_refund_create.py
index 186a1bf75b..2dd3c3a182 100644
--- a/saleor/graphql/order/mutations/order_grant_refund_create.py
+++ b/saleor/graphql/order/mutations/order_grant_refund_create.py
@@ -6,6 +6,7 @@ from ...core.descriptions import ADDED_IN_313, PREVIEW_FEATURE
from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.mutations import BaseMutation
from ...core.scalars import Decimal
+from ...core.types import BaseInputObjectType
from ...core.types.common import Error
from ..enums import OrderGrantRefundCreateErrorCode
from ..types import Order, OrderGrantedRefund
@@ -14,11 +15,17 @@ from ..types import Order, OrderGrantedRefund
class OrderGrantRefundCreateError(Error):
code = OrderGrantRefundCreateErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
-class OrderGrantRefundCreateInput(graphene.InputObjectType):
+class OrderGrantRefundCreateInput(BaseInputObjectType):
amount = Decimal(required=True, description="Amount of the granted refund.")
reason = graphene.String(description="Reason of the granted refund.")
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
class OrderGrantRefundCreate(BaseMutation):
order = graphene.Field(
diff --git a/saleor/graphql/order/mutations/order_grant_refund_update.py b/saleor/graphql/order/mutations/order_grant_refund_update.py
index da3b9318eb..4e9678dec4 100644
--- a/saleor/graphql/order/mutations/order_grant_refund_update.py
+++ b/saleor/graphql/order/mutations/order_grant_refund_update.py
@@ -7,6 +7,7 @@ from ...core.descriptions import ADDED_IN_313, PREVIEW_FEATURE
from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.mutations import ModelMutation
from ...core.scalars import Decimal
+from ...core.types import BaseInputObjectType
from ...core.types.common import Error
from ..enums import OrderGrantRefundUpdateErrorCode
from ..types import Order, OrderGrantedRefund
@@ -15,11 +16,17 @@ from ..types import Order, OrderGrantedRefund
class OrderGrantRefundUpdateError(Error):
code = OrderGrantRefundUpdateErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
-class OrderGrantRefundUpdateInput(graphene.InputObjectType):
+class OrderGrantRefundUpdateInput(BaseInputObjectType):
amount = Decimal(description="Amount of the granted refund.")
reason = graphene.String(description="Reason of the granted refund.")
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
class OrderGrantRefundUpdate(ModelMutation):
order = graphene.Field(
diff --git a/saleor/graphql/order/mutations/order_update.py b/saleor/graphql/order/mutations/order_update.py
index 60936d262c..ec5e8dee2d 100644
--- a/saleor/graphql/order/mutations/order_update.py
+++ b/saleor/graphql/order/mutations/order_update.py
@@ -12,14 +12,15 @@ from ....permission.enums import OrderPermissions
from ...account.types import AddressInput
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_310
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.mutations import ModelWithExtRefMutation
-from ...core.types import OrderError
+from ...core.types import BaseInputObjectType, OrderError
from ...plugins.dataloaders import get_plugin_manager_promise
from ..types import Order
from .draft_order_create import DraftOrderCreate
-class OrderUpdateInput(graphene.InputObjectType):
+class OrderUpdateInput(BaseInputObjectType):
billing_address = AddressInput(description="Billing address of the customer.")
user_email = graphene.String(description="Email address of the customer.")
shipping_address = AddressInput(description="Shipping address of the customer.")
@@ -27,6 +28,9 @@ class OrderUpdateInput(graphene.InputObjectType):
description="External ID of this order." + ADDED_IN_310, required=False
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
class OrderUpdate(DraftOrderCreate, ModelWithExtRefMutation):
class Arguments:
diff --git a/saleor/graphql/order/sorters.py b/saleor/graphql/order/sorters.py
index 8ff2b87d55..d32c95cc69 100644
--- a/saleor/graphql/order/sorters.py
+++ b/saleor/graphql/order/sorters.py
@@ -1,12 +1,12 @@
-import graphene
from django.db.models import CharField, ExpressionWrapper, OuterRef, QuerySet, Subquery
from ...payment.models import Payment
from ..core.descriptions import DEPRECATED_IN_3X_INPUT
-from ..core.types import SortInputObjectType
+from ..core.doc_category import DOC_CATEGORY_ORDERS
+from ..core.types import BaseEnum, SortInputObjectType
-class OrderSortField(graphene.Enum):
+class OrderSortField(BaseEnum):
NUMBER = ["number"]
RANK = ["search_rank", "id"]
CREATION_DATE = ["created_at", "status", "pk"]
@@ -16,6 +16,9 @@ class OrderSortField(graphene.Enum):
PAYMENT = ["last_charge_status", "status", "pk"]
FULFILLMENT_STATUS = ["status", "user_email", "pk"]
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
@property
def description(self):
descriptions = {
@@ -50,5 +53,6 @@ class OrderSortField(graphene.Enum):
class OrderSortingInput(SortInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
sort_enum = OrderSortField
type_name = "orders"
diff --git a/saleor/graphql/order/types.py b/saleor/graphql/order/types.py
index e701413eaa..bfc3f8d107 100644
--- a/saleor/graphql/order/types.py
+++ b/saleor/graphql/order/types.py
@@ -78,12 +78,14 @@ from ..core.descriptions import (
PREVIEW_FEATURE,
PREVIEW_FEATURE_DEPRECATED_IN_313_FIELD,
)
+from ..core.doc_category import DOC_CATEGORY_ORDERS
from ..core.enums import LanguageCodeEnum
from ..core.fields import PermissionsField
from ..core.mutations import validation_error_to_error_type
from ..core.scalars import PositiveDecimal
from ..core.tracing import traced_resolver
from ..core.types import (
+ BaseObjectType,
Image,
ModelObjectType,
Money,
@@ -239,7 +241,7 @@ class OrderGrantedRefund(ModelObjectType):
return None
-class OrderDiscount(graphene.ObjectType):
+class OrderDiscount(BaseObjectType):
value_type = graphene.Field(
DiscountValueTypeEnum,
required=True,
@@ -254,6 +256,9 @@ class OrderDiscount(graphene.ObjectType):
)
amount = graphene.Field(Money, description="Returns amount of discount.")
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
class OrderEventDiscountObject(OrderDiscount):
old_value_type = graphene.Field(
@@ -270,7 +275,7 @@ class OrderEventDiscountObject(OrderDiscount):
)
-class OrderEventOrderLineObject(graphene.ObjectType):
+class OrderEventOrderLineObject(BaseObjectType):
quantity = graphene.Int(description="The variant quantity.")
order_line = graphene.Field(lambda: OrderLine, description="The order line.")
item_name = graphene.String(description="The variant name.")
@@ -278,6 +283,9 @@ class OrderEventOrderLineObject(graphene.ObjectType):
OrderEventDiscountObject, description="The discount applied to the order line."
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
class OrderEvent(ModelObjectType[models.OrderEvent]):
id = graphene.GlobalID(required=True)
diff --git a/saleor/graphql/page/filters.py b/saleor/graphql/page/filters.py
index 1050a156b8..f0d54a2502 100644
--- a/saleor/graphql/page/filters.py
+++ b/saleor/graphql/page/filters.py
@@ -3,6 +3,7 @@ import graphene
from django.db.models import Q
from ...page import models
+from ..core.doc_category import DOC_CATEGORY_PAGES
from ..core.filters import (
GlobalIDMultipleChoiceFilter,
ListObjectTypeFilter,
@@ -51,6 +52,7 @@ class PageFilter(MetadataFilterBase):
class PageFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_PAGES
filterset_class = PageFilter
@@ -61,4 +63,5 @@ class PageTypeFilter(django_filters.FilterSet):
class PageTypeFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_PAGES
filterset_class = PageTypeFilter
diff --git a/saleor/graphql/page/sorters.py b/saleor/graphql/page/sorters.py
index 1f1e8cb86e..5836e82bb3 100644
--- a/saleor/graphql/page/sorters.py
+++ b/saleor/graphql/page/sorters.py
@@ -1,10 +1,9 @@
-import graphene
-
from ..core.descriptions import ADDED_IN_38, DEPRECATED_IN_3X_INPUT
-from ..core.types import SortInputObjectType
+from ..core.doc_category import DOC_CATEGORY_PAGES
+from ..core.types import BaseEnum, SortInputObjectType
-class PageSortField(graphene.Enum):
+class PageSortField(BaseEnum):
TITLE = ["title", "slug"]
SLUG = ["slug"]
VISIBILITY = ["is_published", "title", "slug"]
@@ -13,6 +12,9 @@ class PageSortField(graphene.Enum):
PUBLISHED_AT = ["published_at", "title", "slug"]
CREATED_AT = ["created_at", "title", "slug"]
+ class Meta:
+ doc_category = DOC_CATEGORY_PAGES
+
@property
def description(self):
if self.name in PageSortField.__enum__._member_names_:
@@ -30,14 +32,18 @@ class PageSortField(graphene.Enum):
class PageSortingInput(SortInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_PAGES
sort_enum = PageSortField
type_name = "pages"
-class PageTypeSortField(graphene.Enum):
+class PageTypeSortField(BaseEnum):
NAME = ["name", "slug"]
SLUG = ["slug"]
+ class Meta:
+ doc_category = DOC_CATEGORY_PAGES
+
@property
def description(self):
if self.name in PageTypeSortField.__enum__._member_names_:
@@ -48,5 +54,6 @@ class PageTypeSortField(graphene.Enum):
class PageTypeSortingInput(SortInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_PAGES
sort_enum = PageTypeSortField
type_name = "page types"
diff --git a/saleor/graphql/payment/enums.py b/saleor/graphql/payment/enums.py
index e3ace62ccd..2c20eca059 100644
--- a/saleor/graphql/payment/enums.py
+++ b/saleor/graphql/payment/enums.py
@@ -1,5 +1,3 @@
-import graphene
-
from ...payment import (
ChargeStatus,
StorePaymentMethod,
@@ -8,31 +6,45 @@ from ...payment import (
TransactionEventType,
TransactionKind,
)
+from ..core.doc_category import DOC_CATEGORY_PAYMENTS
from ..core.enums import to_enum
+from ..core.types import BaseEnum
TransactionKindEnum = to_enum(TransactionKind, type_name="TransactionKind")
+TransactionKindEnum.doc_category = DOC_CATEGORY_PAYMENTS
+
PaymentChargeStatusEnum = to_enum(ChargeStatus, type_name="PaymentChargeStatusEnum")
+PaymentChargeStatusEnum.doc_category = DOC_CATEGORY_PAYMENTS
+
TransactionActionEnum = to_enum(
TransactionAction,
type_name="TransactionActionEnum",
description=TransactionAction.__doc__,
)
+TransactionActionEnum.doc_category = DOC_CATEGORY_PAYMENTS
+
TransactionEventTypeEnum = to_enum(
TransactionEventType, description=TransactionEventType.__doc__
)
+TransactionEventTypeEnum.doc_category = DOC_CATEGORY_PAYMENTS
+
TransactionEventStatusEnum = to_enum(
TransactionEventStatus,
type_name="TransactionStatus",
description=TransactionEventStatus.__doc__,
)
+TransactionEventStatusEnum.doc_category = DOC_CATEGORY_PAYMENTS
-class OrderAction(graphene.Enum):
+class OrderAction(BaseEnum):
CAPTURE = "CAPTURE"
MARK_AS_PAID = "MARK_AS_PAID"
REFUND = "REFUND"
VOID = "VOID"
+ class Meta:
+ doc_category = DOC_CATEGORY_PAYMENTS
+
@property
def description(self):
if self == OrderAction.CAPTURE:
@@ -68,3 +80,4 @@ def description(enum):
StorePaymentMethodEnum = to_enum(
StorePaymentMethod, type_name="StorePaymentMethodEnum", description=description
)
+StorePaymentMethodEnum.doc_category = DOC_CATEGORY_PAYMENTS
diff --git a/saleor/graphql/payment/filters.py b/saleor/graphql/payment/filters.py
index 5256c9dcca..5ceec18384 100644
--- a/saleor/graphql/payment/filters.py
+++ b/saleor/graphql/payment/filters.py
@@ -1,6 +1,7 @@
import django_filters
from ..core.descriptions import ADDED_IN_38
+from ..core.doc_category import DOC_CATEGORY_PAYMENTS
from ..core.filters import GlobalIDMultipleChoiceFilter
from ..core.types import FilterInputObjectType
from .types import Payment
@@ -19,4 +20,5 @@ class PaymentFilter(django_filters.FilterSet):
class PaymentFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_PAYMENTS
filterset_class = PaymentFilter
diff --git a/saleor/graphql/payment/mutations.py b/saleor/graphql/payment/mutations.py
index 607f59d72b..5c1f6d9e91 100644
--- a/saleor/graphql/payment/mutations.py
+++ b/saleor/graphql/payment/mutations.py
@@ -34,6 +34,7 @@ from ...payment import models as payment_models
from ...payment.error_codes import (
PaymentErrorCode,
TransactionCreateErrorCode,
+ TransactionEventReportErrorCode,
TransactionRequestActionErrorCode,
TransactionUpdateErrorCode,
)
@@ -70,8 +71,7 @@ from ..core.descriptions import (
PREVIEW_FEATURE,
PREVIEW_FEATURE_DEPRECATED_IN_313_INPUT,
)
-from ..core.doc_category import DOC_CATEGORY_PAYMENTS
-from ..core.enums import TransactionEventReportErrorCode
+from ..core.doc_category import DOC_CATEGORY_CHECKOUT, DOC_CATEGORY_PAYMENTS
from ..core.fields import JSONString
from ..core.mutations import BaseMutation, ModelMutation
from ..core.scalars import UUID, PositiveDecimal
@@ -165,7 +165,7 @@ class CheckoutPaymentCreate(BaseMutation, I18nMixin):
class Meta:
description = "Create a new payment for given checkout."
- doc_category = DOC_CATEGORY_PAYMENTS
+ doc_category = DOC_CATEGORY_CHECKOUT
error_type_class = common_types.PaymentError
error_type_field = "payment_errors"
diff --git a/saleor/graphql/payment/types.py b/saleor/graphql/payment/types.py
index f0d5ce7648..40c68c5aa0 100644
--- a/saleor/graphql/payment/types.py
+++ b/saleor/graphql/payment/types.py
@@ -16,9 +16,10 @@ from ..core.descriptions import (
PREVIEW_FEATURE,
PREVIEW_FEATURE_DEPRECATED_IN_313_FIELD,
)
+from ..core.doc_category import DOC_CATEGORY_PAYMENTS
from ..core.fields import JSONString, PermissionsField
from ..core.tracing import traced_resolver
-from ..core.types import ModelObjectType, Money, NonNullList
+from ..core.types import BaseObjectType, ModelObjectType, Money, NonNullList
from ..meta.permissions import public_payment_permissions
from ..meta.resolvers import resolve_metadata
from ..meta.types import MetadataItem, ObjectWithMetadata
@@ -63,7 +64,7 @@ class Transaction(ModelObjectType[models.Transaction]):
return root.get_amount()
-class CreditCard(graphene.ObjectType):
+class CreditCard(BaseObjectType):
brand = graphene.String(description="Card brand.", required=True)
first_digits = graphene.String(
description="First 4 digits of the card number.", required=False
@@ -80,13 +81,17 @@ class CreditCard(graphene.ObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PAYMENTS
+
-class PaymentSource(graphene.ObjectType):
+class PaymentSource(BaseObjectType):
class Meta:
description = (
"Represents a payment source stored "
"for user in payment gateway, such as credit card."
)
+ doc_category = DOC_CATEGORY_PAYMENTS
gateway = graphene.String(description="Payment gateway name.", required=True)
payment_method_id = graphene.String(description="ID of stored payment method.")
@@ -242,13 +247,14 @@ class PaymentCountableConnection(CountableConnection):
node = Payment
-class PaymentInitialized(graphene.ObjectType):
+class PaymentInitialized(BaseObjectType):
class Meta:
description = (
"Server-side data generated by a payment gateway. Optional step when the "
"payment provider requires an additional action to initialize payment "
"session."
)
+ doc_category = DOC_CATEGORY_PAYMENTS
gateway = graphene.String(description="ID of a payment gateway.", required=True)
name = graphene.String(description="Payment gateway name.", required=True)
diff --git a/saleor/graphql/product/enums.py b/saleor/graphql/product/enums.py
index 50cf35d032..9fda8d52c2 100644
--- a/saleor/graphql/product/enums.py
+++ b/saleor/graphql/product/enums.py
@@ -4,7 +4,10 @@ from ..core.enums import to_enum
from ..core.types import BaseEnum
ProductTypeKindEnum = to_enum(ProductTypeKind)
+ProductTypeKindEnum.doc_category = DOC_CATEGORY_PRODUCTS
+
ProductMediaType = to_enum(ProductMediaTypes, type_name="ProductMediaType")
+ProductMediaType.doc_category = DOC_CATEGORY_PRODUCTS
class ProductAttributeType(BaseEnum):
diff --git a/saleor/graphql/product/filters.py b/saleor/graphql/product/filters.py
index 1289ed1364..b07c232710 100644
--- a/saleor/graphql/product/filters.py
+++ b/saleor/graphql/product/filters.py
@@ -37,6 +37,7 @@ from ...product.search import search_products
from ...warehouse.models import Allocation, Reservation, Stock, Warehouse
from ..channel.filters import get_channel_slug_from_filter_data
from ..core.descriptions import ADDED_IN_38
+from ..core.doc_category import DOC_CATEGORY_PRODUCTS
from ..core.filters import (
EnumFilter,
GlobalIDMultipleChoiceFilter,
@@ -46,6 +47,7 @@ from ..core.filters import (
filter_slug_list,
)
from ..core.types import (
+ BaseInputObjectType,
ChannelFilterInputObjectType,
DateTimeRangeInput,
FilterInputObjectType,
@@ -654,10 +656,13 @@ def filter_updated_at_range(qs, _, value):
return filter_range_field(qs, "updated_at", value)
-class ProductStockFilterInput(graphene.InputObjectType):
+class ProductStockFilterInput(BaseInputObjectType):
warehouse_ids = NonNullList(graphene.ID, required=False)
quantity = graphene.Field(IntRangeInput, required=False)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class ProductFilter(MetadataFilterBase):
is_published = django_filters.BooleanFilter(method="filter_is_published")
@@ -888,24 +893,29 @@ class ProductTypeFilter(MetadataFilterBase):
class ProductFilterInput(ChannelFilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
filterset_class = ProductFilter
class ProductVariantFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
filterset_class = ProductVariantFilter
class CollectionFilterInput(ChannelFilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
filterset_class = CollectionFilter
class CategoryFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
filterset_class = CategoryFilter
class ProductTypeFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
filterset_class = ProductTypeFilter
diff --git a/saleor/graphql/product/mutations/category/category_create.py b/saleor/graphql/product/mutations/category/category_create.py
index 40c44e94b6..c485a17920 100644
--- a/saleor/graphql/product/mutations/category/category_create.py
+++ b/saleor/graphql/product/mutations/category/category_create.py
@@ -7,9 +7,16 @@ from .....product import models
from .....product.error_codes import ProductErrorCode
from ....core import ResolveInfo
from ....core.descriptions import ADDED_IN_38, RICH_CONTENT
+from ....core.doc_category import DOC_CATEGORY_PRODUCTS
from ....core.fields import JSONString
from ....core.mutations import ModelMutation
-from ....core.types import NonNullList, ProductError, SeoInput, Upload
+from ....core.types import (
+ BaseInputObjectType,
+ NonNullList,
+ ProductError,
+ SeoInput,
+ Upload,
+)
from ....core.validators import clean_seo_fields, validate_slug_and_generate_if_needed
from ....core.validators.file import clean_image_file
from ....meta.mutations import MetadataInput
@@ -17,7 +24,7 @@ from ....plugins.dataloaders import get_plugin_manager_promise
from ...types import Category
-class CategoryInput(graphene.InputObjectType):
+class CategoryInput(BaseInputObjectType):
description = JSONString(description="Category description." + RICH_CONTENT)
name = graphene.String(description="Category name.")
slug = graphene.String(description="Category slug.")
@@ -37,6 +44,9 @@ class CategoryInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class CategoryCreate(ModelMutation):
class Arguments:
diff --git a/saleor/graphql/product/types/channels.py b/saleor/graphql/product/types/channels.py
index 578dbb907f..864b1d05a0 100644
--- a/saleor/graphql/product/types/channels.py
+++ b/saleor/graphql/product/types/channels.py
@@ -28,10 +28,11 @@ from ...core.descriptions import (
DEPRECATED_IN_3X_FIELD,
PREVIEW_FEATURE,
)
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
from ...core.fields import PermissionsField
from ...core.scalars import Date
from ...core.tracing import traced_resolver
-from ...core.types import ModelObjectType
+from ...core.types import BaseObjectType, ModelObjectType
from ...discount.dataloaders import DiscountsByDateTimeLoader
from ...tax.dataloaders import (
TaxClassByProductIdLoader,
@@ -49,10 +50,13 @@ from ..dataloaders import (
)
-class Margin(graphene.ObjectType):
+class Margin(BaseObjectType):
start = graphene.Int()
stop = graphene.Int()
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class ProductChannelListing(ModelObjectType[models.ProductChannelListing]):
id = graphene.GlobalID(required=True)
@@ -323,7 +327,7 @@ class ProductChannelListing(ModelObjectType[models.ProductChannelListing]):
)
-class PreorderThreshold(graphene.ObjectType):
+class PreorderThreshold(BaseObjectType):
quantity = graphene.Int(
required=False,
description="Preorder threshold for product variant in this channel.",
@@ -334,6 +338,7 @@ class PreorderThreshold(graphene.ObjectType):
)
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
description = "Represents preorder variant data for channel."
diff --git a/saleor/graphql/product/types/products.py b/saleor/graphql/product/types/products.py
index d0ada41f3b..30e529507e 100644
--- a/saleor/graphql/product/types/products.py
+++ b/saleor/graphql/product/types/products.py
@@ -62,6 +62,7 @@ from ...core.descriptions import (
PREVIEW_FEATURE,
RICH_CONTENT,
)
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
from ...core.enums import ReportingPeriod
from ...core.federation import federated_entity, resolve_federation_references
from ...core.fields import (
@@ -73,6 +74,7 @@ from ...core.fields import (
from ...core.scalars import Date
from ...core.tracing import traced_resolver
from ...core.types import (
+ BaseObjectType,
Image,
ModelObjectType,
NonNullList,
@@ -157,12 +159,7 @@ destination_address_argument = graphene.Argument(
)
-class Margin(graphene.ObjectType):
- start = graphene.Int()
- stop = graphene.Int()
-
-
-class BasePricingInfo(graphene.ObjectType):
+class BasePricingInfo(BaseObjectType):
on_sale = graphene.Boolean(description="Whether it is in sale or not.")
discount = graphene.Field(
TaxedMoney, description="The discount amount if in sale (null otherwise)."
@@ -171,6 +168,9 @@ class BasePricingInfo(graphene.ObjectType):
TaxedMoney, description="The discount amount in the local currency."
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class VariantPricingInfo(BasePricingInfo):
discount_local_currency = graphene.Field(
@@ -187,6 +187,7 @@ class VariantPricingInfo(BasePricingInfo):
)
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
description = "Represents availability of a variant in the storefront."
@@ -215,10 +216,11 @@ class ProductPricingInfo(BasePricingInfo):
)
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
description = "Represents availability of a product in the storefront."
-class PreorderData(graphene.ObjectType):
+class PreorderData(BaseObjectType):
global_threshold = PermissionsField(
graphene.Int,
required=False,
@@ -234,6 +236,7 @@ class PreorderData(graphene.ObjectType):
end_date = graphene.DateTime(required=False, description="Preorder end date.")
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
description = "Represents preorder settings for product variant."
@staticmethod
@@ -1826,7 +1829,7 @@ class ProductMedia(ModelObjectType[models.ProductMedia]):
return graphene.Node.to_global_id("Product", root.product_id)
-class ProductImage(graphene.ObjectType):
+class ProductImage(BaseObjectType):
id = graphene.ID(required=True, description="The ID of the image.")
alt = graphene.String(description="The alt text of the image.")
sort_order = graphene.Int(
@@ -1840,6 +1843,7 @@ class ProductImage(graphene.ObjectType):
url = ThumbnailField(graphene.String, required=True)
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
description = "Represents a product image."
@staticmethod
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index 506a5869c7..aa89bc5c25 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -1517,7 +1517,7 @@ type WebhookEvent @doc(category: "Webhooks") {
}
"""Enum determining type of webhook."""
-enum WebhookEventTypeEnum {
+enum WebhookEventTypeEnum @doc(category: "Webhooks") {
"""All the events."""
ANY_EVENTS
@@ -2038,7 +2038,7 @@ type WebhookEventSync @doc(category: "Webhooks") {
}
"""Enum determining type of webhook."""
-enum WebhookEventTypeSyncEnum {
+enum WebhookEventTypeSyncEnum @doc(category: "Webhooks") {
"""Authorize payment."""
PAYMENT_AUTHORIZE
@@ -2125,7 +2125,7 @@ type WebhookEventAsync @doc(category: "Webhooks") {
}
"""Enum determining type of webhook."""
-enum WebhookEventTypeAsyncEnum {
+enum WebhookEventTypeAsyncEnum @doc(category: "Webhooks") {
"""All the events."""
ANY_EVENTS
@@ -2756,7 +2756,7 @@ type Permission {
}
"""An enumeration."""
-enum PermissionEnum {
+enum PermissionEnum @doc(category: "Users") {
MANAGE_USERS
MANAGE_STAFF
IMPERSONATE_USER
@@ -2790,7 +2790,7 @@ value as specified by
scalar DateTime
"""Enum determining type of your App."""
-enum AppTypeEnum {
+enum AppTypeEnum @doc(category: "Apps") {
"""
Local Saleor App. The app is fully manageable from dashboard. You can change assigned permissions, add webhooks, or authentication token
"""
@@ -2838,7 +2838,7 @@ type AppExtension implements Node @doc(category: "Apps") {
}
"""All places where app extension can be mounted."""
-enum AppExtensionMountEnum {
+enum AppExtensionMountEnum @doc(category: "Apps") {
CUSTOMER_OVERVIEW_CREATE
CUSTOMER_OVERVIEW_MORE_ACTIONS
CUSTOMER_DETAILS_MORE_ACTIONS
@@ -2862,7 +2862,7 @@ All available ways of opening an app extension.
POPUP - app's extension will be mounted as a popup window
APP_PAGE - redirect to app's page
"""
-enum AppExtensionTargetEnum {
+enum AppExtensionTargetEnum @doc(category: "Apps") {
POPUP
APP_PAGE
}
@@ -2934,7 +2934,7 @@ type EventDelivery implements Node {
payload: String
}
-enum EventDeliveryStatusEnum {
+enum EventDeliveryStatusEnum @doc(category: "Webhooks") {
PENDING
SUCCESS
FAILED
@@ -2986,7 +2986,7 @@ type EventDeliveryAttempt implements Node @doc(category: "Webhooks") {
status: EventDeliveryStatusEnum!
}
-input EventDeliveryAttemptSortingInput {
+input EventDeliveryAttemptSortingInput @doc(category: "Webhooks") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -3002,12 +3002,12 @@ enum OrderDirection {
DESC
}
-enum EventDeliveryAttemptSortField {
+enum EventDeliveryAttemptSortField @doc(category: "Webhooks") {
"""Sort event delivery attempts by created at."""
CREATED_AT
}
-input EventDeliverySortingInput {
+input EventDeliverySortingInput @doc(category: "Webhooks") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -3015,7 +3015,7 @@ input EventDeliverySortingInput {
field: EventDeliverySortField!
}
-enum EventDeliverySortField {
+enum EventDeliverySortField @doc(category: "Webhooks") {
"""Sort event deliveries by created at."""
CREATED_AT
}
@@ -3028,7 +3028,7 @@ input EventDeliveryFilterInput {
scalar JSONString
"""An enumeration."""
-enum WebhookSampleEventTypeEnum {
+enum WebhookSampleEventTypeEnum @doc(category: "Webhooks") {
ADDRESS_CREATED
ADDRESS_UPDATED
ADDRESS_DELETED
@@ -3345,7 +3345,7 @@ type ReducedRate {
}
"""An enumeration."""
-enum WarehouseClickAndCollectOptionEnum {
+enum WarehouseClickAndCollectOptionEnum @doc(category: "Products") {
DISABLED
LOCAL
ALL
@@ -3591,7 +3591,7 @@ type ShippingMethodType implements Node & ObjectWithMetadata @doc(category: "Shi
}
"""An enumeration."""
-enum ShippingMethodTypeEnum {
+enum ShippingMethodTypeEnum @doc(category: "Shipping") {
PRICE
WEIGHT
}
@@ -4512,7 +4512,7 @@ Added in Saleor 3.6.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type ShippingMethodsPerCountry {
+type ShippingMethodsPerCountry @doc(category: "Shipping") {
"""The country code."""
countryCode: CountryCode!
@@ -4777,7 +4777,7 @@ enum CountryCode {
"""
Shipping methods that can be used as means of shipping for orders and checkouts.
"""
-type ShippingMethod implements Node & ObjectWithMetadata {
+type ShippingMethod implements Node & ObjectWithMetadata @doc(category: "Shipping") {
"""Unique ID of ShippingMethod available for Order."""
id: ID!
@@ -4898,7 +4898,7 @@ Determine the allocation strategy for the channel.
PRIORITIZE_HIGH_STOCK - allocate stock in a warehouse with the most stock
"""
-enum AllocationStrategyEnum {
+enum AllocationStrategyEnum @doc(category: "Products") {
PRIORITIZE_SORTING_ORDER
PRIORITIZE_HIGH_STOCK
}
@@ -4936,7 +4936,7 @@ Determine the mark as paid strategy for the channel.
PAYMENT_FLOW - new orders marked as paid will receive a
`Payment` object, that will cover the `order.total`.
"""
-enum MarkAsPaidStrategyEnum {
+enum MarkAsPaidStrategyEnum @doc(category: "Channels") {
TRANSACTION_FLOW
PAYMENT_FLOW
}
@@ -4957,7 +4957,7 @@ type ShippingMethodPostalCodeRule implements Node @doc(category: "Shipping") {
}
"""An enumeration."""
-enum PostalCodeRuleInclusionTypeEnum {
+enum PostalCodeRuleInclusionTypeEnum @doc(category: "Shipping") {
INCLUDE
EXCLUDE
}
@@ -5326,13 +5326,13 @@ type ProductType implements Node & ObjectWithMetadata @doc(category: "Products")
}
"""An enumeration."""
-enum ProductTypeKindEnum {
+enum ProductTypeKindEnum @doc(category: "Products") {
NORMAL
GIFT_CARD
}
"""Representation of tax types fetched from tax gateway."""
-type TaxType {
+type TaxType @doc(category: "Taxes") {
"""Description of the tax type."""
description: String
@@ -5587,7 +5587,7 @@ type Attribute implements Node & ObjectWithMetadata @doc(category: "Attributes")
}
"""An enumeration."""
-enum AttributeInputTypeEnum {
+enum AttributeInputTypeEnum @doc(category: "Attributes") {
DROPDOWN
MULTISELECT
FILE
@@ -5602,14 +5602,14 @@ enum AttributeInputTypeEnum {
}
"""An enumeration."""
-enum AttributeEntityTypeEnum {
+enum AttributeEntityTypeEnum @doc(category: "Attributes") {
PAGE
PRODUCT
PRODUCT_VARIANT
}
"""An enumeration."""
-enum AttributeTypeEnum {
+enum AttributeTypeEnum @doc(category: "Attributes") {
PRODUCT_TYPE
PAGE_TYPE
}
@@ -6124,7 +6124,7 @@ type CategoryCountableEdge {
cursor: String!
}
-input ProductFilterInput {
+input ProductFilterInput @doc(category: "Products") {
isPublished: Boolean
collections: [ID!]
categories: [ID!]
@@ -6238,7 +6238,7 @@ enum StockAvailability @doc(category: "Products") {
OUT_OF_STOCK
}
-input ProductStockFilterInput {
+input ProductStockFilterInput @doc(category: "Products") {
warehouseIds: [ID!]
quantity: IntRangeInput
}
@@ -6562,7 +6562,7 @@ type ProductVariant implements Node & ObjectWithMetadata @doc(category: "Product
}
"""Represents product varaint channel listing."""
-type ProductVariantChannelListing implements Node {
+type ProductVariantChannelListing implements Node @doc(category: "Products") {
id: ID!
channel: Channel!
price: Money
@@ -6588,7 +6588,7 @@ type ProductVariantChannelListing implements Node {
}
"""Represents preorder variant data for channel."""
-type PreorderThreshold {
+type PreorderThreshold @doc(category: "Products") {
"""Preorder threshold for product variant in this channel."""
quantity: Int
@@ -6597,7 +6597,7 @@ type PreorderThreshold {
}
"""Represents availability of a variant in the storefront."""
-type VariantPricingInfo {
+type VariantPricingInfo @doc(category: "Products") {
"""Whether it is in sale or not."""
onSale: Boolean
@@ -6684,7 +6684,7 @@ enum ReportingPeriod {
}
"""Represents a product image."""
-type ProductImage {
+type ProductImage @doc(category: "Products") {
"""The ID of the image."""
id: ID!
@@ -6802,7 +6802,7 @@ type ProductMedia implements Node & ObjectWithMetadata @doc(category: "Products"
}
"""An enumeration."""
-enum ProductMediaType {
+enum ProductMediaType @doc(category: "Products") {
IMAGE
VIDEO
}
@@ -6920,7 +6920,7 @@ type Stock implements Node @doc(category: "Products") {
}
"""Represents preorder settings for product variant."""
-type PreorderData {
+type PreorderData @doc(category: "Products") {
"""
The global preorder threshold for product variant.
@@ -6940,7 +6940,7 @@ type PreorderData {
}
"""Represents availability of a product in the storefront."""
-type ProductPricingInfo {
+type ProductPricingInfo @doc(category: "Products") {
"""Whether it is in sale or not."""
onSale: Boolean
@@ -6981,7 +6981,7 @@ type TaxedMoneyRange {
}
"""Represents product channel listing."""
-type ProductChannelListing implements Node {
+type ProductChannelListing implements Node @doc(category: "Products") {
id: ID!
publicationDate: Date @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `publishedAt` field to fetch the publication date.")
@@ -7034,7 +7034,7 @@ type ProductChannelListing implements Node {
): ProductPricingInfo
}
-type Margin {
+type Margin @doc(category: "Products") {
start: Int
stop: Int
}
@@ -7238,7 +7238,7 @@ type ProductTranslation implements Node {
descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.")
}
-type WarehouseCountableConnection {
+type WarehouseCountableConnection @doc(category: "Products") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [WarehouseCountableEdge!]!
@@ -7255,7 +7255,7 @@ type WarehouseCountableEdge {
cursor: String!
}
-input WarehouseFilterInput {
+input WarehouseFilterInput @doc(category: "Products") {
clickAndCollectOption: WarehouseClickAndCollectOptionEnum
search: String
ids: [ID!]
@@ -7264,7 +7264,7 @@ input WarehouseFilterInput {
slugs: [String!]
}
-input WarehouseSortingInput {
+input WarehouseSortingInput @doc(category: "Products") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -7272,7 +7272,7 @@ input WarehouseSortingInput {
field: WarehouseSortField!
}
-enum WarehouseSortField {
+enum WarehouseSortField @doc(category: "Products") {
"""Sort warehouses by name."""
NAME
}
@@ -7891,7 +7891,7 @@ type Sale implements Node & ObjectWithMetadata @doc(category: "Discounts") {
currency: String
}
-enum SaleType {
+enum SaleType @doc(category: "Discounts") {
FIXED
PERCENTAGE
}
@@ -8132,12 +8132,12 @@ type Voucher implements Node & ObjectWithMetadata @doc(category: "Discounts") {
channelListings: [VoucherChannelListing!]
}
-enum DiscountValueTypeEnum {
+enum DiscountValueTypeEnum @doc(category: "Discounts") {
FIXED
PERCENTAGE
}
-enum VoucherTypeEnum {
+enum VoucherTypeEnum @doc(category: "Discounts") {
SHIPPING
ENTIRE_ORDER
SPECIFIC_PRODUCT
@@ -8404,7 +8404,7 @@ type TaxConfiguration implements Node & ObjectWithMetadata @doc(category: "Taxes
countries: [TaxConfigurationPerCountry!]!
}
-enum TaxCalculationStrategy {
+enum TaxCalculationStrategy @doc(category: "Taxes") {
FLAT_RATES
TAX_APP
}
@@ -8507,7 +8507,7 @@ type TaxCountryConfiguration @doc(category: "Taxes") {
taxClassCountryRates: [TaxClassCountryRate!]!
}
-type StockCountableConnection {
+type StockCountableConnection @doc(category: "Products") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [StockCountableEdge!]!
@@ -8524,7 +8524,7 @@ type StockCountableEdge {
cursor: String!
}
-input StockFilterInput {
+input StockFilterInput @doc(category: "Products") {
quantity: Float
search: String
}
@@ -8741,7 +8741,7 @@ type Shop {
"""
Available payment gateway backend with configuration necessary to setup client.
"""
-type PaymentGateway {
+type PaymentGateway @doc(category: "Payments") {
"""Payment gateway name."""
name: String!
@@ -8756,7 +8756,7 @@ type PaymentGateway {
}
"""Payment gateway client configuration key and value pair."""
-type GatewayConfigLine {
+type GatewayConfigLine @doc(category: "Payments") {
"""Gateway config key."""
field: String!
@@ -9389,7 +9389,7 @@ type GiftCardEvent implements Node {
}
"""An enumeration."""
-enum GiftCardEventsEnum {
+enum GiftCardEventsEnum @doc(category: "Gift cards") {
ISSUED
BOUGHT
UPDATED
@@ -9404,7 +9404,7 @@ enum GiftCardEventsEnum {
USED_IN_ORDER
}
-type GiftCardEventBalance {
+type GiftCardEventBalance @doc(category: "Gift cards") {
"""Initial balance of the gift card."""
initialBalance: Money
@@ -9418,7 +9418,7 @@ type GiftCardEventBalance {
oldCurrentBalance: Money
}
-input GiftCardEventFilterInput {
+input GiftCardEventFilterInput @doc(category: "Gift cards") {
type: GiftCardEventsEnum
orders: [ID!]
}
@@ -9700,7 +9700,7 @@ Represents possible actions on payment transaction.
in Saleor 3.14 (Preview Feature). Use `CANCEL` instead.
CANCEL - Represents a cancel action. Added in Saleor 3.12.
"""
-enum TransactionActionEnum {
+enum TransactionActionEnum @doc(category: "Payments") {
CHARGE
REFUND
VOID
@@ -10116,7 +10116,7 @@ type Order implements Node & ObjectWithMetadata @doc(category: "Orders") {
}
"""An enumeration."""
-enum OrderStatus {
+enum OrderStatus @doc(category: "Orders") {
DRAFT
UNCONFIRMED
UNFULFILLED
@@ -10192,7 +10192,7 @@ type Fulfillment implements Node & ObjectWithMetadata @doc(category: "Orders") {
}
"""An enumeration."""
-enum FulfillmentStatus {
+enum FulfillmentStatus @doc(category: "Orders") {
FULFILLED
REFUNDED
RETURNED
@@ -10388,7 +10388,7 @@ Should be used in places where value must be nonnegative (0 or greater).
scalar PositiveDecimal
"""Represents allocation."""
-type Allocation implements Node {
+type Allocation implements Node @doc(category: "Products") {
id: ID!
"""
@@ -10406,7 +10406,7 @@ type Allocation implements Node {
warehouse: Warehouse!
}
-enum OrderAction {
+enum OrderAction @doc(category: "Payments") {
"""Represents the capture action."""
CAPTURE
@@ -10513,14 +10513,14 @@ enum JobStatusEnum {
}
"""An enumeration."""
-enum OrderOriginEnum {
+enum OrderOriginEnum @doc(category: "Orders") {
CHECKOUT
DRAFT
REISSUE
}
"""An enumeration."""
-enum PaymentChargeStatusEnum {
+enum PaymentChargeStatusEnum @doc(category: "Payments") {
NOT_CHARGED
PENDING
PARTIALLY_CHARGED
@@ -10547,7 +10547,7 @@ Determine a current authorize status for order.
FULL - the funds that are authorized and charged fully cover the
`order.total`-`order.totalGrantedRefund`
"""
-enum OrderAuthorizeStatusEnum {
+enum OrderAuthorizeStatusEnum @doc(category: "Orders") {
NONE
PARTIAL
FULL
@@ -10573,7 +10573,7 @@ Determine the current charge status for the order.
OVERCHARGED - the charged funds are bigger than the
`order.total`-`order.totalGrantedRefund`
"""
-enum OrderChargeStatusEnum {
+enum OrderChargeStatusEnum @doc(category: "Orders") {
NONE
PARTIAL
FULL
@@ -10702,7 +10702,7 @@ type Transaction implements Node @doc(category: "Payments") {
}
"""An enumeration."""
-enum TransactionKind {
+enum TransactionKind @doc(category: "Payments") {
EXTERNAL
AUTH
PENDING
@@ -10715,7 +10715,7 @@ enum TransactionKind {
CANCEL
}
-type CreditCard {
+type CreditCard @doc(category: "Payments") {
"""Card brand."""
brand: String!
@@ -10812,7 +10812,7 @@ type OrderEvent implements Node @doc(category: "Orders") {
}
"""The different order event types."""
-enum OrderEventsEnum {
+enum OrderEventsEnum @doc(category: "Orders") {
DRAFT_CREATED
DRAFT_CREATED_FROM_REPLACE
ADDED_PRODUCTS
@@ -10873,7 +10873,7 @@ enum OrderEventsEnum {
}
"""An enumeration."""
-enum OrderEventsEmailsEnum {
+enum OrderEventsEmailsEnum @doc(category: "Orders") {
PAYMENT_CONFIRMATION
CONFIRMED
SHIPPING_CONFIRMATION
@@ -10885,7 +10885,7 @@ enum OrderEventsEmailsEnum {
DIGITAL_LINKS
}
-type OrderEventOrderLineObject {
+type OrderEventOrderLineObject @doc(category: "Orders") {
"""The variant quantity."""
quantity: Int
@@ -10930,7 +10930,7 @@ Represents a status of payment transaction.
FAILURE - Represents a failure action.
PENDING - Represents a pending action.
"""
-enum TransactionStatus {
+enum TransactionStatus @doc(category: "Payments") {
PENDING
SUCCESS
FAILURE
@@ -10961,12 +10961,12 @@ type OrderDiscount implements Node @doc(category: "Discounts") {
}
"""An enumeration."""
-enum OrderDiscountType {
+enum OrderDiscountType @doc(category: "Discounts") {
VOUCHER
MANUAL
}
-type OrderError {
+type OrderError @doc(category: "Orders") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -10992,7 +10992,7 @@ type OrderError {
}
"""An enumeration."""
-enum OrderErrorCode {
+enum OrderErrorCode @doc(category: "Orders") {
BILLING_ADDRESS_NOT_SET
CANNOT_CANCEL_FULFILLMENT
CANNOT_CANCEL_ORDER
@@ -11040,7 +11040,7 @@ Added in Saleor 3.13.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type OrderGrantedRefund {
+type OrderGrantedRefund @doc(category: "Orders") {
id: ID!
"""Time of creation."""
@@ -11145,7 +11145,7 @@ Represents possible event types.
CANCEL_REQUEST - represents cancel request.
INFO - represents info event.
"""
-enum TransactionEventTypeEnum {
+enum TransactionEventTypeEnum @doc(category: "Payments") {
AUTHORIZATION_SUCCESS
AUTHORIZATION_FAILURE
AUTHORIZATION_ADJUSTMENT
@@ -11283,7 +11283,7 @@ type CustomerEvent implements Node @doc(category: "Users") {
}
"""An enumeration."""
-enum CustomerEventsEnum {
+enum CustomerEventsEnum @doc(category: "Users") {
ACCOUNT_CREATED
ACCOUNT_ACTIVATED
ACCOUNT_DEACTIVATED
@@ -11304,7 +11304,7 @@ enum CustomerEventsEnum {
"""
Represents a payment source stored for user in payment gateway, such as credit card.
"""
-type PaymentSource {
+type PaymentSource @doc(category: "Payments") {
"""Payment gateway name."""
gateway: String!
@@ -11350,7 +11350,7 @@ type GiftCardSettings {
}
"""An enumeration."""
-enum GiftCardSettingsExpiryTypeEnum {
+enum GiftCardSettingsExpiryTypeEnum @doc(category: "Gift cards") {
NEVER_EXPIRE
EXPIRY_PERIOD
}
@@ -11371,7 +11371,7 @@ enum TimePeriodTypeEnum {
YEAR
}
-input ShippingZoneFilterInput {
+input ShippingZoneFilterInput @doc(category: "Shipping") {
search: String
channels: [ID!]
}
@@ -11393,7 +11393,7 @@ type DigitalContentCountableEdge {
cursor: String!
}
-input CategoryFilterInput {
+input CategoryFilterInput @doc(category: "Products") {
search: String
metadata: [MetadataFilter!]
ids: [ID!]
@@ -11426,7 +11426,7 @@ enum CategorySortField @doc(category: "Products") {
SUBCATEGORY_COUNT
}
-input CollectionFilterInput {
+input CollectionFilterInput @doc(category: "Products") {
published: CollectionPublished
search: String
metadata: [MetadataFilter!]
@@ -11490,7 +11490,7 @@ enum CollectionSortField @doc(category: "Products") {
PUBLISHED_AT
}
-input ProductTypeFilterInput {
+input ProductTypeFilterInput @doc(category: "Products") {
search: String
configurable: ProductTypeConfigurable
productType: ProductTypeEnum
@@ -11529,7 +11529,7 @@ enum ProductTypeSortField @doc(category: "Products") {
SHIPPING_REQUIRED
}
-input ProductVariantFilterInput {
+input ProductVariantFilterInput @doc(category: "Products") {
search: String
sku: [String!]
metadata: [MetadataFilter!]
@@ -11567,7 +11567,7 @@ type PaymentCountableEdge {
cursor: String!
}
-input PaymentFilterInput {
+input PaymentFilterInput @doc(category: "Payments") {
"""
Filter by ids.
@@ -11594,7 +11594,7 @@ type PageCountableEdge {
cursor: String!
}
-input PageSortingInput {
+input PageSortingInput @doc(category: "Pages") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -11602,7 +11602,7 @@ input PageSortingInput {
field: PageSortField!
}
-enum PageSortField {
+enum PageSortField @doc(category: "Pages") {
"""Sort pages by title."""
TITLE
@@ -11641,7 +11641,7 @@ enum PageSortField {
CREATED_AT
}
-input PageFilterInput {
+input PageFilterInput @doc(category: "Pages") {
search: String
metadata: [MetadataFilter!]
pageTypes: [ID!]
@@ -11666,7 +11666,7 @@ type PageTypeCountableEdge {
cursor: String!
}
-input PageTypeSortingInput {
+input PageTypeSortingInput @doc(category: "Pages") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -11674,7 +11674,7 @@ input PageTypeSortingInput {
field: PageTypeSortField!
}
-enum PageTypeSortField {
+enum PageTypeSortField @doc(category: "Pages") {
"""Sort page types by name."""
NAME
@@ -11682,7 +11682,7 @@ enum PageTypeSortField {
SLUG
}
-input PageTypeFilterInput {
+input PageTypeFilterInput @doc(category: "Pages") {
search: String
slugs: [String!]
}
@@ -11704,7 +11704,7 @@ type OrderEventCountableEdge {
cursor: String!
}
-input OrderSortingInput {
+input OrderSortingInput @doc(category: "Orders") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -11712,7 +11712,7 @@ input OrderSortingInput {
field: OrderSortField!
}
-enum OrderSortField {
+enum OrderSortField @doc(category: "Orders") {
"""Sort orders by number."""
NUMBER
@@ -11768,7 +11768,7 @@ input OrderFilterInput @doc(category: "Orders") {
checkoutIds: [ID!]
}
-enum OrderStatusFilter {
+enum OrderStatusFilter @doc(category: "Orders") {
READY_TO_FULFILL
READY_TO_CAPTURE
UNFULFILLED
@@ -11861,7 +11861,7 @@ input MenuItemFilterInput {
metadata: [MetadataFilter!]
}
-input GiftCardSortingInput {
+input GiftCardSortingInput @doc(category: "Gift cards") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -11869,7 +11869,7 @@ input GiftCardSortingInput {
field: GiftCardSortField!
}
-enum GiftCardSortField {
+enum GiftCardSortField @doc(category: "Gift cards") {
"""Sort gift cards by product."""
PRODUCT
@@ -11887,7 +11887,7 @@ enum GiftCardSortField {
CREATED_AT
}
-input GiftCardFilterInput {
+input GiftCardFilterInput @doc(category: "Gift cards") {
isActive: Boolean
metadata: [MetadataFilter!]
tags: [String!]
@@ -11917,7 +11917,7 @@ type GiftCardTagCountableEdge {
cursor: String!
}
-input GiftCardTagFilterInput {
+input GiftCardTagFilterInput @doc(category: "Gift cards") {
search: String
}
@@ -12043,7 +12043,7 @@ type SaleCountableEdge {
cursor: String!
}
-input SaleFilterInput {
+input SaleFilterInput @doc(category: "Discounts") {
status: [DiscountStatusEnum!]
saleType: DiscountValueTypeEnum
started: DateTimeRangeInput
@@ -12052,13 +12052,13 @@ input SaleFilterInput {
updatedAt: DateTimeRangeInput
}
-enum DiscountStatusEnum {
+enum DiscountStatusEnum @doc(category: "Discounts") {
ACTIVE
EXPIRED
SCHEDULED
}
-input SaleSortingInput {
+input SaleSortingInput @doc(category: "Discounts") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -12073,7 +12073,7 @@ input SaleSortingInput {
field: SaleSortField!
}
-enum SaleSortField {
+enum SaleSortField @doc(category: "Discounts") {
"""Sort sales by name."""
NAME
@@ -12117,7 +12117,7 @@ type VoucherCountableEdge {
cursor: String!
}
-input VoucherFilterInput {
+input VoucherFilterInput @doc(category: "Discounts") {
status: [DiscountStatusEnum!]
timesUsed: IntRangeInput
discountType: [VoucherDiscountType!]
@@ -12127,13 +12127,13 @@ input VoucherFilterInput {
ids: [ID!]
}
-enum VoucherDiscountType {
+enum VoucherDiscountType @doc(category: "Discounts") {
FIXED
PERCENTAGE
SHIPPING
}
-input VoucherSortingInput {
+input VoucherSortingInput @doc(category: "Discounts") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -12279,7 +12279,7 @@ enum ExportFileSortField {
LAST_MODIFIED_AT
}
-input CheckoutSortingInput {
+input CheckoutSortingInput @doc(category: "Checkout") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -12287,7 +12287,7 @@ input CheckoutSortingInput {
field: CheckoutSortField!
}
-enum CheckoutSortField {
+enum CheckoutSortField @doc(category: "Checkout") {
"""Sort checkouts by creation date."""
CREATION_DATE
@@ -12298,7 +12298,7 @@ enum CheckoutSortField {
PAYMENT
}
-input CheckoutFilterInput {
+input CheckoutFilterInput @doc(category: "Checkout") {
customer: String
created: DateRangeInput
search: String
@@ -12960,7 +12960,7 @@ type Mutation {
"""Fields required to update shipping method channel listings."""
input: ShippingMethodChannelListingInput!
- ): ShippingMethodChannelListingUpdate
+ ): ShippingMethodChannelListingUpdate @doc(category: "Shipping")
"""
Creates a new shipping price.
@@ -15073,7 +15073,7 @@ type Mutation {
"""Fields required to modify catalogue IDs of sale."""
input: CatalogueInput!
- ): SaleAddCatalogues @doc(category: "Products")
+ ): SaleAddCatalogues @doc(category: "Discounts")
"""
Removes products, categories, collections from a sale.
@@ -15086,7 +15086,7 @@ type Mutation {
"""Fields required to modify catalogue IDs of sale."""
input: CatalogueInput!
- ): SaleRemoveCatalogues @doc(category: "Products")
+ ): SaleRemoveCatalogues @doc(category: "Discounts")
"""
Creates/updates translations for a sale.
@@ -15113,7 +15113,7 @@ type Mutation {
"""Fields required to update sale channel listings."""
input: SaleChannelListingInput!
- ): SaleChannelListingUpdate @doc(category: "Products")
+ ): SaleChannelListingUpdate @doc(category: "Discounts")
"""
Creates a new voucher.
@@ -15169,7 +15169,7 @@ type Mutation {
"""Fields required to modify catalogue IDs of voucher."""
input: CatalogueInput!
- ): VoucherAddCatalogues @doc(category: "Products")
+ ): VoucherAddCatalogues @doc(category: "Discounts")
"""
Removes products, categories, collections from a voucher.
@@ -15182,7 +15182,7 @@ type Mutation {
"""Fields required to modify catalogue IDs of voucher."""
input: CatalogueInput!
- ): VoucherRemoveCatalogues @doc(category: "Products")
+ ): VoucherRemoveCatalogues @doc(category: "Discounts")
"""
Creates/updates translations for a voucher.
@@ -15209,7 +15209,7 @@ type Mutation {
"""Fields required to update voucher channel listings."""
input: VoucherChannelListingInput!
- ): VoucherChannelListingUpdate @doc(category: "Products")
+ ): VoucherChannelListingUpdate @doc(category: "Discounts")
"""
Export products to csv file.
@@ -15219,7 +15219,7 @@ type Mutation {
exportProducts(
"""Fields required to export product data."""
input: ExportProductsInput!
- ): ExportProducts
+ ): ExportProducts @doc(category: "Products")
"""
Export gift cards to csv file.
@@ -15233,7 +15233,7 @@ type Mutation {
exportGiftCards(
"""Fields required to export gift cards data."""
input: ExportGiftCardsInput!
- ): ExportGiftCards
+ ): ExportGiftCards @doc(category: "Gift cards")
"""
Upload a file. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec
@@ -15612,7 +15612,7 @@ type Mutation {
DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
"""
token: UUID
- ): CheckoutPaymentCreate @doc(category: "Payments")
+ ): CheckoutPaymentCreate @doc(category: "Checkout")
"""Update shipping address in the existing checkout."""
checkoutShippingAddressUpdate(
@@ -16619,7 +16619,7 @@ type WebhookCreate @doc(category: "Webhooks") {
webhook: Webhook
}
-type WebhookError {
+type WebhookError @doc(category: "Webhooks") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -16633,7 +16633,7 @@ type WebhookError {
}
"""An enumeration."""
-enum WebhookErrorCode {
+enum WebhookErrorCode @doc(category: "Webhooks") {
GRAPHQL_ERROR
INVALID
NOT_FOUND
@@ -16647,7 +16647,7 @@ enum WebhookErrorCode {
INVALID_CUSTOM_HEADERS
}
-input WebhookCreateInput {
+input WebhookCreateInput @doc(category: "Webhooks") {
"""The name of the webhook."""
name: String
@@ -16721,7 +16721,7 @@ type WebhookUpdate @doc(category: "Webhooks") {
webhook: Webhook
}
-input WebhookUpdateInput {
+input WebhookUpdateInput @doc(category: "Webhooks") {
"""The new name of the webhook."""
name: String
@@ -16799,7 +16799,7 @@ type WebhookDryRun @doc(category: "Webhooks") {
errors: [WebhookDryRunError!]!
}
-type WebhookDryRunError {
+type WebhookDryRunError @doc(category: "Webhooks") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -16813,7 +16813,7 @@ type WebhookDryRunError {
}
"""An enumeration."""
-enum WebhookDryRunErrorCode {
+enum WebhookDryRunErrorCode @doc(category: "Webhooks") {
GRAPHQL_ERROR
NOT_FOUND
INVALID_ID
@@ -16839,7 +16839,7 @@ type WebhookTrigger @doc(category: "Webhooks") {
errors: [WebhookTriggerError!]!
}
-type WebhookTriggerError {
+type WebhookTriggerError @doc(category: "Webhooks") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -16853,7 +16853,7 @@ type WebhookTriggerError {
}
"""An enumeration."""
-enum WebhookTriggerErrorCode {
+enum WebhookTriggerErrorCode @doc(category: "Webhooks") {
GRAPHQL_ERROR
NOT_FOUND
INVALID_ID
@@ -16877,7 +16877,7 @@ type WarehouseCreate @doc(category: "Products") {
warehouse: Warehouse
}
-type WarehouseError {
+type WarehouseError @doc(category: "Products") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -16894,7 +16894,7 @@ type WarehouseError {
}
"""An enumeration."""
-enum WarehouseErrorCode {
+enum WarehouseErrorCode @doc(category: "Products") {
ALREADY_EXISTS
GRAPHQL_ERROR
INVALID
@@ -16903,7 +16903,7 @@ enum WarehouseErrorCode {
UNIQUE
}
-input WarehouseCreateInput {
+input WarehouseCreateInput @doc(category: "Products") {
"""Warehouse slug."""
slug: String
@@ -16942,7 +16942,7 @@ type WarehouseUpdate @doc(category: "Products") {
warehouse: Warehouse
}
-input WarehouseUpdateInput {
+input WarehouseUpdateInput @doc(category: "Products") {
"""Warehouse slug."""
slug: String
@@ -17045,7 +17045,7 @@ type TaxClassCreateError @doc(category: "Taxes") {
}
"""An enumeration."""
-enum TaxClassCreateErrorCode {
+enum TaxClassCreateErrorCode @doc(category: "Taxes") {
GRAPHQL_ERROR
INVALID
NOT_FOUND
@@ -17083,7 +17083,7 @@ type TaxClassDelete @doc(category: "Taxes") {
taxClass: TaxClass
}
-type TaxClassDeleteError {
+type TaxClassDeleteError @doc(category: "Taxes") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -17097,7 +17097,7 @@ type TaxClassDeleteError {
}
"""An enumeration."""
-enum TaxClassDeleteErrorCode {
+enum TaxClassDeleteErrorCode @doc(category: "Taxes") {
GRAPHQL_ERROR
INVALID
NOT_FOUND
@@ -17117,7 +17117,7 @@ type TaxClassUpdate @doc(category: "Taxes") {
taxClass: TaxClass
}
-type TaxClassUpdateError {
+type TaxClassUpdateError @doc(category: "Taxes") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -17134,14 +17134,14 @@ type TaxClassUpdateError {
}
"""An enumeration."""
-enum TaxClassUpdateErrorCode {
+enum TaxClassUpdateErrorCode @doc(category: "Taxes") {
DUPLICATED_INPUT_ITEM
GRAPHQL_ERROR
INVALID
NOT_FOUND
}
-input TaxClassUpdateInput {
+input TaxClassUpdateInput @doc(category: "Taxes") {
"""Name of the tax class."""
name: String
@@ -17156,7 +17156,7 @@ input TaxClassUpdateInput {
removeCountryRates: [CountryCode!]
}
-input CountryRateUpdateInput {
+input CountryRateUpdateInput @doc(category: "Taxes") {
"""Country in which this rate applies."""
countryCode: CountryCode!
@@ -17180,7 +17180,7 @@ type TaxConfigurationUpdate @doc(category: "Taxes") {
taxConfiguration: TaxConfiguration
}
-type TaxConfigurationUpdateError {
+type TaxConfigurationUpdateError @doc(category: "Taxes") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -17197,14 +17197,14 @@ type TaxConfigurationUpdateError {
}
"""An enumeration."""
-enum TaxConfigurationUpdateErrorCode {
+enum TaxConfigurationUpdateErrorCode @doc(category: "Taxes") {
DUPLICATED_INPUT_ITEM
GRAPHQL_ERROR
INVALID
NOT_FOUND
}
-input TaxConfigurationUpdateInput {
+input TaxConfigurationUpdateInput @doc(category: "Taxes") {
"""Determines whether taxes are charged in the given channel."""
chargeTaxes: Boolean
@@ -17230,7 +17230,7 @@ input TaxConfigurationUpdateInput {
removeCountriesConfiguration: [CountryCode!]
}
-input TaxConfigurationPerCountryInput {
+input TaxConfigurationPerCountryInput @doc(category: "Taxes") {
"""Country in which this configuration applies."""
countryCode: CountryCode!
@@ -17280,7 +17280,7 @@ type TaxCountryConfigurationUpdateError @doc(category: "Taxes") {
}
"""An enumeration."""
-enum TaxCountryConfigurationUpdateErrorCode {
+enum TaxCountryConfigurationUpdateErrorCode @doc(category: "Taxes") {
GRAPHQL_ERROR
INVALID
NOT_FOUND
@@ -17311,7 +17311,7 @@ type TaxCountryConfigurationDelete @doc(category: "Taxes") {
errors: [TaxCountryConfigurationDeleteError!]!
}
-type TaxCountryConfigurationDeleteError {
+type TaxCountryConfigurationDeleteError @doc(category: "Taxes") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -17325,7 +17325,7 @@ type TaxCountryConfigurationDeleteError {
}
"""An enumeration."""
-enum TaxCountryConfigurationDeleteErrorCode {
+enum TaxCountryConfigurationDeleteErrorCode @doc(category: "Taxes") {
GRAPHQL_ERROR
INVALID
NOT_FOUND
@@ -17347,7 +17347,7 @@ type TaxExemptionManage @doc(category: "Taxes") {
union TaxSourceObject = Checkout | Order
-type TaxExemptionManageError {
+type TaxExemptionManageError @doc(category: "Taxes") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -17361,7 +17361,7 @@ type TaxExemptionManageError {
}
"""An enumeration."""
-enum TaxExemptionManageErrorCode {
+enum TaxExemptionManageErrorCode @doc(category: "Taxes") {
GRAPHQL_ERROR
INVALID
NOT_FOUND
@@ -17394,7 +17394,7 @@ type StockBulkResult @doc(category: "Products") {
errors: [StockBulkUpdateError!]
}
-type StockBulkUpdateError {
+type StockBulkUpdateError @doc(category: "Products") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -17408,7 +17408,7 @@ type StockBulkUpdateError {
}
"""An enumeration."""
-enum StockBulkUpdateErrorCode {
+enum StockBulkUpdateErrorCode @doc(category: "Products") {
GRAPHQL_ERROR
INVALID
NOT_FOUND
@@ -17709,7 +17709,7 @@ type OrderSettingsUpdate @doc(category: "Orders") {
errors: [OrderSettingsError!]!
}
-type OrderSettingsError {
+type OrderSettingsError @doc(category: "Orders") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -17723,7 +17723,7 @@ type OrderSettingsError {
}
"""An enumeration."""
-enum OrderSettingsErrorCode {
+enum OrderSettingsErrorCode @doc(category: "Orders") {
INVALID
}
@@ -17750,7 +17750,7 @@ type GiftCardSettingsUpdate @doc(category: "Gift cards") {
errors: [GiftCardSettingsError!]!
}
-type GiftCardSettingsError {
+type GiftCardSettingsError @doc(category: "Gift cards") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -17764,7 +17764,7 @@ type GiftCardSettingsError {
}
"""An enumeration."""
-enum GiftCardSettingsErrorCode {
+enum GiftCardSettingsErrorCode @doc(category: "Gift cards") {
INVALID
REQUIRED
GRAPHQL_ERROR
@@ -17791,14 +17791,14 @@ Manage shipping method's availability in channels.
Requires one of the following permissions: MANAGE_SHIPPING.
"""
-type ShippingMethodChannelListingUpdate {
+type ShippingMethodChannelListingUpdate @doc(category: "Shipping") {
"""An updated shipping method instance."""
shippingMethod: ShippingMethodType
shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ShippingError!]!
}
-type ShippingError {
+type ShippingError @doc(category: "Shipping") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -17818,7 +17818,7 @@ type ShippingError {
}
"""An enumeration."""
-enum ShippingErrorCode {
+enum ShippingErrorCode @doc(category: "Shipping") {
ALREADY_EXISTS
GRAPHQL_ERROR
INVALID
@@ -17829,7 +17829,7 @@ enum ShippingErrorCode {
DUPLICATED_INPUT_ITEM
}
-input ShippingMethodChannelListingInput {
+input ShippingMethodChannelListingInput @doc(category: "Shipping") {
"""List of channels to which the shipping method should be assigned."""
addChannels: [ShippingMethodChannelListingAddInput!]
@@ -17837,7 +17837,7 @@ input ShippingMethodChannelListingInput {
removeChannels: [ID!]
}
-input ShippingMethodChannelListingAddInput {
+input ShippingMethodChannelListingAddInput @doc(category: "Shipping") {
"""ID of a channel."""
channelId: ID!
@@ -17864,7 +17864,7 @@ type ShippingPriceCreate @doc(category: "Shipping") {
errors: [ShippingError!]!
}
-input ShippingPriceInput {
+input ShippingPriceInput @doc(category: "Shipping") {
"""Name of the shipping method."""
name: String
@@ -17906,7 +17906,7 @@ input ShippingPriceInput {
scalar WeightScalar
-input ShippingPostalCodeRulesCreateInputRange {
+input ShippingPostalCodeRulesCreateInputRange @doc(category: "Shipping") {
"""Start range of the postal code."""
start: String!
@@ -18016,7 +18016,7 @@ type ShippingZoneCreate @doc(category: "Shipping") {
shippingZone: ShippingZone
}
-input ShippingZoneCreateInput {
+input ShippingZoneCreateInput @doc(category: "Shipping") {
"""Shipping zone's name. Visible only to the staff."""
name: String
@@ -18072,7 +18072,7 @@ type ShippingZoneUpdate @doc(category: "Shipping") {
shippingZone: ShippingZone
}
-input ShippingZoneUpdateInput {
+input ShippingZoneUpdateInput @doc(category: "Shipping") {
"""Shipping zone's name. Visible only to the staff."""
name: String
@@ -18112,7 +18112,7 @@ type ProductAttributeAssign @doc(category: "Products") {
errors: [ProductError!]!
}
-type ProductError {
+type ProductError @doc(category: "Products") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -18132,7 +18132,7 @@ type ProductError {
}
"""An enumeration."""
-enum ProductErrorCode {
+enum ProductErrorCode @doc(category: "Products") {
ALREADY_EXISTS
ATTRIBUTE_ALREADY_ASSIGNED
ATTRIBUTE_CANNOT_BE_ASSIGNED
@@ -18224,7 +18224,7 @@ type CategoryCreate @doc(category: "Products") {
category: Category
}
-input CategoryInput {
+input CategoryInput @doc(category: "Products") {
"""
Category description.
@@ -18353,7 +18353,7 @@ type CollectionAddProducts @doc(category: "Products") {
errors: [CollectionError!]!
}
-type CollectionError {
+type CollectionError @doc(category: "Products") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -18370,7 +18370,7 @@ type CollectionError {
}
"""An enumeration."""
-enum CollectionErrorCode {
+enum CollectionErrorCode @doc(category: "Products") {
DUPLICATED_INPUT_ITEM
GRAPHQL_ERROR
INVALID
@@ -18581,7 +18581,7 @@ type CollectionChannelListingUpdate @doc(category: "Products") {
errors: [CollectionChannelListingError!]!
}
-type CollectionChannelListingError {
+type CollectionChannelListingError @doc(category: "Products") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -18860,7 +18860,7 @@ type ProductBulkCreateError {
}
"""An enumeration."""
-enum ProductBulkCreateErrorCode {
+enum ProductBulkCreateErrorCode @doc(category: "Products") {
ATTRIBUTE_ALREADY_ASSIGNED
ATTRIBUTE_CANNOT_BE_ASSIGNED
ATTRIBUTE_VARIANTS_DISABLED
@@ -19297,7 +19297,7 @@ type ProductChannelListingUpdate @doc(category: "Products") {
errors: [ProductChannelListingError!]!
}
-type ProductChannelListingError {
+type ProductChannelListingError @doc(category: "Products") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -19828,7 +19828,7 @@ type ProductVariantBulkResult @doc(category: "Products") {
errors: [ProductVariantBulkError!]
}
-type ProductVariantBulkError {
+type ProductVariantBulkError @doc(category: "Products") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -19868,7 +19868,7 @@ type ProductVariantBulkError {
}
"""An enumeration."""
-enum ProductVariantBulkErrorCode {
+enum ProductVariantBulkErrorCode @doc(category: "Products") {
ATTRIBUTE_ALREADY_ASSIGNED
ATTRIBUTE_CANNOT_BE_ASSIGNED
ATTRIBUTE_VARIANTS_DISABLED
@@ -19883,7 +19883,7 @@ enum ProductVariantBulkErrorCode {
PRODUCT_NOT_ASSIGNED_TO_CHANNEL
}
-type BulkProductError {
+type BulkProductError @doc(category: "Products") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -20081,7 +20081,7 @@ type ProductVariantStocksCreate @doc(category: "Products") {
errors: [BulkStockError!]!
}
-type BulkStockError {
+type BulkStockError @doc(category: "Products") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -20115,7 +20115,7 @@ type ProductVariantStocksDelete @doc(category: "Products") {
errors: [StockError!]!
}
-type StockError {
+type StockError @doc(category: "Products") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -20129,7 +20129,7 @@ type StockError {
}
"""An enumeration."""
-enum StockErrorCode {
+enum StockErrorCode @doc(category: "Products") {
ALREADY_EXISTS
GRAPHQL_ERROR
INVALID
@@ -20320,7 +20320,7 @@ type PaymentCapture @doc(category: "Payments") {
errors: [PaymentError!]!
}
-type PaymentError {
+type PaymentError @doc(category: "Payments") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -20337,7 +20337,7 @@ type PaymentError {
}
"""An enumeration."""
-enum PaymentErrorCode {
+enum PaymentErrorCode @doc(category: "Payments") {
BILLING_ADDRESS_NOT_SET
GRAPHQL_ERROR
INVALID
@@ -20391,7 +20391,7 @@ type PaymentInitialize @doc(category: "Payments") {
"""
Server-side data generated by a payment gateway. Optional step when the payment provider requires an additional action to initialize payment session.
"""
-type PaymentInitialized {
+type PaymentInitialized @doc(category: "Payments") {
"""ID of a payment gateway."""
gateway: String!
@@ -20459,7 +20459,7 @@ type TransactionCreate @doc(category: "Payments") {
errors: [TransactionCreateError!]!
}
-type TransactionCreateError {
+type TransactionCreateError @doc(category: "Payments") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -20473,7 +20473,7 @@ type TransactionCreateError {
}
"""An enumeration."""
-enum TransactionCreateErrorCode {
+enum TransactionCreateErrorCode @doc(category: "Payments") {
INVALID
GRAPHQL_ERROR
NOT_FOUND
@@ -20616,7 +20616,7 @@ type TransactionUpdate @doc(category: "Payments") {
errors: [TransactionUpdateError!]!
}
-type TransactionUpdateError {
+type TransactionUpdateError @doc(category: "Payments") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -20630,7 +20630,7 @@ type TransactionUpdateError {
}
"""An enumeration."""
-enum TransactionUpdateErrorCode {
+enum TransactionUpdateErrorCode @doc(category: "Payments") {
INVALID
GRAPHQL_ERROR
NOT_FOUND
@@ -20736,7 +20736,7 @@ type TransactionRequestAction @doc(category: "Payments") {
errors: [TransactionRequestActionError!]!
}
-type TransactionRequestActionError {
+type TransactionRequestActionError @doc(category: "Payments") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -20750,7 +20750,7 @@ type TransactionRequestActionError {
}
"""An enumeration."""
-enum TransactionRequestActionErrorCode {
+enum TransactionRequestActionErrorCode @doc(category: "Payments") {
INVALID
GRAPHQL_ERROR
NOT_FOUND
@@ -20794,7 +20794,7 @@ type TransactionEventReportError {
}
"""An enumeration."""
-enum TransactionEventReportErrorCode {
+enum TransactionEventReportErrorCode @doc(category: "Payments") {
INVALID
GRAPHQL_ERROR
NOT_FOUND
@@ -20813,7 +20813,7 @@ type PageCreate @doc(category: "Pages") {
page: Page
}
-type PageError {
+type PageError @doc(category: "Pages") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -20833,7 +20833,7 @@ type PageError {
}
"""An enumeration."""
-enum PageErrorCode {
+enum PageErrorCode @doc(category: "Pages") {
GRAPHQL_ERROR
INVALID
NOT_FOUND
@@ -21574,7 +21574,7 @@ type OrderGrantRefundCreate @doc(category: "Orders") {
errors: [OrderGrantRefundCreateError!]!
}
-type OrderGrantRefundCreateError {
+type OrderGrantRefundCreateError @doc(category: "Orders") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -21588,12 +21588,12 @@ type OrderGrantRefundCreateError {
}
"""An enumeration."""
-enum OrderGrantRefundCreateErrorCode {
+enum OrderGrantRefundCreateErrorCode @doc(category: "Orders") {
GRAPHQL_ERROR
NOT_FOUND
}
-input OrderGrantRefundCreateInput {
+input OrderGrantRefundCreateInput @doc(category: "Orders") {
"""Amount of the granted refund."""
amount: Decimal!
@@ -21628,7 +21628,7 @@ type OrderGrantRefundUpdate @doc(category: "Orders") {
orderGrantedRefund: OrderGrantedRefund
}
-type OrderGrantRefundUpdateError {
+type OrderGrantRefundUpdateError @doc(category: "Orders") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -21642,13 +21642,13 @@ type OrderGrantRefundUpdateError {
}
"""An enumeration."""
-enum OrderGrantRefundUpdateErrorCode {
+enum OrderGrantRefundUpdateErrorCode @doc(category: "Orders") {
GRAPHQL_ERROR
NOT_FOUND
REQUIRED
}
-input OrderGrantRefundUpdateInput {
+input OrderGrantRefundUpdateInput @doc(category: "Orders") {
"""Amount of the granted refund."""
amount: Decimal
@@ -21816,7 +21816,7 @@ type OrderUpdate @doc(category: "Orders") {
order: Order
}
-input OrderUpdateInput {
+input OrderUpdateInput @doc(category: "Orders") {
"""Billing address of the customer."""
billingAddress: AddressInput
@@ -22287,7 +22287,7 @@ type GiftCardActivate @doc(category: "Gift cards") {
errors: [GiftCardError!]!
}
-type GiftCardError {
+type GiftCardError @doc(category: "Gift cards") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -22304,7 +22304,7 @@ type GiftCardError {
}
"""An enumeration."""
-enum GiftCardErrorCode {
+enum GiftCardErrorCode @doc(category: "Gift cards") {
ALREADY_EXISTS
GRAPHQL_ERROR
INVALID
@@ -22735,7 +22735,7 @@ type SaleCreate @doc(category: "Discounts") {
sale: Sale
}
-type DiscountError {
+type DiscountError @doc(category: "Discounts") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -22755,7 +22755,7 @@ type DiscountError {
}
"""An enumeration."""
-enum DiscountErrorCode {
+enum DiscountErrorCode @doc(category: "Discounts") {
ALREADY_EXISTS
GRAPHQL_ERROR
INVALID
@@ -22766,7 +22766,7 @@ enum DiscountErrorCode {
DUPLICATED_INPUT_ITEM
}
-input SaleInput @doc(category: "Products") {
+input SaleInput @doc(category: "Discounts") {
"""Voucher name."""
name: String
@@ -22832,14 +22832,14 @@ Adds products, categories, collections to a voucher.
Requires one of the following permissions: MANAGE_DISCOUNTS.
"""
-type SaleAddCatalogues @doc(category: "Products") {
+type SaleAddCatalogues @doc(category: "Discounts") {
"""Sale of which catalogue IDs will be modified."""
sale: Sale
discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [DiscountError!]!
}
-input CatalogueInput @doc(category: "Products") {
+input CatalogueInput @doc(category: "Discounts") {
"""Products related to the discount."""
products: [ID!]
@@ -22862,7 +22862,7 @@ Removes products, categories, collections from a sale.
Requires one of the following permissions: MANAGE_DISCOUNTS.
"""
-type SaleRemoveCatalogues @doc(category: "Products") {
+type SaleRemoveCatalogues @doc(category: "Discounts") {
"""Sale of which catalogue IDs will be modified."""
sale: Sale
discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -22885,14 +22885,14 @@ Manage sale's availability in channels.
Requires one of the following permissions: MANAGE_DISCOUNTS.
"""
-type SaleChannelListingUpdate @doc(category: "Products") {
+type SaleChannelListingUpdate @doc(category: "Discounts") {
"""An updated sale instance."""
sale: Sale
discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [DiscountError!]!
}
-input SaleChannelListingInput @doc(category: "Products") {
+input SaleChannelListingInput @doc(category: "Discounts") {
"""List of channels to which the sale should be assigned."""
addChannels: [SaleChannelListingAddInput!]
@@ -22900,7 +22900,7 @@ input SaleChannelListingInput @doc(category: "Products") {
removeChannels: [ID!]
}
-input SaleChannelListingAddInput @doc(category: "Products") {
+input SaleChannelListingAddInput @doc(category: "Discounts") {
"""ID of a channel."""
channelId: ID!
@@ -22919,7 +22919,7 @@ type VoucherCreate @doc(category: "Discounts") {
voucher: Voucher
}
-input VoucherInput {
+input VoucherInput @doc(category: "Discounts") {
"""Voucher type: PRODUCT, CATEGORY SHIPPING or ENTIRE_ORDER."""
type: VoucherTypeEnum
@@ -23012,7 +23012,7 @@ Adds products, categories, collections to a voucher.
Requires one of the following permissions: MANAGE_DISCOUNTS.
"""
-type VoucherAddCatalogues @doc(category: "Products") {
+type VoucherAddCatalogues @doc(category: "Discounts") {
"""Voucher of which catalogue IDs will be modified."""
voucher: Voucher
discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23024,7 +23024,7 @@ Removes products, categories, collections from a voucher.
Requires one of the following permissions: MANAGE_DISCOUNTS.
"""
-type VoucherRemoveCatalogues @doc(category: "Products") {
+type VoucherRemoveCatalogues @doc(category: "Discounts") {
"""Voucher of which catalogue IDs will be modified."""
voucher: Voucher
discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23047,14 +23047,14 @@ Manage voucher's availability in channels.
Requires one of the following permissions: MANAGE_DISCOUNTS.
"""
-type VoucherChannelListingUpdate @doc(category: "Products") {
+type VoucherChannelListingUpdate @doc(category: "Discounts") {
"""An updated voucher instance."""
voucher: Voucher
discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [DiscountError!]!
}
-input VoucherChannelListingInput @doc(category: "Products") {
+input VoucherChannelListingInput @doc(category: "Discounts") {
"""List of channels to which the voucher should be assigned."""
addChannels: [VoucherChannelListingAddInput!]
@@ -23062,7 +23062,7 @@ input VoucherChannelListingInput @doc(category: "Products") {
removeChannels: [ID!]
}
-input VoucherChannelListingAddInput @doc(category: "Products") {
+input VoucherChannelListingAddInput @doc(category: "Discounts") {
"""ID of a channel."""
channelId: ID!
@@ -23078,7 +23078,7 @@ Export products to csv file.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ExportProducts {
+type ExportProducts @doc(category: "Products") {
"""
The newly created export file job which is responsible for export data.
"""
@@ -23108,7 +23108,7 @@ enum ExportErrorCode {
REQUIRED
}
-input ExportProductsInput {
+input ExportProductsInput @doc(category: "Products") {
"""Determine which products should be exported."""
scope: ExportScope!
@@ -23125,7 +23125,7 @@ input ExportProductsInput {
fileType: FileTypesEnum!
}
-enum ExportScope {
+enum ExportScope @doc(category: "Products") {
"""Export all products."""
ALL
@@ -23136,7 +23136,7 @@ enum ExportScope {
FILTER
}
-input ExportInfoInput {
+input ExportInfoInput @doc(category: "Products") {
"""List of attribute ids witch should be exported."""
attributes: [ID!]
@@ -23150,7 +23150,7 @@ input ExportInfoInput {
fields: [ProductFieldEnum!]
}
-enum ProductFieldEnum {
+enum ProductFieldEnum @doc(category: "Products") {
NAME
DESCRIPTION
PRODUCT_TYPE
@@ -23180,7 +23180,7 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: MANAGE_GIFT_CARD.
"""
-type ExportGiftCards {
+type ExportGiftCards @doc(category: "Gift cards") {
"""
The newly created export file job which is responsible for export data.
"""
@@ -23188,7 +23188,7 @@ type ExportGiftCards {
errors: [ExportError!]!
}
-input ExportGiftCardsInput {
+input ExportGiftCardsInput @doc(category: "Gift cards") {
"""Determine which gift cards should be exported."""
scope: ExportScope!
@@ -23239,7 +23239,7 @@ type CheckoutAddPromoCode @doc(category: "Checkout") {
errors: [CheckoutError!]!
}
-type CheckoutError {
+type CheckoutError @doc(category: "Checkout") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -23262,7 +23262,7 @@ type CheckoutError {
}
"""An enumeration."""
-enum CheckoutErrorCode {
+enum CheckoutErrorCode @doc(category: "Checkout") {
BILLING_ADDRESS_NOT_SET
CHECKOUT_NOT_FULLY_PAID
GRAPHQL_ERROR
@@ -23529,7 +23529,7 @@ type CheckoutRemovePromoCode @doc(category: "Checkout") {
}
"""Create a new payment for given checkout."""
-type CheckoutPaymentCreate @doc(category: "Payments") {
+type CheckoutPaymentCreate @doc(category: "Checkout") {
"""Related checkout object."""
checkout: Checkout
@@ -23574,7 +23574,7 @@ input PaymentInput @doc(category: "Payments") {
}
"""Enum representing the type of a payment storage in a gateway."""
-enum StorePaymentMethodEnum {
+enum StorePaymentMethodEnum @doc(category: "Payments") {
"""
On session storage type. The payment is stored only to be reused when the customer is present in the checkout flow.
"""
@@ -23659,7 +23659,7 @@ type OrderCreateFromCheckoutError @doc(category: "Checkout") {
}
"""An enumeration."""
-enum OrderCreateFromCheckoutErrorCode {
+enum OrderCreateFromCheckoutErrorCode @doc(category: "Orders") {
GRAPHQL_ERROR
CHECKOUT_NOT_FOUND
CHANNEL_INACTIVE
@@ -23687,7 +23687,7 @@ type ChannelCreate @doc(category: "Channels") {
channel: Channel
}
-type ChannelError {
+type ChannelError @doc(category: "Channels") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -23707,7 +23707,7 @@ type ChannelError {
}
"""An enumeration."""
-enum ChannelErrorCode {
+enum ChannelErrorCode @doc(category: "Channels") {
ALREADY_EXISTS
GRAPHQL_ERROR
INVALID
@@ -23719,7 +23719,7 @@ enum ChannelErrorCode {
DUPLICATED_INPUT_ITEM
}
-input ChannelCreateInput {
+input ChannelCreateInput @doc(category: "Channels") {
"""isActive flag."""
isActive: Boolean
@@ -23770,14 +23770,14 @@ input ChannelCreateInput {
defaultCountry: CountryCode!
}
-input StockSettingsInput {
+input StockSettingsInput @doc(category: "Products") {
"""
Allocation strategy options. Strategy defines the preference of warehouses for allocations and reservations.
"""
allocationStrategy: AllocationStrategyEnum!
}
-input OrderSettingsInput {
+input OrderSettingsInput @doc(category: "Orders") {
"""
When disabled, all new orders from checkout will be marked as unconfirmed. When enabled orders from checkout will become unfulfilled immediately. By default set to True
"""
@@ -23812,7 +23812,7 @@ type ChannelUpdate @doc(category: "Channels") {
channel: Channel
}
-input ChannelUpdateInput {
+input ChannelUpdateInput @doc(category: "Channels") {
"""isActive flag."""
isActive: Boolean
@@ -23881,7 +23881,7 @@ type ChannelDelete @doc(category: "Channels") {
channel: Channel
}
-input ChannelDeleteInput {
+input ChannelDeleteInput @doc(category: "Channels") {
"""ID of channel to migrate orders from origin channel."""
channelId: ID!
}
@@ -23932,7 +23932,7 @@ type AttributeCreate @doc(category: "Attributes") {
errors: [AttributeError!]!
}
-type AttributeError {
+type AttributeError @doc(category: "Attributes") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -23946,7 +23946,7 @@ type AttributeError {
}
"""An enumeration."""
-enum AttributeErrorCode {
+enum AttributeErrorCode @doc(category: "Attributes") {
ALREADY_EXISTS
GRAPHQL_ERROR
INVALID
@@ -24297,7 +24297,7 @@ type AppCreate @doc(category: "Apps") {
app: App
}
-type AppError {
+type AppError @doc(category: "Apps") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -24314,7 +24314,7 @@ type AppError {
}
"""An enumeration."""
-enum AppErrorCode {
+enum AppErrorCode @doc(category: "Apps") {
FORBIDDEN
GRAPHQL_ERROR
INVALID
@@ -24626,7 +24626,7 @@ type AccountError @doc(category: "Users") {
}
"""An enumeration."""
-enum AccountErrorCode {
+enum AccountErrorCode @doc(category: "Users") {
ACTIVATE_OWN_ACCOUNT
ACTIVATE_SUPERUSER_ACCOUNT
DUPLICATED_INPUT_ITEM
@@ -25037,7 +25037,7 @@ type CustomerCreate @doc(category: "Users") {
user: User
}
-input UserCreateInput {
+input UserCreateInput @doc(category: "Users") {
"""Billing address of the customer."""
defaultBillingAddress: AddressInput
@@ -25091,7 +25091,7 @@ type CustomerUpdate @doc(category: "Users") {
user: User
}
-input CustomerInput {
+input CustomerInput @doc(category: "Users") {
"""Billing address of the customer."""
defaultBillingAddress: AddressInput
@@ -25187,7 +25187,7 @@ type CustomerBulkUpdateError {
}
"""An enumeration."""
-enum CustomerBulkUpdateErrorCode {
+enum CustomerBulkUpdateErrorCode @doc(category: "Users") {
BLANK
DUPLICATED_INPUT_ITEM
GRAPHQL_ERROR
@@ -25220,7 +25220,7 @@ type StaffCreate @doc(category: "Users") {
user: User
}
-type StaffError {
+type StaffError @doc(category: "Users") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -25376,7 +25376,7 @@ type PermissionGroupCreate @doc(category: "Users") {
group: Group
}
-type PermissionGroupError {
+type PermissionGroupError @doc(category: "Users") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -25396,7 +25396,7 @@ type PermissionGroupError {
}
"""An enumeration."""
-enum PermissionGroupErrorCode {
+enum PermissionGroupErrorCode @doc(category: "Users") {
ASSIGN_NON_STAFF_MEMBER
DUPLICATED_INPUT_ITEM
CANNOT_REMOVE_FROM_LAST_GROUP
@@ -25407,7 +25407,7 @@ enum PermissionGroupErrorCode {
UNIQUE
}
-input PermissionGroupCreateInput {
+input PermissionGroupCreateInput @doc(category: "Users") {
"""List of permission code names to assign to this group."""
addPermissions: [PermissionEnum!]
@@ -25429,7 +25429,7 @@ type PermissionGroupUpdate @doc(category: "Users") {
group: Group
}
-input PermissionGroupUpdateInput {
+input PermissionGroupUpdateInput @doc(category: "Users") {
"""List of permission code names to assign to this group."""
addPermissions: [PermissionEnum!]
@@ -25528,7 +25528,7 @@ Added in Saleor 3.5.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type AddressCreated implements Event {
+type AddressCreated implements Event @doc(category: "Users") {
"""Time of the event."""
issuedAt: DateTime
@@ -25552,7 +25552,7 @@ Added in Saleor 3.5.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type AddressUpdated implements Event {
+type AddressUpdated implements Event @doc(category: "Users") {
"""Time of the event."""
issuedAt: DateTime
@@ -25576,7 +25576,7 @@ Added in Saleor 3.5.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type AddressDeleted implements Event {
+type AddressDeleted implements Event @doc(category: "Users") {
"""Time of the event."""
issuedAt: DateTime
@@ -25600,7 +25600,7 @@ Added in Saleor 3.4.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type AppInstalled implements Event {
+type AppInstalled implements Event @doc(category: "Apps") {
"""Time of the event."""
issuedAt: DateTime
@@ -25624,7 +25624,7 @@ Added in Saleor 3.4.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type AppUpdated implements Event {
+type AppUpdated implements Event @doc(category: "Apps") {
"""Time of the event."""
issuedAt: DateTime
@@ -25648,7 +25648,7 @@ Added in Saleor 3.4.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type AppDeleted implements Event {
+type AppDeleted implements Event @doc(category: "Apps") {
"""Time of the event."""
issuedAt: DateTime
@@ -25672,7 +25672,7 @@ Added in Saleor 3.4.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type AppStatusChanged implements Event {
+type AppStatusChanged implements Event @doc(category: "Apps") {
"""Time of the event."""
issuedAt: DateTime
@@ -25696,7 +25696,7 @@ Added in Saleor 3.5.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type AttributeCreated implements Event {
+type AttributeCreated implements Event @doc(category: "Attributes") {
"""Time of the event."""
issuedAt: DateTime
@@ -25720,7 +25720,7 @@ Added in Saleor 3.5.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type AttributeUpdated implements Event {
+type AttributeUpdated implements Event @doc(category: "Attributes") {
"""Time of the event."""
issuedAt: DateTime
@@ -25744,7 +25744,7 @@ Added in Saleor 3.5.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type AttributeDeleted implements Event {
+type AttributeDeleted implements Event @doc(category: "Attributes") {
"""Time of the event."""
issuedAt: DateTime
@@ -25768,7 +25768,7 @@ Added in Saleor 3.5.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type AttributeValueCreated implements Event {
+type AttributeValueCreated implements Event @doc(category: "Attributes") {
"""Time of the event."""
issuedAt: DateTime
@@ -25792,7 +25792,7 @@ Added in Saleor 3.5.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type AttributeValueUpdated implements Event {
+type AttributeValueUpdated implements Event @doc(category: "Attributes") {
"""Time of the event."""
issuedAt: DateTime
@@ -25816,7 +25816,7 @@ Added in Saleor 3.5.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type AttributeValueDeleted implements Event {
+type AttributeValueDeleted implements Event @doc(category: "Attributes") {
"""Time of the event."""
issuedAt: DateTime
@@ -25840,7 +25840,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type CategoryCreated implements Event {
+type CategoryCreated implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -25864,7 +25864,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type CategoryUpdated implements Event {
+type CategoryUpdated implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -25888,7 +25888,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type CategoryDeleted implements Event {
+type CategoryDeleted implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -25912,7 +25912,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type ChannelCreated implements Event {
+type ChannelCreated implements Event @doc(category: "Channels") {
"""Time of the event."""
issuedAt: DateTime
@@ -25936,7 +25936,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type ChannelUpdated implements Event {
+type ChannelUpdated implements Event @doc(category: "Channels") {
"""Time of the event."""
issuedAt: DateTime
@@ -25960,7 +25960,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type ChannelDeleted implements Event {
+type ChannelDeleted implements Event @doc(category: "Channels") {
"""Time of the event."""
issuedAt: DateTime
@@ -25984,7 +25984,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type ChannelStatusChanged implements Event {
+type ChannelStatusChanged implements Event @doc(category: "Channels") {
"""Time of the event."""
issuedAt: DateTime
@@ -26008,7 +26008,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type GiftCardCreated implements Event {
+type GiftCardCreated implements Event @doc(category: "Gift cards") {
"""Time of the event."""
issuedAt: DateTime
@@ -26032,7 +26032,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type GiftCardUpdated implements Event {
+type GiftCardUpdated implements Event @doc(category: "Gift cards") {
"""Time of the event."""
issuedAt: DateTime
@@ -26056,7 +26056,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type GiftCardDeleted implements Event {
+type GiftCardDeleted implements Event @doc(category: "Gift cards") {
"""Time of the event."""
issuedAt: DateTime
@@ -26080,7 +26080,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type GiftCardStatusChanged implements Event {
+type GiftCardStatusChanged implements Event @doc(category: "Gift cards") {
"""Time of the event."""
issuedAt: DateTime
@@ -26104,7 +26104,7 @@ Added in Saleor 3.8.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type GiftCardMetadataUpdated implements Event {
+type GiftCardMetadataUpdated implements Event @doc(category: "Gift cards") {
"""Time of the event."""
issuedAt: DateTime
@@ -26290,7 +26290,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type OrderCreated implements Event {
+type OrderCreated implements Event @doc(category: "Orders") {
"""Time of the event."""
issuedAt: DateTime
@@ -26314,7 +26314,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type OrderUpdated implements Event {
+type OrderUpdated implements Event @doc(category: "Orders") {
"""Time of the event."""
issuedAt: DateTime
@@ -26338,7 +26338,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type OrderConfirmed implements Event {
+type OrderConfirmed implements Event @doc(category: "Orders") {
"""Time of the event."""
issuedAt: DateTime
@@ -26362,7 +26362,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type OrderFullyPaid implements Event {
+type OrderFullyPaid implements Event @doc(category: "Orders") {
"""Time of the event."""
issuedAt: DateTime
@@ -26386,7 +26386,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type OrderFulfilled implements Event {
+type OrderFulfilled implements Event @doc(category: "Orders") {
"""Time of the event."""
issuedAt: DateTime
@@ -26410,7 +26410,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type OrderCancelled implements Event {
+type OrderCancelled implements Event @doc(category: "Orders") {
"""Time of the event."""
issuedAt: DateTime
@@ -26434,7 +26434,7 @@ Added in Saleor 3.8.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type OrderMetadataUpdated implements Event {
+type OrderMetadataUpdated implements Event @doc(category: "Orders") {
"""Time of the event."""
issuedAt: DateTime
@@ -26458,7 +26458,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type DraftOrderCreated implements Event {
+type DraftOrderCreated implements Event @doc(category: "Orders") {
"""Time of the event."""
issuedAt: DateTime
@@ -26482,7 +26482,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type DraftOrderUpdated implements Event {
+type DraftOrderUpdated implements Event @doc(category: "Orders") {
"""Time of the event."""
issuedAt: DateTime
@@ -26506,7 +26506,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type DraftOrderDeleted implements Event {
+type DraftOrderDeleted implements Event @doc(category: "Orders") {
"""Time of the event."""
issuedAt: DateTime
@@ -26530,7 +26530,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type ProductCreated implements Event {
+type ProductCreated implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -26560,7 +26560,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type ProductUpdated implements Event {
+type ProductUpdated implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -26590,7 +26590,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type ProductDeleted implements Event {
+type ProductDeleted implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -26620,7 +26620,7 @@ Added in Saleor 3.8.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type ProductMetadataUpdated implements Event {
+type ProductMetadataUpdated implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -26648,7 +26648,7 @@ Event sent when new product media is created.
Added in Saleor 3.12.
"""
-type ProductMediaCreated implements Event {
+type ProductMediaCreated implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -26670,7 +26670,7 @@ Event sent when product media is updated.
Added in Saleor 3.12.
"""
-type ProductMediaUpdated implements Event {
+type ProductMediaUpdated implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -26692,7 +26692,7 @@ Event sent when product media is deleted.
Added in Saleor 3.12.
"""
-type ProductMediaDeleted implements Event {
+type ProductMediaDeleted implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -26716,7 +26716,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type ProductVariantCreated implements Event {
+type ProductVariantCreated implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -26743,7 +26743,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type ProductVariantUpdated implements Event {
+type ProductVariantUpdated implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -26770,7 +26770,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type ProductVariantOutOfStock implements Event {
+type ProductVariantOutOfStock implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -26800,7 +26800,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type ProductVariantBackInStock implements Event {
+type ProductVariantBackInStock implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -26860,7 +26860,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type ProductVariantDeleted implements Event {
+type ProductVariantDeleted implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -26887,7 +26887,7 @@ Added in Saleor 3.8.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type ProductVariantMetadataUpdated implements Event {
+type ProductVariantMetadataUpdated implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -26914,7 +26914,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type SaleCreated implements Event {
+type SaleCreated implements Event @doc(category: "Discounts") {
"""Time of the event."""
issuedAt: DateTime
@@ -26941,7 +26941,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type SaleUpdated implements Event {
+type SaleUpdated implements Event @doc(category: "Discounts") {
"""Time of the event."""
issuedAt: DateTime
@@ -26968,7 +26968,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type SaleDeleted implements Event {
+type SaleDeleted implements Event @doc(category: "Discounts") {
"""Time of the event."""
issuedAt: DateTime
@@ -26995,7 +26995,7 @@ Added in Saleor 3.5.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type SaleToggle implements Event {
+type SaleToggle implements Event @doc(category: "Discounts") {
"""Time of the event."""
issuedAt: DateTime
@@ -27121,7 +27121,7 @@ Added in Saleor 3.4.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type FulfillmentCreated implements Event {
+type FulfillmentCreated implements Event @doc(category: "Orders") {
"""Time of the event."""
issuedAt: DateTime
@@ -27148,7 +27148,7 @@ Added in Saleor 3.4.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type FulfillmentCanceled implements Event {
+type FulfillmentCanceled implements Event @doc(category: "Orders") {
"""Time of the event."""
issuedAt: DateTime
@@ -27175,7 +27175,7 @@ Added in Saleor 3.7.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type FulfillmentApproved implements Event {
+type FulfillmentApproved implements Event @doc(category: "Orders") {
"""Time of the event."""
issuedAt: DateTime
@@ -27202,7 +27202,7 @@ Added in Saleor 3.8.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type FulfillmentMetadataUpdated implements Event {
+type FulfillmentMetadataUpdated implements Event @doc(category: "Orders") {
"""Time of the event."""
issuedAt: DateTime
@@ -27229,7 +27229,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type CustomerCreated implements Event {
+type CustomerCreated implements Event @doc(category: "Users") {
"""Time of the event."""
issuedAt: DateTime
@@ -27253,7 +27253,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type CustomerUpdated implements Event {
+type CustomerUpdated implements Event @doc(category: "Users") {
"""Time of the event."""
issuedAt: DateTime
@@ -27277,7 +27277,7 @@ Added in Saleor 3.8.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type CustomerMetadataUpdated implements Event {
+type CustomerMetadataUpdated implements Event @doc(category: "Users") {
"""Time of the event."""
issuedAt: DateTime
@@ -27301,7 +27301,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type CollectionCreated implements Event {
+type CollectionCreated implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -27328,7 +27328,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type CollectionUpdated implements Event {
+type CollectionUpdated implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -27355,7 +27355,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type CollectionDeleted implements Event {
+type CollectionDeleted implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -27382,7 +27382,7 @@ Added in Saleor 3.8.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type CollectionMetadataUpdated implements Event {
+type CollectionMetadataUpdated implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -27409,7 +27409,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type CheckoutCreated implements Event {
+type CheckoutCreated implements Event @doc(category: "Checkout") {
"""Time of the event."""
issuedAt: DateTime
@@ -27433,7 +27433,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type CheckoutUpdated implements Event {
+type CheckoutUpdated implements Event @doc(category: "Checkout") {
"""Time of the event."""
issuedAt: DateTime
@@ -27457,7 +27457,7 @@ Added in Saleor 3.8.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type CheckoutMetadataUpdated implements Event {
+type CheckoutMetadataUpdated implements Event @doc(category: "Checkout") {
"""Time of the event."""
issuedAt: DateTime
@@ -27481,7 +27481,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type PageCreated implements Event {
+type PageCreated implements Event @doc(category: "Pages") {
"""Time of the event."""
issuedAt: DateTime
@@ -27505,7 +27505,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type PageUpdated implements Event {
+type PageUpdated implements Event @doc(category: "Pages") {
"""Time of the event."""
issuedAt: DateTime
@@ -27529,7 +27529,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type PageDeleted implements Event {
+type PageDeleted implements Event @doc(category: "Pages") {
"""Time of the event."""
issuedAt: DateTime
@@ -27553,7 +27553,7 @@ Added in Saleor 3.5.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type PageTypeCreated implements Event {
+type PageTypeCreated implements Event @doc(category: "Pages") {
"""Time of the event."""
issuedAt: DateTime
@@ -27577,7 +27577,7 @@ Added in Saleor 3.5.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type PageTypeUpdated implements Event {
+type PageTypeUpdated implements Event @doc(category: "Pages") {
"""Time of the event."""
issuedAt: DateTime
@@ -27601,7 +27601,7 @@ Added in Saleor 3.5.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type PageTypeDeleted implements Event {
+type PageTypeDeleted implements Event @doc(category: "Pages") {
"""Time of the event."""
issuedAt: DateTime
@@ -27625,7 +27625,7 @@ Added in Saleor 3.6.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type PermissionGroupCreated implements Event {
+type PermissionGroupCreated implements Event @doc(category: "Users") {
"""Time of the event."""
issuedAt: DateTime
@@ -27649,7 +27649,7 @@ Added in Saleor 3.6.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type PermissionGroupUpdated implements Event {
+type PermissionGroupUpdated implements Event @doc(category: "Users") {
"""Time of the event."""
issuedAt: DateTime
@@ -27673,7 +27673,7 @@ Added in Saleor 3.6.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type PermissionGroupDeleted implements Event {
+type PermissionGroupDeleted implements Event @doc(category: "Users") {
"""Time of the event."""
issuedAt: DateTime
@@ -27796,7 +27796,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type ShippingZoneCreated implements Event {
+type ShippingZoneCreated implements Event @doc(category: "Shipping") {
"""Time of the event."""
issuedAt: DateTime
@@ -27823,7 +27823,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type ShippingZoneUpdated implements Event {
+type ShippingZoneUpdated implements Event @doc(category: "Shipping") {
"""Time of the event."""
issuedAt: DateTime
@@ -27850,7 +27850,7 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type ShippingZoneDeleted implements Event {
+type ShippingZoneDeleted implements Event @doc(category: "Shipping") {
"""Time of the event."""
issuedAt: DateTime
@@ -27877,7 +27877,7 @@ Added in Saleor 3.8.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type ShippingZoneMetadataUpdated implements Event {
+type ShippingZoneMetadataUpdated implements Event @doc(category: "Shipping") {
"""Time of the event."""
issuedAt: DateTime
@@ -27904,7 +27904,7 @@ Added in Saleor 3.5.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type StaffCreated implements Event {
+type StaffCreated implements Event @doc(category: "Users") {
"""Time of the event."""
issuedAt: DateTime
@@ -27928,7 +27928,7 @@ Added in Saleor 3.5.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type StaffUpdated implements Event {
+type StaffUpdated implements Event @doc(category: "Users") {
"""Time of the event."""
issuedAt: DateTime
@@ -27952,7 +27952,7 @@ Added in Saleor 3.5.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type StaffDeleted implements Event {
+type StaffDeleted implements Event @doc(category: "Users") {
"""Time of the event."""
issuedAt: DateTime
@@ -28011,7 +28011,7 @@ Added in Saleor 3.8.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type TransactionItemMetadataUpdated implements Event {
+type TransactionItemMetadataUpdated implements Event @doc(category: "Payments") {
"""Time of the event."""
issuedAt: DateTime
@@ -28089,7 +28089,7 @@ Added in Saleor 3.4.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type VoucherCreated implements Event {
+type VoucherCreated implements Event @doc(category: "Discounts") {
"""Time of the event."""
issuedAt: DateTime
@@ -28116,7 +28116,7 @@ Added in Saleor 3.4.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type VoucherUpdated implements Event {
+type VoucherUpdated implements Event @doc(category: "Discounts") {
"""Time of the event."""
issuedAt: DateTime
@@ -28143,7 +28143,7 @@ Added in Saleor 3.4.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type VoucherDeleted implements Event {
+type VoucherDeleted implements Event @doc(category: "Discounts") {
"""Time of the event."""
issuedAt: DateTime
@@ -28170,7 +28170,7 @@ Added in Saleor 3.8.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type VoucherMetadataUpdated implements Event {
+type VoucherMetadataUpdated implements Event @doc(category: "Discounts") {
"""Time of the event."""
issuedAt: DateTime
@@ -28197,7 +28197,7 @@ Added in Saleor 3.4.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type WarehouseCreated implements Event {
+type WarehouseCreated implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -28221,7 +28221,7 @@ Added in Saleor 3.4.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type WarehouseUpdated implements Event {
+type WarehouseUpdated implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -28245,7 +28245,7 @@ Added in Saleor 3.4.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type WarehouseDeleted implements Event {
+type WarehouseDeleted implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -28269,7 +28269,7 @@ Added in Saleor 3.8.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type WarehouseMetadataUpdated implements Event {
+type WarehouseMetadataUpdated implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -28704,7 +28704,7 @@ type CalculateTaxes implements Event {
}
"""Taxable object."""
-type TaxableObject {
+type TaxableObject @doc(category: "Taxes") {
"""The source object related to this tax object."""
sourceObject: TaxSourceObject!
@@ -28729,7 +28729,7 @@ type TaxableObject {
}
"""Taxable object discount."""
-type TaxableObjectDiscount {
+type TaxableObjectDiscount @doc(category: "Taxes") {
"""The name of the discount."""
name: String
@@ -28737,7 +28737,7 @@ type TaxableObjectDiscount {
amount: Money!
}
-type TaxableObjectLine {
+type TaxableObjectLine @doc(category: "Taxes") {
"""The source line related to this tax line."""
sourceLine: TaxSourceLine!
diff --git a/saleor/graphql/shipping/enums.py b/saleor/graphql/shipping/enums.py
index c2dde4bb0e..e465192a55 100644
--- a/saleor/graphql/shipping/enums.py
+++ b/saleor/graphql/shipping/enums.py
@@ -1,7 +1,11 @@
from ...graphql.core.enums import to_enum
from ...shipping import PostalCodeRuleInclusionType, ShippingMethodType
+from ..core.doc_category import DOC_CATEGORY_SHIPPING
ShippingMethodTypeEnum = to_enum(ShippingMethodType, type_name="ShippingMethodTypeEnum")
+ShippingMethodTypeEnum.doc_category = DOC_CATEGORY_SHIPPING
+
PostalCodeRuleInclusionTypeEnum = to_enum(
PostalCodeRuleInclusionType, type_name="PostalCodeRuleInclusionTypeEnum"
)
+PostalCodeRuleInclusionTypeEnum.doc_category = DOC_CATEGORY_SHIPPING
diff --git a/saleor/graphql/shipping/filters.py b/saleor/graphql/shipping/filters.py
index 3eefbb869f..a923b9330f 100644
--- a/saleor/graphql/shipping/filters.py
+++ b/saleor/graphql/shipping/filters.py
@@ -2,6 +2,7 @@ import django_filters
from ...shipping.models import ShippingZone
from ..channel.types import Channel
+from ..core.doc_category import DOC_CATEGORY_SHIPPING
from ..core.filters import GlobalIDMultipleChoiceFilter
from ..core.types import FilterInputObjectType
from ..utils import resolve_global_ids_to_primary_keys
@@ -29,4 +30,5 @@ class ShippingZoneFilter(django_filters.FilterSet):
class ShippingZoneFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_SHIPPING
filterset_class = ShippingZoneFilter
diff --git a/saleor/graphql/shipping/mutations/channels.py b/saleor/graphql/shipping/mutations/channels.py
index 8db6ea63c4..da66681598 100644
--- a/saleor/graphql/shipping/mutations/channels.py
+++ b/saleor/graphql/shipping/mutations/channels.py
@@ -14,8 +14,9 @@ from ....shipping.tasks import (
from ...channel import ChannelContext
from ...channel.mutations import BaseChannelListingMutation
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_SHIPPING
from ...core.scalars import PositiveDecimal
-from ...core.types import NonNullList, ShippingError
+from ...core.types import BaseInputObjectType, NonNullList, ShippingError
from ...core.validators import validate_decimal_max_value, validate_price_precision
from ...plugins.dataloaders import get_plugin_manager_promise
from ...shipping.utils import get_shipping_model_by_object_id
@@ -27,7 +28,7 @@ if TYPE_CHECKING:
ErrorType = DefaultDict[str, List[ValidationError]]
-class ShippingMethodChannelListingAddInput(graphene.InputObjectType):
+class ShippingMethodChannelListingAddInput(BaseInputObjectType):
channel_id = graphene.ID(required=True, description="ID of a channel.")
price = PositiveDecimal(
description="Shipping price of the shipping method in this channel."
@@ -39,8 +40,11 @@ class ShippingMethodChannelListingAddInput(graphene.InputObjectType):
description="Maximum order price to use this shipping method."
)
+ class Meta:
+ doc_category = DOC_CATEGORY_SHIPPING
+
-class ShippingMethodChannelListingInput(graphene.InputObjectType):
+class ShippingMethodChannelListingInput(BaseInputObjectType):
add_channels = NonNullList(
ShippingMethodChannelListingAddInput,
description="List of channels to which the shipping method should be assigned.",
@@ -54,6 +58,9 @@ class ShippingMethodChannelListingInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_SHIPPING
+
class ShippingMethodChannelListingUpdate(BaseChannelListingMutation):
shipping_method = graphene.Field(
@@ -71,6 +78,7 @@ class ShippingMethodChannelListingUpdate(BaseChannelListingMutation):
class Meta:
description = "Manage shipping method's availability in channels."
+ doc_category = DOC_CATEGORY_SHIPPING
permissions = (ShippingPermissions.MANAGE_SHIPPING,)
error_type_class = ShippingError
error_type_field = "shipping_errors"
diff --git a/saleor/graphql/shipping/mutations/shippings.py b/saleor/graphql/shipping/mutations/shippings.py
index 9aadb10e6e..e07c935a81 100644
--- a/saleor/graphql/shipping/mutations/shippings.py
+++ b/saleor/graphql/shipping/mutations/shippings.py
@@ -35,14 +35,17 @@ from ..enums import PostalCodeRuleInclusionTypeEnum, ShippingMethodTypeEnum
from ..types import ShippingMethodPostalCodeRule, ShippingMethodType, ShippingZone
-class ShippingPostalCodeRulesCreateInputRange(graphene.InputObjectType):
+class ShippingPostalCodeRulesCreateInputRange(BaseInputObjectType):
start = graphene.String(
required=True, description="Start range of the postal code."
)
end = graphene.String(required=False, description="End range of the postal code.")
+ class Meta:
+ doc_category = DOC_CATEGORY_SHIPPING
+
-class ShippingPriceInput(graphene.InputObjectType):
+class ShippingPriceInput(BaseInputObjectType):
name = graphene.String(description="Name of the shipping method.")
description = JSONString(description="Shipping method description.")
minimum_order_weight = WeightScalar(
@@ -80,8 +83,11 @@ class ShippingPriceInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_SHIPPING
+
-class ShippingZoneCreateInput(graphene.InputObjectType):
+class ShippingZoneCreateInput(BaseInputObjectType):
name = graphene.String(
description="Shipping zone's name. Visible only to the staff."
)
@@ -104,6 +110,9 @@ class ShippingZoneCreateInput(graphene.InputObjectType):
description="List of channels to assign to the shipping zone.",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_SHIPPING
+
class ShippingZoneUpdateInput(ShippingZoneCreateInput):
remove_warehouses = NonNullList(
@@ -115,6 +124,9 @@ class ShippingZoneUpdateInput(ShippingZoneCreateInput):
description="List of channels to unassign from the shipping zone.",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_SHIPPING
+
class ShippingZoneMixin:
@classmethod
diff --git a/saleor/graphql/shipping/types.py b/saleor/graphql/shipping/types.py
index 3e80a8ea2e..d0c95fef1b 100644
--- a/saleor/graphql/shipping/types.py
+++ b/saleor/graphql/shipping/types.py
@@ -27,9 +27,11 @@ from ..core.descriptions import (
PREVIEW_FEATURE,
RICH_CONTENT,
)
+from ..core.doc_category import DOC_CATEGORY_SHIPPING
from ..core.fields import ConnectionField, JSONString, PermissionsField
from ..core.tracing import traced_resolver
from ..core.types import (
+ BaseObjectType,
CountryDisplay,
ModelObjectType,
Money,
@@ -338,7 +340,7 @@ class ShippingZone(ChannelContextTypeWithMetadata[models.ShippingZone]):
return ChannelsByShippingZoneIdLoader(info.context).load(root.node.id)
-class ShippingMethod(graphene.ObjectType):
+class ShippingMethod(BaseObjectType):
id = graphene.ID(
required=True, description="Unique ID of ShippingMethod available for Order."
)
@@ -386,6 +388,7 @@ class ShippingMethod(graphene.ObjectType):
class Meta:
interfaces = [relay.Node, ObjectWithMetadata]
+ doc_category = DOC_CATEGORY_SHIPPING
description = (
"Shipping methods that can be used as means of shipping "
"for orders and checkouts."
@@ -409,7 +412,7 @@ class ShippingZoneCountableConnection(CountableConnection):
node = ShippingZone
-class ShippingMethodsPerCountry(graphene.ObjectType):
+class ShippingMethodsPerCountry(BaseObjectType):
country_code = graphene.Field(
CountryCodeEnum, required=True, description="The country code."
)
@@ -418,6 +421,7 @@ class ShippingMethodsPerCountry(graphene.ObjectType):
)
class Meta:
+ doc_category = DOC_CATEGORY_SHIPPING
description = (
"List of shipping methods available for the country."
+ ADDED_IN_36
diff --git a/saleor/graphql/shop/enums.py b/saleor/graphql/shop/enums.py
index e416d65b7b..4f191ada09 100644
--- a/saleor/graphql/shop/enums.py
+++ b/saleor/graphql/shop/enums.py
@@ -1,4 +1,6 @@
from ...site import GiftCardSettingsExpiryType
+from ..core.doc_category import DOC_CATEGORY_GIFT_CARDS
from ..core.enums import to_enum
GiftCardSettingsExpiryTypeEnum = to_enum(GiftCardSettingsExpiryType)
+GiftCardSettingsExpiryTypeEnum.doc_category = DOC_CATEGORY_GIFT_CARDS
diff --git a/saleor/graphql/tax/enums.py b/saleor/graphql/tax/enums.py
index be94540bc3..786d6914c5 100644
--- a/saleor/graphql/tax/enums.py
+++ b/saleor/graphql/tax/enums.py
@@ -1,4 +1,5 @@
from ...tax import TaxCalculationStrategy as InternalTaxCalculationStrategy
+from ..core.doc_category import DOC_CATEGORY_TAXES
from ..core.enums import to_enum
@@ -15,3 +16,4 @@ TaxCalculationStrategy = to_enum(
description=description,
type_name="TaxCalculationStrategy",
)
+TaxCalculationStrategy.doc_category = DOC_CATEGORY_TAXES
diff --git a/saleor/graphql/tax/mutations/tax_class_create.py b/saleor/graphql/tax/mutations/tax_class_create.py
index cbc50f7167..247632d47d 100644
--- a/saleor/graphql/tax/mutations/tax_class_create.py
+++ b/saleor/graphql/tax/mutations/tax_class_create.py
@@ -10,6 +10,7 @@ from ...core.types import BaseInputObjectType, Error, NonNullList
from ..types import TaxClass
TaxClassCreateErrorCode = graphene.Enum.from_enum(error_codes.TaxClassCreateErrorCode)
+TaxClassCreateErrorCode.doc_category = DOC_CATEGORY_TAXES
class TaxClassCreateError(Error):
diff --git a/saleor/graphql/tax/mutations/tax_class_delete.py b/saleor/graphql/tax/mutations/tax_class_delete.py
index 9cd060e4e3..7cdc2ce768 100644
--- a/saleor/graphql/tax/mutations/tax_class_delete.py
+++ b/saleor/graphql/tax/mutations/tax_class_delete.py
@@ -3,16 +3,21 @@ import graphene
from ....permission.enums import CheckoutPermissions
from ....tax import error_codes, models
from ...core.descriptions import ADDED_IN_39, PREVIEW_FEATURE
+from ...core.doc_category import DOC_CATEGORY_TAXES
from ...core.mutations import ModelDeleteMutation
from ...core.types import Error
from ..types import TaxClass
TaxClassDeleteErrorCode = graphene.Enum.from_enum(error_codes.TaxClassDeleteErrorCode)
+TaxClassDeleteErrorCode.doc_category = DOC_CATEGORY_TAXES
class TaxClassDeleteError(Error):
code = TaxClassDeleteErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_TAXES
+
class TaxClassDelete(ModelDeleteMutation):
class Arguments:
diff --git a/saleor/graphql/tax/mutations/tax_class_update.py b/saleor/graphql/tax/mutations/tax_class_update.py
index 30555f5062..c6666ea5d0 100644
--- a/saleor/graphql/tax/mutations/tax_class_update.py
+++ b/saleor/graphql/tax/mutations/tax_class_update.py
@@ -6,15 +6,17 @@ from ....tax import error_codes, models
from ...account.enums import CountryCodeEnum
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_39, PREVIEW_FEATURE
+from ...core.doc_category import DOC_CATEGORY_TAXES
from ...core.mutations import ModelMutation
-from ...core.types import Error, NonNullList
+from ...core.types import BaseInputObjectType, Error, NonNullList
from ...core.utils import get_duplicates_items
from ..types import TaxClass
TaxClassUpdateErrorCode = graphene.Enum.from_enum(error_codes.TaxClassUpdateErrorCode)
+TaxClassUpdateErrorCode.doc_category = DOC_CATEGORY_TAXES
-class CountryRateUpdateInput(graphene.InputObjectType):
+class CountryRateUpdateInput(BaseInputObjectType):
country_code = CountryCodeEnum(
description="Country in which this rate applies.", required=True
)
@@ -26,6 +28,9 @@ class CountryRateUpdateInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_TAXES
+
class TaxClassUpdateError(Error):
code = TaxClassUpdateErrorCode(description="The error code.", required=True)
@@ -35,8 +40,11 @@ class TaxClassUpdateError(Error):
required=True,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_TAXES
+
-class TaxClassUpdateInput(graphene.InputObjectType):
+class TaxClassUpdateInput(BaseInputObjectType):
name = graphene.String(description="Name of the tax class.")
update_country_rates = NonNullList(
CountryRateUpdateInput,
@@ -52,6 +60,9 @@ class TaxClassUpdateInput(graphene.InputObjectType):
),
)
+ class Meta:
+ doc_category = DOC_CATEGORY_TAXES
+
class TaxClassUpdate(ModelMutation):
class Arguments:
diff --git a/saleor/graphql/tax/mutations/tax_configuration_update.py b/saleor/graphql/tax/mutations/tax_configuration_update.py
index 924e9fa620..98f0df78cb 100644
--- a/saleor/graphql/tax/mutations/tax_configuration_update.py
+++ b/saleor/graphql/tax/mutations/tax_configuration_update.py
@@ -6,8 +6,9 @@ from ....tax import error_codes, models
from ...account.enums import CountryCodeEnum
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_39, PREVIEW_FEATURE
+from ...core.doc_category import DOC_CATEGORY_TAXES
from ...core.mutations import ModelMutation
-from ...core.types import Error, NonNullList
+from ...core.types import BaseInputObjectType, Error, NonNullList
from ...core.utils import get_duplicates_items
from ..enums import TaxCalculationStrategy
from ..types import TaxConfiguration
@@ -15,9 +16,10 @@ from ..types import TaxConfiguration
TaxConfigurationUpdateErrorCode = graphene.Enum.from_enum(
error_codes.TaxConfigurationUpdateErrorCode
)
+TaxConfigurationUpdateErrorCode.doc_category = DOC_CATEGORY_TAXES
-class TaxConfigurationPerCountryInput(graphene.InputObjectType):
+class TaxConfigurationPerCountryInput(BaseInputObjectType):
country_code = CountryCodeEnum(
description="Country in which this configuration applies.", required=True
)
@@ -42,8 +44,11 @@ class TaxConfigurationPerCountryInput(graphene.InputObjectType):
required=True,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_TAXES
+
-class TaxConfigurationUpdateInput(graphene.InputObjectType):
+class TaxConfigurationUpdateInput(BaseInputObjectType):
charge_taxes = graphene.Boolean(
description="Determines whether taxes are charged in the given channel."
)
@@ -77,6 +82,9 @@ class TaxConfigurationUpdateInput(graphene.InputObjectType):
description="List of country codes for which to remove the tax configuration.",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_TAXES
+
class TaxConfigurationUpdateError(Error):
code = TaxConfigurationUpdateErrorCode(description="The error code.", required=True)
@@ -86,6 +94,9 @@ class TaxConfigurationUpdateError(Error):
required=True,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_TAXES
+
class TaxConfigurationUpdate(ModelMutation):
class Arguments:
diff --git a/saleor/graphql/tax/mutations/tax_country_configuration_delete.py b/saleor/graphql/tax/mutations/tax_country_configuration_delete.py
index 26e9cd9124..cd6415d38d 100644
--- a/saleor/graphql/tax/mutations/tax_country_configuration_delete.py
+++ b/saleor/graphql/tax/mutations/tax_country_configuration_delete.py
@@ -14,6 +14,7 @@ from ..types import TaxCountryConfiguration
TaxCountryConfigurationDeleteErrorCode = graphene.Enum.from_enum(
error_codes.TaxCountryConfigurationDeleteErrorCode
)
+TaxCountryConfigurationDeleteErrorCode.doc_category = DOC_CATEGORY_TAXES
class TaxCountryConfigurationDeleteError(Error):
@@ -21,6 +22,9 @@ class TaxCountryConfigurationDeleteError(Error):
description="The error code.", required=True
)
+ class Meta:
+ doc_category = DOC_CATEGORY_TAXES
+
class TaxCountryConfigurationDelete(BaseMutation):
tax_country_configuration = graphene.Field(
diff --git a/saleor/graphql/tax/mutations/tax_country_configuration_update.py b/saleor/graphql/tax/mutations/tax_country_configuration_update.py
index 1e8935e848..c2e760b63c 100644
--- a/saleor/graphql/tax/mutations/tax_country_configuration_update.py
+++ b/saleor/graphql/tax/mutations/tax_country_configuration_update.py
@@ -20,6 +20,7 @@ from ..types import TaxCountryConfiguration
TaxCountryConfigurationUpdateErrorCode = graphene.Enum.from_enum(
error_codes.TaxCountryConfigurationUpdateErrorCode
)
+TaxCountryConfigurationUpdateErrorCode.doc_category = DOC_CATEGORY_TAXES
class TaxCountryConfigurationUpdateError(Error):
diff --git a/saleor/graphql/tax/mutations/tax_exemption_manage.py b/saleor/graphql/tax/mutations/tax_exemption_manage.py
index 131856d79c..b8bce2202b 100644
--- a/saleor/graphql/tax/mutations/tax_exemption_manage.py
+++ b/saleor/graphql/tax/mutations/tax_exemption_manage.py
@@ -20,11 +20,15 @@ from ...plugins.dataloaders import get_plugin_manager_promise
TaxExemptionManageErrorCode = graphene.Enum.from_enum(
error_codes.TaxExemptionManageErrorCode
)
+TaxExemptionManageErrorCode.doc_category = DOC_CATEGORY_TAXES
class TaxExemptionManageError(Error):
code = TaxExemptionManageErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_TAXES
+
class TaxExemptionManage(BaseMutation):
taxable_object = graphene.Field(TaxSourceObject)
diff --git a/saleor/graphql/warehouse/enums.py b/saleor/graphql/warehouse/enums.py
index f800e0ef3f..ba7eed5e31 100644
--- a/saleor/graphql/warehouse/enums.py
+++ b/saleor/graphql/warehouse/enums.py
@@ -1,6 +1,8 @@
from ...graphql.core.enums import to_enum
from ...warehouse import WarehouseClickAndCollectOption
+from ..core.doc_category import DOC_CATEGORY_PRODUCTS
WarehouseClickAndCollectOptionEnum = to_enum(
WarehouseClickAndCollectOption, type_name="WarehouseClickAndCollectOptionEnum"
)
+WarehouseClickAndCollectOptionEnum.doc_category = DOC_CATEGORY_PRODUCTS
diff --git a/saleor/graphql/warehouse/filters.py b/saleor/graphql/warehouse/filters.py
index d933b79b2d..09139a4c54 100644
--- a/saleor/graphql/warehouse/filters.py
+++ b/saleor/graphql/warehouse/filters.py
@@ -7,6 +7,7 @@ from ...product.models import Product, ProductVariant
from ...warehouse import WarehouseClickAndCollectOption
from ...warehouse.models import Stock, Warehouse
from ..channel.types import Channel
+from ..core.doc_category import DOC_CATEGORY_PRODUCTS
from ..core.filters import (
EnumFilter,
GlobalIDMultipleChoiceFilter,
@@ -101,6 +102,7 @@ class WarehouseFilter(django_filters.FilterSet):
class WarehouseFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
filterset_class = WarehouseFilter
@@ -114,4 +116,5 @@ class StockFilter(django_filters.FilterSet):
class StockFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
filterset_class = StockFilter
diff --git a/saleor/graphql/warehouse/sorters.py b/saleor/graphql/warehouse/sorters.py
index c42821eec5..caec73de99 100644
--- a/saleor/graphql/warehouse/sorters.py
+++ b/saleor/graphql/warehouse/sorters.py
@@ -1,11 +1,13 @@
-import graphene
+from ..core.doc_category import DOC_CATEGORY_PRODUCTS
+from ..core.types import BaseEnum, SortInputObjectType
-from ..core.types import SortInputObjectType
-
-class WarehouseSortField(graphene.Enum):
+class WarehouseSortField(BaseEnum):
NAME = ["name", "slug"]
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
@property
def description(self):
if self.name in WarehouseSortField.__enum__._member_names_:
@@ -16,5 +18,6 @@ class WarehouseSortField(graphene.Enum):
class WarehouseSortingInput(SortInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
sort_enum = WarehouseSortField
type_name = "warehouses"
diff --git a/saleor/graphql/warehouse/types.py b/saleor/graphql/warehouse/types.py
index db1a436081..e40aaa1992 100644
--- a/saleor/graphql/warehouse/types.py
+++ b/saleor/graphql/warehouse/types.py
@@ -17,8 +17,14 @@ from ..core.descriptions import (
DEPRECATED_IN_3X_INPUT,
PREVIEW_FEATURE,
)
+from ..core.doc_category import DOC_CATEGORY_PRODUCTS
from ..core.fields import ConnectionField, PermissionsField
-from ..core.types import ModelObjectType, NonNullList
+from ..core.types import (
+ BaseInputObjectType,
+ BaseObjectType,
+ ModelObjectType,
+ NonNullList,
+)
from ..meta.types import ObjectWithMetadata
from ..product.dataloaders import ProductVariantByIdLoader
from ..site.dataloaders import load_site_callback
@@ -26,13 +32,16 @@ from .dataloaders import WarehouseByIdLoader
from .enums import WarehouseClickAndCollectOptionEnum
-class WarehouseInput(graphene.InputObjectType):
+class WarehouseInput(BaseInputObjectType):
slug = graphene.String(description="Warehouse slug.")
email = graphene.String(description="The email address of the warehouse.")
external_reference = graphene.String(
description="External ID of the warehouse." + ADDED_IN_310, required=False
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class WarehouseCreateInput(WarehouseInput):
name = graphene.String(description="Warehouse name.", required=True)
@@ -48,6 +57,9 @@ class WarehouseCreateInput(WarehouseInput):
+ " Providing the zone ids will raise a ValidationError.",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class WarehouseUpdateInput(WarehouseInput):
name = graphene.String(description="Warehouse name.", required=False)
@@ -69,6 +81,9 @@ class WarehouseUpdateInput(WarehouseInput):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class Warehouse(ModelObjectType[models.Warehouse]):
id = graphene.GlobalID(required=True)
@@ -144,6 +159,7 @@ class Warehouse(ModelObjectType[models.Warehouse]):
class WarehouseCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
node = Warehouse
@@ -232,10 +248,11 @@ class Stock(ModelObjectType[models.Stock]):
class StockCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
node = Stock
-class Allocation(graphene.ObjectType):
+class Allocation(BaseObjectType):
id = graphene.GlobalID(required=True)
quantity = PermissionsField(
graphene.Int,
@@ -258,6 +275,7 @@ class Allocation(graphene.ObjectType):
class Meta:
description = "Represents allocation."
+ doc_category = DOC_CATEGORY_PRODUCTS
model = models.Allocation
interfaces = [graphene.relay.Node]
diff --git a/saleor/graphql/webhook/enums.py b/saleor/graphql/webhook/enums.py
index 6b780d9b28..f3c808a741 100644
--- a/saleor/graphql/webhook/enums.py
+++ b/saleor/graphql/webhook/enums.py
@@ -8,6 +8,8 @@ from ..core.descriptions import (
ADDED_IN_313,
PREVIEW_FEATURE,
)
+from ..core.doc_category import DOC_CATEGORY_WEBHOOKS
+from ..core.types import BaseEnum
from ..core.utils import str_to_enum
checkout_updated_event_enum_description = (
@@ -236,6 +238,7 @@ WebhookEventTypeEnum = graphene.Enum(
],
description=description,
)
+WebhookEventTypeEnum.doc_category = DOC_CATEGORY_WEBHOOKS
WebhookEventTypeAsyncEnum = graphene.Enum(
@@ -243,12 +246,14 @@ WebhookEventTypeAsyncEnum = graphene.Enum(
[(str_to_enum(e_type[0]), e_type[0]) for e_type in WebhookEventAsyncType.CHOICES],
description=description,
)
+WebhookEventTypeAsyncEnum.doc_category = DOC_CATEGORY_WEBHOOKS
WebhookEventTypeSyncEnum = graphene.Enum(
"WebhookEventTypeSyncEnum",
[(str_to_enum(e_type[0]), e_type[0]) for e_type in WebhookEventSyncType.CHOICES],
description=description,
)
+WebhookEventTypeSyncEnum.doc_category = DOC_CATEGORY_WEBHOOKS
WebhookSampleEventTypeEnum = graphene.Enum(
"WebhookSampleEventTypeEnum",
@@ -258,9 +263,13 @@ WebhookSampleEventTypeEnum = graphene.Enum(
if e_type[0] != WebhookEventAsyncType.ANY
],
)
+WebhookSampleEventTypeEnum.doc_category = DOC_CATEGORY_WEBHOOKS
-class EventDeliveryStatusEnum(graphene.Enum):
+class EventDeliveryStatusEnum(BaseEnum):
PENDING = "pending"
SUCCESS = "success"
FAILED = "failed"
+
+ class Meta:
+ doc_category = DOC_CATEGORY_WEBHOOKS
diff --git a/saleor/graphql/webhook/mutations/webhook_create.py b/saleor/graphql/webhook/mutations/webhook_create.py
index 53521c9b65..187b495500 100644
--- a/saleor/graphql/webhook/mutations/webhook_create.py
+++ b/saleor/graphql/webhook/mutations/webhook_create.py
@@ -20,16 +20,17 @@ from ...core.descriptions import (
DEPRECATED_IN_3X_INPUT,
PREVIEW_FEATURE,
)
+from ...core.doc_category import DOC_CATEGORY_WEBHOOKS
from ...core.fields import JSONString
from ...core.mutations import ModelMutation
-from ...core.types import NonNullList, WebhookError
+from ...core.types import BaseInputObjectType, NonNullList, WebhookError
from ...core.utils import raise_validation_error
from .. import enums
from ..subscription_query import SubscriptionQuery
from ..types import Webhook
-class WebhookCreateInput(graphene.InputObjectType):
+class WebhookCreateInput(BaseInputObjectType):
name = graphene.String(description="The name of the webhook.", required=False)
target_url = graphene.String(description="The url to receive the payload.")
events = NonNullList(
@@ -74,6 +75,9 @@ class WebhookCreateInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_WEBHOOKS
+
class WebhookCreate(ModelMutation):
class Arguments:
diff --git a/saleor/graphql/webhook/mutations/webhook_update.py b/saleor/graphql/webhook/mutations/webhook_update.py
index b32188a171..c33bf78445 100644
--- a/saleor/graphql/webhook/mutations/webhook_update.py
+++ b/saleor/graphql/webhook/mutations/webhook_update.py
@@ -10,14 +10,15 @@ from ...core.descriptions import (
DEPRECATED_IN_3X_INPUT,
PREVIEW_FEATURE,
)
+from ...core.doc_category import DOC_CATEGORY_WEBHOOKS
from ...core.fields import JSONString
-from ...core.types import NonNullList, WebhookError
+from ...core.types import BaseInputObjectType, NonNullList, WebhookError
from .. import enums
from ..types import Webhook
from . import WebhookCreate
-class WebhookUpdateInput(graphene.InputObjectType):
+class WebhookUpdateInput(BaseInputObjectType):
name = graphene.String(description="The new name of the webhook.", required=False)
target_url = graphene.String(
description="The url to receive the payload.", required=False
@@ -67,6 +68,9 @@ class WebhookUpdateInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_WEBHOOKS
+
class WebhookUpdate(WebhookCreate):
class Arguments:
diff --git a/saleor/graphql/webhook/sorters.py b/saleor/graphql/webhook/sorters.py
index 11db56edac..bed38bd1e2 100644
--- a/saleor/graphql/webhook/sorters.py
+++ b/saleor/graphql/webhook/sorters.py
@@ -1,11 +1,13 @@
-import graphene
+from ..core.doc_category import DOC_CATEGORY_WEBHOOKS
+from ..core.types import BaseEnum, SortInputObjectType
-from ..core.types import SortInputObjectType
-
-class EventDeliverySortField(graphene.Enum):
+class EventDeliverySortField(BaseEnum):
CREATED_AT = ["created_at"]
+ class Meta:
+ doc_category = DOC_CATEGORY_WEBHOOKS
+
@property
def description(self):
if self.name in EventDeliverySortField.__enum__._member_names_:
@@ -16,13 +18,17 @@ class EventDeliverySortField(graphene.Enum):
class EventDeliverySortingInput(SortInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_WEBHOOKS
sort_enum = EventDeliverySortField
type_name = "deliveries"
-class EventDeliveryAttemptSortField(graphene.Enum):
+class EventDeliveryAttemptSortField(BaseEnum):
CREATED_AT = ["created_at"]
+ class Meta:
+ doc_category = DOC_CATEGORY_WEBHOOKS
+
@property
def description(self):
if self.name in EventDeliveryAttemptSortField.__enum__._member_names_:
@@ -33,5 +39,6 @@ class EventDeliveryAttemptSortField(graphene.Enum):
class EventDeliveryAttemptSortingInput(SortInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_WEBHOOKS
sort_enum = EventDeliveryAttemptSortField
type_name = "attempts"