From 399569e9d3db60f604cff67b7969054b86577f19 Mon Sep 17 00:00:00 2001 From: Konstantin Savosteev Date: Thu, 21 Nov 2024 12:36:44 +0200 Subject: [PATCH 1/2] feat: add OrderConfigurationItemType --- .../Schemas/OrderConfigurationItemType.cs | 14 ++++++++++++++ .../Schemas/OrderLineItemType.cs | 5 +++++ .../VirtoCommerce.XOrder.Core.csproj | 4 ++-- src/VirtoCommerce.XOrder.Web/module.manifest | 4 ++-- 4 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 src/VirtoCommerce.XOrder.Core/Schemas/OrderConfigurationItemType.cs diff --git a/src/VirtoCommerce.XOrder.Core/Schemas/OrderConfigurationItemType.cs b/src/VirtoCommerce.XOrder.Core/Schemas/OrderConfigurationItemType.cs new file mode 100644 index 0000000..4b84df4 --- /dev/null +++ b/src/VirtoCommerce.XOrder.Core/Schemas/OrderConfigurationItemType.cs @@ -0,0 +1,14 @@ +using VirtoCommerce.OrdersModule.Core.Model; +using VirtoCommerce.Xapi.Core.Schemas; + +namespace VirtoCommerce.XOrder.Core.Schemas; + +public class OrderConfigurationItemType : ExtendableGraphType +{ + public OrderConfigurationItemType() + { + Field(x => x.Id, nullable: false).Description("Configuration item ID"); + Field(x => x.Name, nullable: true).Description("Configuration item name"); + } +} + diff --git a/src/VirtoCommerce.XOrder.Core/Schemas/OrderLineItemType.cs b/src/VirtoCommerce.XOrder.Core/Schemas/OrderLineItemType.cs index 0939f50..758c081 100644 --- a/src/VirtoCommerce.XOrder.Core/Schemas/OrderLineItemType.cs +++ b/src/VirtoCommerce.XOrder.Core/Schemas/OrderLineItemType.cs @@ -147,6 +147,11 @@ public OrderLineItemType( "Customer order Line item dynamic property values", QueryArgumentPresets.GetArgumentForDynamicProperties(), context => dynamicPropertyResolverService.LoadDynamicPropertyValues(context.Source, context.GetCultureName())); + + ExtendableField>( + "configurationItems", + "Configuration items for configurable product", + resolve: context => context.Source.ConfigurationItems ?? []); } } } diff --git a/src/VirtoCommerce.XOrder.Core/VirtoCommerce.XOrder.Core.csproj b/src/VirtoCommerce.XOrder.Core/VirtoCommerce.XOrder.Core.csproj index ddaf93b..539a13e 100644 --- a/src/VirtoCommerce.XOrder.Core/VirtoCommerce.XOrder.Core.csproj +++ b/src/VirtoCommerce.XOrder.Core/VirtoCommerce.XOrder.Core.csproj @@ -10,8 +10,8 @@ - + - + \ No newline at end of file diff --git a/src/VirtoCommerce.XOrder.Web/module.manifest b/src/VirtoCommerce.XOrder.Web/module.manifest index 6bc5ac9..a096849 100644 --- a/src/VirtoCommerce.XOrder.Web/module.manifest +++ b/src/VirtoCommerce.XOrder.Web/module.manifest @@ -6,10 +6,10 @@ 3.861.0 - + - + Order Experience API From dc5e23dd17188e5b977e4e46334be37a40ece799 Mon Sep 17 00:00:00 2001 From: Konstantin Savosteev Date: Mon, 25 Nov 2024 15:43:18 +0200 Subject: [PATCH 2/2] feat: update dependency --- .../VirtoCommerce.XOrder.Core.csproj | 6 +++--- .../VirtoCommerce.XOrder.Data.csproj | 2 +- src/VirtoCommerce.XOrder.Web/module.manifest | 4 ++-- .../VirtoCommerce.XOrder.Tests.csproj | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/VirtoCommerce.XOrder.Core/VirtoCommerce.XOrder.Core.csproj b/src/VirtoCommerce.XOrder.Core/VirtoCommerce.XOrder.Core.csproj index 539a13e..d6ccada 100644 --- a/src/VirtoCommerce.XOrder.Core/VirtoCommerce.XOrder.Core.csproj +++ b/src/VirtoCommerce.XOrder.Core/VirtoCommerce.XOrder.Core.csproj @@ -10,8 +10,8 @@ - - - + + + \ No newline at end of file diff --git a/src/VirtoCommerce.XOrder.Data/VirtoCommerce.XOrder.Data.csproj b/src/VirtoCommerce.XOrder.Data/VirtoCommerce.XOrder.Data.csproj index e847e99..f3e7463 100644 --- a/src/VirtoCommerce.XOrder.Data/VirtoCommerce.XOrder.Data.csproj +++ b/src/VirtoCommerce.XOrder.Data/VirtoCommerce.XOrder.Data.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/VirtoCommerce.XOrder.Web/module.manifest b/src/VirtoCommerce.XOrder.Web/module.manifest index a096849..8cd4768 100644 --- a/src/VirtoCommerce.XOrder.Web/module.manifest +++ b/src/VirtoCommerce.XOrder.Web/module.manifest @@ -4,11 +4,11 @@ 3.811.0 - 3.861.0 + 3.867.0 - + diff --git a/tests/VirtoCommerce.XOrder.Tests/VirtoCommerce.XOrder.Tests.csproj b/tests/VirtoCommerce.XOrder.Tests/VirtoCommerce.XOrder.Tests.csproj index 5d87fd0..5100fb0 100644 --- a/tests/VirtoCommerce.XOrder.Tests/VirtoCommerce.XOrder.Tests.csproj +++ b/tests/VirtoCommerce.XOrder.Tests/VirtoCommerce.XOrder.Tests.csproj @@ -9,7 +9,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + all