|
1 | | -using Optimizely.Graph.Source.Sdk.SourceConfiguration; |
2 | | -using System.Linq.Expressions; |
3 | | - |
4 | | -namespace Optimizely.Graph.Source.Sdk.Repositories |
5 | | -{ |
6 | | - public interface IGraphSourceRepository |
7 | | - { |
8 | | - /// <summary> |
9 | | - /// Adds language preference to SourceConfigurationModel. |
10 | | - /// </summary> |
11 | | - /// <param name="language"></param> |
12 | | - void AddLanguage(string language); |
13 | | - |
14 | | - void ConfigureLink<T, U>(string name, Expression<Func<T, object>> from, Expression<Func<U, object>> to); |
15 | | - |
16 | | - /// <summary> |
17 | | - /// Configures Content Types within the SourceConfigurationModel. |
18 | | - /// </summary> |
19 | | - /// <typeparam name="T">Generic content type.</typeparam> |
20 | | - /// <returns></returns> |
21 | | - SourceConfigurationModel<T> ConfigureContentType<T>() where T : class, new(); |
22 | | - |
23 | | - /// <summary> |
24 | | - /// Configures Content Property Types within the SourceConfigurationModel. |
25 | | - /// </summary> |
26 | | - /// <typeparam name="T">Generic property type.</typeparam> |
27 | | - /// <returns></returns> |
28 | | - SourceConfigurationModel<T> ConfigurePropertyType<T>() where T : class, new(); |
29 | | - |
30 | | - /// <summary> |
31 | | - /// Saves Content Types set in the SourceConfigurationModel to the Content Graph api. |
32 | | - /// </summary> |
33 | | - /// <returns></returns> |
34 | | - Task<string> SaveTypesAsync(); |
35 | | - |
36 | | - /// <summary> |
37 | | - /// Saves dynamic content sent in data array to the Content Graph api. |
38 | | - /// </summary> |
39 | | - /// <typeparam name="T"></typeparam> |
40 | | - /// <param name="generateId">Id associated with content.</param> |
41 | | - /// <param name="data">Dynamic data being saved to Content Graph.</param> |
42 | | - /// <returns></returns> |
43 | | - Task<string> SaveContentAsync<T>(Func<T, string> generateId, params T[] data) where T : class, new(); |
44 | | - |
45 | | - /// <summary> |
46 | | - /// Removes content previously stored by source. |
47 | | - /// </summary> |
48 | | - /// <returns></returns> |
49 | | - Task<string> DeleteContentAsync(); |
50 | | - } |
51 | | -} |
| 1 | +using Optimizely.Graph.Source.Sdk.SourceConfiguration; |
| 2 | +using System.Linq.Expressions; |
| 3 | + |
| 4 | +namespace Optimizely.Graph.Source.Sdk.Repositories |
| 5 | +{ |
| 6 | + public interface IGraphSourceRepository |
| 7 | + { |
| 8 | + /// <summary> |
| 9 | + /// Adds language preference to SourceConfigurationModel. |
| 10 | + /// </summary> |
| 11 | + /// <param name="language"></param> |
| 12 | + void AddLanguage(string language); |
| 13 | + |
| 14 | + void ConfigureLink<T, U>(string name, Expression<Func<T, object>> from, Expression<Func<U, object>> to); |
| 15 | + |
| 16 | + /// <summary> |
| 17 | + /// Configures Content Types within the SourceConfigurationModel. |
| 18 | + /// </summary> |
| 19 | + /// <typeparam name="T">Generic content type.</typeparam> |
| 20 | + /// <returns></returns> |
| 21 | + SourceConfigurationModel<T> ConfigureContentType<T>() where T : class, new(); |
| 22 | + |
| 23 | + /// <summary> |
| 24 | + /// Configures Content Property Types within the SourceConfigurationModel. |
| 25 | + /// </summary> |
| 26 | + /// <typeparam name="T">Generic property type.</typeparam> |
| 27 | + /// <returns></returns> |
| 28 | + SourceConfigurationModel<T> ConfigurePropertyType<T>() where T : class, new(); |
| 29 | + |
| 30 | + /// <summary> |
| 31 | + /// Saves Content Types set in the SourceConfigurationModel to the Content Graph api. |
| 32 | + /// </summary> |
| 33 | + /// <returns></returns> |
| 34 | + Task<string> SaveTypesAsync(); |
| 35 | + |
| 36 | + /// <summary> |
| 37 | + /// Saves dynamic content sent in data array to the Content Graph api. |
| 38 | + /// </summary> |
| 39 | + /// <typeparam name="T"></typeparam> |
| 40 | + /// <param name="generateId">Id associated with content.</param> |
| 41 | + /// <param name="data">Dynamic data being saved to Content Graph.</param> |
| 42 | + /// <returns></returns> |
| 43 | + Task<string> SaveContentAsync<T>(Func<T, string> generateId, params T[] data) where T : class, new(); |
| 44 | + |
| 45 | + /// <summary> |
| 46 | + /// Removes content previously stored by source. |
| 47 | + /// </summary> |
| 48 | + /// <returns></returns> |
| 49 | + Task<string> DeleteContentAsync(); |
| 50 | + |
| 51 | + /// <summary> |
| 52 | + /// Removes content previously stored by source. |
| 53 | + /// </summary> |
| 54 | + /// <returns></returns> |
| 55 | + Task<string> DeleteContentItemsAsync(string language, params string[] ids); |
| 56 | + } |
| 57 | +} |
0 commit comments