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

Add new webhooks and rename legacy webhooks #254

Merged
merged 3 commits into from
Jan 15, 2024

Conversation

lenkaklimcikova
Copy link

@lenkaklimcikova lenkaklimcikova commented Dec 13, 2023

Motivation

Enable customers to use both webhook versions - new and legacy.
DEL-4734

@lenkaklimcikova lenkaklimcikova requested review from pokornyd and a team as code owners December 13, 2023 11:05
@lenkaklimcikova lenkaklimcikova force-pushed the DEL-4734-webhoks-vnext branch 2 times, most recently from 797f56a to 4e248a4 Compare December 14, 2023 08:58
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point thanks, didn't think about changing the old ones,too :D fixed

@@ -1,7 +1,7 @@
using Newtonsoft.Json;
using System.Collections.Generic;

namespace Kontent.Ai.Management.Models.Webhooks.Triggers;
namespace Kontent.Ai.Management.Models.LegacyWebhooks.Triggers;

/// <summary>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -1,7 +1,7 @@
using Newtonsoft.Json;
using System.Collections.Generic;

namespace Kontent.Ai.Management.Models.Webhooks.Triggers;
namespace Kontent.Ai.Management.Models.LegacyWebhooks.Triggers;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -2,7 +2,7 @@
using Newtonsoft.Json;
using System.Collections.Generic;

namespace Kontent.Ai.Management.Models.Webhooks.Triggers;
namespace Kontent.Ai.Management.Models.LegacyWebhooks.Triggers;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


/// <summary>
/// Determines if the webhook is enabled. By default, the enabled property is set to true.
/// More info: https://kontent.ai/learn/reference/management-api-v2#section/Webhook-object
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

namespace Kontent.Ai.Management.Models.Webhooks.Triggers.Taxonomy;

/// <summary>
/// Represents taxonomy actions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

singular - > Represents * action.

/// <summary>
/// Represents the delivery slot model.
/// </summary>
public enum DeliverySlotModel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DeliverySlot

namespace Kontent.Ai.Management.Models.Webhooks.Triggers;

/// <summary>
/// Represents the delivery slot model.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/// Represents the delivery slot.

namespace Kontent.Ai.Management.Models.LegacyWebhooks;

/// <summary>
/// Represents the webhook create model.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/// Represents the legacy webhook create model.

@Sevitas
Copy link
Contributor

Sevitas commented Jan 2, 2024

You have renamed the action enums to names with suffix Enum, please keep it consistent in the namespace Kontent.Ai.Management.Models.Webhooks. There are enums without this suffix. I'd prefer removing those suffixes

Copy link

codecov bot commented Jan 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ec7910b) 89.31% compared to head (1d5d606) 84.93%.

❗ Current head 1d5d606 differs from pull request most recent head 26c9d4b. Consider uploading reports for the commit 26c9d4b to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #254      +/-   ##
==========================================
- Coverage   89.31%   84.93%   -4.38%     
==========================================
  Files         246      263      +17     
  Lines        2816     2907      +91     
  Branches      315      320       +5     
==========================================
- Hits         2515     2469      -46     
- Misses        298      343      +45     
- Partials        3       95      +92     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

pokornyd
pokornyd previously approved these changes Jan 15, 2024
Copy link
Member

@pokornyd pokornyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

following internal discussion, the target framework was updated to .NET 8.0 for all projects under the solution.

@pokornyd pokornyd merged commit 81450dc into kontent-ai:master Jan 15, 2024
3 checks passed
@lenkaklimcikova lenkaklimcikova deleted the DEL-4734-webhoks-vnext branch January 15, 2024 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants