Skip to content

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

Fix deprecation reasons for sort fields (#17846)

Iga Karbowiak294afe5b9c1e
diff --git a/saleor/graphql/csv/sorters.py b/saleor/graphql/csv/sorters.py
index b988be080b..9b22c05c8b 100644
--- a/saleor/graphql/csv/sorters.py
+++ b/saleor/graphql/csv/sorters.py
@@ -1,6 +1,5 @@
import graphene
-from ..core.descriptions import DEPRECATED_IN_3X_INPUT
from ..core.types import SortInputObjectType
@@ -8,7 +7,7 @@ class ExportFileSortField(graphene.Enum):
STATUS = ["status"]
CREATED_AT = ["created_at"]
UPDATED_AT = ["updated_at"]
- LAST_MODIFIED_AT = ["updated_at"]
+ LAST_MODIFIED_AT = ["updated_at", "pk"]
@property
def description(self):
@@ -16,9 +15,7 @@ class ExportFileSortField(graphene.Enum):
descriptions = {
ExportFileSortField.STATUS.name: "status.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
ExportFileSortField.CREATED_AT.name: "creation date.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
- ExportFileSortField.UPDATED_AT.name: ( # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
- f"update date. {DEPRECATED_IN_3X_INPUT}"
- ),
+ ExportFileSortField.UPDATED_AT.name: "update date.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
ExportFileSortField.LAST_MODIFIED_AT.name: "update date.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
}
@@ -26,6 +23,15 @@ class ExportFileSortField(graphene.Enum):
return f"Sort export file by {descriptions[self.name]}"
raise ValueError(f"Unsupported enum value: {self.value}")
+ @property
+ def deprecation_reason(self):
+ deprecations = {
+ ExportFileSortField.UPDATED_AT.name: "Use `LAST_MODIFIED_AT` instead.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
+ }
+ if self.name in deprecations:
+ return deprecations[self.name]
+ return None
+
class ExportFileSortingInput(SortInputObjectType):
class Meta:
diff --git a/saleor/graphql/discount/sorters.py b/saleor/graphql/discount/sorters.py
index 2314ba8046..6824e1cafd 100644
--- a/saleor/graphql/discount/sorters.py
+++ b/saleor/graphql/discount/sorters.py
@@ -2,7 +2,11 @@ import graphene
from django.db.models import F, Min, OuterRef, Q, QuerySet, Subquery
from ...discount.models import VoucherCode
-from ..core.descriptions import ADDED_IN_318, CHANNEL_REQUIRED, DEPRECATED_IN_3X_INPUT
+from ..core.descriptions import (
+ ADDED_IN_318,
+ CHANNEL_REQUIRED,
+ DEFAULT_DEPRECATION_REASON,
+)
from ..core.doc_category import DOC_CATEGORY_DISCOUNTS
from ..core.types import BaseEnum, ChannelSortInputObjectType, SortInputObjectType
@@ -21,15 +25,17 @@ class SaleSortField(BaseEnum):
@property
def description(self):
- descrption_extras = {
- SaleSortField.VALUE.name: [CHANNEL_REQUIRED], # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
+ descriptions = {
+ SaleSortField.NAME.name: "name.", # type: ignore[attr-defined] # noqa: E501
+ SaleSortField.START_DATE.name: "start date.", # type: ignore[attr-defined] # noqa: E501
+ SaleSortField.END_DATE.name: "end date.", # type: ignore[attr-defined] # noqa: E501
+ SaleSortField.VALUE.name: "value." + CHANNEL_REQUIRED, # type: ignore[attr-defined] # noqa: E501
+ SaleSortField.TYPE.name: "type.", # type: ignore[attr-defined] # noqa: E501
+ SaleSortField.CREATED_AT.name: "creation date.", # type: ignore[attr-defined] # noqa: E501
+ SaleSortField.LAST_MODIFIED_AT.name: "last modification date.", # type: ignore[attr-defined] # noqa: E501
}
- if self.name in SaleSortField.__enum__._member_names_:
- sort_name = self.name.lower().replace("_", " ")
- description = f"Sort sales by {sort_name}."
- if extras := descrption_extras.get(self.name):
- description += "".join(extras)
- return description
+ if self.name in descriptions:
+ return f"Sort sales by {descriptions[self.name]}"
raise ValueError(f"Unsupported enum value: {self.value}")
@staticmethod
@@ -72,7 +78,6 @@ class VoucherSortField(graphene.Enum):
VoucherSortField.VALUE.name: [CHANNEL_REQUIRED], # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
VoucherSortField.MINIMUM_SPENT_AMOUNT.name: [CHANNEL_REQUIRED], # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
VoucherSortField.NAME.name: [ADDED_IN_318], # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
- VoucherSortField.CODE.name: [DEPRECATED_IN_3X_INPUT], # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
}
if self.name in VoucherSortField.__enum__._member_names_:
sort_name = self.name.lower().replace("_", " ")
@@ -82,6 +87,15 @@ class VoucherSortField(graphene.Enum):
return description
raise ValueError(f"Unsupported enum value: {self.value}")
+ @property
+ def deprecation_reason(self):
+ deprecations = {
+ VoucherSortField.CODE.name: DEFAULT_DEPRECATION_REASON, # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
+ }
+ if self.name in deprecations:
+ return deprecations[self.name]
+ return None
+
@staticmethod
def qs_with_minimum_spent_amount(queryset: QuerySet, channel_slug: str) -> QuerySet:
return queryset.annotate(
@@ -130,10 +144,14 @@ class PromotionSortField(BaseEnum):
@property
def description(self):
- if self.name in PromotionSortField.__enum__._member_names_:
- sort_name = self.name.lower().replace("_", " ")
- description = f"Sort promotions by {sort_name}."
- return description
+ descriptions = {
+ PromotionSortField.NAME.name: "name.", # type: ignore[attr-defined] # noqa: E501
+ PromotionSortField.START_DATE.name: "start date.", # type: ignore[attr-defined] # noqa: E501
+ PromotionSortField.END_DATE.name: "end date.", # type: ignore[attr-defined] # noqa: E501
+ PromotionSortField.CREATED_AT.name: "creation date.", # type: ignore[attr-defined] # noqa: E501
+ }
+ if self.name in descriptions:
+ return f"Sort promotions by {descriptions[self.name]}"
raise ValueError(f"Unsupported enum value: {self.value}")
diff --git a/saleor/graphql/order/sorters.py b/saleor/graphql/order/sorters.py
index 38fa286743..fd0a3e3420 100644
--- a/saleor/graphql/order/sorters.py
+++ b/saleor/graphql/order/sorters.py
@@ -23,27 +23,27 @@ class OrderSortField(BaseEnum):
@property
def description(self):
descriptions = {
- OrderSortField.NUMBER.name: "Sort orders by number.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
+ OrderSortField.NUMBER.name: "number.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
OrderSortField.RANK.name: ( # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
- "Sort orders by rank. Note: This option is available only with the `search` filter."
+ "rank. Note: This option is available only with the `search` filter."
),
- OrderSortField.CREATION_DATE.name: "Sort orders by creation date", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
- OrderSortField.CREATED_AT.name: "Sort orders by creation date.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
- OrderSortField.LAST_MODIFIED_AT.name: "Sort orders by last modified date.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
- OrderSortField.CUSTOMER.name: "Sort orders by customer.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
- OrderSortField.PAYMENT.name: "Sort orders by payment status.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
- OrderSortField.FULFILLMENT_STATUS.name: "Sort orders by fulfillment status.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
- OrderSortField.STATUS.name: f"Sort orders by order status. {ADDED_IN_322}", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
+ OrderSortField.CREATION_DATE.name: "creation date", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
+ OrderSortField.CREATED_AT.name: "creation date.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
+ OrderSortField.LAST_MODIFIED_AT.name: "last modified date.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
+ OrderSortField.CUSTOMER.name: "customer.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
+ OrderSortField.PAYMENT.name: "payment status.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
+ OrderSortField.FULFILLMENT_STATUS.name: "fulfillment status.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
+ OrderSortField.STATUS.name: f"order status. {ADDED_IN_322}", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
}
if self.name in descriptions:
- return descriptions[self.name]
+ return f"Sort orders by {descriptions[self.name]}"
raise ValueError(f"Unsupported enum value: {self.value}")
@property
def deprecation_reason(self):
deprecations = {
- OrderSortField.CREATION_DATE.name: ("Use `createdAt` instead."), # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
- OrderSortField.FULFILLMENT_STATUS.name: ("Use `status` instead."), # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
+ OrderSortField.CREATION_DATE.name: ("Use `CREATED_AT` instead."), # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
+ OrderSortField.FULFILLMENT_STATUS.name: ("Use `STATUS` instead."), # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
}
if self.name in deprecations:
return deprecations[self.name]
diff --git a/saleor/graphql/page/sorters.py b/saleor/graphql/page/sorters.py
index f21bfc03a3..0bf19bcf69 100644
--- a/saleor/graphql/page/sorters.py
+++ b/saleor/graphql/page/sorters.py
@@ -1,4 +1,3 @@
-from ..core.descriptions import DEPRECATED_IN_3X_INPUT
from ..core.doc_category import DOC_CATEGORY_PAGES
from ..core.types import BaseEnum, SortInputObjectType
@@ -7,8 +6,8 @@ class PageSortField(BaseEnum):
TITLE = ["title", "slug"]
SLUG = ["slug"]
VISIBILITY = ["is_published", "title", "slug"]
- CREATION_DATE = ["created_at", "title", "slug"]
- PUBLICATION_DATE = ["published_at", "title", "slug"]
+ CREATION_DATE = ["created_at", "title", "slug", "pk"]
+ PUBLICATION_DATE = ["published_at", "title", "slug", "pk"]
PUBLISHED_AT = ["published_at", "title", "slug"]
CREATED_AT = ["created_at", "title", "slug"]
@@ -17,16 +16,29 @@ class PageSortField(BaseEnum):
@property
def description(self):
- if self.name in PageSortField.__enum__._member_names_:
- sort_name = self.name.lower().replace("_", " ")
- description = f"Sort pages by {sort_name}."
- if self.name == "PUBLICATION_DATE":
- description += DEPRECATED_IN_3X_INPUT
- if self.name == "CREATION_DATE":
- description += DEPRECATED_IN_3X_INPUT
- return description
+ descriptions = {
+ PageSortField.TITLE.name: "title.", # type: ignore[attr-defined] # noqa: E501
+ PageSortField.SLUG.name: "slug.", # type: ignore[attr-defined] # noqa: E501
+ PageSortField.VISIBILITY.name: "visibility.", # type: ignore[attr-defined] # noqa: E501
+ PageSortField.CREATION_DATE.name: "creation date.", # type: ignore[attr-defined] # noqa: E501
+ PageSortField.CREATED_AT.name: "creation date.", # type: ignore[attr-defined] # noqa: E501
+ PageSortField.PUBLICATION_DATE.name: "publication date.", # type: ignore[attr-defined] # noqa: E501
+ PageSortField.PUBLISHED_AT.name: "publication date.", # type: ignore[attr-defined] # noqa: E501
+ }
+ if self.name in descriptions:
+ return f"Sort pages by {descriptions[self.name]}"
raise ValueError(f"Unsupported enum value: {self.value}")
+ @property
+ def deprecation_reason(self):
+ deprecations = {
+ PageSortField.PUBLICATION_DATE.name: "Use `PUBLISHED_AT` instead.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
+ PageSortField.CREATION_DATE.name: "Use `CREATED_AT` instead.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
+ }
+ if self.name in deprecations:
+ return deprecations[self.name]
+ return None
+
class PageSortingInput(SortInputObjectType):
class Meta:
diff --git a/saleor/graphql/product/sorters.py b/saleor/graphql/product/sorters.py
index b8b62a4d3c..518c09e459 100644
--- a/saleor/graphql/product/sorters.py
+++ b/saleor/graphql/product/sorters.py
@@ -23,7 +23,7 @@ from ...product.models import (
Product,
ProductChannelListing,
)
-from ..core.descriptions import CHANNEL_REQUIRED, DEPRECATED_IN_3X_INPUT
+from ..core.descriptions import CHANNEL_REQUIRED
from ..core.doc_category import DOC_CATEGORY_PRODUCTS
from ..core.types import BaseEnum, ChannelSortInputObjectType, SortInputObjectType
@@ -80,7 +80,7 @@ class CollectionSortField(BaseEnum):
NAME = ["name", "slug"]
AVAILABILITY = ["is_published", "slug"]
PRODUCT_COUNT = ["product_count", "slug"]
- PUBLICATION_DATE = ["published_at", "slug"]
+ PUBLICATION_DATE = ["published_at", "slug", "pk"]
PUBLISHED_AT = ["published_at", "slug"]
class Meta:
@@ -88,22 +88,27 @@ class CollectionSortField(BaseEnum):
@property
def description(self):
- descrption_extras = {
- CollectionSortField.AVAILABILITY.name: [CHANNEL_REQUIRED], # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
- CollectionSortField.PUBLICATION_DATE.name: [ # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
- CHANNEL_REQUIRED,
- DEPRECATED_IN_3X_INPUT,
- ],
- CollectionSortField.PUBLISHED_AT.name: [CHANNEL_REQUIRED], # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
+ descriptions = {
+ CollectionSortField.NAME.name: "name.", # type: ignore[attr-defined] # noqa: E501
+ CollectionSortField.AVAILABILITY.name: "availability." + CHANNEL_REQUIRED, # type: ignore[attr-defined] # noqa: E501
+ CollectionSortField.PRODUCT_COUNT.name: "product count.", # type: ignore[attr-defined] # noqa: E501
+ CollectionSortField.PUBLICATION_DATE.name: "publication date." # type: ignore[attr-defined] # noqa: E501
+ + CHANNEL_REQUIRED,
+ CollectionSortField.PUBLISHED_AT.name: "published at." + CHANNEL_REQUIRED, # type: ignore[attr-defined] # noqa: E501
}
- if self.name in CollectionSortField.__enum__._member_names_:
- sort_name = self.name.lower().replace("_", " ")
- description = f"Sort collections by {sort_name}."
- if extras := descrption_extras.get(self.name):
- description += "".join(extras)
- return description
+ if self.name in descriptions:
+ return f"Sort collections by {descriptions[self.name]}"
raise ValueError(f"Unsupported enum value: {self.value}")
+ @property
+ def deprecation_reason(self):
+ deprecations = {
+ CollectionSortField.PUBLICATION_DATE.name: "Use `PUBLISHED_AT` instead.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
+ }
+ if self.name in deprecations:
+ return deprecations[self.name]
+ return None
+
@staticmethod
def qs_with_product_count(queryset: QuerySet, **_kwargs) -> QuerySet:
return queryset.annotate(product_count=Count("collectionproduct__id"))
@@ -147,11 +152,11 @@ class ProductOrderField(BaseEnum):
RANK = ["search_rank", "id"]
PRICE = ["min_variants_price_amount", "name", "slug"]
MINIMAL_PRICE = ["discounted_price_amount", "name", "slug"]
- LAST_MODIFIED = ["updated_at", "name", "slug"]
- DATE = ["updated_at", "name", "slug"]
+ LAST_MODIFIED = ["updated_at", "name", "slug", "pk"]
+ DATE = ["updated_at", "name", "slug", "pk"]
TYPE = ["product_type__name", "name", "slug"]
PUBLISHED = ["is_published", "name", "slug"]
- PUBLICATION_DATE = ["published_at", "name", "slug"]
+ PUBLICATION_DATE = ["published_at", "name", "slug", "pk"]
PUBLISHED_AT = ["published_at", "name", "slug"]
LAST_MODIFIED_AT = ["updated_at", "name", "slug"]
COLLECTION = ["sort_order", "pk"]
@@ -179,15 +184,15 @@ class ProductOrderField(BaseEnum):
ProductOrderField.MINIMAL_PRICE.name: ( # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
"a minimal price of a product's variant." + CHANNEL_REQUIRED
),
- ProductOrderField.DATE.name: f"update date. {DEPRECATED_IN_3X_INPUT}", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
+ ProductOrderField.DATE.name: "update date.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
ProductOrderField.PUBLISHED.name: ( # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
"publication status." + CHANNEL_REQUIRED
),
ProductOrderField.PUBLICATION_DATE.name: ( # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
- "publication date." + CHANNEL_REQUIRED + DEPRECATED_IN_3X_INPUT
+ "publication date." + CHANNEL_REQUIRED
),
ProductOrderField.LAST_MODIFIED.name: ( # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
- f"update date. {DEPRECATED_IN_3X_INPUT}"
+ "update date."
),
ProductOrderField.PUBLISHED_AT.name: ( # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
"publication date." + CHANNEL_REQUIRED
@@ -200,6 +205,17 @@ class ProductOrderField(BaseEnum):
return f"Sort products by {descriptions[self.name]}"
raise ValueError(f"Unsupported enum value: {self.value}")
+ @property
+ def deprecation_reason(self):
+ deprecations = {
+ ProductOrderField.DATE.name: "Use `LAST_MODIFIED` instead.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
+ ProductOrderField.PUBLICATION_DATE.name: "Use `PUBLISHED_AT` instead.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
+ ProductOrderField.LAST_MODIFIED.name: "Use `LAST_MODIFIED_AT` instead.", # type: ignore[attr-defined] # graphene.Enum is not typed # noqa: E501
+ }
+ if self.name in deprecations:
+ return deprecations[self.name]
+ return None
+
@staticmethod
def qs_with_price(queryset: QuerySet, channel_slug: str) -> QuerySet:
return queryset.annotate(
@@ -294,10 +310,11 @@ class ProductVariantSortField(BaseEnum):
@property
def description(self):
- # pylint: disable=no-member
- if self.name in ProductVariantSortField.__enum__._member_names_:
- sort_name = self.name.lower().replace("_", " ")
- return f"Sort products variants by {sort_name}."
+ descriptions = {
+ ProductVariantSortField.LAST_MODIFIED_AT.name: "last modification date.", # type: ignore[attr-defined] # noqa: E501
+ }
+ if self.name in descriptions:
+ return f"Sort product variants by {descriptions[self.name]}"
raise ValueError(f"Unsupported enum value: {self.value}")
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index 0ebcc1cee3..2e06df4984 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -6963,10 +6963,10 @@ enum ProductOrderField @doc(category: "Products") {
MINIMAL_PRICE
"""Sort products by update date."""
- LAST_MODIFIED
+ LAST_MODIFIED @deprecated(reason: "Use `LAST_MODIFIED_AT` instead.")
"""Sort products by update date."""
- DATE
+ DATE @deprecated(reason: "Use `LAST_MODIFIED_AT` instead.")
"""Sort products by type."""
TYPE
@@ -6983,7 +6983,7 @@ enum ProductOrderField @doc(category: "Products") {
This option requires a channel filter to work as the values can vary between channels.
"""
- PUBLICATION_DATE
+ PUBLICATION_DATE @deprecated(reason: "Use `PUBLISHED_AT` instead.")
"""
Sort products by publication date.
@@ -7876,7 +7876,7 @@ input ProductVariantSortingInput @doc(category: "Products") {
}
enum ProductVariantSortField @doc(category: "Products") {
- """Sort products variants by last modified at."""
+ """Sort product variants by last modification date."""
LAST_MODIFIED_AT
}
@@ -12665,10 +12665,10 @@ enum CollectionSortField @doc(category: "Products") {
This option requires a channel filter to work as the values can vary between channels.
"""
- PUBLICATION_DATE
+ PUBLICATION_DATE @deprecated(reason: "Use `PUBLISHED_AT` instead.")
"""
- Sort collections by publication date.
+ Sort collections by published at.
This option requires a channel filter to work as the values can vary between channels.
"""
@@ -12773,10 +12773,10 @@ enum PageSortField @doc(category: "Pages") {
VISIBILITY
"""Sort pages by creation date."""
- CREATION_DATE
+ CREATION_DATE @deprecated(reason: "Use `CREATED_AT` instead.")
"""Sort pages by publication date."""
- PUBLICATION_DATE
+ PUBLICATION_DATE @deprecated(reason: "Use `PUBLISHED_AT` instead.")
"""Sort pages by publication date."""
PUBLISHED_AT
@@ -12866,7 +12866,7 @@ enum OrderSortField @doc(category: "Orders") {
RANK
"""Sort orders by creation date"""
- CREATION_DATE @deprecated(reason: "Use `createdAt` instead.")
+ CREATION_DATE @deprecated(reason: "Use `CREATED_AT` instead.")
"""Sort orders by creation date."""
CREATED_AT
@@ -12881,7 +12881,7 @@ enum OrderSortField @doc(category: "Orders") {
PAYMENT
"""Sort orders by fulfillment status."""
- FULFILLMENT_STATUS @deprecated(reason: "Use `status` instead.")
+ FULFILLMENT_STATUS @deprecated(reason: "Use `STATUS` instead.")
"""
Sort orders by order status.
@@ -13454,10 +13454,10 @@ enum SaleSortField @doc(category: "Discounts") {
"""Sort sales by type."""
TYPE
- """Sort sales by created at."""
+ """Sort sales by creation date."""
CREATED_AT
- """Sort sales by last modified at."""
+ """Sort sales by last modification date."""
LAST_MODIFIED_AT
}
@@ -13507,7 +13507,7 @@ input VoucherSortingInput @doc(category: "Discounts") {
enum VoucherSortField {
"""Sort vouchers by code."""
- CODE
+ CODE @deprecated
"""
Sort vouchers by name.
@@ -13958,7 +13958,7 @@ enum PromotionSortField @doc(category: "Discounts") {
"""Sort promotions by end date."""
END_DATE
- """Sort promotions by created at."""
+ """Sort promotions by creation date."""
CREATED_AT
}
@@ -14062,7 +14062,7 @@ input ExportFileSortingInput {
enum ExportFileSortField {
STATUS
CREATED_AT
- UPDATED_AT
+ UPDATED_AT @deprecated(reason: "Use `LAST_MODIFIED_AT` instead.")
LAST_MODIFIED_AT
}