Skip to content

Commit

Permalink
Update generated SDKs (#255)
Browse files Browse the repository at this point in the history
* build(codegen): updating SDK

* build(codegen): updating SDK

* build(codegen): updating SDK

* build(codegen): updating SDK

* build(codegen): updating SDK

* build(codegen): updating SDK

* build(codegen): updating SDK

* build(codegen): updating SDK

* build(codegen): updating SDK

* build(codegen): updating SDK

* build(codegen): updating SDK

* build(codegen): updating SDK

* build(codegen): updating SDK

* build(codegen): updating SDK

* build(codegen): updating SDK

---------

Co-authored-by: Auto Mation <[email protected]>
Co-authored-by: ct-sdks[bot] <153784748+ct-sdks[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 12, 2024
1 parent f24c214 commit 12f3296
Show file tree
Hide file tree
Showing 26 changed files with 316 additions and 370 deletions.
19 changes: 19 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,21 @@
<details>
<summary>Added Type(s)</summary>

- added type `ApprovalFlowSetCustomFieldAction`
- added type `ApprovalFlowSetCustomTypeAction`
- added type `CustomerEmailTokenReference`
- added type `CustomerPasswordTokenReference`
</details>


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

- :warning: removed type `NotEnabledError`
- :warning: removed type `GraphQLNotEnabledError`
</details>


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

Expand Down Expand Up @@ -192,6 +202,13 @@
</details>


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

- added property `custom` to type `ApprovalFlow`
</details>


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

Expand All @@ -209,6 +226,8 @@
- added enum `customer-email-token` to type `MessageSubscriptionResourceTypeId`
- added enum `customer-group` to type `MessageSubscriptionResourceTypeId`
- added enum `customer-password-token` to type `MessageSubscriptionResourceTypeId`
- added enum `approval-flow` to type `CustomFieldReferenceValue`
- added enum `approval-flow` to type `ResourceTypeId`
</details>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using commercetools.Sdk.Api.Models.BusinessUnits;
using commercetools.Sdk.Api.Models.Common;
using commercetools.Sdk.Api.Models.Orders;
using commercetools.Sdk.Api.Models.Types;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -51,5 +52,7 @@ public partial class ApprovalFlow : IApprovalFlow
public IList<IRuleApprover> CurrentTierPendingApprovers { get; set; }
public IEnumerable<IRuleApprover> CurrentTierPendingApproversEnumerable { set => CurrentTierPendingApprovers = value.ToList(); }


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


namespace commercetools.Sdk.Api.Models.ApprovalFlows
{

public partial class ApprovalFlowSetCustomFieldAction : IApprovalFlowSetCustomFieldAction
{
public string Action { get; set; }

public string Name { get; set; }

public Object Value { get; set; }
public ApprovalFlowSetCustomFieldAction()
{
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.ApprovalFlows
{

public partial class ApprovalFlowSetCustomTypeAction : IApprovalFlowSetCustomTypeAction
{
public string Action { get; set; }

public ITypeResourceIdentifier Type { get; set; }

public IFieldContainer Fields { get; set; }
public ApprovalFlowSetCustomTypeAction()
{
this.Action = "setCustomType";
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using commercetools.Sdk.Api.Models.BusinessUnits;
using commercetools.Sdk.Api.Models.Common;
using commercetools.Sdk.Api.Models.Orders;
using commercetools.Sdk.Api.Models.Types;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -53,5 +54,7 @@ public partial interface IApprovalFlow : IBaseResource
IEnumerable<IRuleApprover> CurrentTierPendingApproversEnumerable { set => CurrentTierPendingApprovers = value.ToList(); }


ICustomFields Custom { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using commercetools.Base.CustomAttributes;

// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Models.ApprovalFlows
{
[DeserializeAs(typeof(commercetools.Sdk.Api.Models.ApprovalFlows.ApprovalFlowSetCustomFieldAction))]
public partial interface IApprovalFlowSetCustomFieldAction : IApprovalFlowUpdateAction
{
string Name { get; set; }

Object Value { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using commercetools.Sdk.Api.Models.Types;
using commercetools.Base.CustomAttributes;

// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Models.ApprovalFlows
{
[DeserializeAs(typeof(commercetools.Sdk.Api.Models.ApprovalFlows.ApprovalFlowSetCustomTypeAction))]
public partial interface IApprovalFlowSetCustomTypeAction : IApprovalFlowUpdateAction
{
ITypeResourceIdentifier Type { get; set; }

IFieldContainer Fields { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ namespace commercetools.Sdk.Api.Models.ApprovalFlows
[DefaultTypeDiscriminator(typeof(commercetools.Sdk.Api.Models.ApprovalFlows.ApprovalFlowUpdateAction))]
[SubTypeDiscriminator("approve", typeof(commercetools.Sdk.Api.Models.ApprovalFlows.ApprovalFlowApproveAction))]
[SubTypeDiscriminator("reject", typeof(commercetools.Sdk.Api.Models.ApprovalFlows.ApprovalFlowRejectAction))]
[SubTypeDiscriminator("setCustomField", typeof(commercetools.Sdk.Api.Models.ApprovalFlows.ApprovalFlowSetCustomFieldAction))]
[SubTypeDiscriminator("setCustomType", typeof(commercetools.Sdk.Api.Models.ApprovalFlows.ApprovalFlowSetCustomTypeAction))]
public partial interface IApprovalFlowUpdateAction
{
string Action { get; set; }
Expand All @@ -24,5 +26,17 @@ static commercetools.Sdk.Api.Models.ApprovalFlows.ApprovalFlowRejectAction Rejec
init?.Invoke(t);
return t;
}
static commercetools.Sdk.Api.Models.ApprovalFlows.ApprovalFlowSetCustomFieldAction SetCustomField(Action<commercetools.Sdk.Api.Models.ApprovalFlows.ApprovalFlowSetCustomFieldAction> init = null)
{
var t = new commercetools.Sdk.Api.Models.ApprovalFlows.ApprovalFlowSetCustomFieldAction();
init?.Invoke(t);
return t;
}
static commercetools.Sdk.Api.Models.ApprovalFlows.ApprovalFlowSetCustomTypeAction SetCustomType(Action<commercetools.Sdk.Api.Models.ApprovalFlows.ApprovalFlowSetCustomTypeAction> init = null)
{
var t = new commercetools.Sdk.Api.Models.ApprovalFlows.ApprovalFlowSetCustomTypeAction();
init?.Invoke(t);
return t;
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ namespace commercetools.Sdk.Api.Models.Errors
[SubTypeDiscriminator("MissingTaxRateForCountry", typeof(commercetools.Sdk.Api.Models.Errors.MissingTaxRateForCountryError))]
[SubTypeDiscriminator("MoneyOverflow", typeof(commercetools.Sdk.Api.Models.Errors.MoneyOverflowError))]
[SubTypeDiscriminator("NoMatchingProductDiscountFound", typeof(commercetools.Sdk.Api.Models.Errors.NoMatchingProductDiscountFoundError))]
[SubTypeDiscriminator("NotEnabled", typeof(commercetools.Sdk.Api.Models.Errors.NotEnabledError))]
[SubTypeDiscriminator("ObjectNotFound", typeof(commercetools.Sdk.Api.Models.Errors.ObjectNotFoundError))]
[SubTypeDiscriminator("OutOfStock", typeof(commercetools.Sdk.Api.Models.Errors.OutOfStockError))]
[SubTypeDiscriminator("OverCapacity", typeof(commercetools.Sdk.Api.Models.Errors.OverCapacityError))]
Expand Down Expand Up @@ -394,12 +393,6 @@ static commercetools.Sdk.Api.Models.Errors.NoMatchingProductDiscountFoundError N
init?.Invoke(t);
return t;
}
static commercetools.Sdk.Api.Models.Errors.NotEnabledError NotEnabled(Action<commercetools.Sdk.Api.Models.Errors.NotEnabledError> init = null)
{
var t = new commercetools.Sdk.Api.Models.Errors.NotEnabledError();
init?.Invoke(t);
return t;
}
static commercetools.Sdk.Api.Models.Errors.ObjectNotFoundError ObjectNotFound(Action<commercetools.Sdk.Api.Models.Errors.ObjectNotFoundError> init = null)
{
var t = new commercetools.Sdk.Api.Models.Errors.ObjectNotFoundError();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ namespace commercetools.Sdk.Api.Models.Errors
[SubTypeDiscriminator("MissingTaxRateForCountry", typeof(commercetools.Sdk.Api.Models.Errors.GraphQLMissingTaxRateForCountryError))]
[SubTypeDiscriminator("MoneyOverflow", typeof(commercetools.Sdk.Api.Models.Errors.GraphQLMoneyOverflowError))]
[SubTypeDiscriminator("NoMatchingProductDiscountFound", typeof(commercetools.Sdk.Api.Models.Errors.GraphQLNoMatchingProductDiscountFoundError))]
[SubTypeDiscriminator("NotEnabled", typeof(commercetools.Sdk.Api.Models.Errors.GraphQLNotEnabledError))]
[SubTypeDiscriminator("ObjectNotFound", typeof(commercetools.Sdk.Api.Models.Errors.GraphQLObjectNotFoundError))]
[SubTypeDiscriminator("OutOfStock", typeof(commercetools.Sdk.Api.Models.Errors.GraphQLOutOfStockError))]
[SubTypeDiscriminator("OverCapacity", typeof(commercetools.Sdk.Api.Models.Errors.GraphQLOverCapacityError))]
Expand Down Expand Up @@ -392,12 +391,6 @@ static commercetools.Sdk.Api.Models.Errors.GraphQLNoMatchingProductDiscountFound
init?.Invoke(t);
return t;
}
static commercetools.Sdk.Api.Models.Errors.GraphQLNotEnabledError NotEnabled(Action<commercetools.Sdk.Api.Models.Errors.GraphQLNotEnabledError> init = null)
{
var t = new commercetools.Sdk.Api.Models.Errors.GraphQLNotEnabledError();
init?.Invoke(t);
return t;
}
static commercetools.Sdk.Api.Models.Errors.GraphQLObjectNotFoundError ObjectNotFound(Action<commercetools.Sdk.Api.Models.Errors.GraphQLObjectNotFoundError> init = null)
{
var t = new commercetools.Sdk.Api.Models.Errors.GraphQLObjectNotFoundError();
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ namespace commercetools.Sdk.Api.Models.Types
{
public enum CustomFieldReferenceValue
{
[Description("approval-flow")]
ApprovalFlow,

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

Expand Down Expand Up @@ -76,6 +79,9 @@ IEnumerator IEnumerable.GetEnumerator()
[EnumInterfaceCreator(typeof(ICustomFieldReferenceValue), "FindEnum")]
public interface ICustomFieldReferenceValue : IJsonName, IEnumerable<char>
{
public static ICustomFieldReferenceValue ApprovalFlow = new CustomFieldReferenceValueWrapper
{ Value = CustomFieldReferenceValue.ApprovalFlow, JsonName = "approval-flow" };

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

Expand Down Expand Up @@ -124,6 +130,7 @@ static ICustomFieldReferenceValue[] Values()
{
return new[]
{
ApprovalFlow ,
AssociateRole ,
BusinessUnit ,
Cart ,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ public enum ResourceTypeId
[Description("asset")]
Asset,

[Description("approval-flow")]
ApprovalFlow,

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

Expand Down Expand Up @@ -133,6 +136,9 @@ public interface IResourceTypeId : IJsonName, IEnumerable<char>
public static IResourceTypeId Asset = new ResourceTypeIdWrapper
{ Value = ResourceTypeId.Asset, JsonName = "asset" };

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

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

Expand Down Expand Up @@ -228,6 +234,7 @@ static IResourceTypeId[] Values()
{
Address ,
Asset ,
ApprovalFlow ,
AssociateRole ,
BusinessUnit ,
CartDiscount ,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,15 @@ public ICollectionPredicateBuilder<ApprovalFlowQueryBuilderDsl> CurrentTierPendi
return new CollectionPredicateBuilder<ApprovalFlowQueryBuilderDsl>(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("currentTierPendingApprovers")),
p => new CombinationQueryPredicate<ApprovalFlowQueryBuilderDsl>(p, ApprovalFlowQueryBuilderDsl.Of));
}
public CombinationQueryPredicate<ApprovalFlowQueryBuilderDsl> Custom(
Func<commercetools.Sdk.Api.Predicates.Query.Types.CustomFieldsQueryBuilderDsl, CombinationQueryPredicate<commercetools.Sdk.Api.Predicates.Query.Types.CustomFieldsQueryBuilderDsl>> fn)
{
return new CombinationQueryPredicate<ApprovalFlowQueryBuilderDsl>(ContainerQueryPredicate.Of()
.Parent(ConstantQueryPredicate.Of().Constant("custom"))
.Inner(fn.Invoke(commercetools.Sdk.Api.Predicates.Query.Types.CustomFieldsQueryBuilderDsl.Of())),
ApprovalFlowQueryBuilderDsl.Of);
}


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

public partial class ApprovalFlowSetCustomFieldActionQueryBuilderDsl
{
public ApprovalFlowSetCustomFieldActionQueryBuilderDsl()
{
}

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

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

}
}
Loading

0 comments on commit 12f3296

Please sign in to comment.