-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EN-376 Add contributors and note to language variants
- Loading branch information
Jiri Kusak
committed
Dec 10, 2024
1 parent
4685d24
commit 23ad422
Showing
16 changed files
with
180 additions
and
15 deletions.
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
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.