-
Notifications
You must be signed in to change notification settings - Fork 31
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
EN-376 Add contributors and note to language variants #279
Open
huluvu21
wants to merge
1
commit into
kontent-ai:master
Choose a base branch
from
huluvu21:EN-376
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2025,7 +2025,15 @@ public async void PutVariantWorkflow() | |
var exception = await Record.ExceptionAsync(async () => | ||
await client.ChangeLanguageVariantWorkflowAsync( | ||
new LanguageVariantIdentifier(itemIdentifier, languageIdentifier), | ||
new WorkflowStepIdentifier(Reference.ById(Guid.Empty), workflowStepIdentifier) | ||
new ChangeLanguageVariantWorkflowModel(Reference.ById(Guid.Empty), workflowStepIdentifier) | ||
{ | ||
DueDate = new DueDateModel | ||
{ | ||
Value = DateTime.UtcNow.AddDays(42) | ||
}, | ||
Contributors = new List<UserIdentifier> { UserIdentifier.ByEmail("[email protected]") }, | ||
Note = "Moving this to the next workflow step." | ||
} | ||
)); | ||
Assert.Null(exception); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,8 +166,8 @@ public interface IManagementClient | |
/// Changes workflow. | ||
/// </summary> | ||
/// <param name="identifier">Identifier of the language variant to be changed.</param> | ||
/// <param name="workflowStepIdentifier">Workflow step identifier to set.</param> | ||
Task ChangeLanguageVariantWorkflowAsync(LanguageVariantIdentifier identifier, WorkflowStepIdentifier workflowStepIdentifier); | ||
/// <param name="changeModel">Change language variant workflow model.</param> | ||
Task ChangeLanguageVariantWorkflowAsync(LanguageVariantIdentifier identifier, ChangeLanguageVariantWorkflowModel changeModel); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will this endpoint still be called "Change the workflow of a language variant" in the API reference? if not, shouldn't the method be renamed? |
||
|
||
/// <summary> | ||
/// Creates the asset folder. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
Kontent.Ai.Management/Models/LanguageVariants/ChangeLanguageVariantWorkflowModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using Kontent.Ai.Management.Models.Shared; | ||
using Newtonsoft.Json; | ||
using System.Collections.Generic; | ||
|
||
namespace Kontent.Ai.Management.Models.LanguageVariants; | ||
|
||
/// <summary> | ||
/// Represents a change language variant workflow model. | ||
/// </summary> | ||
public sealed class ChangeLanguageVariantWorkflowModel | ||
{ | ||
/// <summary> | ||
/// Represents the identifier of the workflow. | ||
/// </summary> | ||
[JsonProperty("workflow_identifier")] | ||
public Reference Workflow { get; set; } | ||
|
||
/// <summary> | ||
/// Represents the identifier of the step in the workflow. | ||
/// </summary> | ||
[JsonProperty("step_identifier")] | ||
public Reference Step { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets due date. | ||
/// </summary> | ||
[JsonProperty("due_date")] | ||
public DueDateModel DueDate { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets a note. | ||
/// </summary> | ||
[JsonProperty("note")] | ||
public string Note { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the contributors. | ||
/// </summary> | ||
[JsonProperty("contributors")] | ||
public IEnumerable<UserIdentifier> Contributors { get; set; } | ||
|
||
/// <summary> | ||
/// Creates an instance of the change language variant workflow model. | ||
/// </summary> | ||
/// <param name="workflowIdentifier">The identifier of the workflow.</param> | ||
/// <param name="stepIdentifier">The identifier of the workflow step.</param> | ||
public ChangeLanguageVariantWorkflowModel(Reference workflowIdentifier, Reference stepIdentifier) | ||
{ | ||
Workflow = workflowIdentifier; | ||
Step = stepIdentifier; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this file is apparently used for code samples, I'd probably fix the formatting here.