Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated SDKs #369

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
**Api changes**

<details>
<summary>Added Type(s)</summary>

- added type `ApprovalRuleSetCustomFieldAction`
- added type `ApprovalRuleSetCustomTypeAction`
</details>


<details>
<summary>Added Property(s)</summary>

- added property `custom` to type `ApprovalRule`
- added property `source` to type `EventBridgeDestination`
</details>


<details>
<summary>Added Enum(s)</summary>

- added enum `approval-rule` to type `CustomFieldReferenceValue`
- added enum `approval-rule` to type `ResourceTypeId`
</details>


<details>
<summary>Added Method(s)</summary>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using commercetools.Sdk.Api.Models.BusinessUnits;
using commercetools.Sdk.Api.Models.Common;
using commercetools.Sdk.Api.Models.Types;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -38,5 +39,7 @@ public partial class ApprovalRule : IApprovalRule
public IEnumerable<IRuleRequester> RequestersEnumerable { set => Requesters = value.ToList(); }

public IBusinessUnitKeyReference BusinessUnit { get; set; }

public ICustomFields Custom { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;

namespace commercetools.Sdk.Api.Models.ApprovalRules
{

public partial class ApprovalRuleSetCustomFieldAction : IApprovalRuleSetCustomFieldAction
{
public string Action { get; set; }

public string Name { get; set; }

public Object Value { get; set; }
public ApprovalRuleSetCustomFieldAction()
{
this.Action = "setCustomField";
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using commercetools.Sdk.Api.Models.Types;


namespace commercetools.Sdk.Api.Models.ApprovalRules
{

public partial class ApprovalRuleSetCustomTypeAction : IApprovalRuleSetCustomTypeAction
{
public string Action { get; set; }

public ITypeResourceIdentifier Type { get; set; }

public IFieldContainer Fields { get; set; }
public ApprovalRuleSetCustomTypeAction()
{
this.Action = "setCustomType";
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using commercetools.Sdk.Api.Models.BusinessUnits;
using commercetools.Sdk.Api.Models.Common;
using commercetools.Sdk.Api.Models.Types;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -40,5 +41,7 @@ public partial interface IApprovalRule : IBaseResource

IBusinessUnitKeyReference BusinessUnit { get; set; }

ICustomFields Custom { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using commercetools.Base.CustomAttributes;
// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Models.ApprovalRules
{
[DeserializeAs(typeof(commercetools.Sdk.Api.Models.ApprovalRules.ApprovalRuleSetCustomFieldAction))]
public partial interface IApprovalRuleSetCustomFieldAction : IApprovalRuleUpdateAction
{
string Name { get; set; }

Object Value { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using commercetools.Sdk.Api.Models.Types;
using commercetools.Base.CustomAttributes;
// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Models.ApprovalRules
{
[DeserializeAs(typeof(commercetools.Sdk.Api.Models.ApprovalRules.ApprovalRuleSetCustomTypeAction))]
public partial interface IApprovalRuleSetCustomTypeAction : IApprovalRuleUpdateAction
{
ITypeResourceIdentifier Type { get; set; }

IFieldContainer Fields { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ namespace commercetools.Sdk.Api.Models.ApprovalRules
[TypeDiscriminator(nameof(Action))]
[DefaultTypeDiscriminator(typeof(commercetools.Sdk.Api.Models.ApprovalRules.ApprovalRuleUpdateAction))]
[SubTypeDiscriminator("setApprovers", typeof(commercetools.Sdk.Api.Models.ApprovalRules.ApprovalRuleSetApproversAction))]
[SubTypeDiscriminator("setCustomField", typeof(commercetools.Sdk.Api.Models.ApprovalRules.ApprovalRuleSetCustomFieldAction))]
[SubTypeDiscriminator("setCustomType", typeof(commercetools.Sdk.Api.Models.ApprovalRules.ApprovalRuleSetCustomTypeAction))]
[SubTypeDiscriminator("setDescription", typeof(commercetools.Sdk.Api.Models.ApprovalRules.ApprovalRuleSetDescriptionAction))]
[SubTypeDiscriminator("setKey", typeof(commercetools.Sdk.Api.Models.ApprovalRules.ApprovalRuleSetKeyAction))]
[SubTypeDiscriminator("setName", typeof(commercetools.Sdk.Api.Models.ApprovalRules.ApprovalRuleSetNameAction))]
Expand All @@ -22,6 +24,18 @@ static commercetools.Sdk.Api.Models.ApprovalRules.ApprovalRuleSetApproversAction
init?.Invoke(t);
return t;
}
static commercetools.Sdk.Api.Models.ApprovalRules.ApprovalRuleSetCustomFieldAction SetCustomField(Action<commercetools.Sdk.Api.Models.ApprovalRules.ApprovalRuleSetCustomFieldAction> init = null)
{
var t = new commercetools.Sdk.Api.Models.ApprovalRules.ApprovalRuleSetCustomFieldAction();
init?.Invoke(t);
return t;
}
static commercetools.Sdk.Api.Models.ApprovalRules.ApprovalRuleSetCustomTypeAction SetCustomType(Action<commercetools.Sdk.Api.Models.ApprovalRules.ApprovalRuleSetCustomTypeAction> init = null)
{
var t = new commercetools.Sdk.Api.Models.ApprovalRules.ApprovalRuleSetCustomTypeAction();
init?.Invoke(t);
return t;
}
static commercetools.Sdk.Api.Models.ApprovalRules.ApprovalRuleSetDescriptionAction SetDescription(Action<commercetools.Sdk.Api.Models.ApprovalRules.ApprovalRuleSetDescriptionAction> init = null)
{
var t = new commercetools.Sdk.Api.Models.ApprovalRules.ApprovalRuleSetDescriptionAction();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ public enum CustomFieldReferenceValue
[Description("approval-flow")]
ApprovalFlow,

[Description("approval-rule")]
ApprovalRule,

[Description("associate-role")]
AssociateRole,

Expand Down Expand Up @@ -88,6 +91,9 @@ public interface ICustomFieldReferenceValue : IJsonName, IEnumerable<char>
public static ICustomFieldReferenceValue ApprovalFlow = new CustomFieldReferenceValueWrapper
{ Value = CustomFieldReferenceValue.ApprovalFlow, JsonName = "approval-flow" };

public static ICustomFieldReferenceValue ApprovalRule = new CustomFieldReferenceValueWrapper
{ Value = CustomFieldReferenceValue.ApprovalRule, JsonName = "approval-rule" };

public static ICustomFieldReferenceValue AssociateRole = new CustomFieldReferenceValueWrapper
{ Value = CustomFieldReferenceValue.AssociateRole, JsonName = "associate-role" };

Expand Down Expand Up @@ -143,6 +149,7 @@ static ICustomFieldReferenceValue[] Values()
return new[]
{
ApprovalFlow ,
ApprovalRule ,
AssociateRole ,
BusinessUnit ,
Cart ,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ public enum ResourceTypeId
[Description("approval-flow")]
ApprovalFlow,

[Description("approval-rule")]
ApprovalRule,

[Description("associate-role")]
AssociateRole,

Expand Down Expand Up @@ -142,6 +145,9 @@ public interface IResourceTypeId : IJsonName, IEnumerable<char>
public static IResourceTypeId ApprovalFlow = new ResourceTypeIdWrapper
{ Value = ResourceTypeId.ApprovalFlow, JsonName = "approval-flow" };

public static IResourceTypeId ApprovalRule = new ResourceTypeIdWrapper
{ Value = ResourceTypeId.ApprovalRule, JsonName = "approval-rule" };

public static IResourceTypeId AssociateRole = new ResourceTypeIdWrapper
{ Value = ResourceTypeId.AssociateRole, JsonName = "associate-role" };

Expand Down Expand Up @@ -241,6 +247,7 @@ static IResourceTypeId[] Values()
Address ,
Asset ,
ApprovalFlow ,
ApprovalRule ,
AssociateRole ,
BusinessUnit ,
CartDiscount ,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,15 @@ public CombinationQueryPredicate<ApprovalRuleQueryBuilderDsl> BusinessUnit(
ApprovalRuleQueryBuilderDsl.Of);
}

public CombinationQueryPredicate<ApprovalRuleQueryBuilderDsl> Custom(
Func<commercetools.Sdk.Api.Predicates.Query.Types.CustomFieldsQueryBuilderDsl, CombinationQueryPredicate<commercetools.Sdk.Api.Predicates.Query.Types.CustomFieldsQueryBuilderDsl>> fn)
{
return new CombinationQueryPredicate<ApprovalRuleQueryBuilderDsl>(ContainerQueryPredicate.Of()
.Parent(ConstantQueryPredicate.Of().Constant("custom"))
.Inner(fn.Invoke(commercetools.Sdk.Api.Predicates.Query.Types.CustomFieldsQueryBuilderDsl.Of())),
ApprovalRuleQueryBuilderDsl.Of);
}


}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Predicates.Query.ApprovalRules
{

public partial class ApprovalRuleSetCustomFieldActionQueryBuilderDsl
{
public ApprovalRuleSetCustomFieldActionQueryBuilderDsl()
{
}

public static ApprovalRuleSetCustomFieldActionQueryBuilderDsl Of()
{
return new ApprovalRuleSetCustomFieldActionQueryBuilderDsl();
}

public IComparisonPredicateBuilder<ApprovalRuleSetCustomFieldActionQueryBuilderDsl, string> Action()
{
return new ComparisonPredicateBuilder<ApprovalRuleSetCustomFieldActionQueryBuilderDsl, string>(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("action")),
p => new CombinationQueryPredicate<ApprovalRuleSetCustomFieldActionQueryBuilderDsl>(p, ApprovalRuleSetCustomFieldActionQueryBuilderDsl.Of),
PredicateFormatter.Format);
}
public IComparisonPredicateBuilder<ApprovalRuleSetCustomFieldActionQueryBuilderDsl, string> Name()
{
return new ComparisonPredicateBuilder<ApprovalRuleSetCustomFieldActionQueryBuilderDsl, string>(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("name")),
p => new CombinationQueryPredicate<ApprovalRuleSetCustomFieldActionQueryBuilderDsl>(p, ApprovalRuleSetCustomFieldActionQueryBuilderDsl.Of),
PredicateFormatter.Format);
}
public IComparisonPredicateBuilder<ApprovalRuleSetCustomFieldActionQueryBuilderDsl, string> Value()
{
return new ComparisonPredicateBuilder<ApprovalRuleSetCustomFieldActionQueryBuilderDsl, string>(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("value")),
p => new CombinationQueryPredicate<ApprovalRuleSetCustomFieldActionQueryBuilderDsl>(p, ApprovalRuleSetCustomFieldActionQueryBuilderDsl.Of),
PredicateFormatter.Format);
}

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
using System;

// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Predicates.Query.ApprovalRules
{

public partial class ApprovalRuleSetCustomTypeActionQueryBuilderDsl
{
public ApprovalRuleSetCustomTypeActionQueryBuilderDsl()
{
}

public static ApprovalRuleSetCustomTypeActionQueryBuilderDsl Of()
{
return new ApprovalRuleSetCustomTypeActionQueryBuilderDsl();
}

public IComparisonPredicateBuilder<ApprovalRuleSetCustomTypeActionQueryBuilderDsl, string> Action()
{
return new ComparisonPredicateBuilder<ApprovalRuleSetCustomTypeActionQueryBuilderDsl, string>(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("action")),
p => new CombinationQueryPredicate<ApprovalRuleSetCustomTypeActionQueryBuilderDsl>(p, ApprovalRuleSetCustomTypeActionQueryBuilderDsl.Of),
PredicateFormatter.Format);
}
public CombinationQueryPredicate<ApprovalRuleSetCustomTypeActionQueryBuilderDsl> Type(
Func<commercetools.Sdk.Api.Predicates.Query.Types.TypeResourceIdentifierQueryBuilderDsl, CombinationQueryPredicate<commercetools.Sdk.Api.Predicates.Query.Types.TypeResourceIdentifierQueryBuilderDsl>> fn)
{
return new CombinationQueryPredicate<ApprovalRuleSetCustomTypeActionQueryBuilderDsl>(ContainerQueryPredicate.Of()
.Parent(ConstantQueryPredicate.Of().Constant("type"))
.Inner(fn.Invoke(commercetools.Sdk.Api.Predicates.Query.Types.TypeResourceIdentifierQueryBuilderDsl.Of())),
ApprovalRuleSetCustomTypeActionQueryBuilderDsl.Of);
}

public CombinationQueryPredicate<ApprovalRuleSetCustomTypeActionQueryBuilderDsl> Fields(
Func<commercetools.Sdk.Api.Predicates.Query.Types.FieldContainerQueryBuilderDsl, CombinationQueryPredicate<commercetools.Sdk.Api.Predicates.Query.Types.FieldContainerQueryBuilderDsl>> fn)
{
return new CombinationQueryPredicate<ApprovalRuleSetCustomTypeActionQueryBuilderDsl>(ContainerQueryPredicate.Of()
.Parent(ConstantQueryPredicate.Of().Constant("fields"))
.Inner(fn.Invoke(commercetools.Sdk.Api.Predicates.Query.Types.FieldContainerQueryBuilderDsl.Of())),
ApprovalRuleSetCustomTypeActionQueryBuilderDsl.Of);
}


}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ public CombinationQueryPredicate<ApprovalRuleUpdateActionQueryBuilderDsl> AsSetA
return new CombinationQueryPredicate<ApprovalRuleUpdateActionQueryBuilderDsl>(fn.Invoke(commercetools.Sdk.Api.Predicates.Query.ApprovalRules.ApprovalRuleSetApproversActionQueryBuilderDsl.Of()),
ApprovalRuleUpdateActionQueryBuilderDsl.Of);
}
public CombinationQueryPredicate<ApprovalRuleUpdateActionQueryBuilderDsl> AsSetCustomField(
Func<commercetools.Sdk.Api.Predicates.Query.ApprovalRules.ApprovalRuleSetCustomFieldActionQueryBuilderDsl, CombinationQueryPredicate<commercetools.Sdk.Api.Predicates.Query.ApprovalRules.ApprovalRuleSetCustomFieldActionQueryBuilderDsl>> fn)
{
return new CombinationQueryPredicate<ApprovalRuleUpdateActionQueryBuilderDsl>(fn.Invoke(commercetools.Sdk.Api.Predicates.Query.ApprovalRules.ApprovalRuleSetCustomFieldActionQueryBuilderDsl.Of()),
ApprovalRuleUpdateActionQueryBuilderDsl.Of);
}
public CombinationQueryPredicate<ApprovalRuleUpdateActionQueryBuilderDsl> AsSetCustomType(
Func<commercetools.Sdk.Api.Predicates.Query.ApprovalRules.ApprovalRuleSetCustomTypeActionQueryBuilderDsl, CombinationQueryPredicate<commercetools.Sdk.Api.Predicates.Query.ApprovalRules.ApprovalRuleSetCustomTypeActionQueryBuilderDsl>> fn)
{
return new CombinationQueryPredicate<ApprovalRuleUpdateActionQueryBuilderDsl>(fn.Invoke(commercetools.Sdk.Api.Predicates.Query.ApprovalRules.ApprovalRuleSetCustomTypeActionQueryBuilderDsl.Of()),
ApprovalRuleUpdateActionQueryBuilderDsl.Of);
}
public CombinationQueryPredicate<ApprovalRuleUpdateActionQueryBuilderDsl> AsSetDescription(
Func<commercetools.Sdk.Api.Predicates.Query.ApprovalRules.ApprovalRuleSetDescriptionActionQueryBuilderDsl, CombinationQueryPredicate<commercetools.Sdk.Api.Predicates.Query.ApprovalRules.ApprovalRuleSetDescriptionActionQueryBuilderDsl>> fn)
{
Expand Down
15 changes: 15 additions & 0 deletions commercetools.Sdk/commercetools.Sdk.GraphQL.Api/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,7 @@ type ApprovalRule implements Versioned {
requesters: [RuleRequester!]!
businessUnitRef: KeyReference!
businessUnit: BusinessUnit!
custom: CustomFieldsType
id: String!
version: Long!
createdAt: DateTime!
Expand Down Expand Up @@ -864,6 +865,8 @@ input ApprovalRuleUpdateAction {
setRequesters: SetApprovalRuleRequesters
setStatus: SetApprovalRuleStatus
setApprovers: SetApprovalRuleApprovers
setCustomField: SetApprovalRuleCustomField
setCustomType: SetApprovalRuleCustomType
}

input ApproveApprovalFlow {
Expand Down Expand Up @@ -10532,6 +10535,18 @@ input SetApprovalRuleStatus {
status: ApprovalRuleStatus!
}

input SetApprovalRuleCustomField {
name: String!
value: String
}

input SetApprovalRuleCustomType {
fields: [CustomFieldInput!]
type: ResourceIdentifierInput
typeKey: String
typeId: String
}

input SetAssociateRoleCustomField {
name: String!
value: String
Expand Down
1 change: 1 addition & 0 deletions references.txt
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,4 @@ e985f4b7aa55610705ee49bd3eb645c2fd03eb6c
c27603f949e869148570ebb8bd3ec6db34a985b7
82bca33a98d14907ea79e2cca281625dd82cdf0d
c8c2455221baca20421082b7715eaa0a712af7f1
41774e015e4f946bd57f0e2dc76522ed757860c4
Loading