-
Notifications
You must be signed in to change notification settings - Fork 28
/
ICustomSettingsApi.cs
61 lines (55 loc) · 2.75 KB
/
ICustomSettingsApi.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
namespace DreamFactory.Api
{
using System.Collections.Generic;
using System.Threading.Tasks;
using DreamFactory.Model;
using DreamFactory.Model.Database;
using DreamFactory.Model.System.Custom;
/// <summary>
/// Custom Settings API.
/// </summary>
public interface ICustomSettingsApi
{
/// <summary>
/// Retrieve all custom user|system settings.
/// </summary>
/// <param name="query">SQL query to return created records.</param>
/// <returns>Sequence of custom settings.</returns>
Task<ResourceWrapper<CustomResponse>> GetCustomSettingsAsync(SqlQuery query = null);
/// <summary>
/// Set custom user|system settings.
/// </summary>
/// <param name="customs">Collection of CustomRequest type.</param>
/// <param name="query">SQL query to return created records.</param>
/// <returns>Custom records created.</returns>
Task<ResourceWrapper<CustomResponse>> SetCustomSettingsAsync(List<CustomRequest> customs, SqlQuery query = null);
/// <summary>
/// Update custom user|system settings.
/// </summary>
/// <param name="customs">Collection of CustomRequest type.</param>
/// <param name="query">SQL query to return updated records.</param>
/// <returns>Custom records updated.</returns>
Task<ResourceWrapper<CustomResponse>> UpdateCustomSettingsAsync(List<CustomRequest> customs, SqlQuery query = null);
/// <summary>
/// Retrieve one custom user|system setting.
/// </summary>
/// <param name="settingName">Name of the setting to retrieve.</param>
/// <returns cref="CustomResponse">Custom setting record.</returns>
Task<CustomResponse> GetCustomSettingAsync(string settingName);
/// <summary>
/// Set or update one custom user|system setting.
/// </summary>
/// <param name="settingName">Name of the setting to retrieve.</param>
/// <param name="custom">Instance of the CustomRequest type.</param>
/// <param name="query">SQL query to return updated records.</param>
/// <returns cref="CustomResponse">Custom setting record updated.</returns>
Task<CustomResponse> UpdateCustomSettingAsync(string settingName, CustomRequest custom, SqlQuery query = null);
/// <summary>
/// Delete one custom user|system setting.
/// </summary>
/// <param name="settingName">Name of the setting to delete.</param>
/// <param name="query">SQL query to return deleted records.</param>
/// <returns cref="CustomResponse">Custom setting record deleted.</returns>
Task<CustomResponse> DeleteCustomSettingAsync(string settingName, SqlQuery query = null);
}
}