-
@SharedLocalizer["Name"]
@@ -38,7 +37,6 @@ else
}
- @Localizer["Assign"]
@context.Name
@context.Version
diff --git a/Oqtane.Client/Modules/Admin/Users/Edit.razor b/Oqtane.Client/Modules/Admin/Users/Edit.razor
index 2d75d27a..35e43bb9 100644
--- a/Oqtane.Client/Modules/Admin/Users/Edit.razor
+++ b/Oqtane.Client/Modules/Admin/Users/Edit.razor
@@ -153,7 +153,7 @@
@SharedLocalizer["Save"]
@SharedLocalizer["Cancel"]
- @if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Admin) && PageState.Runtime != Shared.Runtime.Hybrid && !_ishost)
+ @if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Admin) && PageState.Runtime != Shared.Runtime.Hybrid && !_ishost && _isdeleted != "True")
{
@Localizer["Impersonate"]
}
diff --git a/Oqtane.Client/Modules/Admin/Users/Index.razor b/Oqtane.Client/Modules/Admin/Users/Index.razor
index 7e53d87e..53218b3c 100644
--- a/Oqtane.Client/Modules/Admin/Users/Index.razor
+++ b/Oqtane.Client/Modules/Admin/Users/Index.razor
@@ -17,8 +17,21 @@ else
{
-
-
+
+
+
+
+ DeletedChanged(e))">
+ @Localizer["Active Users"]
+ @Localizer["Deleted Users"]
+
+
+
+
+
@@ -495,6 +508,7 @@ else
@code {
private List users;
+ private string _deleted = "false";
private string _allowregistration;
private string _registerurl;
@@ -564,7 +578,7 @@ else
protected override async Task OnInitializedAsync()
{
- await LoadUsersAsync(true);
+ await LoadUsersAsync();
var settings = await SettingService.GetSiteSettingsAsync(PageState.Site.SiteId);
_allowregistration = PageState.Site.AllowRegistration.ToString().ToLower();
@@ -636,20 +650,32 @@ else
_allowsitelogin = SettingService.GetSetting(settings, "LoginOptions:AllowSiteLogin", "true");
}
- private async Task LoadUsersAsync(bool load)
+ private async Task LoadUsersAsync()
{
- if (load)
+ users = await UserRoleService.GetUserRolesAsync(PageState.Site.SiteId, RoleNames.Registered);
+ if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Host))
{
- users = await UserRoleService.GetUserRolesAsync(PageState.Site.SiteId, RoleNames.Registered);
- if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Host))
- {
- var hosts = await UserRoleService.GetUserRolesAsync(PageState.Site.SiteId, RoleNames.Host);
- users.AddRange(hosts);
- users = users.OrderBy(u => u.User.DisplayName).ToList();
- }
+ var hosts = await UserRoleService.GetUserRolesAsync(PageState.Site.SiteId, RoleNames.Host);
+ users.AddRange(hosts);
+ users = users.OrderBy(u => u.User.DisplayName).ToList();
}
+ users = users.Where(item => item.User.IsDeleted == bool.Parse(_deleted)).ToList();
}
+ private async void DeletedChanged(ChangeEventArgs e)
+ {
+ try
+ {
+ _deleted = e.Value.ToString();
+ await LoadUsersAsync();
+ StateHasChanged();
+ }
+ catch (Exception ex)
+ {
+ await logger.LogError(ex, "Error On DeletedChanged");
+ }
+ }
+
private async Task DeleteUser(UserRole UserRole)
{
try
@@ -672,7 +698,7 @@ else
await logger.LogInformation("User {Username} Expired From Role {Role}", userrole.User.Username, userrole.Role.Name);
}
AddModuleMessage(Localizer["Success.DeleteUser"], MessageType.Success);
- await LoadUsersAsync(true);
+ await LoadUsersAsync();
StateHasChanged();
}
catch (Exception ex)
diff --git a/Oqtane.Client/Modules/Controls/AuditInfo.razor b/Oqtane.Client/Modules/Controls/AuditInfo.razor
index e2a025ec..c8e649fc 100644
--- a/Oqtane.Client/Modules/Controls/AuditInfo.razor
+++ b/Oqtane.Client/Modules/Controls/AuditInfo.razor
@@ -52,7 +52,7 @@
if (CreatedOn != null)
{
- _text += $" {Localizer["On"]} {UtcToLocal(CreatedOn).Value.ToString(DateTimeFormat)} b >";
+ _text += $" {Localizer["On"]} {UtcToLocal(CreatedOn).Value.ToString(DateTimeFormat)} ";
}
_text += "";
@@ -69,7 +69,7 @@
if (ModifiedOn != null)
{
- _text += $" {Localizer["On"]} {UtcToLocal(ModifiedOn).Value.ToString(DateTimeFormat)} b >";
+ _text += $" {Localizer["On"]} {UtcToLocal(ModifiedOn).Value.ToString(DateTimeFormat)} ";
}
_text += "";
@@ -86,7 +86,7 @@
if (DeletedOn != null)
{
- _text += $" {Localizer["On"]} {UtcToLocal(DeletedOn).Value.ToString(DateTimeFormat)} b >";
+ _text += $" {Localizer["On"]} {UtcToLocal(DeletedOn).Value.ToString(DateTimeFormat)} ";
}
_text += "";
diff --git a/Oqtane.Client/Modules/Controls/FileManager.razor b/Oqtane.Client/Modules/Controls/FileManager.razor
index 9581c58a..c3ac1846 100644
--- a/Oqtane.Client/Modules/Controls/FileManager.razor
+++ b/Oqtane.Client/Modules/Controls/FileManager.razor
@@ -107,7 +107,7 @@
@code {
private bool _initialized = false;
- private List _folders;
+ private List _folders = new List();
private List _files = new List();
private string _fileinputid = string.Empty;
private string _progressinfoid = string.Empty;
@@ -198,19 +198,22 @@
Filter = "nupkg";
ShowSuccess = true;
}
-
- if (!string.IsNullOrEmpty(Folder) && Folder != Constants.PackagesFolder)
+ else
{
- Folder folder = await FolderService.GetFolderAsync(ModuleState.SiteId, Folder);
- if (folder != null)
+ // folder path specified rather than folderid
+ if (!string.IsNullOrEmpty(Folder))
{
- FolderId = folder.FolderId;
- }
- else
- {
- FolderId = -1;
- _message = "Folder Path " + Folder + " Does Not Exist";
- _messagetype = MessageType.Error;
+ Folder folder = await FolderService.GetFolderAsync(ModuleState.SiteId, Folder);
+ if (folder != null)
+ {
+ FolderId = folder.FolderId;
+ }
+ else
+ {
+ FolderId = -1;
+ _message = "Folder Path " + Folder + " Does Not Exist";
+ _messagetype = MessageType.Error;
+ }
}
}
@@ -245,25 +248,24 @@
}
}
- await SetImage();
-
if (!string.IsNullOrEmpty(Filter))
{
_filter = "." + Filter.Replace(",", ",.");
}
+ GetFolderPermission();
+ await SetImage();
await GetFiles();
_initialized = true;
}
- private async Task GetFiles()
+ private void GetFolderPermission()
{
_haseditpermission = false;
if (Folder == Constants.PackagesFolder)
{
_haseditpermission = UserSecurity.IsAuthorized(PageState.User, RoleNames.Host);
- _files = new List();
}
else
{
@@ -271,69 +273,14 @@
if (folder != null)
{
_haseditpermission = UserSecurity.IsAuthorized(PageState.User, PermissionNames.Edit, folder.PermissionList);
- if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.Browse, folder.PermissionList))
- {
- _files = await FileService.GetFilesAsync(FolderId);
- }
- else
- {
- _files = new List();
- }
}
else
{
_haseditpermission = false;
- _files = new List();
- }
- if (_filter != "*")
- {
- List filtered = new List();
- foreach (File file in _files)
- {
- if (_filter.ToUpper().IndexOf("." + file.Extension.ToUpper()) != -1)
- {
- filtered.Add(file);
- }
- }
- _files = filtered;
}
}
}
- private async Task FolderChanged(ChangeEventArgs e)
- {
- _message = string.Empty;
- try
- {
- FolderId = int.Parse((string)e.Value);
- await GetFiles();
- FileId = -1;
- _file = null;
- _image = string.Empty;
-
- await OnSelectFolder.InvokeAsync(FolderId);
- StateHasChanged();
- }
- catch (Exception ex)
- {
- await logger.LogError(ex, "Error Loading Files {Error}", ex.Message);
- _message = Localizer["Error.File.Load"];
- _messagetype = MessageType.Error;
- }
- }
-
- private async Task FileChanged(ChangeEventArgs e)
- {
- _message = string.Empty;
- FileId = int.Parse((string)e.Value);
- await SetImage();
- #pragma warning disable CS0618
- await OnSelect.InvokeAsync(FileId);
- #pragma warning restore CS0618
- await OnSelectFile.InvokeAsync(FileId);
- StateHasChanged();
- }
-
private async Task SetImage()
{
_image = string.Empty;
@@ -357,6 +304,74 @@
}
}
+ private async Task GetFiles()
+ {
+ if (ShowFiles)
+ {
+ Folder folder = _folders.FirstOrDefault(item => item.FolderId == FolderId);
+ if (folder != null)
+ {
+ if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.Browse, folder.PermissionList))
+ {
+ _files = await FileService.GetFilesAsync(FolderId);
+ }
+ else
+ {
+ _files = new List();
+ }
+ }
+ else
+ {
+ _files = new List();
+ }
+ if (_filter != "*")
+ {
+ List filtered = new List();
+ foreach (File file in _files)
+ {
+ if (_filter.ToUpper().IndexOf("." + file.Extension.ToUpper()) != -1)
+ {
+ filtered.Add(file);
+ }
+ }
+ _files = filtered;
+ }
+ }
+ }
+
+ private async Task FolderChanged(ChangeEventArgs e)
+ {
+ _message = string.Empty;
+ try
+ {
+ FolderId = int.Parse((string)e.Value);
+ await OnSelectFolder.InvokeAsync(FolderId);
+ FileId = -1;
+ GetFolderPermission();
+ await SetImage();
+ await GetFiles();
+ StateHasChanged();
+ }
+ catch (Exception ex)
+ {
+ await logger.LogError(ex, "Error Loading Files {Error}", ex.Message);
+ _message = Localizer["Error.File.Load"];
+ _messagetype = MessageType.Error;
+ }
+ }
+
+ private async Task FileChanged(ChangeEventArgs e)
+ {
+ _message = string.Empty;
+ FileId = int.Parse((string)e.Value);
+ #pragma warning disable CS0618
+ await OnSelect.InvokeAsync(FileId);
+ #pragma warning restore CS0618
+ await OnSelectFile.InvokeAsync(FileId);
+ await SetImage();
+ StateHasChanged();
+ }
+
private async Task UploadFiles()
{
_message = string.Empty;
@@ -433,6 +448,27 @@
_message = Localizer["Success.File.Upload"];
_messagetype = MessageType.Success;
}
+
+ FileId = -1;
+ if (Folder != Constants.PackagesFolder && !AnonymizeUploadFilenames)
+ {
+ // set FileId to first file in upload collection
+ var file = await FileService.GetFileAsync(int.Parse(folder), uploads[0].Split(":")[0]);
+ if (file != null)
+ {
+ FileId = file.FileId;
+ }
+ }
+
+ await OnUpload.InvokeAsync(FileId);
+#pragma warning disable CS0618
+ await OnSelect.InvokeAsync(FileId);
+#pragma warning restore CS0618
+ await OnSelectFile.InvokeAsync(FileId);
+
+ await SetImage();
+ await GetFiles();
+ StateHasChanged();
}
else
{
@@ -440,28 +476,6 @@
_message = Localizer["Error.File.Upload"];
_messagetype = MessageType.Error;
}
-
- if (Folder == Constants.PackagesFolder)
- {
- await OnUpload.InvokeAsync(-1);
- }
- else
- {
- // set FileId to first file in upload collection
- var file = await FileService.GetFileAsync(int.Parse(folder), uploads[0].Split(":")[0]);
- if (file != null)
- {
- FileId = file.FileId;
- await SetImage();
-#pragma warning disable CS0618
- await OnSelect.InvokeAsync(FileId);
-#pragma warning restore CS0618
- await OnSelectFile.InvokeAsync(FileId);
- await OnUpload.InvokeAsync(FileId);
- }
- await GetFiles();
- StateHasChanged();
- }
}
catch (Exception ex)
{
@@ -474,7 +488,6 @@
finally {
tokenSource.Dispose();
}
-
}
else
{
@@ -504,47 +517,49 @@
_messagetype = MessageType.Success;
}
- await GetFiles();
- FileId = -1;
- await SetImage();
+ FileId = -1;
#pragma warning disable CS0618
await OnSelect.InvokeAsync(FileId);
#pragma warning restore CS0618
await OnSelectFile.InvokeAsync(FileId);
+
+ await SetImage();
+ await GetFiles();
StateHasChanged();
- }
- catch (Exception ex)
- {
- await logger.LogError(ex, "Error Deleting File {File} {Error}", FileId, ex.Message);
+ }
+ catch (Exception ex)
+ {
+ await logger.LogError(ex, "Error Deleting File {File} {Error}", FileId, ex.Message);
- _message = Localizer["Error.File.Delete"];
- _messagetype = MessageType.Error;
- }
- }
+ _message = Localizer["Error.File.Delete"];
+ _messagetype = MessageType.Error;
+ }
+ }
- public int GetFileId() => FileId;
+ public int GetFileId() => FileId;
- public int GetFolderId() => FolderId;
+ public int GetFolderId() => FolderId;
- public File GetFile() => _file;
+ public File GetFile() => _file;
- public async Task Refresh()
- {
- await Refresh(-1);
- }
+ public async Task Refresh()
+ {
+ await Refresh(-1);
+ }
- public async Task Refresh(int fileId)
- {
- await GetFiles();
- if (fileId != -1)
+ public async Task Refresh(int fileId)
+ {
+ await GetFiles();
+ FileId = -1;
+ if (fileId != -1)
{
var file = _files.Where(item => item.FileId == fileId).FirstOrDefault();
if (file != null)
{
FileId = file.FileId;
- await SetImage();
}
}
- StateHasChanged();
+ await SetImage();
+ StateHasChanged();
}
}
diff --git a/Oqtane.Client/Modules/ModuleBase.cs b/Oqtane.Client/Modules/ModuleBase.cs
index 59721817..94cef77c 100644
--- a/Oqtane.Client/Modules/ModuleBase.cs
+++ b/Oqtane.Client/Modules/ModuleBase.cs
@@ -8,6 +8,7 @@ using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using Oqtane.Enums;
using Oqtane.Models;
+using Oqtane.Security;
using Oqtane.Services;
using Oqtane.Shared;
using Oqtane.UI;
@@ -147,6 +148,7 @@ namespace Oqtane.Modules
}
// fingerprint hash code for static assets
+
public string Fingerprint
{
get
@@ -155,6 +157,18 @@ namespace Oqtane.Modules
}
}
+ // authorization methods
+
+ public bool IsAuthorizedRole(string roleName)
+ {
+ return UserSecurity.IsAuthorized(PageState.User, roleName);
+ }
+
+ public bool IsAuthorizedPermission(string permissionName)
+ {
+ return UserSecurity.IsAuthorized(PageState.User, permissionName, ModuleState.PermissionList);
+ }
+
// url methods
// navigate url
@@ -417,6 +431,9 @@ namespace Oqtane.Modules
await interop.ScrollTo(0, 0, "smooth");
}
+
+ // token replace methods
+
public string ReplaceTokens(string content)
{
return ReplaceTokens(content, null);
@@ -501,11 +518,12 @@ namespace Oqtane.Modules
}
// date conversion methods
+
public DateTime? UtcToLocal(DateTime? datetime)
{
// Early return if input is null
- if (datetime == null)
- return null;
+ if (datetime == null || datetime.Value == DateTime.MinValue || datetime.Value == DateTime.MaxValue)
+ return datetime;
string timezoneId = null;
@@ -524,8 +542,8 @@ namespace Oqtane.Modules
public DateTime? LocalToUtc(DateTime? datetime)
{
// Early return if input is null
- if (datetime == null)
- return null;
+ if (datetime == null || datetime.Value == DateTime.MinValue || datetime.Value == DateTime.MaxValue)
+ return datetime;
string timezoneId = null;
diff --git a/Oqtane.Client/Oqtane.Client.csproj b/Oqtane.Client/Oqtane.Client.csproj
index 79410dec..6c4b6c37 100644
--- a/Oqtane.Client/Oqtane.Client.csproj
+++ b/Oqtane.Client/Oqtane.Client.csproj
@@ -4,7 +4,7 @@
net9.0
Exe
Debug;Release
- 6.1.4
+ 6.1.5
Oqtane
Shaun Walker
.NET Foundation
@@ -12,7 +12,7 @@
.NET Foundation
https://www.oqtane.org
https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE
- https://github.com/oqtane/oqtane.framework/releases/tag/v6.1.4
+ https://github.com/oqtane/oqtane.framework/releases/tag/v6.1.5
https://github.com/oqtane/oqtane.framework
Git
Oqtane
@@ -22,10 +22,10 @@
-
-
-
-
+
+
+
+
diff --git a/Oqtane.Client/Resources/Modules/Admin/Themes/Index.resx b/Oqtane.Client/Resources/Modules/Admin/Themes/Index.resx
index 0d3b97ed..4865dc89 100644
--- a/Oqtane.Client/Resources/Modules/Admin/Themes/Index.resx
+++ b/Oqtane.Client/Resources/Modules/Admin/Themes/Index.resx
@@ -156,9 +156,6 @@
Enabled?
-
- Assign
-
Check For Updates
diff --git a/Oqtane.Client/Resources/Modules/Admin/Users/Index.resx b/Oqtane.Client/Resources/Modules/Admin/Users/Index.resx
index 1a008727..16e0d40e 100644
--- a/Oqtane.Client/Resources/Modules/Admin/Users/Index.resx
+++ b/Oqtane.Client/Resources/Modules/Admin/Users/Index.resx
@@ -537,4 +537,10 @@
Indicate if host roles are supported from the identity provider. Please use caution with this option as it allows the host user to administrate every site within your installation.
+
+ Active Users
+
+
+ Deleted Users
+
\ No newline at end of file
diff --git a/Oqtane.Client/Services/AliasService.cs b/Oqtane.Client/Services/AliasService.cs
index 714f1061..0fb0600b 100644
--- a/Oqtane.Client/Services/AliasService.cs
+++ b/Oqtane.Client/Services/AliasService.cs
@@ -8,6 +8,46 @@ using Oqtane.Shared;
namespace Oqtane.Services
{
+ ///
+ /// Service to retrieve and store information.
+ ///
+ public interface IAliasService
+ {
+ ///
+ /// Get all aliases in the system
+ ///
+ ///
+ Task> GetAliasesAsync();
+
+ ///
+ /// Get a single alias
+ ///
+ /// The ID, not to be confused with a ID
+ ///
+ Task GetAliasAsync(int aliasId);
+
+ ///
+ /// Save another in the DB. It must already contain all the information incl. it belongs to.
+ ///
+ /// An to add.
+ ///
+ Task AddAliasAsync(Alias alias);
+
+ ///
+ /// Update an in the DB. Make sure the object is correctly filled, as it must update an existing record.
+ ///
+ /// The to update.
+ ///
+ Task UpdateAliasAsync(Alias alias);
+
+ ///
+ /// Remove an from the DB.
+ ///
+ /// The Alias ID, not to be confused with a Site ID.
+ ///
+ Task DeleteAliasAsync(int aliasId);
+ }
+
///
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class AliasService : ServiceBase, IAliasService
diff --git a/Oqtane.Client/Services/CookieConsentService.cs b/Oqtane.Client/Services/CookieConsentService.cs
index 83c2abc7..29b3a40d 100644
--- a/Oqtane.Client/Services/CookieConsentService.cs
+++ b/Oqtane.Client/Services/CookieConsentService.cs
@@ -1,13 +1,46 @@
-using Oqtane.Models;
using System.Threading.Tasks;
using System.Net.Http;
-using System;
using Oqtane.Documentation;
using Oqtane.Shared;
-using System.Globalization;
namespace Oqtane.Services
{
+ ///
+ /// Service to retrieve cookie consent information.
+ ///
+ public interface ICookieConsentService
+ {
+ ///
+ /// Get cookie consent bar actioned status
+ ///
+ ///
+ Task IsActionedAsync();
+
+ ///
+ /// Get cookie consent status
+ ///
+ ///
+ Task CanTrackAsync(bool optOut);
+
+ ///
+ /// create actioned cookie
+ ///
+ ///
+ Task CreateActionedCookieAsync();
+
+ ///
+ /// create consent cookie
+ ///
+ ///
+ Task CreateConsentCookieAsync();
+
+ ///
+ /// widhdraw consent cookie
+ ///
+ ///
+ Task WithdrawConsentCookieAsync();
+ }
+
///
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class CookieConsentService : ServiceBase, ICookieConsentService
diff --git a/Oqtane.Client/Services/DatabaseService.cs b/Oqtane.Client/Services/DatabaseService.cs
index bfa06865..3ca4a1a2 100644
--- a/Oqtane.Client/Services/DatabaseService.cs
+++ b/Oqtane.Client/Services/DatabaseService.cs
@@ -8,6 +8,18 @@ using Oqtane.Shared;
namespace Oqtane.Services
{
+ ///
+ /// Service to retrieve information.
+ ///
+ public interface IDatabaseService
+ {
+ ///
+ /// Returns a list of databases
+ ///
+ ///
+ Task> GetDatabasesAsync();
+ }
+
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class DatabaseService : ServiceBase, IDatabaseService
{
diff --git a/Oqtane.Client/Services/FileService.cs b/Oqtane.Client/Services/FileService.cs
index 9bc563c6..2b45455a 100644
--- a/Oqtane.Client/Services/FileService.cs
+++ b/Oqtane.Client/Services/FileService.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
@@ -10,6 +9,103 @@ using Oqtane.Shared;
namespace Oqtane.Services
{
+ ///
+ /// Service to get / create / upload / download files.
+ ///
+ public interface IFileService
+ {
+ ///
+ /// Get all s in the specified Folder
+ ///
+ /// The folder ID
+ ///
+ Task> GetFilesAsync(int folderId);
+
+ ///
+ /// Get all s in the specified folder.
+ ///
+ ///
+ /// The folder path relative to where the files are stored.
+ /// TODO: todoc verify exactly from where the folder path must start
+ ///
+ ///
+ Task> GetFilesAsync(string folder);
+
+ ///
+ /// Get one
+ ///
+ ///
+ ///
+ Task GetFileAsync(int fileId);
+
+ ///
+ /// Get a based on the and file name.
+ ///
+ /// Reference to the
+ /// name of the file
+ ///
+ ///
+ Task GetFileAsync(int folderId, string name);
+
+ ///
+ /// Add / store a record.
+ /// This does not contain the file contents.
+ ///
+ ///
+ ///
+ Task AddFileAsync(File file);
+
+ ///
+ /// Update a record.
+ /// Use this for rename a file or change some attributes.
+ /// This does not contain the file contents.
+ ///
+ ///
+ ///
+ Task UpdateFileAsync(File file);
+
+ ///
+ /// Delete a
+ ///
+ ///
+ ///
+ Task DeleteFileAsync(int fileId);
+
+ ///
+ /// Upload a file from a URL to a
+ ///
+ ///
+ ///
+ ///
+ ///
+ Task UploadFileAsync(string url, int folderId, string name);
+
+ ///
+ /// Get / download a file (the body).
+ ///
+ /// Reference to a
+ /// The bytes of the file
+ Task DownloadFileAsync(int fileId);
+
+ ///
+ /// Retrieve a list of files from a and
+ ///
+ /// Reference to the
+ /// Path of the folder
+ /// TODO: todoc verify exactly from where the folder path must start
+ ///
+ ///
+ Task> GetFilesAsync(int siteId, string folderPath);
+
+ ///
+ /// Unzips the contents of a zip file
+ ///
+ /// Reference to the
+ ///
+ ///
+ Task UnzipFileAsync(int fileId);
+ }
+
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class FileService : ServiceBase, IFileService
{
diff --git a/Oqtane.Client/Services/FolderService.cs b/Oqtane.Client/Services/FolderService.cs
index 2ce045db..9a099777 100644
--- a/Oqtane.Client/Services/FolderService.cs
+++ b/Oqtane.Client/Services/FolderService.cs
@@ -9,6 +9,58 @@ using Oqtane.Documentation;
namespace Oqtane.Services
{
+ ///
+ /// Service to get / create / modify objects.
+ ///
+ public interface IFolderService
+ {
+ ///
+ /// Retrieve root folders of a
+ ///
+ ///
+ ///
+ Task> GetFoldersAsync(int siteId);
+
+ ///
+ /// Retrieve the information of one
+ ///
+ ///
+ ///
+ Task GetFolderAsync(int folderId);
+
+ ///
+ /// Create one Folder using a object.
+ ///
+ ///
+ ///
+ Task AddFolderAsync(Folder folder);
+
+ ///
+ /// Update the information about a
+ /// Use this to rename the folder etc.
+ ///
+ ///
+ ///
+ Task UpdateFolderAsync(Folder folder);
+
+ ///
+ /// Delete a
+ ///
+ /// Reference to a
+ ///
+ Task DeleteFolderAsync(int folderId);
+
+ ///
+ /// Get a of a based on the path.
+ ///
+ /// Reference to the
+ /// Path of the folder
+ /// TODO: todoc verify exactly from where the folder path must start
+ ///
+ ///
+ Task GetFolderAsync(int siteId, [NotNull] string folderPath);
+ }
+
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class FolderService : ServiceBase, IFolderService
{
diff --git a/Oqtane.Client/Services/InstallationService.cs b/Oqtane.Client/Services/InstallationService.cs
index e0c388c8..28b80c3b 100644
--- a/Oqtane.Client/Services/InstallationService.cs
+++ b/Oqtane.Client/Services/InstallationService.cs
@@ -10,6 +10,38 @@ using System.Linq;
namespace Oqtane.Services
{
+ ///
+ /// Service to manage (install master database / upgrade version / etc.) the installation
+ ///
+ public interface IInstallationService
+ {
+ ///
+ /// Returns a status/message object with the current installation state
+ ///
+ ///
+ Task IsInstalled();
+
+ ///
+ /// Starts the installation process
+ ///
+ /// connectionString, database type, alias etc.
+ /// internal status/message object
+ Task Install(InstallConfig config);
+
+ ///
+ /// Starts the upgrade process
+ ///
+ /// indicates if files should be backed up during upgrade
+ /// internal status/message object
+ Task Upgrade(bool backup);
+
+ ///
+ /// Restarts the installation
+ ///
+ /// internal status/message object
+ Task RestartAsync();
+ }
+
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class InstallationService : ServiceBase, IInstallationService
{
diff --git a/Oqtane.Client/Services/Interfaces/IAliasService.cs b/Oqtane.Client/Services/Interfaces/IAliasService.cs
deleted file mode 100644
index 6b002ec7..00000000
--- a/Oqtane.Client/Services/Interfaces/IAliasService.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-using Oqtane.Models;
-using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to retrieve and store information.
- ///
- public interface IAliasService
- {
- ///
- /// Get all aliases in the system
- ///
- ///
- Task> GetAliasesAsync();
-
- ///
- /// Get a single alias
- ///
- /// The ID, not to be confused with a ID
- ///
- Task GetAliasAsync(int aliasId);
-
- ///
- /// Save another in the DB. It must already contain all the information incl. it belongs to.
- ///
- /// An to add.
- ///
- Task AddAliasAsync(Alias alias);
-
- ///
- /// Update an in the DB. Make sure the object is correctly filled, as it must update an existing record.
- ///
- /// The to update.
- ///
- Task UpdateAliasAsync(Alias alias);
-
- ///
- /// Remove an from the DB.
- ///
- /// The Alias ID, not to be confused with a Site ID.
- ///
- Task DeleteAliasAsync(int aliasId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ICookieConsentService.cs b/Oqtane.Client/Services/Interfaces/ICookieConsentService.cs
deleted file mode 100644
index 71580d7e..00000000
--- a/Oqtane.Client/Services/Interfaces/ICookieConsentService.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-using Oqtane.Models;
-using System;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to retrieve cookie consent information.
- ///
- public interface ICookieConsentService
- {
- ///
- /// Get cookie consent bar actioned status
- ///
- ///
- Task IsActionedAsync();
-
- ///
- /// Get cookie consent status
- ///
- ///
- Task CanTrackAsync(bool optOut);
-
- ///
- /// create actioned cookie
- ///
- ///
- Task CreateActionedCookieAsync();
-
- ///
- /// create consent cookie
- ///
- ///
- Task CreateConsentCookieAsync();
-
- ///
- /// widhdraw consent cookie
- ///
- ///
- Task WithdrawConsentCookieAsync();
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IDatabaseService.cs b/Oqtane.Client/Services/Interfaces/IDatabaseService.cs
deleted file mode 100644
index 94ca3f77..00000000
--- a/Oqtane.Client/Services/Interfaces/IDatabaseService.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to retrieve information.
- ///
- public interface IDatabaseService
- {
- ///
- /// Returns a list of databases
- ///
- ///
- Task> GetDatabasesAsync();
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IFileService.cs b/Oqtane.Client/Services/Interfaces/IFileService.cs
deleted file mode 100644
index 451d3c4d..00000000
--- a/Oqtane.Client/Services/Interfaces/IFileService.cs
+++ /dev/null
@@ -1,104 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to get / create / upload / download files.
- ///
- public interface IFileService
- {
- ///
- /// Get all s in the specified Folder
- ///
- /// The folder ID
- ///
- Task> GetFilesAsync(int folderId);
-
- ///
- /// Get all s in the specified folder.
- ///
- ///
- /// The folder path relative to where the files are stored.
- /// TODO: todoc verify exactly from where the folder path must start
- ///
- ///
- Task> GetFilesAsync(string folder);
-
- ///
- /// Get one
- ///
- ///
- ///
- Task GetFileAsync(int fileId);
-
- ///
- /// Get a based on the and file name.
- ///
- /// Reference to the
- /// name of the file
- ///
- ///
- Task GetFileAsync(int folderId, string name);
-
- ///
- /// Add / store a record.
- /// This does not contain the file contents.
- ///
- ///
- ///
- Task AddFileAsync(File file);
-
- ///
- /// Update a record.
- /// Use this for rename a file or change some attributes.
- /// This does not contain the file contents.
- ///
- ///
- ///
- Task UpdateFileAsync(File file);
-
- ///
- /// Delete a
- ///
- ///
- ///
- Task DeleteFileAsync(int fileId);
-
- ///
- /// Upload a file from a URL to a
- ///
- ///
- ///
- ///
- ///
- Task UploadFileAsync(string url, int folderId, string name);
-
- ///
- /// Get / download a file (the body).
- ///
- /// Reference to a
- /// The bytes of the file
- Task DownloadFileAsync(int fileId);
-
- ///
- /// Retrieve a list of files from a and
- ///
- /// Reference to the
- /// Path of the folder
- /// TODO: todoc verify exactly from where the folder path must start
- ///
- ///
- Task> GetFilesAsync(int siteId, string folderPath);
-
- ///
- /// Unzips the contents of a zip file
- ///
- /// Reference to the
- ///
- ///
- Task UnzipFileAsync(int fileId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IFolderService.cs b/Oqtane.Client/Services/Interfaces/IFolderService.cs
deleted file mode 100644
index 35e96956..00000000
--- a/Oqtane.Client/Services/Interfaces/IFolderService.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to get / create / modify objects.
- ///
- public interface IFolderService
- {
- ///
- /// Retrieve root folders of a
- ///
- ///
- ///
- Task> GetFoldersAsync(int siteId);
-
- ///
- /// Retrieve the information of one
- ///
- ///
- ///
- Task GetFolderAsync(int folderId);
-
- ///
- /// Create one Folder using a object.
- ///
- ///
- ///
- Task AddFolderAsync(Folder folder);
-
- ///
- /// Update the information about a
- /// Use this to rename the folder etc.
- ///
- ///
- ///
- Task UpdateFolderAsync(Folder folder);
-
- ///
- /// Delete a
- ///
- /// Reference to a
- ///
- Task DeleteFolderAsync(int folderId);
-
- ///
- /// Get a of a based on the path.
- ///
- /// Reference to the
- /// Path of the folder
- /// TODO: todoc verify exactly from where the folder path must start
- ///
- ///
- Task GetFolderAsync(int siteId, [NotNull]string folderPath);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IInstallationService.cs b/Oqtane.Client/Services/Interfaces/IInstallationService.cs
deleted file mode 100644
index 1e2311ce..00000000
--- a/Oqtane.Client/Services/Interfaces/IInstallationService.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using Oqtane.Models;
-using System.Threading.Tasks;
-using Oqtane.Shared;
-
-namespace Oqtane.Services
-{
-
- ///
- /// Service to manage (install master database / upgrade version / etc.) the installation
- ///
- public interface IInstallationService
- {
- ///
- /// Returns a status/message object with the current installation state
- ///
- ///
- Task IsInstalled();
-
- ///
- /// Starts the installation process
- ///
- /// connectionString, database type, alias etc.
- /// internal status/message object
- Task Install(InstallConfig config);
-
- ///
- /// Starts the upgrade process
- ///
- /// indicates if files should be backed up during upgrade
- /// internal status/message object
- Task Upgrade(bool backup);
-
- ///
- /// Restarts the installation
- ///
- /// internal status/message object
- Task RestartAsync();
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IJobLogService.cs b/Oqtane.Client/Services/Interfaces/IJobLogService.cs
deleted file mode 100644
index e6a10a20..00000000
--- a/Oqtane.Client/Services/Interfaces/IJobLogService.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to read the job schedule log
- ///
- public interface IJobLogService
- {
- ///
- /// Return a list of entries
- ///
- ///
- ///
- Task> GetJobLogsAsync(int jobId);
-
- ///
- /// Return a entry for the given Id
- ///
- ///
- ///
- Task GetJobLogAsync(int jobLogId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IJobService.cs b/Oqtane.Client/Services/Interfaces/IJobService.cs
deleted file mode 100644
index 984f4b59..00000000
--- a/Oqtane.Client/Services/Interfaces/IJobService.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
-
- ///
- /// Service to manage jobs ( )
- ///
- public interface IJobService
- {
- ///
- /// Returns a list of all jobs
- ///
- ///
- Task> GetJobsAsync();
-
- ///
- /// Return a specific job
- ///
- ///
- ///
- Task GetJobAsync(int jobId);
-
- ///
- /// Adds a new job
- ///
- ///
- ///
- Task AddJobAsync(Job job);
-
- ///
- /// Updates an existing job
- ///
- ///
- ///
- Task UpdateJobAsync(Job job);
-
- ///
- /// Delete an existing job
- ///
- ///
- ///
- Task DeleteJobAsync(int jobId);
-
- ///
- /// Starts the given job
- ///
- ///
- ///
- Task StartJobAsync(int jobId);
-
- ///
- /// Stops the given job
- ///
- ///
- ///
- Task StopJobAsync(int jobId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ILanguageService.cs b/Oqtane.Client/Services/Interfaces/ILanguageService.cs
deleted file mode 100644
index bf7aa9a7..00000000
--- a/Oqtane.Client/Services/Interfaces/ILanguageService.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Oqtane.Models;
-
-namespace Oqtane.Services
-{
-
- ///
- /// Service to manage entries
- ///
- public interface ILanguageService
- {
- ///
- /// Returns a list of all available languages for the given
- ///
- ///
- ///
- Task> GetLanguagesAsync(int siteId);
-
- ///
- /// Returns a list of all available languages for the given and package
- ///
- ///
- ///
- ///
- Task> GetLanguagesAsync(int siteId, string packageName);
-
- ///
- /// Returns the given language
- ///
- ///
- ///
- Task GetLanguageAsync(int languageId);
-
- ///
- /// Adds the given language
- ///
- ///
- ///
- Task AddLanguageAsync(Language language);
-
- ///
- /// Edits the given language
- ///
- ///
- ///
- Task EditLanguageAsync(Language language);
-
- ///
- /// Deletes the given language
- ///
- ///
- ///
- Task DeleteLanguageAsync(int languageId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ILocalizationCookieService.cs b/Oqtane.Client/Services/Interfaces/ILocalizationCookieService.cs
deleted file mode 100644
index a422d432..00000000
--- a/Oqtane.Client/Services/Interfaces/ILocalizationCookieService.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to set localization cookie
- ///
- public interface ILocalizationCookieService
- {
- ///
- /// Set the localization cookie
- ///
- ///
- ///
- Task SetLocalizationCookieAsync(string culture);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ILocalizationService.cs b/Oqtane.Client/Services/Interfaces/ILocalizationService.cs
deleted file mode 100644
index 543f8eba..00000000
--- a/Oqtane.Client/Services/Interfaces/ILocalizationService.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Oqtane.Models;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to retrieve localizations ( )
- ///
- public interface ILocalizationService
- {
- ///
- /// Returns a collection of supported cultures
- ///
- ///
- Task> GetCulturesAsync(bool installed);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ILogService.cs b/Oqtane.Client/Services/Interfaces/ILogService.cs
deleted file mode 100644
index 28fe51b2..00000000
--- a/Oqtane.Client/Services/Interfaces/ILogService.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-using Oqtane.Models;
-using Oqtane.Shared;
-using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Oqtane.Enums;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to retrieve and store entries
- ///
- public interface ILogService
- {
- ///
- /// Returns a list of log entires for the given params
- ///
- ///
- ///
- ///
- ///
- ///
- Task> GetLogsAsync(int siteId, string level, string function, int rows);
-
- ///
- /// Returns a specific log entry for the given id
- ///
- ///
- ///
- Task GetLogAsync(int logId);
-
- ///
- /// Clear the entire logs of the given site.
- ///
- ///
- ///
- Task DeleteLogsAsync(int siteId);
-
- ///
- /// Creates a new log entry
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- Task Log(int? pageId, int? moduleId, int? userId, string category, string feature, LogFunction function, LogLevel level, Exception exception, string message, params object[] args);
-
- ///
- /// Creates a new log entry
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- Task Log(Alias alias, int? pageId, int? moduleId, int? userId, string category, string feature, LogFunction function, LogLevel level, Exception exception, string message, params object[] args);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IModuleDefinitionService.cs b/Oqtane.Client/Services/Interfaces/IModuleDefinitionService.cs
deleted file mode 100644
index 707728eb..00000000
--- a/Oqtane.Client/Services/Interfaces/IModuleDefinitionService.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
-
- ///
- /// Service to manage a
- ///
- public interface IModuleDefinitionService
- {
- ///
- /// Returns a list of module definitions for the given site
- ///
- ///
- ///
- Task> GetModuleDefinitionsAsync(int siteId);
-
- ///
- /// Returns a specific module definition
- ///
- ///
- ///
- ///
- Task GetModuleDefinitionAsync(int moduleDefinitionId, int siteId);
-
- ///
- /// Updates a existing module definition
- ///
- ///
- ///
- Task UpdateModuleDefinitionAsync(ModuleDefinition moduleDefinition);
-
- ///
- /// Deletes a module definition
- ///
- ///
- ///
- ///
- Task DeleteModuleDefinitionAsync(int moduleDefinitionId, int siteId);
-
- ///
- /// Creates a new module definition
- ///
- ///
- ///
- Task CreateModuleDefinitionAsync(ModuleDefinition moduleDefinition);
-
- ///
- /// Returns a list of module definition templates
- ///
- ///
- Task> GetModuleDefinitionTemplatesAsync();
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IModuleService.cs b/Oqtane.Client/Services/Interfaces/IModuleService.cs
deleted file mode 100644
index ea6beab3..00000000
--- a/Oqtane.Client/Services/Interfaces/IModuleService.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to retrieve and store modules ( )
- ///
- public interface IModuleService
- {
- ///
- /// Returns a list of modules for the given site
- ///
- ///
- ///
- Task> GetModulesAsync(int siteId);
-
- ///
- /// Returns a specific module
- ///
- ///
- ///
- Task GetModuleAsync(int moduleId);
-
- ///
- /// Adds a new module
- ///
- ///
- ///
- Task AddModuleAsync(Module module);
-
- ///
- /// Updates an existing module
- ///
- ///
- ///
- Task UpdateModuleAsync(Module module);
-
- ///
- /// Deletes a module
- ///
- ///
- ///
- Task DeleteModuleAsync(int moduleId);
-
- ///
- /// Imports a module
- ///
- ///
- /// module in JSON format
- ///
- Task ImportModuleAsync(int moduleId, int pageId, string content);
-
- ///
- /// Exports a given module
- ///
- ///
- ///
- /// module content in JSON format
- Task ExportModuleAsync(int moduleId, int pageId);
-
- ///
- /// Exports a given module
- ///
- ///
- ///
- ///
- ///
- /// file id
- Task ExportModuleAsync(int moduleId, int pageId, int folderId, string filename);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/INotificationService.cs b/Oqtane.Client/Services/Interfaces/INotificationService.cs
deleted file mode 100644
index 760f4a36..00000000
--- a/Oqtane.Client/Services/Interfaces/INotificationService.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to store and retrieve notifications ( )
- ///
- public interface INotificationService
- {
- ///
- /// Return a list of notifications
- ///
- ///
- ///
- ///
- ///
- Task> GetNotificationsAsync(int siteId, string direction, int userId);
-
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- Task> GetNotificationsAsync(int siteId, string direction, int userId, int count, bool isRead);
-
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- Task GetNotificationCountAsync(int siteId, string direction, int userId, bool isRead);
-
- ///
- /// Returns a specific notifications
- ///
- ///
- ///
- Task GetNotificationAsync(int notificationId);
-
- ///
- /// Creates a new notification
- ///
- ///
- ///
- Task AddNotificationAsync(Notification notification);
-
- ///
- /// Updates a existing notification
- ///
- ///
- ///
- Task UpdateNotificationAsync(Notification notification);
-
- ///
- /// Deletes a notification
- ///
- ///
- ///
- Task DeleteNotificationAsync(int notificationId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IOutputCacheService.cs b/Oqtane.Client/Services/Interfaces/IOutputCacheService.cs
deleted file mode 100644
index 08826146..00000000
--- a/Oqtane.Client/Services/Interfaces/IOutputCacheService.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to manage cache
- ///
- public interface IOutputCacheService
- {
- ///
- /// Evicts the output cache for a specific tag
- ///
- ///
- ///
- Task EvictByTag(string tag);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IPackageService.cs b/Oqtane.Client/Services/Interfaces/IPackageService.cs
deleted file mode 100644
index ff930ccc..00000000
--- a/Oqtane.Client/Services/Interfaces/IPackageService.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
-
- ///
- /// Service to manage packages ( )
- ///
- public interface IPackageService
- {
- ///
- /// Returns a list of packages matching the given parameters
- ///
- ///
- ///
- Task> GetPackagesAsync(string type);
-
- ///
- /// Returns a list of packages matching the given parameters
- ///
- ///
- ///
- ///
- ///
- ///
- Task> GetPackagesAsync(string type, string search, string price, string package);
-
- ///
- /// Returns a list of packages matching the given parameters
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- Task> GetPackagesAsync(string type, string search, string price, string package, string sort);
-
- ///
- /// Returns a list of packages based on installationid
- ///
- ///
- Task> GetPackageUpdatesAsync(string type);
-
- ///
- /// Returns a specific package
- ///
- ///
- ///
- ///
- Task GetPackageAsync(string packageId, string version, bool download);
-
- ///
- /// Downloads a specific package as .nupkg file
- ///
- ///
- ///
- ///
- ///
- Task DownloadPackageAsync(string packageId, string version);
-
- ///
- /// Installs all packages located in //TODO: 2dm where?
- ///
- ///
- Task InstallPackagesAsync();
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IPageModuleService.cs b/Oqtane.Client/Services/Interfaces/IPageModuleService.cs
deleted file mode 100644
index 77bc5d3b..00000000
--- a/Oqtane.Client/Services/Interfaces/IPageModuleService.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using Oqtane.Models;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to store and retrieve a
- ///
- public interface IPageModuleService
- {
-
- ///
- /// Returns a specific page module
- ///
- ///
- ///
- Task GetPageModuleAsync(int pageModuleId);
-
- ///
- /// Return a specific page module
- ///
- ///
- ///
- ///
- Task GetPageModuleAsync(int pageId, int moduleId);
-
- ///
- /// Creates a new page module
- ///
- ///
- ///
- Task AddPageModuleAsync(PageModule pageModule);
-
- ///
- /// Updates a existing page module
- ///
- ///
- ///
- Task UpdatePageModuleAsync(PageModule pageModule);
-
- ///
- /// Updates order of all page modules in the given pane
- ///
- ///
- ///
- ///
- Task UpdatePageModuleOrderAsync(int pageId, string pane);
-
- ///
- /// Deletes a page module
- ///
- ///
- ///
- Task DeletePageModuleAsync(int pageModuleId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IPageService.cs b/Oqtane.Client/Services/Interfaces/IPageService.cs
deleted file mode 100644
index d4002c3f..00000000
--- a/Oqtane.Client/Services/Interfaces/IPageService.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Services to store and retrieve a
- ///
- public interface IPageService
- {
- ///
- /// Returns a list of pages
- ///
- ///
- ///
- Task> GetPagesAsync(int siteId);
-
- ///
- /// Returns a specific page
- ///
- ///
- ///
- Task GetPageAsync(int pageId);
-
- ///
- /// Returns a specific page by its defined path
- ///
- ///
- ///
- ///
- Task GetPageAsync(string path, int siteId);
-
- ///
- /// Adds a new page
- ///
- ///
- ///
- Task AddPageAsync(Page page);
-
- ///
- /// Adds a new page
- ///
- ///
- ///
- Task AddPageAsync(int pageId, int userId);
-
- ///
- /// Updates a existing page
- ///
- ///
- ///
- Task UpdatePageAsync(Page page);
-
- ///
- /// Updates order of all page modules in the given parent
- ///
- ///
- ///
- ///
- ///
- Task UpdatePageOrderAsync(int siteId, int pageId, int? parentId);
-
- ///
- /// Deletes a page
- ///
- ///
- ///
- Task DeletePageAsync(int pageId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IProfileService.cs b/Oqtane.Client/Services/Interfaces/IProfileService.cs
deleted file mode 100644
index 72c2506c..00000000
--- a/Oqtane.Client/Services/Interfaces/IProfileService.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to store and retrieve entries
- ///
- public interface IProfileService
- {
-
- ///
- /// Returns a list of profile entries
- ///
- ///
- ///
- Task> GetProfilesAsync(int siteId);
-
- ///
- /// Returns a specific profile entry
- ///
- ///
- ///
- Task GetProfileAsync(int profileId);
-
- ///
- /// Creates a new profile entry
- ///
- ///
- ///
- Task AddProfileAsync(Profile profile);
-
- ///
- /// Updates an existing profile entry
- ///
- ///
- ///
- Task UpdateProfileAsync(Profile profile);
-
- ///
- /// Deletes a profile entry
- ///
- ///
- ///
- Task DeleteProfileAsync(int profileId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IRoleService.cs b/Oqtane.Client/Services/Interfaces/IRoleService.cs
deleted file mode 100644
index 65d91023..00000000
--- a/Oqtane.Client/Services/Interfaces/IRoleService.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to manage s on a
- ///
- public interface IRoleService
- {
- ///
- /// Get all s of this .
- ///
- /// Will exclude global roles which are for all sites. To get those as well, use the overload
- ///
- /// ID-reference of a
- ///
- Task> GetRolesAsync(int siteId);
-
- ///
- /// Get roles of the and optionally include global Roles.
- ///
- /// ID-reference to a
- /// True if it should also include global roles. False will return the same data as just calling
- ///
- Task> GetRolesAsync(int siteId, bool includeGlobalRoles);
-
- ///
- /// Get one specific
- ///
- /// ID-reference of a
- ///
- Task GetRoleAsync(int roleId);
-
- ///
- /// Add / save a new to the database.
- ///
- ///
- ///
- Task AddRoleAsync(Role role);
-
- ///
- /// Update a in the database.
- ///
- ///
- ///
- Task UpdateRoleAsync(Role role);
-
- ///
- /// Delete / mark-as-deleted a in the database.
- ///
- /// ID-reference of a
- ///
- Task DeleteRoleAsync(int roleId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ISearchResultsService.cs b/Oqtane.Client/Services/Interfaces/ISearchResultsService.cs
deleted file mode 100644
index 49eb02ec..00000000
--- a/Oqtane.Client/Services/Interfaces/ISearchResultsService.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Oqtane.Documentation;
-using Oqtane.Models;
-
-namespace Oqtane.Services
-{
- [PrivateApi("Mark SearchResults classes as private, since it's not very useful in the public docs")]
- public interface ISearchResultsService
- {
- Task GetSearchResultsAsync(SearchQuery searchQuery);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ISettingService.cs b/Oqtane.Client/Services/Interfaces/ISettingService.cs
deleted file mode 100644
index 2f4c4b94..00000000
--- a/Oqtane.Client/Services/Interfaces/ISettingService.cs
+++ /dev/null
@@ -1,269 +0,0 @@
-using Oqtane.Models;
-using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to manage s
- ///
- public interface ISettingService
- {
- ///
- /// Returns a key-value dictionary of all tenant settings
- ///
- ///
- Task> GetTenantSettingsAsync();
-
- ///
- /// Updates a tenant setting
- ///
- ///
- ///
- Task UpdateTenantSettingsAsync(Dictionary tenantSettings);
-
- ///
- /// Returns a key-value dictionary of all site settings for the given site
- ///
- ///
- ///
- Task> GetSiteSettingsAsync(int siteId);
-
- ///
- /// Updates a site setting
- ///
- ///
- ///
- ///
- Task UpdateSiteSettingsAsync(Dictionary siteSettings, int siteId);
-
- ///
- /// Clears site option cache
- ///
- ///
- Task ClearSiteSettingsCacheAsync();
-
- ///
- /// Returns a key-value dictionary of all page settings for the given page
- ///
- ///
- ///
- Task> GetPageSettingsAsync(int pageId);
-
- ///
- /// Updates a page setting
- ///
- ///
- ///
- ///
- Task UpdatePageSettingsAsync(Dictionary pageSettings, int pageId);
-
- ///
- /// Returns a key-value dictionary of all page module settings for the given page module
- ///
- ///
- ///
- Task> GetPageModuleSettingsAsync(int pageModuleId);
-
- ///
- /// Updates a page module setting
- ///
- ///
- ///
- ///
- Task UpdatePageModuleSettingsAsync(Dictionary pageModuleSettings, int pageModuleId);
-
- ///
- /// Returns a key-value dictionary of all module settings for the given module
- ///
- ///
- ///
- Task> GetModuleSettingsAsync(int moduleId);
-
- ///
- /// Updates a module setting
- ///
- ///
- ///
- ///
- Task UpdateModuleSettingsAsync(Dictionary moduleSettings, int moduleId);
-
- ///
- /// Returns a key-value dictionary of all module settings for the given module
- ///
- ///
- ///
- Task> GetModuleDefinitionSettingsAsync(int moduleDefinitionId);
-
- ///
- /// Updates a module setting
- ///
- ///
- ///
- ///
- Task UpdateModuleDefinitionSettingsAsync(Dictionary moduleDefinitionSettings, int moduleDefinitionId);
-
- ///
- /// Returns a key-value dictionary of all user settings for the given user
- ///
- ///
- ///
- Task> GetUserSettingsAsync(int userId);
-
- ///
- /// Updates a user setting
- ///
- ///
- ///
- ///
- Task UpdateUserSettingsAsync(Dictionary userSettings, int userId);
-
- ///
- /// Returns a key-value dictionary of all folder settings for the given folder
- ///
- ///
- ///
- Task> GetFolderSettingsAsync(int folderId);
-
-
- ///
- /// Updates a folder setting
- ///
- ///
- ///
- ///
- Task UpdateFolderSettingsAsync(Dictionary folderSettings, int folderId);
-
- ///
- /// Returns a key-value dictionary of all tenant settings
- ///
- ///
- Task> GetHostSettingsAsync();
-
- ///
- /// Updates a host setting
- ///
- ///
- ///
- Task UpdateHostSettingsAsync(Dictionary hostSettings);
-
- ///
- /// Returns a key-value dictionary of all settings for the given visitor
- ///
- ///
- ///
- Task> GetVisitorSettingsAsync(int visitorId);
-
- ///
- /// Updates a visitor setting
- ///
- ///
- ///
- ///
- Task UpdateVisitorSettingsAsync(Dictionary visitorSettings, int visitorId);
-
- ///
- /// Returns a key-value dictionary of all settings for the given entityName
- ///
- ///
- ///
- Task> GetSettingsAsync(string entityName, int entityId);
-
- ///
- /// Updates settings for a given entityName and Id
- ///
- ///
- ///
- ///
- ///
- Task UpdateSettingsAsync(Dictionary settings, string entityName, int entityId);
-
- ///
- /// Updates setting for a given entityName and Id
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- Task AddOrUpdateSettingAsync(string entityName, int entityId, string settingName, string settingValue, bool isPrivate);
-
- ///
- /// Returns a specific setting
- ///
- ///
- ///
- ///
- ///
- Task DeleteSettingAsync(string entityName, int entityId, string settingName);
-
- ///
- /// Returns a specific setting
- ///
- ///
- ///
- ///
- ///
- Task> GetSettingsAsync(string entityName, int entityId, string settingName);
-
- ///
- /// Returns a specific setting
- ///
- ///
- ///
- Task GetSettingAsync(string entityName, int settingId);
-
- ///
- /// Creates a new setting
- ///
- ///
- ///
- Task AddSettingAsync(Setting setting);
-
- ///
- /// Updates a existing setting
- ///
- ///
- ///
- Task UpdateSettingAsync(Setting setting);
-
- ///
- /// Deletes a setting
- ///
- ///
- ///
- Task DeleteSettingAsync(string entityName, int settingId);
-
- ///
- /// Gets the value of the given settingName (key) from the given key-value dictionary
- ///
- ///
- ///
- ///
- ///
- string GetSetting(Dictionary settings, string settingName, string defaultValue);
-
- ///
- /// Sets the value of the given settingName (key) in the given key-value dictionary
- ///
- ///
- ///
- ///
- ///
- Dictionary SetSetting(Dictionary settings, string settingName, string settingValue);
-
- Dictionary SetSetting(Dictionary settings, string settingName, string settingValue, bool isPrivate);
-
- Dictionary MergeSettings(Dictionary baseSettings, Dictionary overwriteSettings);
-
-
- [Obsolete("GetSettingAsync(int settingId) is deprecated. Use GetSettingAsync(string entityName, int settingId) instead.", false)]
- Task GetSettingAsync(int settingId);
-
- [Obsolete("DeleteSettingAsync(int settingId) is deprecated. Use DeleteSettingAsync(string entityName, int settingId) instead.", false)]
- Task DeleteSettingAsync(int settingId);
-
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ISiteService.cs b/Oqtane.Client/Services/Interfaces/ISiteService.cs
deleted file mode 100644
index 8095a743..00000000
--- a/Oqtane.Client/Services/Interfaces/ISiteService.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-using Oqtane.Documentation;
-using Oqtane.Models;
-using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to store and retrieve entries
- ///
- public interface ISiteService
- {
-
- ///
- /// Returns a list of sites
- ///
- ///
- Task> GetSitesAsync();
-
- ///
- /// Returns a specific site
- ///
- ///
- ///
- Task GetSiteAsync(int siteId);
-
- ///
- /// Creates a new site
- ///
- ///
- ///
- Task AddSiteAsync(Site site);
-
- ///
- /// Updates an existing site
- ///
- ///
- ///
- Task UpdateSiteAsync(Site site);
-
- ///
- /// Deletes a site
- ///
- ///
- ///
- Task DeleteSiteAsync(int siteId);
-
- ///
- /// Returns a list of modules
- ///
- ///
- ///
- ///
- Task> GetModulesAsync(int siteId, int pageId);
-
- [PrivateApi]
- [Obsolete("This method is deprecated.", false)]
- void SetAlias(Alias alias);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ISiteTemplateService.cs b/Oqtane.Client/Services/Interfaces/ISiteTemplateService.cs
deleted file mode 100644
index 48444277..00000000
--- a/Oqtane.Client/Services/Interfaces/ISiteTemplateService.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to retrieve entries
- ///
- public interface ISiteTemplateService
- {
- ///
- /// Returns a list of site templates
- ///
- ///
- Task> GetSiteTemplatesAsync();
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ISqlService.cs b/Oqtane.Client/Services/Interfaces/ISqlService.cs
deleted file mode 100644
index a6b0ad86..00000000
--- a/Oqtane.Client/Services/Interfaces/ISqlService.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using Oqtane.Models;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to execute a against the backend database
- ///
- public interface ISqlService
- {
- ///
- /// Executes a sql query and returns its result
- ///
- ///
- ///
- Task ExecuteQueryAsync(SqlQuery sqlquery);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ISyncService.cs b/Oqtane.Client/Services/Interfaces/ISyncService.cs
deleted file mode 100644
index 12af4f2e..00000000
--- a/Oqtane.Client/Services/Interfaces/ISyncService.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using Oqtane.Models;
-using System;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to retrieve information.
- ///
- public interface ISyncService
- {
- ///
- /// Get sync events
- ///
- ///
- ///
- Task GetSyncEventsAsync(DateTime lastSyncDate);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ISystemService.cs b/Oqtane.Client/Services/Interfaces/ISystemService.cs
deleted file mode 100644
index 3f4e194d..00000000
--- a/Oqtane.Client/Services/Interfaces/ISystemService.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to retrieve and update system information.
- ///
- public interface ISystemService
- {
- ///
- /// returns a key-value dictionary with the current system configuration information
- ///
- ///
- Task> GetSystemInfoAsync();
-
- ///
- /// returns a key-value dictionary with the current system information - "environment" or "configuration"
- ///
- ///
- Task> GetSystemInfoAsync(string type);
-
- ///