Skip to content

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

Add support for ORDER_* mountpoints for Apps (#9694)

Patryk Zawadzkicc728ef7e606
diff --git a/saleor/app/migrations/0013_alter_appextension_mount.py b/saleor/app/migrations/0013_alter_appextension_mount.py
new file mode 100644
index 0000000000..415bc7a61c
--- /dev/null
+++ b/saleor/app/migrations/0013_alter_appextension_mount.py
@@ -0,0 +1,34 @@
+# Generated by Django 3.2.13 on 2022-05-04 14:16
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ("app", "0012_rename_created_app_created_at"),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name="appextension",
+ name="mount",
+ field=models.CharField(
+ choices=[
+ ("product_overview_create", "product_overview_create"),
+ ("product_overview_more_actions", "product_overview_more_actions"),
+ ("product_details_more_actions", "product_details_more_actions"),
+ ("navigation_catalog", "navigation_catalog"),
+ ("navigation_orders", "navigation_orders"),
+ ("navigation_customers", "navigation_customers"),
+ ("navigation_discounts", "navigation_discounts"),
+ ("navigation_translations", "navigation_translations"),
+ ("navigation_pages", "navigation_pages"),
+ ("order_details_more_actions", "order_details_more_actions"),
+ ("order_overview_create", "order_overview_create"),
+ ("order_overview_more_actions", "order_overview_more_actions"),
+ ],
+ max_length=256,
+ ),
+ ),
+ ]
diff --git a/saleor/app/types.py b/saleor/app/types.py
index ff6d80f01d..bff5fd4ed8 100644
--- a/saleor/app/types.py
+++ b/saleor/app/types.py
@@ -19,6 +19,10 @@ class AppExtensionMount:
NAVIGATION_TRANSLATIONS = "navigation_translations"
NAVIGATION_PAGES = "navigation_pages"
+ ORDER_DETAILS_MORE_ACTIONS = "order_details_more_actions"
+ ORDER_OVERVIEW_CREATE = "order_overview_create"
+ ORDER_OVERVIEW_MORE_ACTIONS = "order_overview_more_actions"
+
CHOICES = [
(PRODUCT_OVERVIEW_CREATE, "product_overview_create"),
(PRODUCT_OVERVIEW_MORE_ACTIONS, "product_overview_more_actions"),
@@ -29,6 +33,9 @@ class AppExtensionMount:
(NAVIGATION_DISCOUNTS, "navigation_discounts"),
(NAVIGATION_TRANSLATIONS, "navigation_translations"),
(NAVIGATION_PAGES, "navigation_pages"),
+ (ORDER_DETAILS_MORE_ACTIONS, "order_details_more_actions"),
+ (ORDER_OVERVIEW_CREATE, "order_overview_create"),
+ (ORDER_OVERVIEW_MORE_ACTIONS, "order_overview_more_actions"),
]
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index b63a407f92..6e1ed72c6c 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -1947,6 +1947,9 @@ enum AppExtensionMountEnum {
NAVIGATION_DISCOUNTS
NAVIGATION_TRANSLATIONS
NAVIGATION_PAGES
+ ORDER_DETAILS_MORE_ACTIONS
+ ORDER_OVERVIEW_CREATE
+ ORDER_OVERVIEW_MORE_ACTIONS
}
"""