-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor SyncItem model, adjust tests
- Loading branch information
Showing
7 changed files
with
83 additions
and
48 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
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Kontent.Ai.Delivery.Abstractions; | ||
|
||
/// <summary> | ||
/// Represents a delta update. | ||
/// </summary> | ||
public interface ISyncItemData : IContentItem | ||
{ | ||
/// <summary> | ||
/// Retrieves key:value pairs representing content item elements. | ||
/// </summary> | ||
Dictionary<string, object> Elements { get; } | ||
} |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System.Collections.Generic; | ||
using Kontent.Ai.Delivery.Abstractions; | ||
using Newtonsoft.Json; | ||
|
||
namespace Kontent.Ai.Delivery.Sync | ||
{ | ||
internal sealed class SyncItemData : ISyncItemData | ||
{ | ||
/// <inheritdoc/> | ||
[JsonProperty("system")] | ||
public IContentItemSystemAttributes System { get; internal set; } | ||
|
||
/// <inheritdoc/> | ||
[JsonProperty("elements")] | ||
public Dictionary<string, object> Elements { get; internal set; } | ||
|
||
/// <summary> | ||
/// Constructor used for deserialization. Contains no logic. | ||
/// </summary> | ||
[JsonConstructor] | ||
public SyncItemData() | ||
{ | ||
} | ||
} | ||
} |