diff --git a/common.props b/common.props index 6ce5cae828..ea1df61a0f 100644 --- a/common.props +++ b/common.props @@ -28,4 +28,9 @@ + + + + + diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs index ca1ebef793..5ceb180d47 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs @@ -86,6 +86,7 @@ namespace Volo.Abp.AspNetCore.Mvc var controllerModel = moduleModel.GetOrAddController( _options.ControllerNameGenerator(controllerType, setting), + FindGroupName(controllerType) ?? apiDescription.GroupName, controllerType, _modelOptions.IgnoredInterfaces ); @@ -113,6 +114,14 @@ namespace Volo.Abp.AspNetCore.Mvc allowAnonymous = false; } + var implementFrom = controllerType.FullName; + + var interfaceType = controllerType.GetInterfaces().FirstOrDefault(i => i.GetMethods().Any(x => x.ToString() == method.ToString())); + if (interfaceType != null) + { + implementFrom = TypeHelper.GetFullNameHandlingNullableAndGenerics(interfaceType); + } + var actionModel = controllerModel.AddAction( uniqueMethodName, ActionApiDescriptionModel.Create( @@ -121,7 +130,8 @@ namespace Volo.Abp.AspNetCore.Mvc apiDescription.RelativePath, apiDescription.HttpMethod, GetSupportedVersions(controllerType, method, setting), - allowAnonymous + allowAnonymous, + implementFrom ) ); @@ -351,6 +361,19 @@ namespace Volo.Abp.AspNetCore.Mvc return ModuleApiDescriptionModel.DefaultRemoteServiceName; } + private string FindGroupName(Type controllerType) + { + var controllerNameAttribute = + controllerType.GetCustomAttributes().OfType().FirstOrDefault(); + + if (controllerNameAttribute?.Name != null) + { + return controllerNameAttribute.Name; + } + + return null; + } + [CanBeNull] private ConventionalControllerSetting FindSetting(Type controllerType) { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpServiceConvention.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpServiceConvention.cs index 996e495588..d0be15a071 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpServiceConvention.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpServiceConvention.cs @@ -45,7 +45,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Conventions { RemoveDuplicateControllers(application); - foreach (var controller in application.Controllers) + foreach (var controller in GetControllers(application)) { var controllerType = controller.ControllerType.AsType(); @@ -71,11 +71,16 @@ namespace Volo.Abp.AspNetCore.Mvc.Conventions } } + protected virtual IList GetControllers(ApplicationModel application) + { + return application.Controllers; + } + protected virtual void RemoveDuplicateControllers(ApplicationModel application) { var controllerModelsToRemove = new List(); - foreach (var controllerModel in application.Controllers) + foreach (var controllerModel in GetControllers(application)) { if (!controllerModel.ControllerType.IsDefined(typeof(ExposeServicesAttribute), false)) { @@ -90,7 +95,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Conventions var exposeServicesAttr = ReflectionHelper.GetSingleAttributeOrDefault(controllerModel.ControllerType); if (exposeServicesAttr.IncludeSelf) { - var exposedControllerModels = application.Controllers + var exposedControllerModels = GetControllers(application) .Where(cm => exposeServicesAttr.ServiceTypes.Contains(cm.ControllerType)) .ToArray(); @@ -109,7 +114,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Conventions continue; } - var baseControllerModels = application.Controllers + var baseControllerModels = GetControllers(application) .Where(cm => baseControllerTypes.Contains(cm.ControllerType)) .ToArray(); diff --git a/framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/DynamicProxying/AspNetCoreTestDynamicProxyHttpClientFactory.cs b/framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/DynamicProxying/AspNetCoreTestProxyHttpClientFactory.cs similarity index 73% rename from framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/DynamicProxying/AspNetCoreTestDynamicProxyHttpClientFactory.cs rename to framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/DynamicProxying/AspNetCoreTestProxyHttpClientFactory.cs index 71de80b018..682f8387f6 100644 --- a/framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/DynamicProxying/AspNetCoreTestDynamicProxyHttpClientFactory.cs +++ b/framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/DynamicProxying/AspNetCoreTestProxyHttpClientFactory.cs @@ -1,15 +1,17 @@ using System.Net.Http; using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client; using Volo.Abp.Http.Client.DynamicProxying; +using Volo.Abp.Http.Client.Proxying; namespace Volo.Abp.AspNetCore.TestBase.DynamicProxying { [Dependency(ReplaceServices = true)] - public class AspNetCoreTestDynamicProxyHttpClientFactory : IDynamicProxyHttpClientFactory, ITransientDependency + public class AspNetCoreTestProxyHttpClientFactory : IProxyHttpClientFactory, ITransientDependency { private readonly ITestServerAccessor _testServerAccessor; - public AspNetCoreTestDynamicProxyHttpClientFactory( + public AspNetCoreTestProxyHttpClientFactory( ITestServerAccessor testServerAccessor) { _testServerAccessor = testServerAccessor; diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs index 08da2e3d00..cd166ea302 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs @@ -3,7 +3,12 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Cli.Commands; using Volo.Abp.Cli.Http; using Volo.Abp.Cli.LIbs; +using Volo.Abp.Cli.ServiceProxying; +using Volo.Abp.Cli.ServiceProxying.Angular; +using Volo.Abp.Cli.ServiceProxying.CSharp; +using Volo.Abp.Cli.ServiceProxying.JavaScript; using Volo.Abp.Domain; +using Volo.Abp.Http; using Volo.Abp.IdentityModel; using Volo.Abp.Json; using Volo.Abp.Json.SystemTextJson; @@ -16,7 +21,8 @@ namespace Volo.Abp.Cli typeof(AbpDddDomainModule), typeof(AbpJsonModule), typeof(AbpIdentityModelModule), - typeof(AbpMinifyModule) + typeof(AbpMinifyModule), + typeof(AbpHttpModule) )] public class AbpCliCoreModule : AbpModule { @@ -58,6 +64,13 @@ namespace Volo.Abp.Cli options.Commands["create-migration-and-run-migrator"] = typeof(CreateMigrationAndRunMigratorCommand); options.Commands["install-libs"] = typeof(InstallLibsCommand); }); + + Configure(options => + { + options.Generators[JavaScriptServiceProxyGenerator.Name] = typeof(JavaScriptServiceProxyGenerator); + options.Generators[AngularServiceProxyGenerator.Name] = typeof(AngularServiceProxyGenerator); + options.Generators[CSharpServiceProxyGenerator.Name] = typeof(CSharpServiceProxyGenerator); + }); } } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliUrls.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliUrls.cs index 8d2b10d3ca..15d03236ae 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliUrls.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliUrls.cs @@ -1,4 +1,6 @@ -namespace Volo.Abp.Cli +using System; + +namespace Volo.Abp.Cli { public static class CliUrls { @@ -33,5 +35,11 @@ { return $"{NuGetRootPath}{apiKey}/v3/package/{packageId}/index.json"; } + + public static string GetApiDefinitionUrl(string url) + { + url = url.EnsureEndsWith('/'); + return $"{url}api/abp/api-definition"; + } } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs index b56dd19cb0..70912e2ea1 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs @@ -1,21 +1,40 @@ +using System.Text; +using Microsoft.Extensions.Options; +using Volo.Abp.Cli.ServiceProxying; +using Volo.Abp.DependencyInjection; + namespace Volo.Abp.Cli.Commands { - public class GenerateProxyCommand : ProxyCommandBase + public class GenerateProxyCommand : ProxyCommandBase { public const string Name = "generate-proxy"; protected override string CommandName => Name; - protected override string SchematicsCommandName => "proxy-add"; + public GenerateProxyCommand( + IOptions serviceProxyOptions, + IHybridServiceScopeFactory serviceScopeFactory) + : base(serviceProxyOptions, serviceScopeFactory) + { + } - public GenerateProxyCommand(CliService cliService) - : base(cliService) + public override string GetUsageInfo() { + var sb = new StringBuilder(base.GetUsageInfo()); + + sb.AppendLine(""); + sb.AppendLine("Examples:"); + sb.AppendLine(""); + sb.AppendLine(" abp generate-proxy -t ng"); + sb.AppendLine(" abp generate-proxy -t js -m identity -o Pages/Identity/client-proxies.js -url https://localhost:44302/"); + sb.AppendLine(" abp generate-proxy -t csharp --folder MyProxies/InnerFolder -url https://localhost:44302/"); + + return sb.ToString(); } public override string GetShortDescription() { - return "Generates Angular service proxies and DTOs to consume HTTP APIs."; + return "Generates client service proxies and DTOs to consume HTTP APIs."; } } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProxyCommandBase.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProxyCommandBase.cs index 1745db2fd2..a2d3b95328 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProxyCommandBase.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProxyCommandBase.cs @@ -4,121 +4,74 @@ using System.Text; using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; -using Newtonsoft.Json.Linq; -using NuGet.Versioning; +using Microsoft.Extensions.Options; using Volo.Abp.Cli.Args; -using Volo.Abp.Cli.Utils; +using Volo.Abp.Cli.ServiceProxying; using Volo.Abp.DependencyInjection; namespace Volo.Abp.Cli.Commands { - public abstract class ProxyCommandBase : IConsoleCommand, ITransientDependency + public abstract class ProxyCommandBase : IConsoleCommand, ITransientDependency where T: IConsoleCommand { - public CliService CliService { get; } - public ILogger Logger { get; set; } + public ILogger Logger { get; set; } protected abstract string CommandName { get; } - protected abstract string SchematicsCommandName { get; } + protected AbpCliServiceProxyOptions ServiceProxyOptions { get; } - public ProxyCommandBase(CliService cliService) - { - CliService = cliService; - Logger = NullLogger.Instance; - } + protected IHybridServiceScopeFactory ServiceScopeFactory { get; } - public async Task ExecuteAsync(CommandLineArgs commandLineArgs) + public ProxyCommandBase( + IOptions serviceProxyOptions, + IHybridServiceScopeFactory serviceScopeFactory) { - CheckAngularJsonFile(); - await CheckNgSchematicsAsync(); - - var prompt = commandLineArgs.Options.ContainsKey("p") || commandLineArgs.Options.ContainsKey("prompt"); - var defaultValue = prompt ? null : "__default"; - - var module = commandLineArgs.Options.GetOrNull(Options.Module.Short, Options.Module.Long) ?? defaultValue; - var apiName = commandLineArgs.Options.GetOrNull(Options.ApiName.Short, Options.ApiName.Long) ?? defaultValue; - var source = commandLineArgs.Options.GetOrNull(Options.Source.Short, Options.Source.Long) ?? defaultValue; - var target = commandLineArgs.Options.GetOrNull(Options.Target.Short, Options.Target.Long) ?? defaultValue; - - var commandBuilder = new StringBuilder("npx ng g @abp/ng.schematics:" + SchematicsCommandName); - - if (module != null) - { - commandBuilder.Append($" --module {module}"); - } - - if (apiName != null) - { - commandBuilder.Append($" --api-name {apiName}"); - } - - if (source != null) - { - commandBuilder.Append($" --source {source}"); - } - - if (target != null) - { - commandBuilder.Append($" --target {target}"); - } - - CmdHelper.RunCmd(commandBuilder.ToString()); + ServiceScopeFactory = serviceScopeFactory; + ServiceProxyOptions = serviceProxyOptions.Value; + Logger = NullLogger.Instance; } - private async Task CheckNgSchematicsAsync() + public async Task ExecuteAsync(CommandLineArgs commandLineArgs) { - var packageJsonPath = $"package.json"; + var generateType = commandLineArgs.Options.GetOrNull(Options.GenerateType.Short, Options.GenerateType.Long)?.ToUpper(); - if (!File.Exists(packageJsonPath)) + if (string.IsNullOrWhiteSpace(generateType)) { - throw new CliUsageException( - "package.json file not found" + + throw new CliUsageException("Option Type is required" + Environment.NewLine + - GetUsageInfo() - ); + GetUsageInfo()); } - var schematicsVersion = - (string) JObject.Parse(File.ReadAllText(packageJsonPath))["devDependencies"]?["@abp/ng.schematics"]; - - if (schematicsVersion == null) + if (!ServiceProxyOptions.Generators.ContainsKey(generateType)) { - throw new CliUsageException( - "\"@abp/ng.schematics\" NPM package should be installed to the devDependencies before running this command!" + + throw new CliUsageException("Option Type value is invalid" + Environment.NewLine + - GetUsageInfo() - ); + GetUsageInfo()); } - var parseError = SemanticVersion.TryParse(schematicsVersion.TrimStart('~', '^', 'v'), out var semanticSchematicsVersion); - if (parseError) + using (var scope = ServiceScopeFactory.CreateScope()) { - Logger.LogWarning("Couldn't determinate version of \"@abp/ng.schematics\" package."); - return; - } + var generatorType = ServiceProxyOptions.Generators[generateType]; + var serviceProxyGenerator = scope.ServiceProvider.GetService(generatorType).As(); - var cliVersion = await CliService.GetCurrentCliVersionAsync(typeof(CliService).Assembly); - if (semanticSchematicsVersion < cliVersion) - { - Logger.LogWarning("\"@abp/ng.schematics\" version is lower than ABP Cli version."); - return; + await serviceProxyGenerator.GenerateProxyAsync(BuildArgs(commandLineArgs)); } } - private void CheckAngularJsonFile() + private GenerateProxyArgs BuildArgs(CommandLineArgs commandLineArgs) { - var angularPath = $"angular.json"; - if (!File.Exists(angularPath)) - { - throw new CliUsageException( - "angular.json file not found. You must run this command in the angular folder." + - Environment.NewLine + Environment.NewLine + - GetUsageInfo() - ); - } + var url = commandLineArgs.Options.GetOrNull(Options.Url.Short, Options.Url.Long); + var target = commandLineArgs.Options.GetOrNull(Options.Target.Long); + var module = commandLineArgs.Options.GetOrNull(Options.Module.Short, Options.Module.Long) ?? "app"; + var output = commandLineArgs.Options.GetOrNull(Options.Output.Short, Options.Output.Long); + var apiName = commandLineArgs.Options.GetOrNull(Options.ApiName.Short, Options.ApiName.Long); + var source = commandLineArgs.Options.GetOrNull(Options.Source.Short, Options.Source.Long); + var workDirectory = commandLineArgs.Options.GetOrNull(Options.WorkDirectory.Short, Options.WorkDirectory.Long) ?? Directory.GetCurrentDirectory(); + var folder = commandLineArgs.Options.GetOrNull(Options.Folder.Long); + + return new GenerateProxyArgs(CommandName, workDirectory, module, url, output, target, apiName, source, folder, commandLineArgs.Options); } - public string GetUsageInfo() + public virtual string GetUsageInfo() { var sb = new StringBuilder(); @@ -129,11 +82,16 @@ namespace Volo.Abp.Cli.Commands sb.AppendLine(""); sb.AppendLine("Options:"); sb.AppendLine(""); - sb.AppendLine("-m|--module (default: 'app') The name of the backend module you wish to generate proxies for."); - sb.AppendLine("-a|--api-name (default: 'default') The name of the API endpoint defined in the /src/environments/environment.ts."); - sb.AppendLine("-s|--source (default: 'defaultProject') Angular project name to resolve the root namespace & API definition URL from."); - sb.AppendLine("-t|--target (default: 'defaultProject') Angular project name to place generated code in."); - sb.AppendLine("-p|--prompt Asks the options from the command line prompt (for the missing options)"); + sb.AppendLine("-m|--module (default: 'app') The name of the backend module you wish to generate proxies for."); + sb.AppendLine("-t|--type The name of generate type (csharp, js, ng)."); + sb.AppendLine("-wd|--working-directory Execution directory."); + sb.AppendLine("-u|--url API definition URL from."); + sb.AppendLine("-a|--api-name (default: 'default') The name of the API endpoint defined in the /src/environments/environment.ts."); + sb.AppendLine("-s|--source (default: 'defaultProject') Angular project name to resolve the root namespace & API definition URL from."); + sb.AppendLine("-o|--output JavaScript file path or folder to place generated code in."); + sb.AppendLine("-p|--prompt Asks the options from the command line prompt (for the missing options)"); + sb.AppendLine("--target (default: 'defaultProject') Angular project name to place generated code in."); + sb.AppendLine("--folder (default: 'ClientProxies') Folder name to place generated CSharp code in."); sb.AppendLine(""); sb.AppendLine("See the documentation for more info: https://docs.abp.io/en/abp/latest/CLI"); @@ -150,6 +108,12 @@ namespace Volo.Abp.Cli.Commands public const string Long = "module"; } + public static class GenerateType + { + public const string Short = "t"; + public const string Long = "type"; + } + public static class ApiName { public const string Short = "a"; @@ -161,10 +125,14 @@ namespace Volo.Abp.Cli.Commands public const string Short = "s"; public const string Long = "source"; } + public static class Output + { + public const string Short = "o"; + public const string Long = "output"; + } public static class Target { - public const string Short = "t"; public const string Long = "target"; } @@ -173,6 +141,23 @@ namespace Volo.Abp.Cli.Commands public const string Short = "p"; public const string Long = "prompt"; } + + public static class Folder + { + public const string Long = "folder"; + } + + public static class Url + { + public const string Short = "u"; + public const string Long = "url"; + } + + public static class WorkDirectory + { + public const string Short = "wd"; + public const string Long = "working-directory"; + } } } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/RemoveProxyCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/RemoveProxyCommand.cs index 7c55c0cf71..1fbf5eb96f 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/RemoveProxyCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/RemoveProxyCommand.cs @@ -1,21 +1,40 @@ -namespace Volo.Abp.Cli.Commands +using System.Text; +using Microsoft.Extensions.Options; +using Volo.Abp.Cli.ServiceProxying; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.Cli.Commands { - public class RemoveProxyCommand : ProxyCommandBase + public class RemoveProxyCommand : ProxyCommandBase { public const string Name = "remove-proxy"; protected override string CommandName => Name; - protected override string SchematicsCommandName => "proxy-remove"; + public RemoveProxyCommand( + IOptions serviceProxyOptions, + IHybridServiceScopeFactory serviceScopeFactory) + : base(serviceProxyOptions, serviceScopeFactory) + { + } - public RemoveProxyCommand(CliService cliService) - : base(cliService) + public override string GetUsageInfo() { + var sb = new StringBuilder(base.GetUsageInfo()); + + sb.AppendLine(""); + sb.AppendLine("Examples:"); + sb.AppendLine(""); + sb.AppendLine(" abp remove-proxy -t ng"); + sb.AppendLine(" abp remove-proxy -t js -m identity -o Pages/Identity/client-proxies.js"); + sb.AppendLine(" abp remove-proxy -t csharp --folder MyProxies/InnerFolder"); + + return sb.ToString(); } public override string GetShortDescription() { - return "Remove Angular service proxies and DTOs to consume HTTP APIs."; + return "Remove client service proxies and DTOs to consume HTTP APIs."; } } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/AbpCliServiceProxyOptions.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/AbpCliServiceProxyOptions.cs new file mode 100644 index 0000000000..b3a9bd2d54 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/AbpCliServiceProxyOptions.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; + +namespace Volo.Abp.Cli.ServiceProxying +{ + public class AbpCliServiceProxyOptions + { + public IDictionary Generators { get; } + + public AbpCliServiceProxyOptions() + { + Generators = new Dictionary(); + } + } +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs new file mode 100644 index 0000000000..2e20ec634a --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs @@ -0,0 +1,115 @@ +using System.IO; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Newtonsoft.Json.Linq; +using NuGet.Versioning; +using Volo.Abp.Cli.Commands; +using Volo.Abp.Cli.Http; +using Volo.Abp.Cli.Utils; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Json; + +namespace Volo.Abp.Cli.ServiceProxying.Angular +{ + public class AngularServiceProxyGenerator : ServiceProxyGeneratorBase , ITransientDependency + { + public const string Name = "NG"; + + private readonly CliService _cliService; + + public AngularServiceProxyGenerator( + CliHttpClientFactory cliHttpClientFactory, + IJsonSerializer jsonSerializer, + CliService cliService) : + base(cliHttpClientFactory, jsonSerializer) + { + _cliService = cliService; + } + + public override async Task GenerateProxyAsync(GenerateProxyArgs args) + { + CheckAngularJsonFile(); + await CheckNgSchematicsAsync(); + + var schematicsCommandName = args.CommandName == RemoveProxyCommand.Name ? "proxy-remove" : "proxy-add"; + var prompt = args.ExtraProperties.ContainsKey("p") || args.ExtraProperties.ContainsKey("prompt"); + var defaultValue = prompt ? null : "__default"; + + var module = args.Module ?? defaultValue; + var apiName = args.ApiName ?? defaultValue; + var source = args.Source ?? defaultValue; + var target = args.Target ?? defaultValue; + + var commandBuilder = new StringBuilder("npx ng g @abp/ng.schematics:" + schematicsCommandName); + + if (module != null) + { + commandBuilder.Append($" --module {module}"); + } + + if (apiName != null) + { + commandBuilder.Append($" --api-name {apiName}"); + } + + if (source != null) + { + commandBuilder.Append($" --source {source}"); + } + + if (target != null) + { + commandBuilder.Append($" --target {target}"); + } + + CmdHelper.RunCmd(commandBuilder.ToString()); + } + + private async Task CheckNgSchematicsAsync() + { + var packageJsonPath = $"package.json"; + + if (!File.Exists(packageJsonPath)) + { + throw new CliUsageException( + "package.json file not found" + ); + } + + var schematicsVersion = + (string) JObject.Parse(File.ReadAllText(packageJsonPath))["devDependencies"]?["@abp/ng.schematics"]; + + if (schematicsVersion == null) + { + throw new CliUsageException( + "\"@abp/ng.schematics\" NPM package should be installed to the devDependencies before running this command!" + ); + } + + var parseError = SemanticVersion.TryParse(schematicsVersion.TrimStart('~', '^', 'v'), out var semanticSchematicsVersion); + if (parseError) + { + Logger.LogWarning("Couldn't determinate version of \"@abp/ng.schematics\" package."); + return; + } + + var cliVersion = await _cliService.GetCurrentCliVersionAsync(typeof(CliService).Assembly); + if (semanticSchematicsVersion < cliVersion) + { + Logger.LogWarning("\"@abp/ng.schematics\" version is lower than ABP Cli version."); + } + } + + private static void CheckAngularJsonFile() + { + var angularPath = $"angular.json"; + if (!File.Exists(angularPath)) + { + throw new CliUsageException( + "angular.json file not found. You must run this command in the angular folder." + ); + } + } + } +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs new file mode 100644 index 0000000000..4337fa0d35 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs @@ -0,0 +1,404 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Volo.Abp.Cli.Commands; +using Volo.Abp.Cli.Http; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Modeling; +using Volo.Abp.Json; + +namespace Volo.Abp.Cli.ServiceProxying.CSharp +{ + public class CSharpServiceProxyGenerator : ServiceProxyGeneratorBase, ITransientDependency + { + public const string Name = "CSHARP"; + + private const string UsingPlaceholder = ""; + private const string MethodPlaceholder = ""; + private const string ClassName = ""; + private const string ServiceInterface = ""; + private const string ServicePostfix = "AppService"; + private const string DefaultNamespace = "ClientProxies"; + private const string Namespace = ""; + private const string AppServicePrefix = "Volo.Abp.Application.Services"; + private readonly string _clientProxyGeneratedTemplate = "// This file is automatically generated by ABP framework to use MVC Controllers from CSharp" + + $"{Environment.NewLine}" + + $"{Environment.NewLine}" + + $"{Environment.NewLine}// ReSharper disable once CheckNamespace" + + $"{Environment.NewLine}namespace " + + $"{Environment.NewLine}{{" + + $"{Environment.NewLine} public partial class " + + $"{Environment.NewLine} {{" + + $"{Environment.NewLine} " + + $"{Environment.NewLine} }}" + + $"{Environment.NewLine}}}" + + $"{Environment.NewLine}"; + private readonly string _clientProxyTemplate = "// This file is part of , you can customize it here" + + $"{Environment.NewLine}using Volo.Abp.DependencyInjection;" + + $"{Environment.NewLine}using Volo.Abp.Http.Client.ClientProxying;" + + $"{Environment.NewLine}" + + $"{Environment.NewLine}" + + $"{Environment.NewLine}// ReSharper disable once CheckNamespace" + + $"{Environment.NewLine}namespace " + + $"{Environment.NewLine}{{" + + $"{Environment.NewLine} [Dependency(ReplaceServices = true)]" + + $"{Environment.NewLine} [ExposeServices(typeof(), typeof())]" + + $"{Environment.NewLine} public partial class : ClientProxyBase<>, " + + $"{Environment.NewLine} {{" + + $"{Environment.NewLine} }}" + + $"{Environment.NewLine}}}" + + $"{Environment.NewLine}"; + private readonly List _usingNamespaceList = new() + { + "using System;", + "using System.Threading.Tasks;", + "using Volo.Abp.Application.Dtos;", + "using Volo.Abp.Http.Client;", + "using Volo.Abp.Http.Modeling;" + }; + + public CSharpServiceProxyGenerator( + CliHttpClientFactory cliHttpClientFactory, + IJsonSerializer jsonSerializer) : + base(cliHttpClientFactory, jsonSerializer) + { + } + + public override async Task GenerateProxyAsync(GenerateProxyArgs args) + { + CheckWorkDirectory(args.WorkDirectory); + CheckFolder(args.Folder); + + if (args.CommandName == RemoveProxyCommand.Name) + { + RemoveClientProxyFile(args); + return; + } + + var applicationApiDescriptionModel = await GetApplicationApiDescriptionModelAsync(args); + + foreach (var controller in applicationApiDescriptionModel.Modules.Values.SelectMany(x => x.Controllers)) + { + if (ShouldGenerateProxy(controller.Value)) + { + await GenerateClientProxyFileAsync(args, controller.Value); + } + } + + await CreateGenerateProxyJsonFile(args, applicationApiDescriptionModel); + } + + private async Task CreateGenerateProxyJsonFile(GenerateProxyArgs args, ApplicationApiDescriptionModel applicationApiDescriptionModel) + { + var folder = args.Folder.IsNullOrWhiteSpace()? DefaultNamespace : args.Folder; + var filePath = Path.Combine(args.WorkDirectory, folder, $"{args.Module}-generate-proxy.json"); + + using (var writer = new StreamWriter(filePath)) + { + await writer.WriteAsync(JsonSerializer.Serialize(applicationApiDescriptionModel, indented: true)); + } + } + + private void RemoveClientProxyFile(GenerateProxyArgs args) + { + var folder = args.Folder.IsNullOrWhiteSpace()? DefaultNamespace : args.Folder; + var folderPath = Path.Combine(args.WorkDirectory, folder); + + if (Directory.Exists(folderPath)) + { + Directory.Delete(folderPath, true); + } + + Logger.LogInformation($"Delete {GetLoggerOutputPath(folderPath, args.WorkDirectory)}"); + } + + private async Task GenerateClientProxyFileAsync( + GenerateProxyArgs args, + ControllerApiDescriptionModel controllerApiDescription) + { + var folder = args.Folder.IsNullOrWhiteSpace()? DefaultNamespace : args.Folder; + + var appServiceTypeFullName = controllerApiDescription.Interfaces.Last().Type; + var appServiceTypeName = appServiceTypeFullName.Split('.').Last(); + var clientProxyName = $"{controllerApiDescription.ControllerName}ClientProxy"; + var rootNamespace = $"{GetTypeNamespace(controllerApiDescription.Type)}.{folder.Replace('/', '.')}"; + + var clientProxyBuilder = new StringBuilder(_clientProxyTemplate); + clientProxyBuilder.Replace(ClassName, clientProxyName); + clientProxyBuilder.Replace(Namespace, rootNamespace); + clientProxyBuilder.Replace(ServiceInterface, appServiceTypeName); + clientProxyBuilder.Replace(UsingPlaceholder, $"using {GetTypeNamespace(appServiceTypeFullName)};"); + + var filePath = Path.Combine(args.WorkDirectory, folder, $"{clientProxyName}.cs"); + Directory.CreateDirectory(Path.GetDirectoryName(filePath)); + + if (!File.Exists(filePath)) + { + using (var writer = new StreamWriter(filePath)) + { + await writer.WriteAsync(clientProxyBuilder.ToString()); + } + + Logger.LogInformation($"Create {GetLoggerOutputPath(filePath, args.WorkDirectory)}"); + } + + await GenerateClientProxyGeneratedFileAsync( + args, + controllerApiDescription, + clientProxyName, + appServiceTypeName, + appServiceTypeFullName, + rootNamespace, + folder); + } + + private async Task GenerateClientProxyGeneratedFileAsync( + GenerateProxyArgs args, + ControllerApiDescriptionModel controllerApiDescription, + string clientProxyName, + string appServiceTypeName, + string appServiceTypeFullName, + string rootNamespace, + string folder) + { + var clientProxyBuilder = new StringBuilder(_clientProxyGeneratedTemplate); + + var usingNamespaceList = new List(_usingNamespaceList) + { + $"using {GetTypeNamespace(appServiceTypeFullName)};" + }; + + clientProxyBuilder.Replace(ClassName, clientProxyName); + clientProxyBuilder.Replace(Namespace, rootNamespace); + clientProxyBuilder.Replace(ServiceInterface, appServiceTypeName); + + foreach (var action in controllerApiDescription.Actions.Values) + { + if (!ShouldGenerateMethod(appServiceTypeFullName, action)) + { + continue; + } + + GenerateMethod(action, clientProxyBuilder, usingNamespaceList); + } + + foreach (var usingNamespace in usingNamespaceList) + { + clientProxyBuilder.Replace($"{UsingPlaceholder}", $"{usingNamespace}{Environment.NewLine}{UsingPlaceholder}"); + } + + clientProxyBuilder.Replace($"{Environment.NewLine}{UsingPlaceholder}", string.Empty); + clientProxyBuilder.Replace($"{Environment.NewLine}{Environment.NewLine} {MethodPlaceholder}", string.Empty); + + var filePath = Path.Combine(args.WorkDirectory, folder, $"{clientProxyName}.Generated.cs"); + + using (var writer = new StreamWriter(filePath)) + { + await writer.WriteAsync(clientProxyBuilder.ToString()); + Logger.LogInformation($"Create {GetLoggerOutputPath(filePath, args.WorkDirectory)}"); + } + } + + private void GenerateMethod( + ActionApiDescriptionModel action, + StringBuilder clientProxyBuilder, + List usingNamespaceList) + { + var methodBuilder = new StringBuilder(); + + var returnTypeName = GetRealTypeName(usingNamespaceList, action.ReturnValue.Type); + + if(!action.Name.EndsWith("Async")) + { + GenerateSynchronizationMethod(action, returnTypeName, methodBuilder, usingNamespaceList); + clientProxyBuilder.Replace(MethodPlaceholder, $"{methodBuilder}{Environment.NewLine} {MethodPlaceholder}"); + return; + } + + GenerateAsynchronousMethod(action, returnTypeName, methodBuilder, usingNamespaceList); + clientProxyBuilder.Replace(MethodPlaceholder, $"{methodBuilder}{Environment.NewLine} {MethodPlaceholder}"); + } + + private void GenerateSynchronizationMethod(ActionApiDescriptionModel action, string returnTypeName, StringBuilder methodBuilder, List usingNamespaceList) + { + methodBuilder.AppendLine($"public virtual {returnTypeName} {action.Name}()"); + + foreach (var parameter in action.Parameters.GroupBy(x => x.Name).Select( x=> x.First())) + { + methodBuilder.Replace("", $"{GetRealTypeName(usingNamespaceList, parameter.Type)} {parameter.Name}, "); + } + + methodBuilder.Replace("", string.Empty); + methodBuilder.Replace(", )", ")"); + + methodBuilder.AppendLine(" {"); + methodBuilder.AppendLine(" //Client Proxy does not support the synchronization method, you should always use asynchronous methods as a best practice"); + methodBuilder.AppendLine(" throw new System.NotImplementedException(); "); + methodBuilder.AppendLine(" }"); + } + + private void GenerateAsynchronousMethod( + ActionApiDescriptionModel action, + string returnTypeName, + StringBuilder methodBuilder, + List usingNamespaceList) + { + var returnSign = returnTypeName == "void" ? "Task": $"Task<{returnTypeName}>"; + + methodBuilder.AppendLine($"public virtual async {returnSign} {action.Name}()"); + + foreach (var parameter in action.ParametersOnMethod) + { + methodBuilder.Replace("", $"{GetRealTypeName(usingNamespaceList, parameter.Type)} {parameter.Name}, "); + } + + methodBuilder.Replace("", string.Empty); + methodBuilder.Replace(", )", ")"); + + methodBuilder.AppendLine(" {"); + + if (returnTypeName == "void") + { + methodBuilder.AppendLine($" await RequestAsync(nameof({action.Name}), );"); + } + else + { + methodBuilder.AppendLine($" return await RequestAsync<{returnTypeName}>(nameof({action.Name}), );"); + } + + foreach (var parameter in action.ParametersOnMethod) + { + methodBuilder.Replace("", $"{parameter.Name}, "); + } + + methodBuilder.Replace("", string.Empty); + methodBuilder.Replace(", )", ")"); + methodBuilder.AppendLine(" }"); + } + + private bool ShouldGenerateProxy(ControllerApiDescriptionModel controllerApiDescription) + { + if (!controllerApiDescription.Interfaces.Any()) + { + return false; + } + + var serviceInterface = controllerApiDescription.Interfaces.Last(); + return serviceInterface.Type.EndsWith(ServicePostfix); + } + + private bool ShouldGenerateMethod(string appServiceTypeName, ActionApiDescriptionModel action) + { + return action.ImplementFrom.StartsWith(AppServicePrefix) || action.ImplementFrom.StartsWith(appServiceTypeName); + } + + private string GetTypeNamespace(string typeFullName) + { + return typeFullName.Substring(0, typeFullName.LastIndexOf('.')); + } + + private string GetRealTypeName(List usingNamespaceList, string typeName) + { + var filter = new []{"<", ",", ">"}; + var stringBuilder = new StringBuilder(); + var typeNames = typeName.Split('.'); + + if (typeNames.All(x => !filter.Any(x.Contains))) + { + AddUsingNamespace(usingNamespaceList, typeName); + return NormalizeTypeName(typeNames.Last()); + } + + var fullName = string.Empty; + + foreach (var item in typeNames) + { + if (filter.Any(x => item.Contains(x))) + { + AddUsingNamespace(usingNamespaceList, $"{fullName}.{item}".TrimStart('.')); + fullName = string.Empty; + + if (item.Contains('<') || item.Contains(',')) + { + stringBuilder.Append(item.Substring(0, item.IndexOf(item.Contains('<') ? '<' : ',')+1)); + fullName = item.Substring(item.IndexOf(item.Contains('<') ? '<' : ',') + 1); + } + else + { + stringBuilder.Append(item); + } + } + else + { + fullName = $"{fullName}.{item}"; + } + } + + return stringBuilder.ToString(); + } + + private void AddUsingNamespace(List usingNamespaceList, string typeName) + { + var rootNamespace = $"using {GetTypeNamespace(typeName)};"; + if (usingNamespaceList.Contains(rootNamespace)) + { + return; + } + + usingNamespaceList.Add(rootNamespace); + } + + private string NormalizeTypeName(string typeName) + { + var nullable = string.Empty; + if (typeName.EndsWith("?")) + { + typeName = typeName.TrimEnd('?'); + nullable = "?"; + } + + typeName = typeName switch + { + "Void" => "void", + "Boolean" => "bool", + "String" => "string", + "Int32" => "int", + "Int64" => "long", + "Double" => "double", + "Object" => "object", + "Byte" => "byte", + "Char" => "char", + _ => typeName + }; + + return $"{typeName}{nullable}"; + } + + private void CheckWorkDirectory(string directory) + { + if (!Directory.Exists(directory)) + { + throw new CliUsageException("Specified directory does not exist."); + } + + var projectFiles = Directory.GetFiles(directory, "*HttpApi.Client.csproj"); + if (!projectFiles.Any()) + { + throw new CliUsageException( + "No project file found in the directory. The working directory must have a HttpApi.Client project file."); + } + } + + private void CheckFolder(string folder) + { + if (!folder.IsNullOrWhiteSpace() && Path.HasExtension(folder)) + { + throw new CliUsageException("Option folder should be a directory."); + } + } + } +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/GenerateProxyArgs.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/GenerateProxyArgs.cs new file mode 100644 index 0000000000..0f275e7ea9 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/GenerateProxyArgs.cs @@ -0,0 +1,55 @@ +using System.Collections.Generic; +using JetBrains.Annotations; + +namespace Volo.Abp.Cli.ServiceProxying +{ + public class GenerateProxyArgs + { + [NotNull] + public string CommandName { get; } + + [NotNull] + public string WorkDirectory { get; } + + public string Module { get; } + + public string Url { get; } + + public string Output { get; } + + public string Target { get; } + + public string ApiName { get; } + + public string Source { get; } + + public string Folder { get; } + + [NotNull] + public Dictionary ExtraProperties { get; set; } + + public GenerateProxyArgs( + [NotNull] string commandName, + [NotNull] string workDirectory, + string module, + string url, + string output, + string target, + string apiName, + string source, + string folder, + Dictionary extraProperties = null) + { + CommandName = Check.NotNullOrWhiteSpace(commandName, nameof(commandName)); + WorkDirectory = Check.NotNullOrWhiteSpace(workDirectory, nameof(workDirectory)); + Module = module; + Url = url; + Output = output; + Target = target; + ApiName = apiName; + Source = source; + Folder = folder; + ExtraProperties = extraProperties ?? new Dictionary(); + } + } +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/IServiceProxyGenerator.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/IServiceProxyGenerator.cs new file mode 100644 index 0000000000..ada7adf35d --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/IServiceProxyGenerator.cs @@ -0,0 +1,9 @@ +using System.Threading.Tasks; + +namespace Volo.Abp.Cli.ServiceProxying +{ + public interface IServiceProxyGenerator + { + Task GenerateProxyAsync(GenerateProxyArgs args); + } +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/JavaScript/JavaScriptServiceProxyGenerator.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/JavaScript/JavaScriptServiceProxyGenerator.cs new file mode 100644 index 0000000000..17f50a4d80 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/JavaScript/JavaScriptServiceProxyGenerator.cs @@ -0,0 +1,90 @@ +using System; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Volo.Abp.Cli.Commands; +using Volo.Abp.Cli.Http; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.ProxyScripting.Generators.JQuery; +using Volo.Abp.Json; + +namespace Volo.Abp.Cli.ServiceProxying.JavaScript +{ + public class JavaScriptServiceProxyGenerator : ServiceProxyGeneratorBase, ITransientDependency + { + public const string Name = "JS"; + private const string EventTriggerScript = "abp.event.trigger('abp.serviceProxyScriptInitialized');"; + private const string DefaultOutput = "wwwroot/client-proxies"; + + private readonly JQueryProxyScriptGenerator _jQueryProxyScriptGenerator; + + public JavaScriptServiceProxyGenerator( + CliHttpClientFactory cliHttpClientFactory, + IJsonSerializer jsonSerializer, + JQueryProxyScriptGenerator jQueryProxyScriptGenerator) : + base(cliHttpClientFactory, jsonSerializer) + { + _jQueryProxyScriptGenerator = jQueryProxyScriptGenerator; + } + + public override async Task GenerateProxyAsync(GenerateProxyArgs args) + { + CheckWorkDirectory(args.WorkDirectory); + + var output = Path.Combine(args.WorkDirectory, DefaultOutput, $"{args.Module}-proxy.js"); + if (!args.Output.IsNullOrWhiteSpace()) + { + output = args.Output.EndsWith(".js") ? Path.Combine(args.WorkDirectory, args.Output) : Path.Combine(args.WorkDirectory, Path.GetDirectoryName(args.Output), $"{args.Module}-proxy.js"); + } + + if (args.CommandName == RemoveProxyCommand.Name) + { + RemoveProxy(args, output); + return; + } + + var applicationApiDescriptionModel = await GetApplicationApiDescriptionModelAsync(args); + var script = RemoveInitializedEventTrigger(_jQueryProxyScriptGenerator.CreateScript(applicationApiDescriptionModel)); + + Directory.CreateDirectory(Path.GetDirectoryName(output)); + + using (var writer = new StreamWriter(output)) + { + await writer.WriteAsync(script); + } + + Logger.LogInformation($"Create {GetLoggerOutputPath(output, args.WorkDirectory)}"); + } + + private void RemoveProxy(GenerateProxyArgs args, string filePath) + { + if (File.Exists(filePath)) + { + File.Delete(filePath); + } + + Logger.LogInformation($"Delete {GetLoggerOutputPath(filePath, args.WorkDirectory)}"); + } + + private static void CheckWorkDirectory(string directory) + { + if (!Directory.Exists(directory)) + { + throw new CliUsageException("Specified directory does not exist."); + } + + var projectFiles = Directory.GetFiles(directory, "*.csproj"); + if (!projectFiles.Any()) + { + throw new CliUsageException( + "No project file found in the directory. The working directory must have a Web project file."); + } + } + + private static string RemoveInitializedEventTrigger(string script) + { + return script.Replace(EventTriggerScript, string.Empty); + } + } +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/ServiceProxyGeneratorBase.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/ServiceProxyGeneratorBase.cs new file mode 100644 index 0000000000..388ac852d4 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/ServiceProxyGeneratorBase.cs @@ -0,0 +1,56 @@ +using System; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; +using Volo.Abp.Cli.Http; +using Volo.Abp.Http.Modeling; +using Volo.Abp.Json; + +namespace Volo.Abp.Cli.ServiceProxying +{ + public abstract class ServiceProxyGeneratorBase : IServiceProxyGenerator where T: IServiceProxyGenerator + { + public IJsonSerializer JsonSerializer { get; } + + public CliHttpClientFactory CliHttpClientFactory { get; } + + public ILogger Logger { get; set; } + + protected ServiceProxyGeneratorBase(CliHttpClientFactory cliHttpClientFactory, IJsonSerializer jsonSerializer) + { + CliHttpClientFactory = cliHttpClientFactory; + JsonSerializer = jsonSerializer; + Logger = NullLogger.Instance; + } + + public abstract Task GenerateProxyAsync(GenerateProxyArgs args); + + protected virtual async Task GetApplicationApiDescriptionModelAsync(GenerateProxyArgs args) + { + Check.NotNull(args.Url, nameof(args.Url)); + + var client = CliHttpClientFactory.CreateClient(); + + var apiDefinitionResult = await client.GetStringAsync(CliUrls.GetApiDefinitionUrl(args.Url)); + var apiDefinition = JsonSerializer.Deserialize(apiDefinitionResult); + + var moduleDefinition = apiDefinition.Modules.FirstOrDefault(x => string.Equals(x.Key, args.Module, StringComparison.CurrentCultureIgnoreCase)).Value; + if (moduleDefinition == null) + { + throw new CliUsageException($"Module name: {args.Module} is invalid"); + } + + var apiDescriptionModel = ApplicationApiDescriptionModel.Create(); + apiDescriptionModel.AddModule(moduleDefinition); + + return apiDescriptionModel; + } + + protected string GetLoggerOutputPath(string path, string workDirectory) + { + return path.Replace(workDirectory, string.Empty).TrimStart(Path.DirectorySeparatorChar); + } + } +} diff --git a/framework/src/Volo.Abp.Http.Client/Microsoft/Extensions/DependencyInjection/ServiceCollectionDynamicHttpClientProxyExtensions.cs b/framework/src/Volo.Abp.Http.Client/Microsoft/Extensions/DependencyInjection/ServiceCollectionHttpClientProxyExtensions.cs similarity index 79% rename from framework/src/Volo.Abp.Http.Client/Microsoft/Extensions/DependencyInjection/ServiceCollectionDynamicHttpClientProxyExtensions.cs rename to framework/src/Volo.Abp.Http.Client/Microsoft/Extensions/DependencyInjection/ServiceCollectionHttpClientProxyExtensions.cs index 84b58d6ee0..e4cc09eef3 100644 --- a/framework/src/Volo.Abp.Http.Client/Microsoft/Extensions/DependencyInjection/ServiceCollectionDynamicHttpClientProxyExtensions.cs +++ b/framework/src/Volo.Abp.Http.Client/Microsoft/Extensions/DependencyInjection/ServiceCollectionHttpClientProxyExtensions.cs @@ -7,14 +7,48 @@ using Volo.Abp; using Volo.Abp.Castle.DynamicProxy; using Volo.Abp.Http.Client; using Volo.Abp.Http.Client.DynamicProxying; +using Volo.Abp.Http.Client.Proxying; using Volo.Abp.Validation; namespace Microsoft.Extensions.DependencyInjection { - public static class ServiceCollectionDynamicHttpClientProxyExtensions + public static class ServiceCollectionHttpClientProxyExtensions { private static readonly ProxyGenerator ProxyGeneratorInstance = new ProxyGenerator(); + /// + /// Registers Static HTTP Client Proxies for all public interfaces + /// extend the interface in the + /// given . + /// + /// Service collection + /// The assembly containing the service interfaces + /// + /// The name of the remote service configuration to be used by the Static HTTP Client proxies. + /// See . + /// + public static IServiceCollection AddStaticHttpClientProxies( + [NotNull] this IServiceCollection services, + [NotNull] Assembly assembly, + [NotNull] string remoteServiceConfigurationName = RemoteServiceConfigurationDictionary.DefaultName) + { + Check.NotNull(services, nameof(assembly)); + + var serviceTypes = assembly.GetTypes().Where(IsSuitableForClientProxying).ToArray(); + + foreach (var serviceType in serviceTypes) + { + AddHttpClientFactory(services, remoteServiceConfigurationName); + + services.Configure(options => + { + options.HttpClientProxies[serviceType] = new HttpClientProxyConfig(serviceType, remoteServiceConfigurationName); + }); + } + + return services; + } + /// /// Registers HTTP Client Proxies for all public interfaces /// extend the interface in the @@ -37,7 +71,7 @@ namespace Microsoft.Extensions.DependencyInjection { Check.NotNull(services, nameof(assembly)); - var serviceTypes = assembly.GetTypes().Where(IsSuitableForDynamicClientProxying).ToArray(); + var serviceTypes = assembly.GetTypes().Where(IsSuitableForClientProxying).ToArray(); foreach (var serviceType in serviceTypes) { @@ -101,7 +135,7 @@ namespace Microsoft.Extensions.DependencyInjection services.Configure(options => { - options.HttpClientProxies[type] = new DynamicHttpClientProxyConfig(type, remoteServiceConfigurationName); + options.HttpClientProxies[type] = new HttpClientProxyConfig(type, remoteServiceConfigurationName); }); var interceptorType = typeof(DynamicHttpProxyInterceptor<>).MakeGenericType(type); @@ -178,12 +212,12 @@ namespace Microsoft.Extensions.DependencyInjection } /// - /// Checks wether the type is suitable to use with the dynamic proxying. + /// Checks wether the type is suitable to use with the proxying. /// Currently the type is checked statically against some fixed conditions. /// /// Type to check - /// True, if the type is suitable for dynamic proxying. Otherwise false. - private static bool IsSuitableForDynamicClientProxying(Type type) + /// True, if the type is suitable for proxying. Otherwise false. + private static bool IsSuitableForClientProxying(Type type) { //TODO: Add option to change type filter diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpHttpClientOptions.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpHttpClientOptions.cs index 2e6cd3798d..cc2e35fa55 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpHttpClientOptions.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpHttpClientOptions.cs @@ -1,16 +1,17 @@ using System; using System.Collections.Generic; using Volo.Abp.Http.Client.DynamicProxying; +using Volo.Abp.Http.Client.Proxying; namespace Volo.Abp.Http.Client { public class AbpHttpClientOptions { - public Dictionary HttpClientProxies { get; set; } + public Dictionary HttpClientProxies { get; set; } public AbpHttpClientOptions() { - HttpClientProxies = new Dictionary(); + HttpClientProxies = new Dictionary(); } } } diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyApiDescriptionFinder.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyApiDescriptionFinder.cs new file mode 100644 index 0000000000..5e283e7b5e --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyApiDescriptionFinder.cs @@ -0,0 +1,107 @@ +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Extensions.FileProviders; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Modeling; +using Volo.Abp.Json; +using Volo.Abp.VirtualFileSystem; + +namespace Volo.Abp.Http.Client.ClientProxying +{ + public class ClientProxyApiDescriptionFinder : IClientProxyApiDescriptionFinder, ISingletonDependency + { + protected IVirtualFileProvider VirtualFileProvider { get; } + protected IJsonSerializer JsonSerializer { get; } + protected Dictionary ActionApiDescriptionModels { get; } + protected ApplicationApiDescriptionModel ApplicationApiDescriptionModel { get; set; } + + public ClientProxyApiDescriptionFinder( + IVirtualFileProvider virtualFileProvider, + IJsonSerializer jsonSerializer) + { + VirtualFileProvider = virtualFileProvider; + JsonSerializer = jsonSerializer; + ActionApiDescriptionModels = new Dictionary(); + + Initialize(); + } + + public ActionApiDescriptionModel FindAction(string methodName) + { + return ActionApiDescriptionModels.ContainsKey(methodName) ? ActionApiDescriptionModels[methodName] : null; + } + + public ApplicationApiDescriptionModel GetApiDescription() + { + return ApplicationApiDescriptionModel; + } + + private void Initialize() + { + ApplicationApiDescriptionModel = GetApplicationApiDescriptionModel(); + var controllers = ApplicationApiDescriptionModel.Modules.Select(x=>x.Value).SelectMany(x => x.Controllers.Values).ToList(); + + foreach (var controller in controllers.Where(x => x.Interfaces.Any())) + { + var appServiceType = controller.Interfaces.Last().Type; + + foreach (var actionItem in controller.Actions.Values) + { + var actionKey = $"{appServiceType}.{actionItem.Name}.{string.Join("-", actionItem.ParametersOnMethod.Select(x => x.Type))}"; + + if (!ActionApiDescriptionModels.ContainsKey(actionKey)) + { + ActionApiDescriptionModels.Add(actionKey, actionItem); + } + } + } + } + + private ApplicationApiDescriptionModel GetApplicationApiDescriptionModel() + { + var applicationApiDescription = ApplicationApiDescriptionModel.Create(); + var fileInfoList = new List(); + GetGenerateProxyFileInfos(fileInfoList); + + foreach (var fileInfo in fileInfoList) + { + using (var streamReader = new StreamReader(fileInfo.CreateReadStream())) + { + var content = streamReader.ReadToEnd(); + + var subApplicationApiDescription = JsonSerializer.Deserialize(content); + + foreach (var module in subApplicationApiDescription.Modules) + { + if (!applicationApiDescription.Modules.ContainsKey(module.Key)) + { + applicationApiDescription.AddModule(module.Value); + } + } + } + } + + return applicationApiDescription; + } + + private void GetGenerateProxyFileInfos(List fileInfoList, string path = "") + { + foreach (var directoryContent in VirtualFileProvider.GetDirectoryContents(path)) + { + if (directoryContent.IsDirectory) + { + GetGenerateProxyFileInfos(fileInfoList, directoryContent.PhysicalPath); + } + else + { + if (directoryContent.Name.EndsWith("generate-proxy.json")) + { + fileInfoList.Add(VirtualFileProvider.GetFileInfo(directoryContent.GetVirtualOrPhysicalPathOrNull())); + } + } + } + } + } +} diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyBase.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyBase.cs new file mode 100644 index 0000000000..33a1906114 --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyBase.cs @@ -0,0 +1,52 @@ +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.Proxying; +using Volo.Abp.Http.Modeling; + +namespace Volo.Abp.Http.Client.ClientProxying +{ + public class ClientProxyBase : ITransientDependency + { + public IAbpLazyServiceProvider LazyServiceProvider { get; set; } + + protected IHttpProxyExecuter HttpProxyExecuter => LazyServiceProvider.LazyGetRequiredService(); + protected IClientProxyApiDescriptionFinder ClientProxyApiDescriptionFinder => LazyServiceProvider.LazyGetRequiredService(); + + protected virtual async Task RequestAsync(string methodName, params object[] arguments) + { + await HttpProxyExecuter.MakeRequestAsync(BuildHttpProxyExecuterContext(methodName, arguments)); + } + + protected virtual async Task RequestAsync(string methodName, params object[] arguments) + { + return await HttpProxyExecuter.MakeRequestAndGetResultAsync(BuildHttpProxyExecuterContext(methodName, arguments)); + } + + protected virtual HttpProxyExecuterContext BuildHttpProxyExecuterContext(string methodName, params object[] arguments) + { + var actionKey = GetActionKey(methodName, arguments); + var action = ClientProxyApiDescriptionFinder.FindAction(actionKey); + return new HttpProxyExecuterContext(action, BuildArguments(action, arguments), typeof(TService)); + } + + protected virtual Dictionary BuildArguments(ActionApiDescriptionModel action, object[] arguments) + { + var parameters = action.Parameters.GroupBy(x => x.NameOnMethod).Select(x => x.Key).ToList(); + var dict = new Dictionary(); + + for (var i = 0; i < parameters.Count; i++) + { + dict[parameters[i]] = arguments[i]; + } + + return dict; + } + + private static string GetActionKey(string methodName, params object[] arguments) + { + return $"{typeof(TService).FullName}.{methodName}.{string.Join("-", arguments.Select(x => x.GetType().FullName))}"; + } + } +} diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/IClientProxyApiDescriptionFinder.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/IClientProxyApiDescriptionFinder.cs new file mode 100644 index 0000000000..cffcd6f2da --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/IClientProxyApiDescriptionFinder.cs @@ -0,0 +1,11 @@ +using Volo.Abp.Http.Modeling; + +namespace Volo.Abp.Http.Client.ClientProxying +{ + public interface IClientProxyApiDescriptionFinder + { + ActionApiDescriptionModel FindAction(string methodName); + + ApplicationApiDescriptionModel GetApiDescription(); + } +} diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptor.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptor.cs index b1763d8825..68eb146201 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptor.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptor.cs @@ -1,26 +1,15 @@ using System; using System.Collections.Generic; -using System.Globalization; using System.Linq; -using System.Net.Http; -using System.Net.Http.Headers; using System.Reflection; -using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; -using Microsoft.Extensions.Primitives; -using Volo.Abp.Content; using Volo.Abp.DependencyInjection; using Volo.Abp.DynamicProxy; -using Volo.Abp.Http.Client.Authentication; +using Volo.Abp.Http.Client.Proxying; using Volo.Abp.Http.Modeling; -using Volo.Abp.Http.ProxyScripting.Generators; -using Volo.Abp.Json; -using Volo.Abp.MultiTenancy; -using Volo.Abp.Threading; -using Volo.Abp.Tracing; namespace Volo.Abp.Http.Client.DynamicProxying { @@ -29,63 +18,54 @@ namespace Volo.Abp.Http.Client.DynamicProxying // ReSharper disable once StaticMemberInGenericType protected static MethodInfo MakeRequestAndGetResultAsyncMethod { get; } - protected ICancellationTokenProvider CancellationTokenProvider { get; } - protected ICorrelationIdProvider CorrelationIdProvider { get; } - protected ICurrentTenant CurrentTenant { get; } - protected AbpCorrelationIdOptions AbpCorrelationIdOptions { get; } - protected IDynamicProxyHttpClientFactory HttpClientFactory { get; } - protected IApiDescriptionFinder ApiDescriptionFinder { get; } - protected IRemoteServiceConfigurationProvider RemoteServiceConfigurationProvider { get; } protected AbpHttpClientOptions ClientOptions { get; } - protected IJsonSerializer JsonSerializer { get; } - protected IRemoteServiceHttpClientAuthenticator ClientAuthenticator { get; } + protected IHttpProxyExecuter HttpProxyExecuter { get; } + protected IProxyHttpClientFactory HttpClientFactory { get; } + protected IRemoteServiceConfigurationProvider RemoteServiceConfigurationProvider { get; } + protected IApiDescriptionFinder ApiDescriptionFinder { get; } public ILogger> Logger { get; set; } static DynamicHttpProxyInterceptor() { - MakeRequestAndGetResultAsyncMethod = typeof(DynamicHttpProxyInterceptor) - .GetMethods(BindingFlags.NonPublic | BindingFlags.Instance) - .First(m => m.Name == nameof(MakeRequestAndGetResultAsync) && m.IsGenericMethodDefinition); + MakeRequestAndGetResultAsyncMethod = typeof(HttpProxyExecuter) + .GetMethods(BindingFlags.Public | BindingFlags.Instance) + .First(m => m.Name == nameof(IHttpProxyExecuter.MakeRequestAndGetResultAsync) && m.IsGenericMethodDefinition); } public DynamicHttpProxyInterceptor( - IDynamicProxyHttpClientFactory httpClientFactory, + IHttpProxyExecuter httpProxyExecuter, IOptions clientOptions, - IApiDescriptionFinder apiDescriptionFinder, - IJsonSerializer jsonSerializer, - IRemoteServiceHttpClientAuthenticator clientAuthenticator, - ICancellationTokenProvider cancellationTokenProvider, - ICorrelationIdProvider correlationIdProvider, - IOptions correlationIdOptions, - ICurrentTenant currentTenant, - IRemoteServiceConfigurationProvider remoteServiceConfigurationProvider) + IProxyHttpClientFactory httpClientFactory, + IRemoteServiceConfigurationProvider remoteServiceConfigurationProvider, + IApiDescriptionFinder apiDescriptionFinder) { - CancellationTokenProvider = cancellationTokenProvider; - CorrelationIdProvider = correlationIdProvider; - CurrentTenant = currentTenant; - RemoteServiceConfigurationProvider = remoteServiceConfigurationProvider; - AbpCorrelationIdOptions = correlationIdOptions.Value; + HttpProxyExecuter = httpProxyExecuter; HttpClientFactory = httpClientFactory; + RemoteServiceConfigurationProvider = remoteServiceConfigurationProvider; ApiDescriptionFinder = apiDescriptionFinder; - JsonSerializer = jsonSerializer; - ClientAuthenticator = clientAuthenticator; ClientOptions = clientOptions.Value; Logger = NullLogger>.Instance; } + public override async Task InterceptAsync(IAbpMethodInvocation invocation) { + var context = new HttpProxyExecuterContext( + await GetActionApiDescriptionModel(invocation), + invocation.ArgumentsDictionary, + typeof(TService)); + if (invocation.Method.ReturnType.GenericTypeArguments.IsNullOrEmpty()) { - await MakeRequestAsync(invocation); + await HttpProxyExecuter.MakeRequestAsync(context); } else { var result = (Task)MakeRequestAndGetResultAsyncMethod .MakeGenericMethod(invocation.Method.ReturnType.GenericTypeArguments[0]) - .Invoke(this, new object[] { invocation }); + .Invoke(HttpProxyExecuter, new object[] { context }); invocation.ReturnValue = await GetResultAsync( result, @@ -94,230 +74,27 @@ namespace Volo.Abp.Http.Client.DynamicProxying } } - private async Task GetResultAsync(Task task, Type resultType) - { - await task; - return typeof(Task<>) - .MakeGenericType(resultType) - .GetProperty(nameof(Task.Result), BindingFlags.Instance | BindingFlags.Public) - .GetValue(task); - } - - private async Task MakeRequestAndGetResultAsync(IAbpMethodInvocation invocation) - { - var responseContent = await MakeRequestAsync(invocation); - - if (typeof(T) == typeof(IRemoteStreamContent) || - typeof(T) == typeof(RemoteStreamContent)) - { - /* returning a class that holds a reference to response - * content just to be sure that GC does not dispose of - * it before we finish doing our work with the stream */ - return (T) (object) new RemoteStreamContent( - await responseContent.ReadAsStreamAsync(), - responseContent.Headers?.ContentDisposition?.FileNameStar ?? RemoveQuotes(responseContent.Headers?.ContentDisposition?.FileName).ToString(), - responseContent.Headers?.ContentType?.ToString(), - responseContent.Headers?.ContentLength); - } - - var stringContent = await responseContent.ReadAsStringAsync(); - if (typeof(T) == typeof(string)) - { - return (T)(object)stringContent; - } - - if (stringContent.IsNullOrWhiteSpace()) - { - return default; - } - - return JsonSerializer.Deserialize(stringContent); - } - - private async Task MakeRequestAsync(IAbpMethodInvocation invocation) + private async Task GetActionApiDescriptionModel(IAbpMethodInvocation invocation) { var clientConfig = ClientOptions.HttpClientProxies.GetOrDefault(typeof(TService)) ?? throw new AbpException($"Could not get DynamicHttpClientProxyConfig for {typeof(TService).FullName}."); var remoteServiceConfig = await RemoteServiceConfigurationProvider.GetConfigurationOrDefaultAsync(clientConfig.RemoteServiceName); - var client = HttpClientFactory.Create(clientConfig.RemoteServiceName); - var action = await ApiDescriptionFinder.FindActionAsync( + return await ApiDescriptionFinder.FindActionAsync( client, remoteServiceConfig.BaseUrl, typeof(TService), invocation.Method ); - - var apiVersion = await GetApiVersionInfoAsync(action); - var url = remoteServiceConfig.BaseUrl.EnsureEndsWith('/') + UrlBuilder.GenerateUrlWithParameters(action, invocation.ArgumentsDictionary, apiVersion); - - var requestMessage = new HttpRequestMessage(action.GetHttpMethod(), url) - { - Content = RequestPayloadBuilder.BuildContent(action, invocation.ArgumentsDictionary, JsonSerializer, apiVersion) - }; - - AddHeaders(invocation, action, requestMessage, apiVersion); - - if (action.AllowAnonymous != true) - { - await ClientAuthenticator.Authenticate( - new RemoteServiceHttpClientAuthenticateContext( - client, - requestMessage, - remoteServiceConfig, - clientConfig.RemoteServiceName - ) - ); - } - - var response = await client.SendAsync( - requestMessage, - HttpCompletionOption.ResponseHeadersRead /*this will buffer only the headers, the content will be used as a stream*/, - GetCancellationToken(invocation) - ); - - if (!response.IsSuccessStatusCode) - { - await ThrowExceptionForResponseAsync(response); - } - - return response.Content; - } - - private async Task GetApiVersionInfoAsync(ActionApiDescriptionModel action) - { - var apiVersion = await FindBestApiVersionAsync(action); - - //TODO: Make names configurable? - var versionParam = action.Parameters.FirstOrDefault(p => p.Name == "apiVersion" && p.BindingSourceId == ParameterBindingSources.Path) ?? - action.Parameters.FirstOrDefault(p => p.Name == "api-version" && p.BindingSourceId == ParameterBindingSources.Query); - - return new ApiVersionInfo(versionParam?.BindingSourceId, apiVersion); - } - - private async Task FindBestApiVersionAsync(ActionApiDescriptionModel action) - { - var configuredVersion = await GetConfiguredApiVersionAsync(); - - if (action.SupportedVersions.IsNullOrEmpty()) - { - return configuredVersion ?? "1.0"; - } - - if (action.SupportedVersions.Contains(configuredVersion)) - { - return configuredVersion; - } - - return action.SupportedVersions.Last(); //TODO: Ensure to get the latest version! - } - - protected virtual void AddHeaders( - IAbpMethodInvocation invocation, - ActionApiDescriptionModel action, - HttpRequestMessage requestMessage, - ApiVersionInfo apiVersion) - { - //API Version - if (!apiVersion.Version.IsNullOrEmpty()) - { - //TODO: What about other media types? - requestMessage.Headers.Add("accept", $"{MimeTypes.Text.Plain}; v={apiVersion.Version}"); - requestMessage.Headers.Add("accept", $"{MimeTypes.Application.Json}; v={apiVersion.Version}"); - requestMessage.Headers.Add("api-version", apiVersion.Version); - } - - //Header parameters - var headers = action.Parameters.Where(p => p.BindingSourceId == ParameterBindingSources.Header).ToArray(); - foreach (var headerParameter in headers) - { - var value = HttpActionParameterHelper.FindParameterValue(invocation.ArgumentsDictionary, headerParameter); - if (value != null) - { - requestMessage.Headers.Add(headerParameter.Name, value.ToString()); - } - } - - //CorrelationId - requestMessage.Headers.Add(AbpCorrelationIdOptions.HttpHeaderName, CorrelationIdProvider.Get()); - - //TenantId - if (CurrentTenant.Id.HasValue) - { - //TODO: Use AbpAspNetCoreMultiTenancyOptions to get the key - requestMessage.Headers.Add(TenantResolverConsts.DefaultTenantKey, CurrentTenant.Id.Value.ToString()); - } - - //Culture - //TODO: Is that the way we want? Couldn't send the culture (not ui culture) - var currentCulture = CultureInfo.CurrentUICulture.Name ?? CultureInfo.CurrentCulture.Name; - if (!currentCulture.IsNullOrEmpty()) - { - requestMessage.Headers.AcceptLanguage.Add(new StringWithQualityHeaderValue(currentCulture)); - } - - //X-Requested-With - requestMessage.Headers.Add("X-Requested-With", "XMLHttpRequest"); - } - - private async Task GetConfiguredApiVersionAsync() - { - var clientConfig = ClientOptions.HttpClientProxies.GetOrDefault(typeof(TService)) - ?? throw new AbpException($"Could not get DynamicHttpClientProxyConfig for {typeof(TService).FullName}."); - - return (await RemoteServiceConfigurationProvider - .GetConfigurationOrDefaultOrNullAsync(clientConfig.RemoteServiceName))?.Version; - } - - private async Task ThrowExceptionForResponseAsync(HttpResponseMessage response) - { - if (response.Headers.Contains(AbpHttpConsts.AbpErrorFormat)) - { - var errorResponse = JsonSerializer.Deserialize( - await response.Content.ReadAsStringAsync() - ); - - throw new AbpRemoteCallException(errorResponse.Error) - { - HttpStatusCode = (int) response.StatusCode - }; - } - - throw new AbpRemoteCallException( - new RemoteServiceErrorInfo - { - Message = response.ReasonPhrase, - Code = response.StatusCode.ToString() - } - ) - { - HttpStatusCode = (int) response.StatusCode - }; - } - - protected virtual StringSegment RemoveQuotes(StringSegment input) - { - if (!StringSegment.IsNullOrEmpty(input) && input.Length >= 2 && input[0] == '"' && input[input.Length - 1] == '"') - { - input = input.Subsegment(1, input.Length - 2); - } - - return input; } - protected virtual CancellationToken GetCancellationToken(IAbpMethodInvocation invocation) + private async Task GetResultAsync(Task task, Type resultType) { - var cancellationTokenArg = invocation.Arguments.LastOrDefault(x => x is CancellationToken); - if (cancellationTokenArg != null) - { - var cancellationToken = (CancellationToken) cancellationTokenArg; - if (cancellationToken != default) - { - return cancellationToken; - } - } - - return CancellationTokenProvider.Token; + await task; + return typeof(Task<>) + .MakeGenericType(resultType) + .GetProperty(nameof(Task.Result), BindingFlags.Instance | BindingFlags.Public) + .GetValue(task); } } } diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiVersionInfo.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/ApiVersionInfo.cs similarity index 91% rename from framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiVersionInfo.cs rename to framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/ApiVersionInfo.cs index 88035cf94b..d37de5d452 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiVersionInfo.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/ApiVersionInfo.cs @@ -1,6 +1,6 @@ using System; -namespace Volo.Abp.Http.Client.DynamicProxying +namespace Volo.Abp.Http.Client.Proxying { public class ApiVersionInfo //TODO: Rename to not conflict with api versioning apis { @@ -19,4 +19,4 @@ namespace Volo.Abp.Http.Client.DynamicProxying return !BindingSource.IsIn("Path"); } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DefaultDynamicProxyHttpClientFactory.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/DefaultProxyHttpClientFactory.cs similarity index 52% rename from framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DefaultDynamicProxyHttpClientFactory.cs rename to framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/DefaultProxyHttpClientFactory.cs index e4aad53a11..0f2a272fa6 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DefaultDynamicProxyHttpClientFactory.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/DefaultProxyHttpClientFactory.cs @@ -1,25 +1,25 @@ using System.Net.Http; using Volo.Abp.DependencyInjection; -namespace Volo.Abp.Http.Client.DynamicProxying +namespace Volo.Abp.Http.Client.Proxying { - public class DefaultDynamicProxyHttpClientFactory : IDynamicProxyHttpClientFactory, ITransientDependency + public class DefaultProxyHttpClientFactory : IProxyHttpClientFactory, ITransientDependency { private readonly IHttpClientFactory _httpClientFactory; - public DefaultDynamicProxyHttpClientFactory(IHttpClientFactory httpClientFactory) + public DefaultProxyHttpClientFactory(IHttpClientFactory httpClientFactory) { _httpClientFactory = httpClientFactory; } - public HttpClient Create() + public HttpClient Create() { return _httpClientFactory.CreateClient(); } - public HttpClient Create(string name) + public HttpClient Create(string name) { return _httpClientFactory.CreateClient(name); } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/HttpActionParameterHelper.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpActionParameterHelper.cs similarity index 93% rename from framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/HttpActionParameterHelper.cs rename to framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpActionParameterHelper.cs index 36c3171dc2..1327f4cbe1 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/HttpActionParameterHelper.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpActionParameterHelper.cs @@ -2,7 +2,7 @@ using Volo.Abp.Http.Modeling; using Volo.Abp.Reflection; -namespace Volo.Abp.Http.Client.DynamicProxying +namespace Volo.Abp.Http.Client.Proxying { internal static class HttpActionParameterHelper { diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpClientProxyConfig.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpClientProxyConfig.cs similarity index 54% rename from framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpClientProxyConfig.cs rename to framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpClientProxyConfig.cs index a287c3dd0f..a457ab3797 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpClientProxyConfig.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpClientProxyConfig.cs @@ -1,17 +1,17 @@ using System; -namespace Volo.Abp.Http.Client.DynamicProxying +namespace Volo.Abp.Http.Client.Proxying { - public class DynamicHttpClientProxyConfig + public class HttpClientProxyConfig { public Type Type { get; } public string RemoteServiceName { get; } - public DynamicHttpClientProxyConfig(Type type, string remoteServiceName) + public HttpClientProxyConfig(Type type, string remoteServiceName) { Type = type; RemoteServiceName = remoteServiceName; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpProxyExecuter.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpProxyExecuter.cs new file mode 100644 index 0000000000..6fe5376f2d --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpProxyExecuter.cs @@ -0,0 +1,267 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Options; +using Microsoft.Extensions.Primitives; +using Volo.Abp.Content; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.Authentication; +using Volo.Abp.Http.Modeling; +using Volo.Abp.Http.ProxyScripting.Generators; +using Volo.Abp.Json; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Threading; +using Volo.Abp.Tracing; + +namespace Volo.Abp.Http.Client.Proxying +{ + public class HttpProxyExecuter : IHttpProxyExecuter, ITransientDependency + { + protected ICancellationTokenProvider CancellationTokenProvider { get; } + protected ICorrelationIdProvider CorrelationIdProvider { get; } + protected ICurrentTenant CurrentTenant { get; } + protected AbpCorrelationIdOptions AbpCorrelationIdOptions { get; } + protected IProxyHttpClientFactory HttpClientFactory { get; } + protected IRemoteServiceConfigurationProvider RemoteServiceConfigurationProvider { get; } + protected AbpHttpClientOptions ClientOptions { get; } + protected IJsonSerializer JsonSerializer { get; } + protected IRemoteServiceHttpClientAuthenticator ClientAuthenticator { get; } + + public HttpProxyExecuter( + ICancellationTokenProvider cancellationTokenProvider, + ICorrelationIdProvider correlationIdProvider, + ICurrentTenant currentTenant, + IOptions abpCorrelationIdOptions, + IProxyHttpClientFactory httpClientFactory, + IRemoteServiceConfigurationProvider remoteServiceConfigurationProvider, + IOptions clientOptions, + IRemoteServiceHttpClientAuthenticator clientAuthenticator, + IJsonSerializer jsonSerializer) + { + CancellationTokenProvider = cancellationTokenProvider; + CorrelationIdProvider = correlationIdProvider; + CurrentTenant = currentTenant; + AbpCorrelationIdOptions = abpCorrelationIdOptions.Value; + HttpClientFactory = httpClientFactory; + RemoteServiceConfigurationProvider = remoteServiceConfigurationProvider; + ClientOptions = clientOptions.Value; + ClientAuthenticator = clientAuthenticator; + JsonSerializer = jsonSerializer; + } + + public virtual async Task MakeRequestAndGetResultAsync(HttpProxyExecuterContext context) + { + var responseContent = await MakeRequestAsync(context); + + if (typeof(T) == typeof(IRemoteStreamContent) || + typeof(T) == typeof(RemoteStreamContent)) + { + /* returning a class that holds a reference to response + * content just to be sure that GC does not dispose of + * it before we finish doing our work with the stream */ + return (T) (object) new RemoteStreamContent( + await responseContent.ReadAsStreamAsync(), + responseContent.Headers?.ContentDisposition?.FileNameStar ?? RemoveQuotes(responseContent.Headers?.ContentDisposition?.FileName).ToString(), + responseContent.Headers?.ContentType?.ToString(), + responseContent.Headers?.ContentLength); + } + + var stringContent = await responseContent.ReadAsStringAsync(); + if (typeof(T) == typeof(string)) + { + return (T)(object)stringContent; + } + + if (stringContent.IsNullOrWhiteSpace()) + { + return default; + } + + return JsonSerializer.Deserialize(stringContent); + } + + public virtual async Task MakeRequestAsync(HttpProxyExecuterContext context) + { + var clientConfig = ClientOptions.HttpClientProxies.GetOrDefault(context.ServiceType) ?? throw new AbpException($"Could not get HttpClientProxyConfig for {context.ServiceType.FullName}."); + var remoteServiceConfig = await RemoteServiceConfigurationProvider.GetConfigurationOrDefaultAsync(clientConfig.RemoteServiceName); + + var client = HttpClientFactory.Create(clientConfig.RemoteServiceName); + + var apiVersion = await GetApiVersionInfoAsync(context); + var url = remoteServiceConfig.BaseUrl.EnsureEndsWith('/') + UrlBuilder.GenerateUrlWithParameters(context.Action, context.Arguments, apiVersion); + + var requestMessage = new HttpRequestMessage(context.Action.GetHttpMethod(), url) + { + Content = RequestPayloadBuilder.BuildContent(context.Action, context.Arguments, JsonSerializer, apiVersion) + }; + + AddHeaders(context.Arguments, context.Action, requestMessage, apiVersion); + + if (context.Action.AllowAnonymous != true) + { + await ClientAuthenticator.Authenticate( + new RemoteServiceHttpClientAuthenticateContext( + client, + requestMessage, + remoteServiceConfig, + clientConfig.RemoteServiceName + ) + ); + } + + var response = await client.SendAsync( + requestMessage, + HttpCompletionOption.ResponseHeadersRead /*this will buffer only the headers, the content will be used as a stream*/, + GetCancellationToken(context.Arguments) + ); + + if (!response.IsSuccessStatusCode) + { + await ThrowExceptionForResponseAsync(response); + } + + return response.Content; + } + + private async Task GetApiVersionInfoAsync(HttpProxyExecuterContext context) + { + var apiVersion = await FindBestApiVersionAsync(context); + + //TODO: Make names configurable? + var versionParam = context.Action.Parameters.FirstOrDefault(p => p.Name == "apiVersion" && p.BindingSourceId == ParameterBindingSources.Path) ?? + context.Action.Parameters.FirstOrDefault(p => p.Name == "api-version" && p.BindingSourceId == ParameterBindingSources.Query); + + return new ApiVersionInfo(versionParam?.BindingSourceId, apiVersion); + } + + private async Task FindBestApiVersionAsync(HttpProxyExecuterContext context) + { + var configuredVersion = await GetConfiguredApiVersionAsync(context); + + if (context.Action.SupportedVersions.IsNullOrEmpty()) + { + return configuredVersion ?? "1.0"; + } + + if (context.Action.SupportedVersions.Contains(configuredVersion)) + { + return configuredVersion; + } + + return context.Action.SupportedVersions.Last(); //TODO: Ensure to get the latest version! + } + + private async Task GetConfiguredApiVersionAsync(HttpProxyExecuterContext context) + { + var clientConfig = ClientOptions.HttpClientProxies.GetOrDefault(context.ServiceType) + ?? throw new AbpException($"Could not get DynamicHttpClientProxyConfig for {context.ServiceType.FullName}."); + + return (await RemoteServiceConfigurationProvider + .GetConfigurationOrDefaultOrNullAsync(clientConfig.RemoteServiceName))?.Version; + } + + private async Task ThrowExceptionForResponseAsync(HttpResponseMessage response) + { + if (response.Headers.Contains(AbpHttpConsts.AbpErrorFormat)) + { + var errorResponse = JsonSerializer.Deserialize( + await response.Content.ReadAsStringAsync() + ); + + throw new AbpRemoteCallException(errorResponse.Error) + { + HttpStatusCode = (int) response.StatusCode + }; + } + + throw new AbpRemoteCallException( + new RemoteServiceErrorInfo + { + Message = response.ReasonPhrase, + Code = response.StatusCode.ToString() + } + ) + { + HttpStatusCode = (int) response.StatusCode + }; + } + + protected virtual void AddHeaders( + IReadOnlyDictionary argumentsDictionary, + ActionApiDescriptionModel action, + HttpRequestMessage requestMessage, + ApiVersionInfo apiVersion) + { + //API Version + if (!apiVersion.Version.IsNullOrEmpty()) + { + //TODO: What about other media types? + requestMessage.Headers.Add("accept", $"{MimeTypes.Text.Plain}; v={apiVersion.Version}"); + requestMessage.Headers.Add("accept", $"{MimeTypes.Application.Json}; v={apiVersion.Version}"); + requestMessage.Headers.Add("api-version", apiVersion.Version); + } + + //Header parameters + var headers = action.Parameters.Where(p => p.BindingSourceId == ParameterBindingSources.Header).ToArray(); + foreach (var headerParameter in headers) + { + var value = HttpActionParameterHelper.FindParameterValue(argumentsDictionary, headerParameter); + if (value != null) + { + requestMessage.Headers.Add(headerParameter.Name, value.ToString()); + } + } + + //CorrelationId + requestMessage.Headers.Add(AbpCorrelationIdOptions.HttpHeaderName, CorrelationIdProvider.Get()); + + //TenantId + if (CurrentTenant.Id.HasValue) + { + //TODO: Use AbpAspNetCoreMultiTenancyOptions to get the key + requestMessage.Headers.Add(TenantResolverConsts.DefaultTenantKey, CurrentTenant.Id.Value.ToString()); + } + + //Culture + //TODO: Is that the way we want? Couldn't send the culture (not ui culture) + var currentCulture = CultureInfo.CurrentUICulture.Name ?? CultureInfo.CurrentCulture.Name; + if (!currentCulture.IsNullOrEmpty()) + { + requestMessage.Headers.AcceptLanguage.Add(new StringWithQualityHeaderValue(currentCulture)); + } + + //X-Requested-With + requestMessage.Headers.Add("X-Requested-With", "XMLHttpRequest"); + } + + protected virtual StringSegment RemoveQuotes(StringSegment input) + { + if (!StringSegment.IsNullOrEmpty(input) && input.Length >= 2 && input[0] == '"' && input[input.Length - 1] == '"') + { + input = input.Subsegment(1, input.Length - 2); + } + + return input; + } + + protected virtual CancellationToken GetCancellationToken(IReadOnlyDictionary arguments) + { + var cancellationTokenArg = arguments.LastOrDefault(); + + if (cancellationTokenArg.Value is CancellationToken cancellationToken) + { + if (cancellationToken != default) + { + return cancellationToken; + } + } + + return CancellationTokenProvider.Token; + } + } +} diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpProxyExecuterContext.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpProxyExecuterContext.cs new file mode 100644 index 0000000000..e61b2af93a --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpProxyExecuterContext.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using JetBrains.Annotations; +using Volo.Abp.Http.Modeling; + +namespace Volo.Abp.Http.Client.Proxying +{ + public class HttpProxyExecuterContext + { + [NotNull] + public ActionApiDescriptionModel Action { get; } + + [NotNull] + public IReadOnlyDictionary Arguments { get; } + + [NotNull] + public Type ServiceType { get; } + + public HttpProxyExecuterContext( + [NotNull] ActionApiDescriptionModel action, + [NotNull] IReadOnlyDictionary arguments, + [NotNull] Type serviceType) + { + ServiceType = serviceType; + Action = Check.NotNull(action, nameof(action)); + Arguments = Check.NotNull(arguments, nameof(arguments)); + ServiceType = Check.NotNull(serviceType, nameof(serviceType)); + } + } +} diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/IHttpProxyExecuter.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/IHttpProxyExecuter.cs new file mode 100644 index 0000000000..a7f48f14fe --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/IHttpProxyExecuter.cs @@ -0,0 +1,12 @@ +using System.Net.Http; +using System.Threading.Tasks; + +namespace Volo.Abp.Http.Client.Proxying +{ + public interface IHttpProxyExecuter + { + Task MakeRequestAsync(HttpProxyExecuterContext context); + + Task MakeRequestAndGetResultAsync(HttpProxyExecuterContext context); + } +} diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/IDynamicProxyHttpClientFactory.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/IProxyHttpClientFactory.cs similarity index 52% rename from framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/IDynamicProxyHttpClientFactory.cs rename to framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/IProxyHttpClientFactory.cs index 1cc90672a1..c852e00bcf 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/IDynamicProxyHttpClientFactory.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/IProxyHttpClientFactory.cs @@ -1,11 +1,11 @@ using System.Net.Http; -namespace Volo.Abp.Http.Client.DynamicProxying +namespace Volo.Abp.Http.Client.Proxying { - public interface IDynamicProxyHttpClientFactory + public interface IProxyHttpClientFactory { HttpClient Create(); HttpClient Create(string name); } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/RequestPayloadBuilder.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/RequestPayloadBuilder.cs similarity index 98% rename from framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/RequestPayloadBuilder.cs rename to framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/RequestPayloadBuilder.cs index d83b319b28..583798f43f 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/RequestPayloadBuilder.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/RequestPayloadBuilder.cs @@ -6,11 +6,12 @@ using System.Net.Http.Headers; using System.Text; using JetBrains.Annotations; using Volo.Abp.Content; +using Volo.Abp.Http.Client.DynamicProxying; using Volo.Abp.Http.Modeling; using Volo.Abp.Http.ProxyScripting.Generators; using Volo.Abp.Json; -namespace Volo.Abp.Http.Client.DynamicProxying +namespace Volo.Abp.Http.Client.Proxying { public static class RequestPayloadBuilder { diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/UrlBuilder.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/UrlBuilder.cs similarity index 98% rename from framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/UrlBuilder.cs rename to framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/UrlBuilder.cs index 2a990c70d6..5f916fdd88 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/UrlBuilder.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/UrlBuilder.cs @@ -5,11 +5,12 @@ using System.Globalization; using System.Linq; using System.Text; using JetBrains.Annotations; +using Volo.Abp.Http.Client.DynamicProxying; using Volo.Abp.Http.Modeling; using Volo.Abp.Http.ProxyScripting.Generators; using Volo.Abp.Localization; -namespace Volo.Abp.Http.Client.DynamicProxying +namespace Volo.Abp.Http.Client.Proxying { internal static class UrlBuilder { diff --git a/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ActionApiDescriptionModel.cs b/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ActionApiDescriptionModel.cs index 2901161259..c23f722c30 100644 --- a/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ActionApiDescriptionModel.cs +++ b/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ActionApiDescriptionModel.cs @@ -28,12 +28,14 @@ namespace Volo.Abp.Http.Modeling public bool? AllowAnonymous { get; set; } + public string ImplementFrom { get; set; } + public ActionApiDescriptionModel() { } - public static ActionApiDescriptionModel Create([NotNull] string uniqueName, [NotNull] MethodInfo method, [NotNull] string url, [CanBeNull] string httpMethod, [NotNull] IList supportedVersions, bool? allowAnonymous = null) + public static ActionApiDescriptionModel Create([NotNull] string uniqueName, [NotNull] MethodInfo method, [NotNull] string url, [CanBeNull] string httpMethod, [NotNull] IList supportedVersions, bool? allowAnonymous = null, string implementFrom = null) { Check.NotNull(uniqueName, nameof(uniqueName)); Check.NotNull(method, nameof(method)); @@ -53,7 +55,8 @@ namespace Volo.Abp.Http.Modeling .Select(MethodParameterApiDescriptionModel.Create) .ToList(), SupportedVersions = supportedVersions, - AllowAnonymous = allowAnonymous + AllowAnonymous = allowAnonymous, + ImplementFrom = implementFrom }; } diff --git a/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ControllerApiDescriptionModel.cs b/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ControllerApiDescriptionModel.cs index 3c4b1ee538..66e9cb88e2 100644 --- a/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ControllerApiDescriptionModel.cs +++ b/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ControllerApiDescriptionModel.cs @@ -10,6 +10,8 @@ namespace Volo.Abp.Http.Modeling { public string ControllerName { get; set; } + public string ControllerGroupName { get; set; } + public string Type { get; set; } public List Interfaces { get; set; } @@ -21,11 +23,12 @@ namespace Volo.Abp.Http.Modeling } - public static ControllerApiDescriptionModel Create(string controllerName, Type type, [CanBeNull] HashSet ignoredInterfaces = null) + public static ControllerApiDescriptionModel Create(string controllerName, string groupName, Type type, [CanBeNull] HashSet ignoredInterfaces = null) { return new ControllerApiDescriptionModel { ControllerName = controllerName, + ControllerGroupName = groupName, Type = type.FullName, Actions = new Dictionary(), Interfaces = type diff --git a/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ModuleApiDescriptionModel.cs b/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ModuleApiDescriptionModel.cs index 62365b898b..71c1dcd2d7 100644 --- a/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ModuleApiDescriptionModel.cs +++ b/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ModuleApiDescriptionModel.cs @@ -49,9 +49,9 @@ namespace Volo.Abp.Http.Modeling return Controllers[controller.Type] = controller; } - public ControllerApiDescriptionModel GetOrAddController(string name, Type type, [CanBeNull] HashSet ignoredInterfaces = null) + public ControllerApiDescriptionModel GetOrAddController(string name, string groupName, Type type, [CanBeNull] HashSet ignoredInterfaces = null) { - return Controllers.GetOrAdd(type.FullName, () => ControllerApiDescriptionModel.Create(name, type, ignoredInterfaces)); + return Controllers.GetOrAdd(type.FullName, () => ControllerApiDescriptionModel.Create(name, groupName, type, ignoredInterfaces)); } public ModuleApiDescriptionModel CreateSubModel(string[] controllers, string[] actions) diff --git a/framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/Generators/JQuery/JQueryProxyScriptGenerator.cs b/framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/Generators/JQuery/JQueryProxyScriptGenerator.cs index 8cb92c6766..46a657c4a4 100644 --- a/framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/Generators/JQuery/JQueryProxyScriptGenerator.cs +++ b/framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/Generators/JQuery/JQueryProxyScriptGenerator.cs @@ -208,6 +208,8 @@ namespace Volo.Abp.Http.ProxyScripting.Generators.JQuery .Trim() .RemovePostFix(AppServiceCommonPostfixes) .RemovePostFix("Controller") + .Replace(".ClientProxies", string.Empty) + .RemovePostFix("ClientProxy") ); } diff --git a/framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj b/framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj index d759c14604..39757f8454 100644 --- a/framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj +++ b/framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj @@ -20,6 +20,7 @@ + diff --git a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleModule.cs b/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleModule.cs index c8ee0737c8..9bfdeead10 100644 --- a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleModule.cs +++ b/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleModule.cs @@ -1,12 +1,21 @@ -using Volo.Abp.AspNetCore.Mvc; +using System.Linq; +using Microsoft.AspNetCore.Mvc.ApplicationParts; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; +using Microsoft.Extensions.Options; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.Conventions; +using Volo.Abp.Http.Client; using Volo.Abp.Modularity; +using Volo.Abp.Swashbuckle.Conventions; using Volo.Abp.VirtualFileSystem; namespace Volo.Abp.Swashbuckle { [DependsOn( typeof(AbpVirtualFileSystemModule), - typeof(AbpAspNetCoreMvcModule))] + typeof(AbpAspNetCoreMvcModule), + typeof(AbpHttpClientModule))] public class AbpSwashbuckleModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) @@ -15,6 +24,35 @@ namespace Volo.Abp.Swashbuckle { options.FileSets.AddEmbedded(); }); + + var swaggerConventionOptions = context.Services.ExecutePreConfiguredActions(); + if (swaggerConventionOptions.IsEnabled) + { + context.Services.Replace(ServiceDescriptor.Transient()); + context.Services.AddTransient(); + + var partManager = context.Services.GetSingletonInstance(); + partManager.FeatureProviders.Add(new AbpSwaggerClientProxyControllerFeatureProvider()); + } + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + var swaggerConventionOptions = context.ServiceProvider.GetRequiredService>().Value; + if (swaggerConventionOptions.IsEnabled) + { + var partManager = context.ServiceProvider.GetRequiredService(); + foreach (var moduleAssembly in context + .ServiceProvider + .GetRequiredService() + .Modules + .Select(m => m.Type.Assembly) + .Where(a => a.GetTypes().Any(AbpSwaggerClientProxyHelper.IsClientProxyService)) + .Distinct()) + { + partManager.ApplicationParts.AddIfNotContains(moduleAssembly); + } + } } } } diff --git a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyControllerFeatureProvider.cs b/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyControllerFeatureProvider.cs new file mode 100644 index 0000000000..341f38a7dc --- /dev/null +++ b/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyControllerFeatureProvider.cs @@ -0,0 +1,13 @@ +using System.Reflection; +using Microsoft.AspNetCore.Mvc.Controllers; + +namespace Volo.Abp.Swashbuckle.Conventions +{ + public class AbpSwaggerClientProxyControllerFeatureProvider : ControllerFeatureProvider + { + protected override bool IsController(TypeInfo typeInfo) + { + return AbpSwaggerClientProxyHelper.IsClientProxyService(typeInfo); + } + } +} diff --git a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyHelper.cs b/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyHelper.cs new file mode 100644 index 0000000000..5ec9d59112 --- /dev/null +++ b/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyHelper.cs @@ -0,0 +1,16 @@ +using System; +using System.Linq; +using Volo.Abp.Application.Services; +using Volo.Abp.Http.Client.ClientProxying; + +namespace Volo.Abp.Swashbuckle.Conventions +{ + public static class AbpSwaggerClientProxyHelper + { + public static bool IsClientProxyService(Type type) + { + return typeof(IApplicationService).IsAssignableFrom(type) && + type.GetBaseClasses().Any(x => x.IsGenericType && x.GetGenericTypeDefinition() == typeof(ClientProxyBase<>)); + } + } +} diff --git a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyOptions.cs b/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyOptions.cs new file mode 100644 index 0000000000..81977c3478 --- /dev/null +++ b/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyOptions.cs @@ -0,0 +1,12 @@ +namespace Volo.Abp.Swashbuckle.Conventions +{ + public class AbpSwaggerClientProxyOptions + { + public bool IsEnabled { get; set; } + + public AbpSwaggerClientProxyOptions() + { + IsEnabled = true; + } + } +} diff --git a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyServiceConvention.cs b/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyServiceConvention.cs new file mode 100644 index 0000000000..f7f7ab8974 --- /dev/null +++ b/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyServiceConvention.cs @@ -0,0 +1,249 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.ActionConstraints; +using Microsoft.AspNetCore.Mvc.ApplicationModels; +using Microsoft.Extensions.Options; +using Volo.Abp.Application.Services; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.Conventions; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Abp.Http.Modeling; +using Volo.Abp.Reflection; + +namespace Volo.Abp.Swashbuckle.Conventions +{ + [DisableConventionalRegistration] + public class AbpSwaggerServiceConvention : AbpServiceConvention + { + protected readonly IClientProxyApiDescriptionFinder ClientProxyApiDescriptionFinder; + protected readonly List ActionWithAttributeRoute; + + public AbpSwaggerServiceConvention( + IOptions options, + IConventionalRouteBuilder conventionalRouteBuilder, + IClientProxyApiDescriptionFinder clientProxyApiDescriptionFinder) + : base(options, conventionalRouteBuilder) + { + ClientProxyApiDescriptionFinder = clientProxyApiDescriptionFinder; + ActionWithAttributeRoute = new List(); + } + + protected override IList GetControllers(ApplicationModel application) + { + return application.Controllers.Where(c => !AbpSwaggerClientProxyHelper.IsClientProxyService(c.ControllerType)).ToList(); + } + + protected virtual IList GetClientProxyControllers(ApplicationModel application) + { + return application.Controllers.Where(c => AbpSwaggerClientProxyHelper.IsClientProxyService(c.ControllerType)).ToList(); + } + + protected override void ApplyForControllers(ApplicationModel application) + { + base.ApplyForControllers(application); + + foreach (var controller in GetClientProxyControllers(application)) + { + controller.ControllerName = controller.ControllerName.RemovePostFix("ClientProxy"); + + var controllerApiDescription = FindControllerApiDescriptionModel(controller); + if (controllerApiDescription != null && + !controllerApiDescription.ControllerGroupName.IsNullOrWhiteSpace()) + { + controller.ControllerName = controllerApiDescription.ControllerGroupName; + } + + ConfigureClientProxySelector(controller); + ConfigureClientProxyApiExplorer(controller); + ConfigureParameters(controller); + } + } + + protected virtual void ConfigureClientProxySelector(ControllerModel controller) + { + RemoveEmptySelectors(controller.Selectors); + + var controllerType = controller.ControllerType.AsType(); + var remoteServiceAtt = ReflectionHelper.GetSingleAttributeOrDefault(controllerType.GetTypeInfo()); + if (remoteServiceAtt != null && !remoteServiceAtt.IsEnabledFor(controllerType)) + { + return; + } + + if (controller.Selectors.Any(selector => selector.AttributeRouteModel != null)) + { + return; + } + + foreach (var action in controller.Actions) + { + ConfigureClientProxySelector(controller, action); + } + } + + protected virtual void ConfigureClientProxySelector(ControllerModel controller, ActionModel action) + { + RemoveEmptySelectors(action.Selectors); + + var remoteServiceAtt = ReflectionHelper.GetSingleAttributeOrDefault(action.ActionMethod); + if (remoteServiceAtt != null && !remoteServiceAtt.IsEnabledFor(action.ActionMethod)) + { + return; + } + + var actionApiDescriptionModel = FindActionApiDescriptionModel(controller, action); + if (actionApiDescriptionModel == null) + { + return;; + } + + ActionWithAttributeRoute.Add(action); + + if (!action.Selectors.Any()) + { + var abpServiceSelectorModel = new SelectorModel + { + AttributeRouteModel = new AttributeRouteModel( + new RouteAttribute(template: actionApiDescriptionModel.Url) + ), + ActionConstraints = { new HttpMethodActionConstraint(new[] { actionApiDescriptionModel.HttpMethod }) } + }; + + action.Selectors.Add(abpServiceSelectorModel); + } + else + { + foreach (var selector in action.Selectors) + { + var httpMethod = selector.ActionConstraints + .OfType() + .FirstOrDefault()? + .HttpMethods? + .FirstOrDefault(); + + if (httpMethod == null) + { + httpMethod = actionApiDescriptionModel.HttpMethod; + } + + if (selector.AttributeRouteModel == null) + { + selector.AttributeRouteModel = new AttributeRouteModel( + new RouteAttribute(template: actionApiDescriptionModel.Url) + ); + } + + if (!selector.ActionConstraints.OfType().Any()) + { + selector.ActionConstraints.Add(new HttpMethodActionConstraint(new[] { httpMethod })); + } + } + } + } + + protected virtual void ConfigureClientProxyApiExplorer(ControllerModel controller) + { + if (controller.ApiExplorer.GroupName.IsNullOrEmpty()) + { + controller.ApiExplorer.GroupName = controller.ControllerName; + } + + if (controller.ApiExplorer.IsVisible == null) + { + controller.ApiExplorer.IsVisible = IsVisibleRemoteService(controller.ControllerType); + } + + foreach (var action in controller.Actions) + { + if (ActionWithAttributeRoute.Contains(action)) + { + ConfigureApiExplorer(action); + } + } + } + + protected virtual ModuleApiDescriptionModel FindModuleApiDescriptionModel(ControllerModel controller) + { + var appServiceType = FindAppServiceInterfaceType(controller); + if (appServiceType == null) + { + return null; + } + + var applicationApiDescriptionModel = ClientProxyApiDescriptionFinder.GetApiDescription(); + foreach (var moduleApiDescription in applicationApiDescriptionModel.Modules.Values) + { + if (moduleApiDescription.Controllers.Values.Any(x => x.Interfaces.Any(t => t.Type == appServiceType.FullName))) + { + return moduleApiDescription; + } + } + + return null; + } + + protected virtual ControllerApiDescriptionModel FindControllerApiDescriptionModel(ControllerModel controller) + { + var appServiceType = FindAppServiceInterfaceType(controller); + if (appServiceType == null) + { + return null; + } + + var applicationApiDescriptionModel = ClientProxyApiDescriptionFinder.GetApiDescription(); + foreach (var controllerApiDescription in applicationApiDescriptionModel.Modules.Values.SelectMany(x => x.Controllers.Values)) + { + if (controllerApiDescription.Interfaces.Any(t => t.Type == appServiceType.FullName)) + { + return controllerApiDescription; + } + } + + return null; + } + + protected virtual ActionApiDescriptionModel FindActionApiDescriptionModel(ControllerModel controller, ActionModel action) + { + var appServiceType = FindAppServiceInterfaceType(controller); + if (appServiceType == null) + { + return null; + } + + var key = + $"{appServiceType.FullName}." + + $"{action.ActionMethod.Name}." + + $"{string.Join("-", action.Parameters.Select(x => x.ParameterType.FullName))}"; + + var actionApiDescriptionModel = ClientProxyApiDescriptionFinder.FindAction(key); + if (actionApiDescriptionModel == null) + { + return null; + } + + if (actionApiDescriptionModel.ImplementFrom.StartsWith("Volo.Abp.Application.Services")) + { + return actionApiDescriptionModel; + } + + if (appServiceType.FullName != null && actionApiDescriptionModel.ImplementFrom.StartsWith(appServiceType.FullName)) + { + return actionApiDescriptionModel; + } + + return null; + } + + protected virtual Type FindAppServiceInterfaceType(ControllerModel controller) + { + return controller.ControllerType.GetInterfaces() + .FirstOrDefault(type => !type.IsGenericType && + type != typeof(IApplicationService) && + typeof(IApplicationService).IsAssignableFrom(type)); + } + } +} diff --git a/modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/AccountClientProxy.Generated.cs b/modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/AccountClientProxy.Generated.cs new file mode 100644 index 0000000000..5c7e147105 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/AccountClientProxy.Generated.cs @@ -0,0 +1,30 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Abp.Account; +using Volo.Abp.Identity; + +// ReSharper disable once CheckNamespace +namespace Volo.Abp.Account.ClientProxies +{ + public partial class AccountClientProxy + { + public virtual async Task RegisterAsync(RegisterDto input) + { + return await RequestAsync(nameof(RegisterAsync), input); + } + + public virtual async Task SendPasswordResetCodeAsync(SendPasswordResetCodeDto input) + { + await RequestAsync(nameof(SendPasswordResetCodeAsync), input); + } + + public virtual async Task ResetPasswordAsync(ResetPasswordDto input) + { + await RequestAsync(nameof(ResetPasswordAsync), input); + } + } +} diff --git a/modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/AccountClientProxy.cs b/modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/AccountClientProxy.cs new file mode 100644 index 0000000000..3270dcf9f3 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/AccountClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of AccountClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Abp.Account; + +// ReSharper disable once CheckNamespace +namespace Volo.Abp.Account.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IAccountAppService), typeof(AccountClientProxy))] + public partial class AccountClientProxy : ClientProxyBase, IAccountAppService + { + } +} diff --git a/modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/account-generate-proxy.json b/modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/account-generate-proxy.json new file mode 100644 index 0000000000..a9db883530 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/account-generate-proxy.json @@ -0,0 +1,231 @@ +{ + "modules": { + "account": { + "rootPath": "account", + "remoteServiceName": "AbpAccount", + "controllers": { + "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController": { + "controllerName": "Account", + "controllerGroupName": "Login", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController", + "interfaces": [], + "actions": { + "LoginByLogin": { + "uniqueName": "LoginByLogin", + "name": "Login", + "httpMethod": "POST", + "url": "api/account/login", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "login", + "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "login", + "name": "login", + "jsonName": null, + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController" + }, + "Logout": { + "uniqueName": "Logout", + "name": "Logout", + "httpMethod": "GET", + "url": "api/account/logout", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController" + }, + "CheckPasswordByLogin": { + "uniqueName": "CheckPasswordByLogin", + "name": "CheckPassword", + "httpMethod": "POST", + "url": "api/account/check-password", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "login", + "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "login", + "name": "login", + "jsonName": null, + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController" + } + } + }, + "Volo.Abp.Account.AccountController": { + "controllerName": "Account", + "controllerGroupName": "Account", + "type": "Volo.Abp.Account.AccountController", + "interfaces": [ + { + "type": "Volo.Abp.Account.IAccountAppService" + } + ], + "actions": { + "RegisterAsyncByInput": { + "uniqueName": "RegisterAsyncByInput", + "name": "RegisterAsync", + "httpMethod": "POST", + "url": "api/account/register", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Account.RegisterDto, Volo.Abp.Account.Application.Contracts", + "type": "Volo.Abp.Account.RegisterDto", + "typeSimple": "Volo.Abp.Account.RegisterDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Account.RegisterDto", + "typeSimple": "Volo.Abp.Account.RegisterDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.IAccountAppService" + }, + "SendPasswordResetCodeAsyncByInput": { + "uniqueName": "SendPasswordResetCodeAsyncByInput", + "name": "SendPasswordResetCodeAsync", + "httpMethod": "POST", + "url": "api/account/send-password-reset-code", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Account.SendPasswordResetCodeDto, Volo.Abp.Account.Application.Contracts", + "type": "Volo.Abp.Account.SendPasswordResetCodeDto", + "typeSimple": "Volo.Abp.Account.SendPasswordResetCodeDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Account.SendPasswordResetCodeDto", + "typeSimple": "Volo.Abp.Account.SendPasswordResetCodeDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.IAccountAppService" + }, + "ResetPasswordAsyncByInput": { + "uniqueName": "ResetPasswordAsyncByInput", + "name": "ResetPasswordAsync", + "httpMethod": "POST", + "url": "api/account/reset-password", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Account.ResetPasswordDto, Volo.Abp.Account.Application.Contracts", + "type": "Volo.Abp.Account.ResetPasswordDto", + "typeSimple": "Volo.Abp.Account.ResetPasswordDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Account.ResetPasswordDto", + "typeSimple": "Volo.Abp.Account.ResetPasswordDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.IAccountAppService" + } + } + } + } + } + }, + "types": {} +} \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo/Abp/Account/AbpAccountHttpApiClientModule.cs b/modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo/Abp/Account/AbpAccountHttpApiClientModule.cs index a1eb2f9263..ab79807d54 100644 --- a/modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo/Abp/Account/AbpAccountHttpApiClientModule.cs +++ b/modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo/Abp/Account/AbpAccountHttpApiClientModule.cs @@ -1,6 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Http.Client; using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; namespace Volo.Abp.Account { @@ -11,8 +12,13 @@ namespace Volo.Abp.Account { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddHttpClientProxies(typeof(AbpAccountApplicationContractsModule).Assembly, + context.Services.AddStaticHttpClientProxies(typeof(AbpAccountApplicationContractsModule).Assembly, AccountRemoteServiceConsts.RemoteServiceName); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); } } -} \ No newline at end of file +} diff --git a/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs b/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs index 4a806b9ae2..acb48e2943 100644 --- a/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs +++ b/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs @@ -17,7 +17,7 @@ using Volo.Abp.VirtualFileSystem; namespace Volo.Abp.Account.Web { [DependsOn( - typeof(AbpAccountHttpApiModule), + typeof(AbpAccountApplicationContractsModule), typeof(AbpIdentityAspNetCoreModule), typeof(AbpAutoMapperModule), typeof(AbpAspNetCoreMvcUiThemeSharedModule), diff --git a/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj b/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj index dc3ff0b63f..c59ec20c40 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj +++ b/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj @@ -24,19 +24,23 @@ + + + + - + diff --git a/modules/account/src/Volo.Abp.Account.Web/wwwroot/client-proxies/account-proxy.js b/modules/account/src/Volo.Abp.Account.Web/wwwroot/client-proxies/account-proxy.js new file mode 100644 index 0000000000..8864396741 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Web/wwwroot/client-proxies/account-proxy.js @@ -0,0 +1,76 @@ +/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */ + + +// module account + +(function(){ + + // controller volo.abp.account.web.areas.account.controllers.account + + (function(){ + + abp.utils.createNamespace(window, 'volo.abp.account.web.areas.account.controllers.account'); + + volo.abp.account.web.areas.account.controllers.account.login = function(login, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/account/login', + type: 'POST', + data: JSON.stringify(login) + }, ajaxParams)); + }; + + volo.abp.account.web.areas.account.controllers.account.logout = function(ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/account/logout', + type: 'GET', + dataType: null + }, ajaxParams)); + }; + + volo.abp.account.web.areas.account.controllers.account.checkPassword = function(login, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/account/check-password', + type: 'POST', + data: JSON.stringify(login) + }, ajaxParams)); + }; + + })(); + + // controller volo.abp.account.account + + (function(){ + + abp.utils.createNamespace(window, 'volo.abp.account.account'); + + volo.abp.account.account.register = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/account/register', + type: 'POST', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.abp.account.account.sendPasswordResetCode = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/account/send-password-reset-code', + type: 'POST', + dataType: null, + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.abp.account.account.resetPassword = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/account/reset-password', + type: 'POST', + dataType: null, + data: JSON.stringify(input) + }, ajaxParams)); + }; + + })(); + +})(); + + diff --git a/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/ClientProxies/BlogManagementClientProxy.Generated.cs b/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/ClientProxies/BlogManagementClientProxy.Generated.cs new file mode 100644 index 0000000000..709d63f973 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/ClientProxies/BlogManagementClientProxy.Generated.cs @@ -0,0 +1,45 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Blogging.Admin.Blogs; +using Volo.Blogging.Blogs.Dtos; + +// ReSharper disable once CheckNamespace +namespace Volo.Blogging.Admin.ClientProxies +{ + public partial class BlogManagementClientProxy + { + public virtual async Task> GetListAsync() + { + return await RequestAsync>(nameof(GetListAsync)); + } + + public virtual async Task GetAsync(Guid id) + { + return await RequestAsync(nameof(GetAsync), id); + } + + public virtual async Task CreateAsync(CreateBlogDto input) + { + return await RequestAsync(nameof(CreateAsync), input); + } + + public virtual async Task UpdateAsync(Guid id, UpdateBlogDto input) + { + return await RequestAsync(nameof(UpdateAsync), id, input); + } + + public virtual async Task DeleteAsync(Guid id) + { + await RequestAsync(nameof(DeleteAsync), id); + } + + public virtual async Task ClearCacheAsync(Guid id) + { + await RequestAsync(nameof(ClearCacheAsync), id); + } + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/ClientProxies/BlogManagementClientProxy.cs b/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/ClientProxies/BlogManagementClientProxy.cs new file mode 100644 index 0000000000..7828a70f86 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/ClientProxies/BlogManagementClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of BlogManagementClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Blogging.Admin.Blogs; + +// ReSharper disable once CheckNamespace +namespace Volo.Blogging.Admin.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IBlogManagementAppService), typeof(BlogManagementClientProxy))] + public partial class BlogManagementClientProxy : ClientProxyBase, IBlogManagementAppService + { + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/ClientProxies/bloggingAdmin-generate-proxy.json b/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/ClientProxies/bloggingAdmin-generate-proxy.json new file mode 100644 index 0000000000..01a6fc3d82 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/ClientProxies/bloggingAdmin-generate-proxy.json @@ -0,0 +1,243 @@ +{ + "modules": { + "bloggingAdmin": { + "rootPath": "bloggingAdmin", + "remoteServiceName": "BloggingAdmin", + "controllers": { + "Volo.Blogging.Admin.BlogManagementController": { + "controllerName": "BlogManagement", + "controllerGroupName": "BlogManagement", + "type": "Volo.Blogging.Admin.BlogManagementController", + "interfaces": [ + { + "type": "Volo.Blogging.Admin.Blogs.IBlogManagementAppService" + } + ], + "actions": { + "GetListAsync": { + "uniqueName": "GetListAsync", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/blogging/blogs/admin", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Admin.Blogs.IBlogManagementAppService" + }, + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/blogging/blogs/admin/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Blogging.Blogs.Dtos.BlogDto", + "typeSimple": "Volo.Blogging.Blogs.Dtos.BlogDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Admin.Blogs.IBlogManagementAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/blogging/blogs/admin", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Blogging.Admin.Blogs.CreateBlogDto, Volo.Blogging.Admin.Application.Contracts", + "type": "Volo.Blogging.Admin.Blogs.CreateBlogDto", + "typeSimple": "Volo.Blogging.Admin.Blogs.CreateBlogDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Blogging.Admin.Blogs.CreateBlogDto", + "typeSimple": "Volo.Blogging.Admin.Blogs.CreateBlogDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Blogging.Blogs.Dtos.BlogDto", + "typeSimple": "Volo.Blogging.Blogs.Dtos.BlogDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Admin.Blogs.IBlogManagementAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/blogging/blogs/admin/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Blogging.Admin.Blogs.UpdateBlogDto, Volo.Blogging.Admin.Application.Contracts", + "type": "Volo.Blogging.Admin.Blogs.UpdateBlogDto", + "typeSimple": "Volo.Blogging.Admin.Blogs.UpdateBlogDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Blogging.Admin.Blogs.UpdateBlogDto", + "typeSimple": "Volo.Blogging.Admin.Blogs.UpdateBlogDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Blogging.Blogs.Dtos.BlogDto", + "typeSimple": "Volo.Blogging.Blogs.Dtos.BlogDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Admin.Blogs.IBlogManagementAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/blogging/blogs/admin/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Admin.Blogs.IBlogManagementAppService" + }, + "ClearCacheAsyncById": { + "uniqueName": "ClearCacheAsyncById", + "name": "ClearCacheAsync", + "httpMethod": "GET", + "url": "api/blogging/blogs/admin/clear-cache/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Admin.Blogs.IBlogManagementAppService" + } + } + } + } + } + }, + "types": {} +} \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/Volo/Blogging/Admin/BloggingAdminHttpApiClientModule.cs b/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/Volo/Blogging/Admin/BloggingAdminHttpApiClientModule.cs index 9ccb1b5d15..7a661657b9 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/Volo/Blogging/Admin/BloggingAdminHttpApiClientModule.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/Volo/Blogging/Admin/BloggingAdminHttpApiClientModule.cs @@ -1,6 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Http.Client; using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; namespace Volo.Blogging.Admin { @@ -11,8 +12,13 @@ namespace Volo.Blogging.Admin { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddHttpClientProxies(typeof(BloggingAdminApplicationContractsModule).Assembly, + context.Services.AddStaticHttpClientProxies(typeof(BloggingAdminApplicationContractsModule).Assembly, BloggingAdminRemoteServiceConsts.RemoteServiceName); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); } } diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminWebModule.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminWebModule.cs index 09d6b8e3cc..1df71a47eb 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminWebModule.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminWebModule.cs @@ -11,7 +11,7 @@ using Volo.Blogging.Localization; namespace Volo.Blogging.Admin { [DependsOn( - typeof(BloggingAdminHttpApiModule), + typeof(BloggingAdminApplicationContractsModule), typeof(AbpAspNetCoreMvcUiBootstrapModule), typeof(AbpAspNetCoreMvcUiBundlingModule), typeof(AbpAutoMapperModule) diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml index 1c2b823852..4ad35d52e6 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml @@ -15,9 +15,10 @@ @section scripts { - - - + + + + } diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj b/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj index b1f303ba55..341cf01c83 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj @@ -19,7 +19,7 @@ - + @@ -32,10 +32,14 @@ + + + + diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/wwwroot/client-proxies/bloggingAdmin-proxy.js b/modules/blogging/src/Volo.Blogging.Admin.Web/wwwroot/client-proxies/bloggingAdmin-proxy.js new file mode 100644 index 0000000000..18fb9ed7c8 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/wwwroot/client-proxies/bloggingAdmin-proxy.js @@ -0,0 +1,64 @@ +/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */ + + +// module bloggingAdmin + +(function(){ + + // controller volo.blogging.admin.blogManagement + + (function(){ + + abp.utils.createNamespace(window, 'volo.blogging.admin.blogManagement'); + + volo.blogging.admin.blogManagement.getList = function(ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/blogs/admin', + type: 'GET' + }, ajaxParams)); + }; + + volo.blogging.admin.blogManagement.get = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/blogs/admin/' + id + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.blogging.admin.blogManagement.create = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/blogs/admin', + type: 'POST', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.blogging.admin.blogManagement.update = function(id, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/blogs/admin/' + id + '', + type: 'PUT', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.blogging.admin.blogManagement['delete'] = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/blogs/admin/' + id + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + volo.blogging.admin.blogManagement.clearCache = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/blogs/admin/clear-cache/' + id + '', + type: 'GET', + dataType: null + }, ajaxParams)); + }; + + })(); + +})(); + + diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogFilesClientProxy.Generated.cs b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogFilesClientProxy.Generated.cs new file mode 100644 index 0000000000..6facda0870 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogFilesClientProxy.Generated.cs @@ -0,0 +1,24 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Blogging.Files; + +// ReSharper disable once CheckNamespace +namespace Volo.Blogging.ClientProxies +{ + public partial class BlogFilesClientProxy + { + public virtual async Task GetAsync(string name) + { + return await RequestAsync(nameof(GetAsync), name); + } + + public virtual async Task CreateAsync(FileUploadInputDto input) + { + return await RequestAsync(nameof(CreateAsync), input); + } + } +} diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogFilesClientProxy.cs b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogFilesClientProxy.cs new file mode 100644 index 0000000000..fe3fda9f30 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogFilesClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of BlogFilesClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Blogging.Files; + +// ReSharper disable once CheckNamespace +namespace Volo.Blogging.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IFileAppService), typeof(BlogFilesClientProxy))] + public partial class BlogFilesClientProxy : ClientProxyBase, IFileAppService + { + } +} diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogsClientProxy.Generated.cs b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogsClientProxy.Generated.cs new file mode 100644 index 0000000000..12e4a9499f --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogsClientProxy.Generated.cs @@ -0,0 +1,30 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Blogging.Blogs; +using Volo.Blogging.Blogs.Dtos; + +// ReSharper disable once CheckNamespace +namespace Volo.Blogging.ClientProxies +{ + public partial class BlogsClientProxy + { + public virtual async Task> GetListAsync() + { + return await RequestAsync>(nameof(GetListAsync)); + } + + public virtual async Task GetByShortNameAsync(string shortName) + { + return await RequestAsync(nameof(GetByShortNameAsync), shortName); + } + + public virtual async Task GetAsync(Guid id) + { + return await RequestAsync(nameof(GetAsync), id); + } + } +} diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogsClientProxy.cs b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogsClientProxy.cs new file mode 100644 index 0000000000..3798c6efb7 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogsClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of BlogsClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Blogging.Blogs; + +// ReSharper disable once CheckNamespace +namespace Volo.Blogging.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IBlogAppService), typeof(BlogsClientProxy))] + public partial class BlogsClientProxy : ClientProxyBase, IBlogAppService + { + } +} diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/CommentsClientProxy.Generated.cs b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/CommentsClientProxy.Generated.cs new file mode 100644 index 0000000000..a149e4ee26 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/CommentsClientProxy.Generated.cs @@ -0,0 +1,36 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Blogging.Comments; +using System.Collections.Generic; +using Volo.Blogging.Comments.Dtos; + +// ReSharper disable once CheckNamespace +namespace Volo.Blogging.ClientProxies +{ + public partial class CommentsClientProxy + { + public virtual async Task> GetHierarchicalListOfPostAsync(Guid postId) + { + return await RequestAsync>(nameof(GetHierarchicalListOfPostAsync), postId); + } + + public virtual async Task CreateAsync(CreateCommentDto input) + { + return await RequestAsync(nameof(CreateAsync), input); + } + + public virtual async Task UpdateAsync(Guid id, UpdateCommentDto input) + { + return await RequestAsync(nameof(UpdateAsync), id, input); + } + + public virtual async Task DeleteAsync(Guid id) + { + await RequestAsync(nameof(DeleteAsync), id); + } + } +} diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/CommentsClientProxy.cs b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/CommentsClientProxy.cs new file mode 100644 index 0000000000..b42508862f --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/CommentsClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of CommentsClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Blogging.Comments; + +// ReSharper disable once CheckNamespace +namespace Volo.Blogging.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(ICommentAppService), typeof(CommentsClientProxy))] + public partial class CommentsClientProxy : ClientProxyBase, ICommentAppService + { + } +} diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/PostsClientProxy.Generated.cs b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/PostsClientProxy.Generated.cs new file mode 100644 index 0000000000..4d2101c0f6 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/PostsClientProxy.Generated.cs @@ -0,0 +1,49 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Blogging.Posts; + +// ReSharper disable once CheckNamespace +namespace Volo.Blogging.ClientProxies +{ + public partial class PostsClientProxy + { + public virtual async Task> GetListByBlogIdAndTagNameAsync(Guid blogId, string tagName) + { + return await RequestAsync>(nameof(GetListByBlogIdAndTagNameAsync), blogId, tagName); + } + + public virtual async Task> GetTimeOrderedListAsync(Guid blogId) + { + return await RequestAsync>(nameof(GetTimeOrderedListAsync), blogId); + } + + public virtual async Task GetForReadingAsync(GetPostInput input) + { + return await RequestAsync(nameof(GetForReadingAsync), input); + } + + public virtual async Task GetAsync(Guid id) + { + return await RequestAsync(nameof(GetAsync), id); + } + + public virtual async Task CreateAsync(CreatePostDto input) + { + return await RequestAsync(nameof(CreateAsync), input); + } + + public virtual async Task UpdateAsync(Guid id, UpdatePostDto input) + { + return await RequestAsync(nameof(UpdateAsync), id, input); + } + + public virtual async Task DeleteAsync(Guid id) + { + await RequestAsync(nameof(DeleteAsync), id); + } + } +} diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/PostsClientProxy.cs b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/PostsClientProxy.cs new file mode 100644 index 0000000000..60d343be1e --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/PostsClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of PostsClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Blogging.Posts; + +// ReSharper disable once CheckNamespace +namespace Volo.Blogging.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IPostAppService), typeof(PostsClientProxy))] + public partial class PostsClientProxy : ClientProxyBase, IPostAppService + { + } +} diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/TagsClientProxy.Generated.cs b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/TagsClientProxy.Generated.cs new file mode 100644 index 0000000000..667dacdebd --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/TagsClientProxy.Generated.cs @@ -0,0 +1,21 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Blogging.Tagging; +using System.Collections.Generic; +using Volo.Blogging.Tagging.Dtos; + +// ReSharper disable once CheckNamespace +namespace Volo.Blogging.ClientProxies +{ + public partial class TagsClientProxy + { + public virtual async Task> GetPopularTagsAsync(Guid blogId, GetPopularTagsInput input) + { + return await RequestAsync>(nameof(GetPopularTagsAsync), blogId, input); + } + } +} diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/TagsClientProxy.cs b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/TagsClientProxy.cs new file mode 100644 index 0000000000..1b69a4953d --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/TagsClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of TagsClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Blogging.Tagging; + +// ReSharper disable once CheckNamespace +namespace Volo.Blogging.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(ITagAppService), typeof(TagsClientProxy))] + public partial class TagsClientProxy : ClientProxyBase, ITagAppService + { + } +} diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/blogging-generate-proxy.json b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/blogging-generate-proxy.json new file mode 100644 index 0000000000..3b2916d49e --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/blogging-generate-proxy.json @@ -0,0 +1,856 @@ +{ + "modules": { + "blogging": { + "rootPath": "blogging", + "remoteServiceName": "Blogging", + "controllers": { + "Volo.Blogging.BlogFilesController": { + "controllerName": "BlogFiles", + "controllerGroupName": "BlogFiles", + "type": "Volo.Blogging.BlogFilesController", + "interfaces": [ + { + "type": "Volo.Blogging.Files.IFileAppService" + } + ], + "actions": { + "GetAsyncByName": { + "uniqueName": "GetAsyncByName", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/blogging/files/{name}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "name", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "name", + "name": "name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Blogging.Files.RawFileDto", + "typeSimple": "Volo.Blogging.Files.RawFileDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Files.IFileAppService" + }, + "GetForWebAsyncByName": { + "uniqueName": "GetForWebAsyncByName", + "name": "GetForWebAsync", + "httpMethod": "GET", + "url": "api/blogging/files/www/{name}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "name", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "name", + "name": "name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Microsoft.AspNetCore.Mvc.FileResult", + "typeSimple": "Microsoft.AspNetCore.Mvc.FileResult" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.BlogFilesController" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/blogging/files", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Blogging.Files.FileUploadInputDto, Volo.Blogging.Application.Contracts", + "type": "Volo.Blogging.Files.FileUploadInputDto", + "typeSimple": "Volo.Blogging.Files.FileUploadInputDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Blogging.Files.FileUploadInputDto", + "typeSimple": "Volo.Blogging.Files.FileUploadInputDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Blogging.Files.FileUploadOutputDto", + "typeSimple": "Volo.Blogging.Files.FileUploadOutputDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Files.IFileAppService" + }, + "UploadImageByFile": { + "uniqueName": "UploadImageByFile", + "name": "UploadImage", + "httpMethod": "POST", + "url": "api/blogging/files/images/upload", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "file", + "typeAsString": "Microsoft.AspNetCore.Http.IFormFile, Microsoft.AspNetCore.Http.Features", + "type": "Microsoft.AspNetCore.Http.IFormFile", + "typeSimple": "Microsoft.AspNetCore.Http.IFormFile", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "file", + "name": "file", + "jsonName": null, + "type": "Microsoft.AspNetCore.Http.IFormFile", + "typeSimple": "Microsoft.AspNetCore.Http.IFormFile", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "FormFile", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Microsoft.AspNetCore.Mvc.JsonResult", + "typeSimple": "Microsoft.AspNetCore.Mvc.JsonResult" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.BlogFilesController" + } + } + }, + "Volo.Blogging.BlogsController": { + "controllerName": "Blogs", + "controllerGroupName": "Blogs", + "type": "Volo.Blogging.BlogsController", + "interfaces": [ + { + "type": "Volo.Blogging.Blogs.IBlogAppService" + } + ], + "actions": { + "GetListAsync": { + "uniqueName": "GetListAsync", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/blogging/blogs", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Blogs.IBlogAppService" + }, + "GetByShortNameAsyncByShortName": { + "uniqueName": "GetByShortNameAsyncByShortName", + "name": "GetByShortNameAsync", + "httpMethod": "GET", + "url": "api/blogging/blogs/by-shortname/{shortName}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "shortName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "shortName", + "name": "shortName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Blogging.Blogs.Dtos.BlogDto", + "typeSimple": "Volo.Blogging.Blogs.Dtos.BlogDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Blogs.IBlogAppService" + }, + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/blogging/blogs/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Blogging.Blogs.Dtos.BlogDto", + "typeSimple": "Volo.Blogging.Blogs.Dtos.BlogDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Blogs.IBlogAppService" + } + } + }, + "Volo.Blogging.CommentsController": { + "controllerName": "Comments", + "controllerGroupName": "Comments", + "type": "Volo.Blogging.CommentsController", + "interfaces": [ + { + "type": "Volo.Blogging.Comments.ICommentAppService" + } + ], + "actions": { + "GetHierarchicalListOfPostAsyncByPostId": { + "uniqueName": "GetHierarchicalListOfPostAsyncByPostId", + "name": "GetHierarchicalListOfPostAsync", + "httpMethod": "GET", + "url": "api/blogging/comments/hierarchical/{postId}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "postId", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "postId", + "name": "postId", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Collections.Generic.List", + "typeSimple": "[Volo.Blogging.Comments.Dtos.CommentWithRepliesDto]" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Comments.ICommentAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/blogging/comments", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Blogging.Comments.Dtos.CreateCommentDto, Volo.Blogging.Application.Contracts", + "type": "Volo.Blogging.Comments.Dtos.CreateCommentDto", + "typeSimple": "Volo.Blogging.Comments.Dtos.CreateCommentDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Blogging.Comments.Dtos.CreateCommentDto", + "typeSimple": "Volo.Blogging.Comments.Dtos.CreateCommentDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Blogging.Comments.Dtos.CommentWithDetailsDto", + "typeSimple": "Volo.Blogging.Comments.Dtos.CommentWithDetailsDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Comments.ICommentAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/blogging/comments/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Blogging.Comments.Dtos.UpdateCommentDto, Volo.Blogging.Application.Contracts", + "type": "Volo.Blogging.Comments.Dtos.UpdateCommentDto", + "typeSimple": "Volo.Blogging.Comments.Dtos.UpdateCommentDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Blogging.Comments.Dtos.UpdateCommentDto", + "typeSimple": "Volo.Blogging.Comments.Dtos.UpdateCommentDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Blogging.Comments.Dtos.CommentWithDetailsDto", + "typeSimple": "Volo.Blogging.Comments.Dtos.CommentWithDetailsDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Comments.ICommentAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/blogging/comments/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Comments.ICommentAppService" + } + } + }, + "Volo.Blogging.PostsController": { + "controllerName": "Posts", + "controllerGroupName": "Posts", + "type": "Volo.Blogging.PostsController", + "interfaces": [ + { + "type": "Volo.Blogging.Posts.IPostAppService" + } + ], + "actions": { + "GetListByBlogIdAndTagNameAsyncByBlogIdAndTagName": { + "uniqueName": "GetListByBlogIdAndTagNameAsyncByBlogIdAndTagName", + "name": "GetListByBlogIdAndTagNameAsync", + "httpMethod": "GET", + "url": "api/blogging/posts/{blogId}/all", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "blogId", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "tagName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "blogId", + "name": "blogId", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "tagName", + "name": "tagName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Posts.IPostAppService" + }, + "GetTimeOrderedListAsyncByBlogId": { + "uniqueName": "GetTimeOrderedListAsyncByBlogId", + "name": "GetTimeOrderedListAsync", + "httpMethod": "GET", + "url": "api/blogging/posts/{blogId}/all/by-time", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "blogId", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "blogId", + "name": "blogId", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Posts.IPostAppService" + }, + "GetForReadingAsyncByInput": { + "uniqueName": "GetForReadingAsyncByInput", + "name": "GetForReadingAsync", + "httpMethod": "GET", + "url": "api/blogging/posts/read", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Blogging.Posts.GetPostInput, Volo.Blogging.Application.Contracts", + "type": "Volo.Blogging.Posts.GetPostInput", + "typeSimple": "Volo.Blogging.Posts.GetPostInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Url", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "BlogId", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Blogging.Posts.PostWithDetailsDto", + "typeSimple": "Volo.Blogging.Posts.PostWithDetailsDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Posts.IPostAppService" + }, + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/blogging/posts/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Blogging.Posts.PostWithDetailsDto", + "typeSimple": "Volo.Blogging.Posts.PostWithDetailsDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Posts.IPostAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/blogging/posts", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Blogging.Posts.CreatePostDto, Volo.Blogging.Application.Contracts", + "type": "Volo.Blogging.Posts.CreatePostDto", + "typeSimple": "Volo.Blogging.Posts.CreatePostDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Blogging.Posts.CreatePostDto", + "typeSimple": "Volo.Blogging.Posts.CreatePostDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Blogging.Posts.PostWithDetailsDto", + "typeSimple": "Volo.Blogging.Posts.PostWithDetailsDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Posts.IPostAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/blogging/posts/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Blogging.Posts.UpdatePostDto, Volo.Blogging.Application.Contracts", + "type": "Volo.Blogging.Posts.UpdatePostDto", + "typeSimple": "Volo.Blogging.Posts.UpdatePostDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Blogging.Posts.UpdatePostDto", + "typeSimple": "Volo.Blogging.Posts.UpdatePostDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Blogging.Posts.PostWithDetailsDto", + "typeSimple": "Volo.Blogging.Posts.PostWithDetailsDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Posts.IPostAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/blogging/posts/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Posts.IPostAppService" + } + } + }, + "Volo.Blogging.TagsController": { + "controllerName": "Tags", + "controllerGroupName": "Tags", + "type": "Volo.Blogging.TagsController", + "interfaces": [ + { + "type": "Volo.Blogging.Tagging.ITagAppService" + } + ], + "actions": { + "GetPopularTagsAsyncByBlogIdAndInput": { + "uniqueName": "GetPopularTagsAsyncByBlogIdAndInput", + "name": "GetPopularTagsAsync", + "httpMethod": "GET", + "url": "api/blogging/tags/popular/{blogId}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "blogId", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Blogging.Tagging.Dtos.GetPopularTagsInput, Volo.Blogging.Application.Contracts", + "type": "Volo.Blogging.Tagging.Dtos.GetPopularTagsInput", + "typeSimple": "Volo.Blogging.Tagging.Dtos.GetPopularTagsInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "blogId", + "name": "blogId", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "ResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MinimumPostCount", + "jsonName": null, + "type": "System.Int32?", + "typeSimple": "number?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "System.Collections.Generic.List", + "typeSimple": "[Volo.Blogging.Tagging.Dtos.TagDto]" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Blogging.Tagging.ITagAppService" + } + } + } + } + } + }, + "types": {} +} \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo/Blogging/BloggingHttpApiClientModule.cs b/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo/Blogging/BloggingHttpApiClientModule.cs index 0b33ff3367..ec8e0baa62 100644 --- a/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo/Blogging/BloggingHttpApiClientModule.cs +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo/Blogging/BloggingHttpApiClientModule.cs @@ -1,6 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Http.Client; using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; namespace Volo.Blogging { @@ -11,8 +12,13 @@ namespace Volo.Blogging { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddHttpClientProxies(typeof(BloggingApplicationContractsModule).Assembly, + context.Services.AddStaticHttpClientProxies(typeof(BloggingApplicationContractsModule).Assembly, BloggingRemoteServiceConsts.RemoteServiceName); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); } } diff --git a/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs b/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs index 24b92848da..da2da2abb1 100644 --- a/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs +++ b/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs @@ -15,7 +15,7 @@ using Volo.Blogging.Localization; namespace Volo.Blogging { [DependsOn( - typeof(BloggingHttpApiModule), + typeof(BloggingApplicationContractsModule), typeof(AbpAspNetCoreMvcUiBootstrapModule), typeof(AbpAspNetCoreMvcUiBundlingModule), typeof(AbpAutoMapperModule) diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml index adade3e603..69215036ef 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml @@ -36,8 +36,9 @@ } @section scripts { - - + + + } @section styles { diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Edit.cshtml b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Edit.cshtml index 7054895df0..17b37a4245 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Edit.cshtml +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Edit.cshtml @@ -17,8 +17,9 @@ } @section scripts { - - + + + }
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Index.cshtml b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Index.cshtml index c325513079..c0a95fb5cc 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Index.cshtml +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Index.cshtml @@ -15,6 +15,7 @@ } @section scripts { + diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/New.cshtml b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/New.cshtml index 810a0e3203..0d970c3c8a 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/New.cshtml +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/New.cshtml @@ -17,8 +17,9 @@ } @section scripts { - - + + + }
diff --git a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj index b16e782cc6..81c9a15c19 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj +++ b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj @@ -19,7 +19,7 @@ - + @@ -32,10 +32,14 @@ + + + + diff --git a/modules/blogging/src/Volo.Blogging.Web/wwwroot/client-proxies/blogging-proxy.js b/modules/blogging/src/Volo.Blogging.Web/wwwroot/client-proxies/blogging-proxy.js new file mode 100644 index 0000000000..3b0905a0d5 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Web/wwwroot/client-proxies/blogging-proxy.js @@ -0,0 +1,190 @@ +/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */ + + +// module blogging + +(function(){ + + // controller volo.blogging.blogFiles + + (function(){ + + abp.utils.createNamespace(window, 'volo.blogging.blogFiles'); + + volo.blogging.blogFiles.get = function(name, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/files/' + name + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.blogging.blogFiles.getForWeb = function(name, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/files/www/' + name + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.blogging.blogFiles.create = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/files', + type: 'POST', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.blogging.blogFiles.uploadImage = function(file, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/files/images/upload', + type: 'POST' + }, ajaxParams)); + }; + + })(); + + // controller volo.blogging.blogs + + (function(){ + + abp.utils.createNamespace(window, 'volo.blogging.blogs'); + + volo.blogging.blogs.getList = function(ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/blogs', + type: 'GET' + }, ajaxParams)); + }; + + volo.blogging.blogs.getByShortName = function(shortName, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/blogs/by-shortname/' + shortName + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.blogging.blogs.get = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/blogs/' + id + '', + type: 'GET' + }, ajaxParams)); + }; + + })(); + + // controller volo.blogging.comments + + (function(){ + + abp.utils.createNamespace(window, 'volo.blogging.comments'); + + volo.blogging.comments.getHierarchicalListOfPost = function(postId, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/comments/hierarchical/' + postId + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.blogging.comments.create = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/comments', + type: 'POST', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.blogging.comments.update = function(id, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/comments/' + id + '', + type: 'PUT', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.blogging.comments['delete'] = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/comments/' + id + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + })(); + + // controller volo.blogging.posts + + (function(){ + + abp.utils.createNamespace(window, 'volo.blogging.posts'); + + volo.blogging.posts.getListByBlogIdAndTagName = function(blogId, tagName, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/posts/' + blogId + '/all' + abp.utils.buildQueryString([{ name: 'tagName', value: tagName }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.blogging.posts.getTimeOrderedList = function(blogId, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/posts/' + blogId + '/all/by-time', + type: 'GET' + }, ajaxParams)); + }; + + volo.blogging.posts.getForReading = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/posts/read' + abp.utils.buildQueryString([{ name: 'url', value: input.url }, { name: 'blogId', value: input.blogId }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.blogging.posts.get = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/posts/' + id + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.blogging.posts.create = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/posts', + type: 'POST', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.blogging.posts.update = function(id, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/posts/' + id + '', + type: 'PUT', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.blogging.posts['delete'] = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/posts/' + id + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + })(); + + // controller volo.blogging.tags + + (function(){ + + abp.utils.createNamespace(window, 'volo.blogging.tags'); + + volo.blogging.tags.getPopularTags = function(blogId, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/blogging/tags/popular/' + blogId + '' + abp.utils.buildQueryString([{ name: 'resultCount', value: input.resultCount }, { name: 'minimumPostCount', value: input.minimumPostCount }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + })(); + +})(); + + diff --git a/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Properties/launchSettings.json b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Properties/launchSettings.json index 48d1823cea..0a047d88ec 100644 --- a/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Properties/launchSettings.json +++ b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Properties/launchSettings.json @@ -1,4 +1,4 @@ -{ + { "iisSettings": { "windowsAuthentication": false, "anonymousAuthentication": true, @@ -24,4 +24,4 @@ } } } -} \ No newline at end of file +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogAdminClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogAdminClientProxy.Generated.cs new file mode 100644 index 0000000000..fbbd563b41 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogAdminClientProxy.Generated.cs @@ -0,0 +1,39 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.CmsKit.Admin.Blogs; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Admin.Blogs.ClientProxies +{ + public partial class BlogAdminClientProxy + { + public virtual async Task GetAsync(Guid id) + { + return await RequestAsync(nameof(GetAsync), id); + } + + public virtual async Task> GetListAsync(BlogGetListInput input) + { + return await RequestAsync>(nameof(GetListAsync), input); + } + + public virtual async Task CreateAsync(CreateBlogDto input) + { + return await RequestAsync(nameof(CreateAsync), input); + } + + public virtual async Task UpdateAsync(Guid id, UpdateBlogDto input) + { + return await RequestAsync(nameof(UpdateAsync), id, input); + } + + public virtual async Task DeleteAsync(Guid id) + { + await RequestAsync(nameof(DeleteAsync), id); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogAdminClientProxy.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogAdminClientProxy.cs new file mode 100644 index 0000000000..66f3e0d5c0 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogAdminClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of BlogAdminClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.Admin.Blogs; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Admin.Blogs.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IBlogAdminAppService), typeof(BlogAdminClientProxy))] + public partial class BlogAdminClientProxy : ClientProxyBase, IBlogAdminAppService + { + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogFeatureAdminClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogFeatureAdminClientProxy.Generated.cs new file mode 100644 index 0000000000..3b8d26c8c0 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogFeatureAdminClientProxy.Generated.cs @@ -0,0 +1,26 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.CmsKit.Admin.Blogs; +using System.Collections.Generic; +using Volo.CmsKit.Blogs; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Admin.Blogs.ClientProxies +{ + public partial class BlogFeatureAdminClientProxy + { + public virtual async Task> GetListAsync(Guid blogId) + { + return await RequestAsync>(nameof(GetListAsync), blogId); + } + + public virtual async Task SetAsync(Guid blogId, BlogFeatureInputDto dto) + { + await RequestAsync(nameof(SetAsync), blogId, dto); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogFeatureAdminClientProxy.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogFeatureAdminClientProxy.cs new file mode 100644 index 0000000000..388c72b055 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogFeatureAdminClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of BlogFeatureAdminClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.Admin.Blogs; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Admin.Blogs.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IBlogFeatureAdminAppService), typeof(BlogFeatureAdminClientProxy))] + public partial class BlogFeatureAdminClientProxy : ClientProxyBase, IBlogFeatureAdminAppService + { + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogPostAdminClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogPostAdminClientProxy.Generated.cs new file mode 100644 index 0000000000..4d754a0c46 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogPostAdminClientProxy.Generated.cs @@ -0,0 +1,39 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.CmsKit.Admin.Blogs; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Admin.Blogs.ClientProxies +{ + public partial class BlogPostAdminClientProxy + { + public virtual async Task CreateAsync(CreateBlogPostDto input) + { + return await RequestAsync(nameof(CreateAsync), input); + } + + public virtual async Task DeleteAsync(Guid id) + { + await RequestAsync(nameof(DeleteAsync), id); + } + + public virtual async Task GetAsync(Guid id) + { + return await RequestAsync(nameof(GetAsync), id); + } + + public virtual async Task> GetListAsync(BlogPostGetListInput input) + { + return await RequestAsync>(nameof(GetListAsync), input); + } + + public virtual async Task UpdateAsync(Guid id, UpdateBlogPostDto input) + { + return await RequestAsync(nameof(UpdateAsync), id, input); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogPostAdminClientProxy.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogPostAdminClientProxy.cs new file mode 100644 index 0000000000..a8c4695c4d --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogPostAdminClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of BlogPostAdminClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.Admin.Blogs; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Admin.Blogs.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IBlogPostAdminAppService), typeof(BlogPostAdminClientProxy))] + public partial class BlogPostAdminClientProxy : ClientProxyBase, IBlogPostAdminAppService + { + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/CommentAdminClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/CommentAdminClientProxy.Generated.cs new file mode 100644 index 0000000000..abd311a0da --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/CommentAdminClientProxy.Generated.cs @@ -0,0 +1,29 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.CmsKit.Admin.Comments; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Admin.Comments.ClientProxies +{ + public partial class CommentAdminClientProxy + { + public virtual async Task> GetListAsync(CommentGetListInput input) + { + return await RequestAsync>(nameof(GetListAsync), input); + } + + public virtual async Task GetAsync(Guid id) + { + return await RequestAsync(nameof(GetAsync), id); + } + + public virtual async Task DeleteAsync(Guid id) + { + await RequestAsync(nameof(DeleteAsync), id); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/CommentAdminClientProxy.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/CommentAdminClientProxy.cs new file mode 100644 index 0000000000..e8115c8f44 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/CommentAdminClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of CommentAdminClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.Admin.Comments; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Admin.Comments.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(ICommentAdminAppService), typeof(CommentAdminClientProxy))] + public partial class CommentAdminClientProxy : ClientProxyBase, ICommentAdminAppService + { + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/EntityTagAdminClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/EntityTagAdminClientProxy.Generated.cs new file mode 100644 index 0000000000..77b94e02d7 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/EntityTagAdminClientProxy.Generated.cs @@ -0,0 +1,29 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.CmsKit.Admin.Tags; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Admin.Tags.ClientProxies +{ + public partial class EntityTagAdminClientProxy + { + public virtual async Task AddTagToEntityAsync(EntityTagCreateDto input) + { + await RequestAsync(nameof(AddTagToEntityAsync), input); + } + + public virtual async Task RemoveTagFromEntityAsync(EntityTagRemoveDto input) + { + await RequestAsync(nameof(RemoveTagFromEntityAsync), input); + } + + public virtual async Task SetEntityTagsAsync(EntityTagSetDto input) + { + await RequestAsync(nameof(SetEntityTagsAsync), input); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/EntityTagAdminClientProxy.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/EntityTagAdminClientProxy.cs new file mode 100644 index 0000000000..011ba3ef89 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/EntityTagAdminClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of EntityTagAdminClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.Admin.Tags; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Admin.Tags.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IEntityTagAdminAppService), typeof(EntityTagAdminClientProxy))] + public partial class EntityTagAdminClientProxy : ClientProxyBase, IEntityTagAdminAppService + { + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MediaDescriptorAdminClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MediaDescriptorAdminClientProxy.Generated.cs new file mode 100644 index 0000000000..d1416d9620 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MediaDescriptorAdminClientProxy.Generated.cs @@ -0,0 +1,24 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.CmsKit.Admin.MediaDescriptors; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Admin.MediaDescriptors.ClientProxies +{ + public partial class MediaDescriptorAdminClientProxy + { + public virtual async Task CreateAsync(string entityType, CreateMediaInputWithStream inputStream) + { + return await RequestAsync(nameof(CreateAsync), entityType, inputStream); + } + + public virtual async Task DeleteAsync(Guid id) + { + await RequestAsync(nameof(DeleteAsync), id); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MediaDescriptorAdminClientProxy.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MediaDescriptorAdminClientProxy.cs new file mode 100644 index 0000000000..ebcff72a3b --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MediaDescriptorAdminClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of MediaDescriptorAdminClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.Admin.MediaDescriptors; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Admin.MediaDescriptors.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IMediaDescriptorAdminAppService), typeof(MediaDescriptorAdminClientProxy))] + public partial class MediaDescriptorAdminClientProxy : ClientProxyBase, IMediaDescriptorAdminAppService + { + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MenuItemAdminClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MenuItemAdminClientProxy.Generated.cs new file mode 100644 index 0000000000..a1f018c3dd --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MenuItemAdminClientProxy.Generated.cs @@ -0,0 +1,50 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.CmsKit.Admin.Menus; +using Volo.CmsKit.Menus; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Admin.Menus.ClientProxies +{ + public partial class MenuItemAdminClientProxy + { + public virtual async Task> GetListAsync() + { + return await RequestAsync>(nameof(GetListAsync)); + } + + public virtual async Task GetAsync(Guid id) + { + return await RequestAsync(nameof(GetAsync), id); + } + + public virtual async Task CreateAsync(MenuItemCreateInput input) + { + return await RequestAsync(nameof(CreateAsync), input); + } + + public virtual async Task UpdateAsync(Guid id, MenuItemUpdateInput input) + { + return await RequestAsync(nameof(UpdateAsync), id, input); + } + + public virtual async Task DeleteAsync(Guid id) + { + await RequestAsync(nameof(DeleteAsync), id); + } + + public virtual async Task MoveMenuItemAsync(Guid id, MenuItemMoveInput input) + { + await RequestAsync(nameof(MoveMenuItemAsync), id, input); + } + + public virtual async Task> GetPageLookupAsync(PageLookupInputDto input) + { + return await RequestAsync>(nameof(GetPageLookupAsync), input); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MenuItemAdminClientProxy.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MenuItemAdminClientProxy.cs new file mode 100644 index 0000000000..1740cec6aa --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MenuItemAdminClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of MenuItemAdminClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.Admin.Menus; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Admin.Menus.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IMenuItemAdminAppService), typeof(MenuItemAdminClientProxy))] + public partial class MenuItemAdminClientProxy : ClientProxyBase, IMenuItemAdminAppService + { + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/PageAdminClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/PageAdminClientProxy.Generated.cs new file mode 100644 index 0000000000..d1e8a39f7f --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/PageAdminClientProxy.Generated.cs @@ -0,0 +1,39 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.CmsKit.Admin.Pages; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Admin.Pages.ClientProxies +{ + public partial class PageAdminClientProxy + { + public virtual async Task GetAsync(Guid id) + { + return await RequestAsync(nameof(GetAsync), id); + } + + public virtual async Task> GetListAsync(GetPagesInputDto input) + { + return await RequestAsync>(nameof(GetListAsync), input); + } + + public virtual async Task CreateAsync(CreatePageInputDto input) + { + return await RequestAsync(nameof(CreateAsync), input); + } + + public virtual async Task UpdateAsync(Guid id, UpdatePageInputDto input) + { + return await RequestAsync(nameof(UpdateAsync), id, input); + } + + public virtual async Task DeleteAsync(Guid id) + { + await RequestAsync(nameof(DeleteAsync), id); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/PageAdminClientProxy.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/PageAdminClientProxy.cs new file mode 100644 index 0000000000..a0cce18960 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/PageAdminClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of PageAdminClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.Admin.Pages; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Admin.Pages.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IPageAdminAppService), typeof(PageAdminClientProxy))] + public partial class PageAdminClientProxy : ClientProxyBase, IPageAdminAppService + { + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/TagAdminClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/TagAdminClientProxy.Generated.cs new file mode 100644 index 0000000000..3ccfc7bf54 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/TagAdminClientProxy.Generated.cs @@ -0,0 +1,46 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.CmsKit.Admin.Tags; +using Volo.CmsKit.Tags; +using System.Collections.Generic; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Admin.Tags.ClientProxies +{ + public partial class TagAdminClientProxy + { + public virtual async Task CreateAsync(TagCreateDto input) + { + return await RequestAsync(nameof(CreateAsync), input); + } + + public virtual async Task DeleteAsync(Guid id) + { + await RequestAsync(nameof(DeleteAsync), id); + } + + public virtual async Task GetAsync(Guid id) + { + return await RequestAsync(nameof(GetAsync), id); + } + + public virtual async Task> GetListAsync(TagGetListInput input) + { + return await RequestAsync>(nameof(GetListAsync), input); + } + + public virtual async Task UpdateAsync(Guid id, TagUpdateDto input) + { + return await RequestAsync(nameof(UpdateAsync), id, input); + } + + public virtual async Task> GetTagDefinitionsAsync() + { + return await RequestAsync>(nameof(GetTagDefinitionsAsync)); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/TagAdminClientProxy.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/TagAdminClientProxy.cs new file mode 100644 index 0000000000..b804b91cb2 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/TagAdminClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of TagAdminClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.Admin.Tags; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Admin.Tags.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(ITagAdminAppService), typeof(TagAdminClientProxy))] + public partial class TagAdminClientProxy : ClientProxyBase, ITagAdminAppService + { + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/cms-kit-admin-generate-proxy.json b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/cms-kit-admin-generate-proxy.json new file mode 100644 index 0000000000..e20d5cc5c3 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/cms-kit-admin-generate-proxy.json @@ -0,0 +1,1967 @@ +{ + "modules": { + "cms-kit-admin": { + "rootPath": "cms-kit-admin", + "remoteServiceName": "CmsKitAdmin", + "controllers": { + "Volo.CmsKit.Admin.Tags.EntityTagAdminController": { + "controllerName": "EntityTagAdmin", + "controllerGroupName": "EntityTagAdmin", + "type": "Volo.CmsKit.Admin.Tags.EntityTagAdminController", + "interfaces": [ + { + "type": "Volo.CmsKit.Admin.Tags.IEntityTagAdminAppService" + } + ], + "actions": { + "AddTagToEntityAsyncByInput": { + "uniqueName": "AddTagToEntityAsyncByInput", + "name": "AddTagToEntityAsync", + "httpMethod": "POST", + "url": "api/cms-kit-admin/entity-tags", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.CmsKit.Admin.Tags.EntityTagCreateDto, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.Tags.EntityTagCreateDto", + "typeSimple": "Volo.CmsKit.Admin.Tags.EntityTagCreateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Admin.Tags.EntityTagCreateDto", + "typeSimple": "Volo.CmsKit.Admin.Tags.EntityTagCreateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Admin.Tags.IEntityTagAdminAppService" + }, + "RemoveTagFromEntityAsyncByInput": { + "uniqueName": "RemoveTagFromEntityAsyncByInput", + "name": "RemoveTagFromEntityAsync", + "httpMethod": "DELETE", + "url": "api/cms-kit-admin/entity-tags", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.CmsKit.Admin.Tags.EntityTagRemoveDto, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.Tags.EntityTagRemoveDto", + "typeSimple": "Volo.CmsKit.Admin.Tags.EntityTagRemoveDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "TagId", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "EntityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "EntityId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Admin.Tags.IEntityTagAdminAppService" + }, + "SetEntityTagsAsyncByInput": { + "uniqueName": "SetEntityTagsAsyncByInput", + "name": "SetEntityTagsAsync", + "httpMethod": "PUT", + "url": "api/cms-kit-admin/entity-tags", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.CmsKit.Admin.Tags.EntityTagSetDto, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.Tags.EntityTagSetDto", + "typeSimple": "Volo.CmsKit.Admin.Tags.EntityTagSetDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Admin.Tags.EntityTagSetDto", + "typeSimple": "Volo.CmsKit.Admin.Tags.EntityTagSetDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Admin.Tags.IEntityTagAdminAppService" + } + } + }, + "Volo.CmsKit.Admin.Tags.TagAdminController": { + "controllerName": "TagAdmin", + "controllerGroupName": "TagAdmin", + "type": "Volo.CmsKit.Admin.Tags.TagAdminController", + "interfaces": [ + { + "type": "Volo.CmsKit.Admin.Tags.ITagAdminAppService" + } + ], + "actions": { + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/cms-kit-admin/tags", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.CmsKit.Admin.Tags.TagCreateDto, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.Tags.TagCreateDto", + "typeSimple": "Volo.CmsKit.Admin.Tags.TagCreateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Admin.Tags.TagCreateDto", + "typeSimple": "Volo.CmsKit.Admin.Tags.TagCreateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Tags.TagDto", + "typeSimple": "Volo.CmsKit.Tags.TagDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/cms-kit-admin/tags/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" + }, + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/cms-kit-admin/tags/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Tags.TagDto", + "typeSimple": "Volo.CmsKit.Tags.TagDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/cms-kit-admin/tags", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.CmsKit.Admin.Tags.TagGetListInput, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.Tags.TagGetListInput", + "typeSimple": "Volo.CmsKit.Admin.Tags.TagGetListInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/cms-kit-admin/tags/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.CmsKit.Admin.Tags.TagUpdateDto, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.Tags.TagUpdateDto", + "typeSimple": "Volo.CmsKit.Admin.Tags.TagUpdateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Admin.Tags.TagUpdateDto", + "typeSimple": "Volo.CmsKit.Admin.Tags.TagUpdateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Tags.TagDto", + "typeSimple": "Volo.CmsKit.Tags.TagDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" + }, + "GetTagDefinitionsAsync": { + "uniqueName": "GetTagDefinitionsAsync", + "name": "GetTagDefinitionsAsync", + "httpMethod": "GET", + "url": "api/cms-kit-admin/tags/tag-definitions", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.Collections.Generic.List", + "typeSimple": "[Volo.CmsKit.Admin.Tags.TagDefinitionDto]" + }, + "allowAnonymous": false, + "implementFrom": "Volo.CmsKit.Admin.Tags.ITagAdminAppService" + } + } + }, + "Volo.CmsKit.Admin.Pages.PageAdminController": { + "controllerName": "PageAdmin", + "controllerGroupName": "PageAdmin", + "type": "Volo.CmsKit.Admin.Pages.PageAdminController", + "interfaces": [ + { + "type": "Volo.CmsKit.Admin.Pages.IPageAdminAppService" + } + ], + "actions": { + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/cms-kit-admin/pages/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Admin.Pages.PageDto", + "typeSimple": "Volo.CmsKit.Admin.Pages.PageDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/cms-kit-admin/pages", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.CmsKit.Admin.Pages.GetPagesInputDto, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.Pages.GetPagesInputDto", + "typeSimple": "Volo.CmsKit.Admin.Pages.GetPagesInputDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/cms-kit-admin/pages", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.CmsKit.Admin.Pages.CreatePageInputDto, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.Pages.CreatePageInputDto", + "typeSimple": "Volo.CmsKit.Admin.Pages.CreatePageInputDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Admin.Pages.CreatePageInputDto", + "typeSimple": "Volo.CmsKit.Admin.Pages.CreatePageInputDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Admin.Pages.PageDto", + "typeSimple": "Volo.CmsKit.Admin.Pages.PageDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/cms-kit-admin/pages/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.CmsKit.Admin.Pages.UpdatePageInputDto, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.Pages.UpdatePageInputDto", + "typeSimple": "Volo.CmsKit.Admin.Pages.UpdatePageInputDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Admin.Pages.UpdatePageInputDto", + "typeSimple": "Volo.CmsKit.Admin.Pages.UpdatePageInputDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Admin.Pages.PageDto", + "typeSimple": "Volo.CmsKit.Admin.Pages.PageDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/cms-kit-admin/pages/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" + } + } + }, + "Volo.CmsKit.Admin.Menus.MenuItemAdminController": { + "controllerName": "MenuItemAdmin", + "controllerGroupName": "MenuItemAdmin", + "type": "Volo.CmsKit.Admin.Menus.MenuItemAdminController", + "interfaces": [ + { + "type": "Volo.CmsKit.Admin.Menus.IMenuItemAdminAppService" + } + ], + "actions": { + "GetListAsync": { + "uniqueName": "GetListAsync", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/cms-kit-admin/menu-items", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.CmsKit.Admin.Menus.IMenuItemAdminAppService" + }, + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/cms-kit-admin/menu-items/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Menus.MenuItemDto", + "typeSimple": "Volo.CmsKit.Menus.MenuItemDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.CmsKit.Admin.Menus.IMenuItemAdminAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/cms-kit-admin/menu-items", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.CmsKit.Admin.Menus.MenuItemCreateInput, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.Menus.MenuItemCreateInput", + "typeSimple": "Volo.CmsKit.Admin.Menus.MenuItemCreateInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Admin.Menus.MenuItemCreateInput", + "typeSimple": "Volo.CmsKit.Admin.Menus.MenuItemCreateInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Menus.MenuItemDto", + "typeSimple": "Volo.CmsKit.Menus.MenuItemDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.CmsKit.Admin.Menus.IMenuItemAdminAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/cms-kit-admin/menu-items/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.CmsKit.Admin.Menus.MenuItemUpdateInput, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.Menus.MenuItemUpdateInput", + "typeSimple": "Volo.CmsKit.Admin.Menus.MenuItemUpdateInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Admin.Menus.MenuItemUpdateInput", + "typeSimple": "Volo.CmsKit.Admin.Menus.MenuItemUpdateInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Menus.MenuItemDto", + "typeSimple": "Volo.CmsKit.Menus.MenuItemDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.CmsKit.Admin.Menus.IMenuItemAdminAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/cms-kit-admin/menu-items/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": false, + "implementFrom": "Volo.CmsKit.Admin.Menus.IMenuItemAdminAppService" + }, + "MoveMenuItemAsyncByIdAndInput": { + "uniqueName": "MoveMenuItemAsyncByIdAndInput", + "name": "MoveMenuItemAsync", + "httpMethod": "PUT", + "url": "api/cms-kit-admin/menu-items/{id}/move", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.CmsKit.Admin.Menus.MenuItemMoveInput, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.Menus.MenuItemMoveInput", + "typeSimple": "Volo.CmsKit.Admin.Menus.MenuItemMoveInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Admin.Menus.MenuItemMoveInput", + "typeSimple": "Volo.CmsKit.Admin.Menus.MenuItemMoveInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": false, + "implementFrom": "Volo.CmsKit.Admin.Menus.IMenuItemAdminAppService" + }, + "GetPageLookupAsyncByInput": { + "uniqueName": "GetPageLookupAsyncByInput", + "name": "GetPageLookupAsync", + "httpMethod": "GET", + "url": "api/cms-kit-admin/menu-items/lookup/pages", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.CmsKit.Admin.Menus.PageLookupInputDto, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.Menus.PageLookupInputDto", + "typeSimple": "Volo.CmsKit.Admin.Menus.PageLookupInputDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.CmsKit.Admin.Menus.IMenuItemAdminAppService" + } + } + }, + "Volo.CmsKit.Admin.MediaDescriptors.MediaDescriptorAdminController": { + "controllerName": "MediaDescriptorAdmin", + "controllerGroupName": "MediaDescriptorAdmin", + "type": "Volo.CmsKit.Admin.MediaDescriptors.MediaDescriptorAdminController", + "interfaces": [ + { + "type": "Volo.CmsKit.Admin.MediaDescriptors.IMediaDescriptorAdminAppService" + } + ], + "actions": { + "CreateAsyncByEntityTypeAndInputStream": { + "uniqueName": "CreateAsyncByEntityTypeAndInputStream", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/cms-kit-admin/media/{entityType}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "inputStream", + "typeAsString": "Volo.CmsKit.Admin.MediaDescriptors.CreateMediaInputWithStream, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.MediaDescriptors.CreateMediaInputWithStream", + "typeSimple": "Volo.CmsKit.Admin.MediaDescriptors.CreateMediaInputWithStream", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "inputStream", + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "inputStream" + }, + { + "nameOnMethod": "inputStream", + "name": "File", + "jsonName": null, + "type": "Volo.Abp.Content.IRemoteStreamContent", + "typeSimple": "Volo.Abp.Content.IRemoteStreamContent", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "FormFile", + "descriptorName": "inputStream" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Admin.MediaDescriptors.MediaDescriptorDto", + "typeSimple": "Volo.CmsKit.Admin.MediaDescriptors.MediaDescriptorDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Admin.MediaDescriptors.IMediaDescriptorAdminAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/cms-kit-admin/media/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Admin.MediaDescriptors.IMediaDescriptorAdminAppService" + } + } + }, + "Volo.CmsKit.Admin.Comments.CommentAdminController": { + "controllerName": "CommentAdmin", + "controllerGroupName": "CommentAdmin", + "type": "Volo.CmsKit.Admin.Comments.CommentAdminController", + "interfaces": [ + { + "type": "Volo.CmsKit.Admin.Comments.ICommentAdminAppService" + } + ], + "actions": { + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/cms-kit-admin/comments", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.CmsKit.Admin.Comments.CommentGetListInput, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.Comments.CommentGetListInput", + "typeSimple": "Volo.CmsKit.Admin.Comments.CommentGetListInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "EntityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Text", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "RepliedCommentId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Author", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "CreationStartDate", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "CreationEndDate", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.CmsKit.Admin.Comments.ICommentAdminAppService" + }, + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/cms-kit-admin/comments/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Admin.Comments.CommentWithAuthorDto", + "typeSimple": "Volo.CmsKit.Admin.Comments.CommentWithAuthorDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.CmsKit.Admin.Comments.ICommentAdminAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/cms-kit-admin/comments/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": false, + "implementFrom": "Volo.CmsKit.Admin.Comments.ICommentAdminAppService" + } + } + }, + "Volo.CmsKit.Admin.Blogs.BlogAdminController": { + "controllerName": "BlogAdmin", + "controllerGroupName": "BlogAdmin", + "type": "Volo.CmsKit.Admin.Blogs.BlogAdminController", + "interfaces": [ + { + "type": "Volo.CmsKit.Admin.Blogs.IBlogAdminAppService" + } + ], + "actions": { + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/cms-kit-admin/blogs/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Admin.Blogs.BlogDto", + "typeSimple": "Volo.CmsKit.Admin.Blogs.BlogDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/cms-kit-admin/blogs", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.CmsKit.Admin.Blogs.BlogGetListInput, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.Blogs.BlogGetListInput", + "typeSimple": "Volo.CmsKit.Admin.Blogs.BlogGetListInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/cms-kit-admin/blogs", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.CmsKit.Admin.Blogs.CreateBlogDto, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.Blogs.CreateBlogDto", + "typeSimple": "Volo.CmsKit.Admin.Blogs.CreateBlogDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Admin.Blogs.CreateBlogDto", + "typeSimple": "Volo.CmsKit.Admin.Blogs.CreateBlogDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Admin.Blogs.BlogDto", + "typeSimple": "Volo.CmsKit.Admin.Blogs.BlogDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/cms-kit-admin/blogs/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.CmsKit.Admin.Blogs.UpdateBlogDto, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.Blogs.UpdateBlogDto", + "typeSimple": "Volo.CmsKit.Admin.Blogs.UpdateBlogDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Admin.Blogs.UpdateBlogDto", + "typeSimple": "Volo.CmsKit.Admin.Blogs.UpdateBlogDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Admin.Blogs.BlogDto", + "typeSimple": "Volo.CmsKit.Admin.Blogs.BlogDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/cms-kit-admin/blogs/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" + } + } + }, + "Volo.CmsKit.Admin.Blogs.BlogFeatureAdminController": { + "controllerName": "BlogFeatureAdmin", + "controllerGroupName": "BlogFeatureAdmin", + "type": "Volo.CmsKit.Admin.Blogs.BlogFeatureAdminController", + "interfaces": [ + { + "type": "Volo.CmsKit.Admin.Blogs.IBlogFeatureAdminAppService" + } + ], + "actions": { + "GetListAsyncByBlogId": { + "uniqueName": "GetListAsyncByBlogId", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/cms-kit-admin/blogs/{blogId}/features", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "blogId", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "blogId", + "name": "blogId", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Collections.Generic.List", + "typeSimple": "[Volo.CmsKit.Blogs.BlogFeatureDto]" + }, + "allowAnonymous": false, + "implementFrom": "Volo.CmsKit.Admin.Blogs.IBlogFeatureAdminAppService" + }, + "SetAsyncByBlogIdAndDto": { + "uniqueName": "SetAsyncByBlogIdAndDto", + "name": "SetAsync", + "httpMethod": "PUT", + "url": "api/cms-kit-admin/blogs/{blogId}/features", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "blogId", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "dto", + "typeAsString": "Volo.CmsKit.Admin.Blogs.BlogFeatureInputDto, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.Blogs.BlogFeatureInputDto", + "typeSimple": "Volo.CmsKit.Admin.Blogs.BlogFeatureInputDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "blogId", + "name": "blogId", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "dto", + "name": "dto", + "jsonName": null, + "type": "Volo.CmsKit.Admin.Blogs.BlogFeatureInputDto", + "typeSimple": "Volo.CmsKit.Admin.Blogs.BlogFeatureInputDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": false, + "implementFrom": "Volo.CmsKit.Admin.Blogs.IBlogFeatureAdminAppService" + } + } + }, + "Volo.CmsKit.Admin.Blogs.BlogPostAdminController": { + "controllerName": "BlogPostAdmin", + "controllerGroupName": "BlogPostAdmin", + "type": "Volo.CmsKit.Admin.Blogs.BlogPostAdminController", + "interfaces": [ + { + "type": "Volo.CmsKit.Admin.Blogs.IBlogPostAdminAppService" + } + ], + "actions": { + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/cms-kit-admin/blogs/blog-posts", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.CmsKit.Admin.Blogs.CreateBlogPostDto, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.Blogs.CreateBlogPostDto", + "typeSimple": "Volo.CmsKit.Admin.Blogs.CreateBlogPostDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Admin.Blogs.CreateBlogPostDto", + "typeSimple": "Volo.CmsKit.Admin.Blogs.CreateBlogPostDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Admin.Blogs.BlogPostDto", + "typeSimple": "Volo.CmsKit.Admin.Blogs.BlogPostDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/cms-kit-admin/blogs/blog-posts/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" + }, + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/cms-kit-admin/blogs/blog-posts/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [ + "GuidRouteConstraint" + ], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Admin.Blogs.BlogPostDto", + "typeSimple": "Volo.CmsKit.Admin.Blogs.BlogPostDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/cms-kit-admin/blogs/blog-posts", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.CmsKit.Admin.Blogs.BlogPostGetListInput, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.Blogs.BlogPostGetListInput", + "typeSimple": "Volo.CmsKit.Admin.Blogs.BlogPostGetListInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "BlogId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/cms-kit-admin/blogs/blog-posts/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.CmsKit.Admin.Blogs.UpdateBlogPostDto, Volo.CmsKit.Admin.Application.Contracts", + "type": "Volo.CmsKit.Admin.Blogs.UpdateBlogPostDto", + "typeSimple": "Volo.CmsKit.Admin.Blogs.UpdateBlogPostDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Admin.Blogs.UpdateBlogPostDto", + "typeSimple": "Volo.CmsKit.Admin.Blogs.UpdateBlogPostDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Admin.Blogs.BlogPostDto", + "typeSimple": "Volo.CmsKit.Admin.Blogs.BlogPostDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" + } + } + } + } + } + }, + "types": {} +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/Volo/CmsKit/Admin/CmsKitAdminHttpApiClientModule.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/Volo/CmsKit/Admin/CmsKitAdminHttpApiClientModule.cs index 586dede103..7cf32ec051 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/Volo/CmsKit/Admin/CmsKitAdminHttpApiClientModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/Volo/CmsKit/Admin/CmsKitAdminHttpApiClientModule.cs @@ -1,6 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Http.Client; using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; namespace Volo.CmsKit.Admin { @@ -11,10 +12,15 @@ namespace Volo.CmsKit.Admin { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddHttpClientProxies( + context.Services.AddStaticHttpClientProxies( typeof(CmsKitAdminApplicationContractsModule).Assembly, CmsKitAdminRemoteServiceConsts.RemoteServiceName ); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebModule.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebModule.cs index 40e852f42d..0459edaa7a 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebModule.cs @@ -15,7 +15,7 @@ using Volo.Abp.AutoMapper; namespace Volo.CmsKit.Admin.Web { [DependsOn( - typeof(CmsKitAdminHttpApiModule), + typeof(CmsKitAdminApplicationContractsModule), typeof(CmsKitCommonWebModule) )] public class CmsKitAdminWebModule : AbpModule diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Create.cshtml b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Create.cshtml index e730d549d3..d6a7b8bc69 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Create.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Create.cshtml @@ -26,6 +26,8 @@ + + } @@ -59,11 +61,11 @@ - + -
diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Index.cshtml index b819b0a161..9eeb977e84 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Index.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Index.cshtml @@ -17,12 +17,14 @@ } @section scripts { - + + + } @section content_toolbar { - @await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new { pageName = typeof(IndexModel).FullName }) + @await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new {pageName = typeof(IndexModel).FullName}) } @@ -36,9 +38,9 @@
- + - \ No newline at end of file + diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Update.cshtml b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Update.cshtml index ca2e02b3f6..34887368f2 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Update.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Update.cshtml @@ -26,6 +26,8 @@ + + } @@ -63,13 +65,13 @@ - -
- + @if (Model.TagsFeature?.IsEnabled == true) @@ -87,4 +89,4 @@ - \ No newline at end of file + diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/Index.cshtml index 10afa5118d..0dbd5eb255 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/Index.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/Index.cshtml @@ -17,12 +17,14 @@ } @section scripts { - - - - - - + + + + + + + + } @section content_toolbar { @@ -35,4 +37,4 @@ -
\ No newline at end of file + diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/Details.cshtml b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/Details.cshtml index a275f8a104..171812c25e 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/Details.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/Details.cshtml @@ -21,17 +21,19 @@ @section styles{ - + } @section scripts { - + + + }
- + @@ -69,7 +71,7 @@ - + @@ -104,4 +106,4 @@

@L["RepliesToThisComment"]

-
\ No newline at end of file + diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/Index.cshtml index 41a4abd911..7ae786fb03 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/Index.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/Index.cshtml @@ -27,7 +27,9 @@ @section scripts { - + + + } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Menus/MenuItems/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Menus/MenuItems/Index.cshtml index e21b2693da..129b6065c0 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Menus/MenuItems/Index.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Menus/MenuItems/Index.cshtml @@ -26,6 +26,8 @@ @section scripts { + + @@ -47,4 +49,4 @@ - \ No newline at end of file + diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Create.cshtml b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Create.cshtml index b154b13261..841576e761 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Create.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Create.cshtml @@ -22,6 +22,8 @@ + + } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Index.cshtml index ffb1e156e0..dc29d90a73 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Index.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Index.cshtml @@ -16,6 +16,8 @@ } @section scripts { + + } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Update.cshtml b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Update.cshtml index f0e833ecb4..1271502946 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Update.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Update.cshtml @@ -23,6 +23,8 @@ + + } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Tags/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Tags/Index.cshtml index e76f0ad9f5..fa75ab74bf 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Tags/Index.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Tags/Index.cshtml @@ -16,6 +16,8 @@ PageLayout.Content.MenuItemName = CmsKitAdminMenus.Tags.TagsMenu; } @section scripts { + + } @@ -33,10 +35,10 @@ - + - \ No newline at end of file + diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Volo.CmsKit.Admin.Web.csproj b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Volo.CmsKit.Admin.Web.csproj index bbb6539455..3b925fc97c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Volo.CmsKit.Admin.Web.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Volo.CmsKit.Admin.Web.csproj @@ -14,7 +14,7 @@ - + @@ -26,10 +26,14 @@ + + + + diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/wwwroot/client-proxies/cms-kit-admin-proxy.js b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/wwwroot/client-proxies/cms-kit-admin-proxy.js new file mode 100644 index 0000000000..2fcf8f4d4c --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/wwwroot/client-proxies/cms-kit-admin-proxy.js @@ -0,0 +1,374 @@ +/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */ + + +// module cms-kit-admin + +(function(){ + + // controller volo.cmsKit.admin.tags.entityTagAdmin + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.admin.tags.entityTagAdmin'); + + volo.cmsKit.admin.tags.entityTagAdmin.addTagToEntity = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/entity-tags', + type: 'POST', + dataType: null, + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.cmsKit.admin.tags.entityTagAdmin.removeTagFromEntity = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/entity-tags' + abp.utils.buildQueryString([{ name: 'tagId', value: input.tagId }, { name: 'entityType', value: input.entityType }, { name: 'entityId', value: input.entityId }]) + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + volo.cmsKit.admin.tags.entityTagAdmin.setEntityTags = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/entity-tags', + type: 'PUT', + dataType: null, + data: JSON.stringify(input) + }, ajaxParams)); + }; + + })(); + + // controller volo.cmsKit.admin.tags.tagAdmin + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.admin.tags.tagAdmin'); + + volo.cmsKit.admin.tags.tagAdmin.create = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/tags', + type: 'POST', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.cmsKit.admin.tags.tagAdmin['delete'] = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/tags/' + id + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + volo.cmsKit.admin.tags.tagAdmin.get = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/tags/' + id + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.cmsKit.admin.tags.tagAdmin.getList = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/tags' + abp.utils.buildQueryString([{ name: 'filter', value: input.filter }, { name: 'sorting', value: input.sorting }, { name: 'skipCount', value: input.skipCount }, { name: 'maxResultCount', value: input.maxResultCount }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.cmsKit.admin.tags.tagAdmin.update = function(id, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/tags/' + id + '', + type: 'PUT', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.cmsKit.admin.tags.tagAdmin.getTagDefinitions = function(ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/tags/tag-definitions', + type: 'GET' + }, ajaxParams)); + }; + + })(); + + // controller volo.cmsKit.admin.pages.pageAdmin + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.admin.pages.pageAdmin'); + + volo.cmsKit.admin.pages.pageAdmin.get = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/pages/' + id + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.cmsKit.admin.pages.pageAdmin.getList = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/pages' + abp.utils.buildQueryString([{ name: 'filter', value: input.filter }, { name: 'sorting', value: input.sorting }, { name: 'skipCount', value: input.skipCount }, { name: 'maxResultCount', value: input.maxResultCount }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.cmsKit.admin.pages.pageAdmin.create = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/pages', + type: 'POST', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.cmsKit.admin.pages.pageAdmin.update = function(id, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/pages/' + id + '', + type: 'PUT', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.cmsKit.admin.pages.pageAdmin['delete'] = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/pages/' + id + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + })(); + + // controller volo.cmsKit.admin.menus.menuItemAdmin + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.admin.menus.menuItemAdmin'); + + volo.cmsKit.admin.menus.menuItemAdmin.getList = function(ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/menu-items', + type: 'GET' + }, ajaxParams)); + }; + + volo.cmsKit.admin.menus.menuItemAdmin.get = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/menu-items/' + id + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.cmsKit.admin.menus.menuItemAdmin.create = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/menu-items', + type: 'POST', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.cmsKit.admin.menus.menuItemAdmin.update = function(id, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/menu-items/' + id + '', + type: 'PUT', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.cmsKit.admin.menus.menuItemAdmin['delete'] = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/menu-items/' + id + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + volo.cmsKit.admin.menus.menuItemAdmin.moveMenuItem = function(id, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/menu-items/' + id + '/move', + type: 'PUT', + dataType: null, + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.cmsKit.admin.menus.menuItemAdmin.getPageLookup = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/menu-items/lookup/pages' + abp.utils.buildQueryString([{ name: 'filter', value: input.filter }, { name: 'sorting', value: input.sorting }, { name: 'skipCount', value: input.skipCount }, { name: 'maxResultCount', value: input.maxResultCount }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + })(); + + // controller volo.cmsKit.admin.mediaDescriptors.mediaDescriptorAdmin + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.admin.mediaDescriptors.mediaDescriptorAdmin'); + + volo.cmsKit.admin.mediaDescriptors.mediaDescriptorAdmin.create = function(entityType, inputStream, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/media/' + entityType + '' + abp.utils.buildQueryString([{ name: 'name', value: inputStream.name }]) + '', + type: 'POST' + }, ajaxParams)); + }; + + volo.cmsKit.admin.mediaDescriptors.mediaDescriptorAdmin['delete'] = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/media/' + id + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + })(); + + // controller volo.cmsKit.admin.comments.commentAdmin + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.admin.comments.commentAdmin'); + + volo.cmsKit.admin.comments.commentAdmin.getList = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/comments' + abp.utils.buildQueryString([{ name: 'entityType', value: input.entityType }, { name: 'text', value: input.text }, { name: 'repliedCommentId', value: input.repliedCommentId }, { name: 'author', value: input.author }, { name: 'creationStartDate', value: input.creationStartDate }, { name: 'creationEndDate', value: input.creationEndDate }, { name: 'sorting', value: input.sorting }, { name: 'skipCount', value: input.skipCount }, { name: 'maxResultCount', value: input.maxResultCount }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.cmsKit.admin.comments.commentAdmin.get = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/comments/' + id + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.cmsKit.admin.comments.commentAdmin['delete'] = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/comments/' + id + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + })(); + + // controller volo.cmsKit.admin.blogs.blogAdmin + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.admin.blogs.blogAdmin'); + + volo.cmsKit.admin.blogs.blogAdmin.get = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/blogs/' + id + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.cmsKit.admin.blogs.blogAdmin.getList = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/blogs' + abp.utils.buildQueryString([{ name: 'filter', value: input.filter }, { name: 'sorting', value: input.sorting }, { name: 'skipCount', value: input.skipCount }, { name: 'maxResultCount', value: input.maxResultCount }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.cmsKit.admin.blogs.blogAdmin.create = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/blogs', + type: 'POST', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.cmsKit.admin.blogs.blogAdmin.update = function(id, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/blogs/' + id + '', + type: 'PUT', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.cmsKit.admin.blogs.blogAdmin['delete'] = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/blogs/' + id + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + })(); + + // controller volo.cmsKit.admin.blogs.blogFeatureAdmin + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.admin.blogs.blogFeatureAdmin'); + + volo.cmsKit.admin.blogs.blogFeatureAdmin.getList = function(blogId, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/blogs/' + blogId + '/features', + type: 'GET' + }, ajaxParams)); + }; + + volo.cmsKit.admin.blogs.blogFeatureAdmin.set = function(blogId, dto, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/blogs/' + blogId + '/features', + type: 'PUT', + dataType: null, + data: JSON.stringify(dto) + }, ajaxParams)); + }; + + })(); + + // controller volo.cmsKit.admin.blogs.blogPostAdmin + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.admin.blogs.blogPostAdmin'); + + volo.cmsKit.admin.blogs.blogPostAdmin.create = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/blogs/blog-posts', + type: 'POST', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.cmsKit.admin.blogs.blogPostAdmin['delete'] = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/blogs/blog-posts/' + id + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + volo.cmsKit.admin.blogs.blogPostAdmin.get = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/blogs/blog-posts/' + id + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.cmsKit.admin.blogs.blogPostAdmin.getList = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/blogs/blog-posts' + abp.utils.buildQueryString([{ name: 'filter', value: input.filter }, { name: 'blogId', value: input.blogId }, { name: 'sorting', value: input.sorting }, { name: 'skipCount', value: input.skipCount }, { name: 'maxResultCount', value: input.maxResultCount }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.cmsKit.admin.blogs.blogPostAdmin.update = function(id, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-admin/blogs/blog-posts/' + id + '', + type: 'PUT', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + })(); + +})(); + + diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/BlogFeatureClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/BlogFeatureClientProxy.Generated.cs new file mode 100644 index 0000000000..9fd02f37b3 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/BlogFeatureClientProxy.Generated.cs @@ -0,0 +1,19 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.CmsKit.Blogs; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Blogs.ClientProxies +{ + public partial class BlogFeatureClientProxy + { + public virtual async Task GetOrDefaultAsync(Guid blogId, string featureName) + { + return await RequestAsync(nameof(GetOrDefaultAsync), blogId, featureName); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/BlogFeatureClientProxy.cs b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/BlogFeatureClientProxy.cs new file mode 100644 index 0000000000..519b22513a --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/BlogFeatureClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of BlogFeatureClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.Blogs; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Blogs.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IBlogFeatureAppService), typeof(BlogFeatureClientProxy))] + public partial class BlogFeatureClientProxy : ClientProxyBase, IBlogFeatureAppService + { + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/MediaDescriptorClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/MediaDescriptorClientProxy.Generated.cs new file mode 100644 index 0000000000..517348fbf7 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/MediaDescriptorClientProxy.Generated.cs @@ -0,0 +1,20 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.CmsKit.MediaDescriptors; +using Volo.Abp.Content; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.MediaDescriptors.ClientProxies +{ + public partial class MediaDescriptorClientProxy + { + public virtual async Task DownloadAsync(Guid id) + { + return await RequestAsync(nameof(DownloadAsync), id); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/MediaDescriptorClientProxy.cs b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/MediaDescriptorClientProxy.cs new file mode 100644 index 0000000000..1aff45b961 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/MediaDescriptorClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of MediaDescriptorClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.MediaDescriptors; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.MediaDescriptors.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IMediaDescriptorAppService), typeof(MediaDescriptorClientProxy))] + public partial class MediaDescriptorClientProxy : ClientProxyBase, IMediaDescriptorAppService + { + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/cms-kit-common-generate-proxy.json b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/cms-kit-common-generate-proxy.json new file mode 100644 index 0000000000..ba052dc973 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/cms-kit-common-generate-proxy.json @@ -0,0 +1,129 @@ +{ + "modules": { + "cms-kit-common": { + "rootPath": "cms-kit-common", + "remoteServiceName": "CmsKitCommon", + "controllers": { + "Volo.CmsKit.MediaDescriptors.MediaDescriptorController": { + "controllerName": "MediaDescriptor", + "controllerGroupName": "MediaDescriptor", + "type": "Volo.CmsKit.MediaDescriptors.MediaDescriptorController", + "interfaces": [ + { + "type": "Volo.CmsKit.MediaDescriptors.IMediaDescriptorAppService" + } + ], + "actions": { + "DownloadAsyncById": { + "uniqueName": "DownloadAsyncById", + "name": "DownloadAsync", + "httpMethod": "GET", + "url": "api/cms-kit/media/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Content.RemoteStreamContent", + "typeSimple": "Volo.Abp.Content.RemoteStreamContent" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.MediaDescriptors.IMediaDescriptorAppService" + } + } + }, + "Volo.CmsKit.Blogs.BlogFeatureController": { + "controllerName": "BlogFeature", + "controllerGroupName": "BlogFeature", + "type": "Volo.CmsKit.Blogs.BlogFeatureController", + "interfaces": [ + { + "type": "Volo.CmsKit.Blogs.IBlogFeatureAppService" + } + ], + "actions": { + "GetOrDefaultAsyncByBlogIdAndFeatureName": { + "uniqueName": "GetOrDefaultAsyncByBlogIdAndFeatureName", + "name": "GetOrDefaultAsync", + "httpMethod": "GET", + "url": "api/cms-kit/blogs/{blogId}/features/{featureName}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "blogId", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "featureName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "blogId", + "name": "blogId", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "featureName", + "name": "featureName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Blogs.BlogFeatureDto", + "typeSimple": "Volo.CmsKit.Blogs.BlogFeatureDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Blogs.IBlogFeatureAppService" + } + } + } + } + } + }, + "types": {} +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/Volo/CmsKit/CmsKitCommonHttpApiClientModule.cs b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/Volo/CmsKit/CmsKitCommonHttpApiClientModule.cs index e46e347d22..bad9e9a844 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/Volo/CmsKit/CmsKitCommonHttpApiClientModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/Volo/CmsKit/CmsKitCommonHttpApiClientModule.cs @@ -1,6 +1,8 @@ using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; using Volo.Abp.Http.Client; using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; namespace Volo.CmsKit { @@ -12,10 +14,15 @@ namespace Volo.CmsKit { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddHttpClientProxies( + context.Services.AddStaticHttpClientProxies( typeof(CmsKitCommonApplicationContractsModule).Assembly, CmsKitCommonRemoteServiceConsts.RemoteServiceName ); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Blogs/BlogFeatureController.cs b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Blogs/BlogFeatureController.cs index 441562e66d..ecb87be110 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Blogs/BlogFeatureController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Blogs/BlogFeatureController.cs @@ -10,7 +10,7 @@ namespace Volo.CmsKit.Blogs { [RequiresGlobalFeature(typeof(BlogsFeature))] [RemoteService(Name = CmsKitCommonRemoteServiceConsts.RemoteServiceName)] - [Area("cms-kit")] + [Area("cms-kit-common")] [Route("api/cms-kit/blogs/{blogId}/features")] public class BlogFeatureController : CmsKitControllerBase, IBlogFeatureAppService { diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/MediaDescriptors/MediaDescriptorController.cs b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/MediaDescriptors/MediaDescriptorController.cs index ce091a2adb..9149d264cd 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/MediaDescriptors/MediaDescriptorController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/MediaDescriptors/MediaDescriptorController.cs @@ -10,7 +10,7 @@ namespace Volo.CmsKit.MediaDescriptors { [RequiresGlobalFeature(typeof(MediaFeature))] [RemoteService(Name = CmsKitCommonRemoteServiceConsts.RemoteServiceName)] - [Area("cms-kit")] + [Area("cms-kit-common")] [Route("api/cms-kit/media")] public class MediaDescriptorController : CmsKitControllerBase, IMediaDescriptorAppService { diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/CmsKitCommonWebModule.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Web/CmsKitCommonWebModule.cs index 53b4359ca7..f100a15878 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Web/CmsKitCommonWebModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/CmsKitCommonWebModule.cs @@ -9,7 +9,7 @@ namespace Volo.CmsKit.Web { [DependsOn( typeof(AbpAspNetCoreMvcUiThemeSharedModule), - typeof(CmsKitCommonHttpApiModule), + typeof(CmsKitCommonApplicationContractsModule), typeof(AbpAutoMapperModule) )] public class CmsKitCommonWebModule : AbpModule diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.csproj b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.csproj index 5d380de8c2..95379d4794 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.csproj @@ -15,7 +15,7 @@ - + diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/wwwroot/client-proxies/cms-kit-common-proxy.js b/modules/cms-kit/src/Volo.CmsKit.Common.Web/wwwroot/client-proxies/cms-kit-common-proxy.js new file mode 100644 index 0000000000..27aa1d819e --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/wwwroot/client-proxies/cms-kit-common-proxy.js @@ -0,0 +1,40 @@ +/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */ + + +// module cms-kit-common + +(function(){ + + // controller volo.cmsKit.mediaDescriptors.mediaDescriptor + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.mediaDescriptors.mediaDescriptor'); + + volo.cmsKit.mediaDescriptors.mediaDescriptor.download = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit/media/' + id + '', + type: 'GET' + }, ajaxParams)); + }; + + })(); + + // controller volo.cmsKit.blogs.blogFeature + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.blogs.blogFeature'); + + volo.cmsKit.blogs.blogFeature.getOrDefault = function(blogId, featureName, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit/blogs/' + blogId + '/features/' + featureName + '', + type: 'GET' + }, ajaxParams)); + }; + + })(); + +})(); + + diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogPostPublicClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogPostPublicClientProxy.Generated.cs new file mode 100644 index 0000000000..64f246412b --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogPostPublicClientProxy.Generated.cs @@ -0,0 +1,24 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.CmsKit.Public.Blogs; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Blogs.ClientProxies +{ + public partial class BlogPostPublicClientProxy + { + public virtual async Task GetAsync(string blogSlug, string blogPostSlug) + { + return await RequestAsync(nameof(GetAsync), blogSlug, blogPostSlug); + } + + public virtual async Task> GetListAsync(string blogSlug, PagedAndSortedResultRequestDto input) + { + return await RequestAsync>(nameof(GetListAsync), blogSlug, input); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogPostPublicClientProxy.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogPostPublicClientProxy.cs new file mode 100644 index 0000000000..1cb6ea5aec --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogPostPublicClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of BlogPostPublicClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.Public.Blogs; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Blogs.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IBlogPostPublicAppService), typeof(BlogPostPublicClientProxy))] + public partial class BlogPostPublicClientProxy : ClientProxyBase, IBlogPostPublicAppService + { + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs new file mode 100644 index 0000000000..21f49b9324 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs @@ -0,0 +1,34 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.CmsKit.Public.Comments; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Comments.ClientProxies +{ + public partial class CommentPublicClientProxy + { + public virtual async Task> GetListAsync(string entityType, string entityId) + { + return await RequestAsync>(nameof(GetListAsync), entityType, entityId); + } + + public virtual async Task CreateAsync(string entityType, string entityId, CreateCommentInput input) + { + return await RequestAsync(nameof(CreateAsync), entityType, entityId, input); + } + + public virtual async Task UpdateAsync(Guid id, UpdateCommentInput input) + { + return await RequestAsync(nameof(UpdateAsync), id, input); + } + + public virtual async Task DeleteAsync(Guid id) + { + await RequestAsync(nameof(DeleteAsync), id); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/CommentPublicClientProxy.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/CommentPublicClientProxy.cs new file mode 100644 index 0000000000..38e681a266 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/CommentPublicClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of CommentPublicClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.Public.Comments; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Comments.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(ICommentPublicAppService), typeof(CommentPublicClientProxy))] + public partial class CommentPublicClientProxy : ClientProxyBase, ICommentPublicAppService + { + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/MenuItemPublicClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/MenuItemPublicClientProxy.Generated.cs new file mode 100644 index 0000000000..740985a03a --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/MenuItemPublicClientProxy.Generated.cs @@ -0,0 +1,21 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.CmsKit.Public.Menus; +using System.Collections.Generic; +using Volo.CmsKit.Menus; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Menus.ClientProxies +{ + public partial class MenuItemPublicClientProxy + { + public virtual async Task> GetListAsync() + { + return await RequestAsync>(nameof(GetListAsync)); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/MenuItemPublicClientProxy.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/MenuItemPublicClientProxy.cs new file mode 100644 index 0000000000..a6cc1a3593 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/MenuItemPublicClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of MenuItemPublicClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.Public.Menus; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Menus.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IMenuItemPublicAppService), typeof(MenuItemPublicClientProxy))] + public partial class MenuItemPublicClientProxy : ClientProxyBase, IMenuItemPublicAppService + { + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/PagesPublicClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/PagesPublicClientProxy.Generated.cs new file mode 100644 index 0000000000..76fcfc0dd7 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/PagesPublicClientProxy.Generated.cs @@ -0,0 +1,19 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.CmsKit.Public.Pages; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Pages.ClientProxies +{ + public partial class PagesPublicClientProxy + { + public virtual async Task FindBySlugAsync(string slug) + { + return await RequestAsync(nameof(FindBySlugAsync), slug); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/PagesPublicClientProxy.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/PagesPublicClientProxy.cs new file mode 100644 index 0000000000..5927267ca8 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/PagesPublicClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of PagesPublicClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.Public.Pages; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Pages.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IPagePublicAppService), typeof(PagesPublicClientProxy))] + public partial class PagesPublicClientProxy : ClientProxyBase, IPagePublicAppService + { + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs new file mode 100644 index 0000000000..b351e55c67 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs @@ -0,0 +1,30 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.CmsKit.Public.Ratings; +using System.Collections.Generic; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Ratings.ClientProxies +{ + public partial class RatingPublicClientProxy + { + public virtual async Task CreateAsync(string entityType, string entityId, CreateUpdateRatingInput input) + { + return await RequestAsync(nameof(CreateAsync), entityType, entityId, input); + } + + public virtual async Task DeleteAsync(string entityType, string entityId) + { + await RequestAsync(nameof(DeleteAsync), entityType, entityId); + } + + public virtual async Task> GetGroupedStarCountsAsync(string entityType, string entityId) + { + return await RequestAsync>(nameof(GetGroupedStarCountsAsync), entityType, entityId); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/RatingPublicClientProxy.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/RatingPublicClientProxy.cs new file mode 100644 index 0000000000..dcd359ea18 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/RatingPublicClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of RatingPublicClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.Public.Ratings; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Ratings.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IRatingPublicAppService), typeof(RatingPublicClientProxy))] + public partial class RatingPublicClientProxy : ClientProxyBase, IRatingPublicAppService + { + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/ReactionPublicClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/ReactionPublicClientProxy.Generated.cs new file mode 100644 index 0000000000..e3c7ccde04 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/ReactionPublicClientProxy.Generated.cs @@ -0,0 +1,29 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.CmsKit.Public.Reactions; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Reactions.ClientProxies +{ + public partial class ReactionPublicClientProxy + { + public virtual async Task> GetForSelectionAsync(string entityType, string entityId) + { + return await RequestAsync>(nameof(GetForSelectionAsync), entityType, entityId); + } + + public virtual async Task CreateAsync(string entityType, string entityId, string reaction) + { + await RequestAsync(nameof(CreateAsync), entityType, entityId, reaction); + } + + public virtual async Task DeleteAsync(string entityType, string entityId, string reaction) + { + await RequestAsync(nameof(DeleteAsync), entityType, entityId, reaction); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/ReactionPublicClientProxy.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/ReactionPublicClientProxy.cs new file mode 100644 index 0000000000..8e4a219955 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/ReactionPublicClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of ReactionPublicClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.Public.Reactions; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Reactions.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IReactionPublicAppService), typeof(ReactionPublicClientProxy))] + public partial class ReactionPublicClientProxy : ClientProxyBase, IReactionPublicAppService + { + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/TagPublicClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/TagPublicClientProxy.Generated.cs new file mode 100644 index 0000000000..b5c1bb31e1 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/TagPublicClientProxy.Generated.cs @@ -0,0 +1,20 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.CmsKit.Tags; +using System.Collections.Generic; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Tags.ClientProxies +{ + public partial class TagPublicClientProxy + { + public virtual async Task> GetAllRelatedTagsAsync(string entityType, string entityId) + { + return await RequestAsync>(nameof(GetAllRelatedTagsAsync), entityType, entityId); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/TagPublicClientProxy.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/TagPublicClientProxy.cs new file mode 100644 index 0000000000..228d75003d --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/TagPublicClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of TagPublicClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.Tags; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Tags.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(ITagAppService), typeof(TagPublicClientProxy))] + public partial class TagPublicClientProxy : ClientProxyBase, ITagAppService + { + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json new file mode 100644 index 0000000000..0387176b02 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json @@ -0,0 +1,972 @@ +{ + "modules": { + "cms-kit": { + "rootPath": "cms-kit", + "remoteServiceName": "CmsKitPublic", + "controllers": { + "Volo.CmsKit.Public.Tags.TagPublicController": { + "controllerName": "TagPublic", + "controllerGroupName": "TagPublic", + "type": "Volo.CmsKit.Public.Tags.TagPublicController", + "interfaces": [ + { + "type": "Volo.CmsKit.Tags.ITagAppService" + } + ], + "actions": { + "GetAllRelatedTagsAsyncByEntityTypeAndEntityId": { + "uniqueName": "GetAllRelatedTagsAsyncByEntityTypeAndEntityId", + "name": "GetAllRelatedTagsAsync", + "httpMethod": "GET", + "url": "api/cms-kit-public/tags/{entityType}/{entityId}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "entityId", + "name": "entityId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Collections.Generic.List", + "typeSimple": "[Volo.CmsKit.Tags.TagDto]" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Tags.ITagAppService" + } + } + }, + "Volo.CmsKit.Public.Reactions.ReactionPublicController": { + "controllerName": "ReactionPublic", + "controllerGroupName": "ReactionPublic", + "type": "Volo.CmsKit.Public.Reactions.ReactionPublicController", + "interfaces": [ + { + "type": "Volo.CmsKit.Public.Reactions.IReactionPublicAppService" + } + ], + "actions": { + "GetForSelectionAsyncByEntityTypeAndEntityId": { + "uniqueName": "GetForSelectionAsyncByEntityTypeAndEntityId", + "name": "GetForSelectionAsync", + "httpMethod": "GET", + "url": "api/cms-kit-public/reactions/{entityType}/{entityId}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "entityId", + "name": "entityId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Reactions.IReactionPublicAppService" + }, + "CreateAsyncByEntityTypeAndEntityIdAndReaction": { + "uniqueName": "CreateAsyncByEntityTypeAndEntityIdAndReaction", + "name": "CreateAsync", + "httpMethod": "PUT", + "url": "api/cms-kit-public/reactions/{entityType}/{entityId}/{reaction}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "reaction", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "entityId", + "name": "entityId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "reaction", + "name": "reaction", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Reactions.IReactionPublicAppService" + }, + "DeleteAsyncByEntityTypeAndEntityIdAndReaction": { + "uniqueName": "DeleteAsyncByEntityTypeAndEntityIdAndReaction", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/cms-kit-public/reactions/{entityType}/{entityId}/{reaction}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "reaction", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "entityId", + "name": "entityId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "reaction", + "name": "reaction", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Reactions.IReactionPublicAppService" + } + } + }, + "Volo.CmsKit.Public.Ratings.RatingPublicController": { + "controllerName": "RatingPublic", + "controllerGroupName": "RatingPublic", + "type": "Volo.CmsKit.Public.Ratings.RatingPublicController", + "interfaces": [ + { + "type": "Volo.CmsKit.Public.Ratings.IRatingPublicAppService" + } + ], + "actions": { + "CreateAsyncByEntityTypeAndEntityIdAndInput": { + "uniqueName": "CreateAsyncByEntityTypeAndEntityIdAndInput", + "name": "CreateAsync", + "httpMethod": "PUT", + "url": "api/cms-kit-public/ratings/{entityType}/{entityId}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput, Volo.CmsKit.Public.Application.Contracts", + "type": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput", + "typeSimple": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "entityId", + "name": "entityId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput", + "typeSimple": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Public.Ratings.RatingDto", + "typeSimple": "Volo.CmsKit.Public.Ratings.RatingDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Ratings.IRatingPublicAppService" + }, + "DeleteAsyncByEntityTypeAndEntityId": { + "uniqueName": "DeleteAsyncByEntityTypeAndEntityId", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/cms-kit-public/ratings/{entityType}/{entityId}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "entityId", + "name": "entityId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Ratings.IRatingPublicAppService" + }, + "GetGroupedStarCountsAsyncByEntityTypeAndEntityId": { + "uniqueName": "GetGroupedStarCountsAsyncByEntityTypeAndEntityId", + "name": "GetGroupedStarCountsAsync", + "httpMethod": "GET", + "url": "api/cms-kit-public/ratings/{entityType}/{entityId}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "entityId", + "name": "entityId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Collections.Generic.List", + "typeSimple": "[Volo.CmsKit.Public.Ratings.RatingWithStarCountDto]" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Ratings.IRatingPublicAppService" + } + } + }, + "Volo.CmsKit.Public.Pages.PagesPublicController": { + "controllerName": "PagesPublic", + "controllerGroupName": "PagesPublic", + "type": "Volo.CmsKit.Public.Pages.PagesPublicController", + "interfaces": [ + { + "type": "Volo.CmsKit.Public.Pages.IPagePublicAppService" + } + ], + "actions": { + "FindBySlugAsyncBySlug": { + "uniqueName": "FindBySlugAsyncBySlug", + "name": "FindBySlugAsync", + "httpMethod": "GET", + "url": "api/cms-kit-public/pages/{slug}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "slug", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "slug", + "name": "slug", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Public.Pages.PageDto", + "typeSimple": "Volo.CmsKit.Public.Pages.PageDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Pages.IPagePublicAppService" + } + } + }, + "Volo.CmsKit.Public.Menus.MenuItemPublicController": { + "controllerName": "MenuItemPublic", + "controllerGroupName": "MenuItemPublic", + "type": "Volo.CmsKit.Public.Menus.MenuItemPublicController", + "interfaces": [ + { + "type": "Volo.CmsKit.Public.Menus.IMenuItemPublicAppService" + } + ], + "actions": { + "GetListAsync": { + "uniqueName": "GetListAsync", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/cms-kit-public/menu-items", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.Collections.Generic.List", + "typeSimple": "[Volo.CmsKit.Menus.MenuItemDto]" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Menus.IMenuItemPublicAppService" + } + } + }, + "Volo.CmsKit.Public.Comments.CommentPublicController": { + "controllerName": "CommentPublic", + "controllerGroupName": "CommentPublic", + "type": "Volo.CmsKit.Public.Comments.CommentPublicController", + "interfaces": [ + { + "type": "Volo.CmsKit.Public.Comments.ICommentPublicAppService" + } + ], + "actions": { + "GetListAsyncByEntityTypeAndEntityId": { + "uniqueName": "GetListAsyncByEntityTypeAndEntityId", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/cms-kit-public/comments/{entityType}/{entityId}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "entityId", + "name": "entityId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Comments.ICommentPublicAppService" + }, + "CreateAsyncByEntityTypeAndEntityIdAndInput": { + "uniqueName": "CreateAsyncByEntityTypeAndEntityIdAndInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/cms-kit-public/comments/{entityType}/{entityId}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.CmsKit.Public.Comments.CreateCommentInput, Volo.CmsKit.Public.Application.Contracts", + "type": "Volo.CmsKit.Public.Comments.CreateCommentInput", + "typeSimple": "Volo.CmsKit.Public.Comments.CreateCommentInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "entityId", + "name": "entityId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Public.Comments.CreateCommentInput", + "typeSimple": "Volo.CmsKit.Public.Comments.CreateCommentInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Public.Comments.CommentDto", + "typeSimple": "Volo.CmsKit.Public.Comments.CommentDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Comments.ICommentPublicAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/cms-kit-public/comments/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.CmsKit.Public.Comments.UpdateCommentInput, Volo.CmsKit.Public.Application.Contracts", + "type": "Volo.CmsKit.Public.Comments.UpdateCommentInput", + "typeSimple": "Volo.CmsKit.Public.Comments.UpdateCommentInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Public.Comments.UpdateCommentInput", + "typeSimple": "Volo.CmsKit.Public.Comments.UpdateCommentInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Public.Comments.CommentDto", + "typeSimple": "Volo.CmsKit.Public.Comments.CommentDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Comments.ICommentPublicAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/cms-kit-public/comments/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Comments.ICommentPublicAppService" + } + } + }, + "Volo.CmsKit.Public.Blogs.BlogPostPublicController": { + "controllerName": "BlogPostPublic", + "controllerGroupName": "BlogPostPublic", + "type": "Volo.CmsKit.Public.Blogs.BlogPostPublicController", + "interfaces": [ + { + "type": "Volo.CmsKit.Public.Blogs.IBlogPostPublicAppService" + } + ], + "actions": { + "GetAsyncByBlogSlugAndBlogPostSlug": { + "uniqueName": "GetAsyncByBlogSlugAndBlogPostSlug", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/cms-kit-public/blog-posts/{blogSlug}/{blogPostSlug}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "blogSlug", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "blogPostSlug", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "blogSlug", + "name": "blogSlug", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "blogPostSlug", + "name": "blogPostSlug", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Public.Blogs.BlogPostPublicDto", + "typeSimple": "Volo.CmsKit.Public.Blogs.BlogPostPublicDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Blogs.IBlogPostPublicAppService" + }, + "GetListAsyncByBlogSlugAndInput": { + "uniqueName": "GetListAsyncByBlogSlugAndInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/cms-kit-public/blog-posts/{blogSlug}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "blogSlug", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto, Volo.Abp.Ddd.Application.Contracts", + "type": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "blogSlug", + "name": "blogSlug", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Blogs.IBlogPostPublicAppService" + } + } + } + } + } + }, + "types": {} +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/Volo/CmsKit/Public/CmsKitPublicHttpApiClientModule.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/Volo/CmsKit/Public/CmsKitPublicHttpApiClientModule.cs index f8a8ee0fe3..cc5d5e2794 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/Volo/CmsKit/Public/CmsKitPublicHttpApiClientModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/Volo/CmsKit/Public/CmsKitPublicHttpApiClientModule.cs @@ -1,6 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Http.Client; using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; namespace Volo.CmsKit.Public { @@ -11,10 +12,15 @@ namespace Volo.CmsKit.Public { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddHttpClientProxies( + context.Services.AddStaticHttpClientProxies( typeof(CmsKitPublicApplicationContractsModule).Assembly, CmsKitPublicRemoteServiceConsts.RemoteServiceName ); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs index 23fdd07206..f0fcce6abc 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs @@ -16,7 +16,7 @@ using Volo.CmsKit.Web; namespace Volo.CmsKit.Public.Web { [DependsOn( - typeof(CmsKitPublicHttpApiModule), + typeof(CmsKitPublicApplicationContractsModule), typeof(CmsKitCommonWebModule) )] public class CmsKitPublicWebModule : AbpModule diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Controllers/CmsKitPublicWidgetsController.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Controllers/CmsKitPublicWidgetsController.cs index e0b1f9d6f3..7aaefc8f9b 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Controllers/CmsKitPublicWidgetsController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Controllers/CmsKitPublicWidgetsController.cs @@ -1,12 +1,13 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc; using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Commenting; using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Rating; using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.ReactionSelection; namespace Volo.CmsKit.Public.Web.Controllers { - public class CmsKitPublicWidgetsController : CmsKitPublicControllerBase + public class CmsKitPublicWidgetsController : AbpController { public Task ReactionSelection(string entityType, string entityId) { diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/CommentingScriptBundleContributor.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/CommentingScriptBundleContributor.cs index 3e27c22b41..2b92891e6e 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/CommentingScriptBundleContributor.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/CommentingScriptBundleContributor.cs @@ -7,6 +7,8 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Commenting { public override void ConfigureBundle(BundleConfigurationContext context) { + context.Files.AddIfNotContains("/client-proxies/cms-kit-common-proxy.js"); + context.Files.AddIfNotContains("/client-proxies/cms-kit-proxy.js"); context.Files.AddIfNotContains("/Pages/CmsKit/Shared/Components/Commenting/default.js"); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/RatingScriptBundleContributor.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/RatingScriptBundleContributor.cs index 4340cea485..d89322e213 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/RatingScriptBundleContributor.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/RatingScriptBundleContributor.cs @@ -10,7 +10,9 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Rating { public override void ConfigureBundle(BundleConfigurationContext context) { + context.Files.AddIfNotContains("/client-proxies/cms-kit-common-proxy.js"); + context.Files.AddIfNotContains("/client-proxies/cms-kit-proxy.js"); context.Files.AddIfNotContains("/Pages/CmsKit/Shared/Components/Rating/default.js"); } } -} \ No newline at end of file +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/ReactionSelection/ReactionSelectionScriptBundleContributor.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/ReactionSelection/ReactionSelectionScriptBundleContributor.cs index d776725dc3..ee9bc5d032 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/ReactionSelection/ReactionSelectionScriptBundleContributor.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/ReactionSelection/ReactionSelectionScriptBundleContributor.cs @@ -7,6 +7,8 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.ReactionSelectio { public override void ConfigureBundle(BundleConfigurationContext context) { + context.Files.AddIfNotContains("/client-proxies/cms-kit-common-proxy.js"); + context.Files.AddIfNotContains("/client-proxies/cms-kit-proxy.js"); context.Files.AddIfNotContains("/Pages/CmsKit/Shared/Components/ReactionSelection/default.js"); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/TagViewComponent.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/TagViewComponent.cs index 33031c4c21..e8c271d463 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/TagViewComponent.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/TagViewComponent.cs @@ -6,7 +6,6 @@ using System.Text; using System.Threading.Tasks; using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc.UI.Widgets; -using Volo.CmsKit.Public.Tags; using Volo.CmsKit.Tags; namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Tags diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Volo.CmsKit.Public.Web.csproj b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Volo.CmsKit.Public.Web.csproj index 237667e7ec..9e3e272063 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Volo.CmsKit.Public.Web.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Volo.CmsKit.Public.Web.csproj @@ -14,7 +14,7 @@ - + @@ -28,6 +28,10 @@ + + + + diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/wwwroot/client-proxies/cms-kit-proxy.js b/modules/cms-kit/src/Volo.CmsKit.Public.Web/wwwroot/client-proxies/cms-kit-proxy.js new file mode 100644 index 0000000000..a135611cac --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/wwwroot/client-proxies/cms-kit-proxy.js @@ -0,0 +1,178 @@ +/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */ + + +// module cms-kit + +(function(){ + + // controller volo.cmsKit.public.tags.tagPublic + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.public.tags.tagPublic'); + + volo.cmsKit.public.tags.tagPublic.getAllRelatedTags = function(entityType, entityId, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/tags/' + entityType + '/' + entityId + '', + type: 'GET' + }, ajaxParams)); + }; + + })(); + + // controller volo.cmsKit.public.reactions.reactionPublic + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.public.reactions.reactionPublic'); + + volo.cmsKit.public.reactions.reactionPublic.getForSelection = function(entityType, entityId, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/reactions/' + entityType + '/' + entityId + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.cmsKit.public.reactions.reactionPublic.create = function(entityType, entityId, reaction, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/reactions/' + entityType + '/' + entityId + '/' + reaction + '', + type: 'PUT', + dataType: null + }, ajaxParams)); + }; + + volo.cmsKit.public.reactions.reactionPublic['delete'] = function(entityType, entityId, reaction, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/reactions/' + entityType + '/' + entityId + '/' + reaction + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + })(); + + // controller volo.cmsKit.public.ratings.ratingPublic + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.public.ratings.ratingPublic'); + + volo.cmsKit.public.ratings.ratingPublic.create = function(entityType, entityId, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/ratings/' + entityType + '/' + entityId + '', + type: 'PUT', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.cmsKit.public.ratings.ratingPublic['delete'] = function(entityType, entityId, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/ratings/' + entityType + '/' + entityId + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + volo.cmsKit.public.ratings.ratingPublic.getGroupedStarCounts = function(entityType, entityId, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/ratings/' + entityType + '/' + entityId + '', + type: 'GET' + }, ajaxParams)); + }; + + })(); + + // controller volo.cmsKit.public.pages.pagesPublic + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.public.pages.pagesPublic'); + + volo.cmsKit.public.pages.pagesPublic.findBySlug = function(slug, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/pages/' + slug + '', + type: 'GET' + }, ajaxParams)); + }; + + })(); + + // controller volo.cmsKit.public.menus.menuItemPublic + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.public.menus.menuItemPublic'); + + volo.cmsKit.public.menus.menuItemPublic.getList = function(ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/menu-items', + type: 'GET' + }, ajaxParams)); + }; + + })(); + + // controller volo.cmsKit.public.comments.commentPublic + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.public.comments.commentPublic'); + + volo.cmsKit.public.comments.commentPublic.getList = function(entityType, entityId, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/comments/' + entityType + '/' + entityId + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.cmsKit.public.comments.commentPublic.create = function(entityType, entityId, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/comments/' + entityType + '/' + entityId + '', + type: 'POST', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.cmsKit.public.comments.commentPublic.update = function(id, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/comments/' + id + '', + type: 'PUT', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.cmsKit.public.comments.commentPublic['delete'] = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/comments/' + id + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + })(); + + // controller volo.cmsKit.public.blogs.blogPostPublic + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.public.blogs.blogPostPublic'); + + volo.cmsKit.public.blogs.blogPostPublic.get = function(blogSlug, blogPostSlug, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/blog-posts/' + blogSlug + '/' + blogPostSlug + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.cmsKit.public.blogs.blogPostPublic.getList = function(blogSlug, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/blog-posts/' + blogSlug + '' + abp.utils.buildQueryString([{ name: 'skipCount', value: input.skipCount }, { name: 'maxResultCount', value: input.maxResultCount }, { name: 'sorting', value: input.sorting }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + })(); + +})(); + + diff --git a/modules/cms-kit/src/Volo.CmsKit.Web/CmsKitWebModule.cs b/modules/cms-kit/src/Volo.CmsKit.Web/CmsKitWebModule.cs index c54ec27feb..a73939032c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Web/CmsKitWebModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Web/CmsKitWebModule.cs @@ -7,7 +7,7 @@ namespace Volo.CmsKit.Web [DependsOn( typeof(CmsKitPublicWebModule), typeof(CmsKitAdminWebModule), - typeof(CmsKitHttpApiModule) + typeof(CmsKitApplicationContractsModule) )] public class CmsKitWebModule : AbpModule { diff --git a/modules/cms-kit/src/Volo.CmsKit.Web/Volo.CmsKit.Web.csproj b/modules/cms-kit/src/Volo.CmsKit.Web/Volo.CmsKit.Web.csproj index b99150c087..4eeb97c9f2 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Web/Volo.CmsKit.Web.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Web/Volo.CmsKit.Web.csproj @@ -15,7 +15,7 @@ - + diff --git a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/DocumentsAdminClientProxy.Generated.cs b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/DocumentsAdminClientProxy.Generated.cs new file mode 100644 index 0000000000..3101fa73d9 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/DocumentsAdminClientProxy.Generated.cs @@ -0,0 +1,44 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Docs.Admin.Documents; + +// ReSharper disable once CheckNamespace +namespace Volo.Docs.Admin.ClientProxies +{ + public partial class DocumentsAdminClientProxy + { + public virtual async Task ClearCacheAsync(ClearCacheInput input) + { + await RequestAsync(nameof(ClearCacheAsync), input); + } + + public virtual async Task PullAllAsync(PullAllDocumentInput input) + { + await RequestAsync(nameof(PullAllAsync), input); + } + + public virtual async Task PullAsync(PullDocumentInput input) + { + await RequestAsync(nameof(PullAsync), input); + } + + public virtual async Task> GetAllAsync(GetAllInput input) + { + return await RequestAsync>(nameof(GetAllAsync), input); + } + + public virtual async Task RemoveFromCacheAsync(Guid documentId) + { + await RequestAsync(nameof(RemoveFromCacheAsync), documentId); + } + + public virtual async Task ReindexAsync(Guid documentId) + { + await RequestAsync(nameof(ReindexAsync), documentId); + } + } +} diff --git a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/DocumentsAdminClientProxy.cs b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/DocumentsAdminClientProxy.cs new file mode 100644 index 0000000000..58beb652f0 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/DocumentsAdminClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of DocumentsAdminClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Docs.Admin.Documents; + +// ReSharper disable once CheckNamespace +namespace Volo.Docs.Admin.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IDocumentAdminAppService), typeof(DocumentsAdminClientProxy))] + public partial class DocumentsAdminClientProxy : ClientProxyBase, IDocumentAdminAppService + { + } +} diff --git a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/ProjectsAdminClientProxy.Generated.cs b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/ProjectsAdminClientProxy.Generated.cs new file mode 100644 index 0000000000..17b620dd29 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/ProjectsAdminClientProxy.Generated.cs @@ -0,0 +1,49 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Docs.Admin.Projects; + +// ReSharper disable once CheckNamespace +namespace Volo.Docs.Admin.ClientProxies +{ + public partial class ProjectsAdminClientProxy + { + public virtual async Task> GetListAsync(PagedAndSortedResultRequestDto input) + { + return await RequestAsync>(nameof(GetListAsync), input); + } + + public virtual async Task GetAsync(Guid id) + { + return await RequestAsync(nameof(GetAsync), id); + } + + public virtual async Task CreateAsync(CreateProjectDto input) + { + return await RequestAsync(nameof(CreateAsync), input); + } + + public virtual async Task UpdateAsync(Guid id, UpdateProjectDto input) + { + return await RequestAsync(nameof(UpdateAsync), id, input); + } + + public virtual async Task DeleteAsync(Guid id) + { + await RequestAsync(nameof(DeleteAsync), id); + } + + public virtual async Task ReindexAllAsync() + { + await RequestAsync(nameof(ReindexAllAsync)); + } + + public virtual async Task ReindexAsync(ReindexInput input) + { + await RequestAsync(nameof(ReindexAsync), input); + } + } +} diff --git a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/ProjectsAdminClientProxy.cs b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/ProjectsAdminClientProxy.cs new file mode 100644 index 0000000000..92a7eee051 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/ProjectsAdminClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of ProjectsAdminClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Docs.Admin.Projects; + +// ReSharper disable once CheckNamespace +namespace Volo.Docs.Admin.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IProjectAdminAppService), typeof(ProjectsAdminClientProxy))] + public partial class ProjectsAdminClientProxy : ClientProxyBase, IProjectAdminAppService + { + } +} diff --git a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/docs-admin-generate-proxy.json b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/docs-admin-generate-proxy.json new file mode 100644 index 0000000000..e85e6fbb43 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/docs-admin-generate-proxy.json @@ -0,0 +1,730 @@ +{ + "modules": { + "docs-admin": { + "rootPath": "docs-admin", + "remoteServiceName": "AbpDocsAdmin", + "controllers": { + "Volo.Docs.Admin.DocumentsAdminController": { + "controllerName": "DocumentsAdmin", + "controllerGroupName": "DocumentsAdmin", + "type": "Volo.Docs.Admin.DocumentsAdminController", + "interfaces": [ + { + "type": "Volo.Docs.Admin.Documents.IDocumentAdminAppService" + } + ], + "actions": { + "ClearCacheAsyncByInput": { + "uniqueName": "ClearCacheAsyncByInput", + "name": "ClearCacheAsync", + "httpMethod": "POST", + "url": "api/docs/admin/documents/ClearCache", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Docs.Admin.Documents.ClearCacheInput, Volo.Docs.Admin.Application.Contracts", + "type": "Volo.Docs.Admin.Documents.ClearCacheInput", + "typeSimple": "Volo.Docs.Admin.Documents.ClearCacheInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Docs.Admin.Documents.ClearCacheInput", + "typeSimple": "Volo.Docs.Admin.Documents.ClearCacheInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Admin.Documents.IDocumentAdminAppService" + }, + "PullAllAsyncByInput": { + "uniqueName": "PullAllAsyncByInput", + "name": "PullAllAsync", + "httpMethod": "POST", + "url": "api/docs/admin/documents/PullAll", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Docs.Admin.Documents.PullAllDocumentInput, Volo.Docs.Admin.Application.Contracts", + "type": "Volo.Docs.Admin.Documents.PullAllDocumentInput", + "typeSimple": "Volo.Docs.Admin.Documents.PullAllDocumentInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Docs.Admin.Documents.PullAllDocumentInput", + "typeSimple": "Volo.Docs.Admin.Documents.PullAllDocumentInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Admin.Documents.IDocumentAdminAppService" + }, + "PullAsyncByInput": { + "uniqueName": "PullAsyncByInput", + "name": "PullAsync", + "httpMethod": "POST", + "url": "api/docs/admin/documents/Pull", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Docs.Admin.Documents.PullDocumentInput, Volo.Docs.Admin.Application.Contracts", + "type": "Volo.Docs.Admin.Documents.PullDocumentInput", + "typeSimple": "Volo.Docs.Admin.Documents.PullDocumentInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Docs.Admin.Documents.PullDocumentInput", + "typeSimple": "Volo.Docs.Admin.Documents.PullDocumentInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Admin.Documents.IDocumentAdminAppService" + }, + "GetAllAsyncByInput": { + "uniqueName": "GetAllAsyncByInput", + "name": "GetAllAsync", + "httpMethod": "GET", + "url": "api/docs/admin/documents/GetAll", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Docs.Admin.Documents.GetAllInput, Volo.Docs.Admin.Application.Contracts", + "type": "Volo.Docs.Admin.Documents.GetAllInput", + "typeSimple": "Volo.Docs.Admin.Documents.GetAllInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "ProjectId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Version", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "LanguageCode", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "FileName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Format", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "CreationTimeMin", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "CreationTimeMax", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "LastUpdatedTimeMin", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "LastUpdatedTimeMax", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "LastSignificantUpdateTimeMin", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "LastSignificantUpdateTimeMax", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "LastCachedTimeMin", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "LastCachedTimeMax", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Admin.Documents.IDocumentAdminAppService" + }, + "RemoveFromCacheAsyncByDocumentId": { + "uniqueName": "RemoveFromCacheAsyncByDocumentId", + "name": "RemoveFromCacheAsync", + "httpMethod": "PUT", + "url": "api/docs/admin/documents/RemoveDocumentFromCache", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "documentId", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "documentId", + "name": "documentId", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Admin.Documents.IDocumentAdminAppService" + }, + "ReindexAsyncByDocumentId": { + "uniqueName": "ReindexAsyncByDocumentId", + "name": "ReindexAsync", + "httpMethod": "PUT", + "url": "api/docs/admin/documents/ReindexDocument", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "documentId", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "documentId", + "name": "documentId", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Admin.Documents.IDocumentAdminAppService" + } + } + }, + "Volo.Docs.Admin.ProjectsAdminController": { + "controllerName": "ProjectsAdmin", + "controllerGroupName": "ProjectsAdmin", + "type": "Volo.Docs.Admin.ProjectsAdminController", + "interfaces": [ + { + "type": "Volo.Docs.Admin.Projects.IProjectAdminAppService" + } + ], + "actions": { + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/docs/admin/projects", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto, Volo.Abp.Ddd.Application.Contracts", + "type": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Admin.Projects.IProjectAdminAppService" + }, + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/docs/admin/projects/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Docs.Admin.Projects.ProjectDto", + "typeSimple": "Volo.Docs.Admin.Projects.ProjectDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Admin.Projects.IProjectAdminAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/docs/admin/projects", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Docs.Admin.Projects.CreateProjectDto, Volo.Docs.Admin.Application.Contracts", + "type": "Volo.Docs.Admin.Projects.CreateProjectDto", + "typeSimple": "Volo.Docs.Admin.Projects.CreateProjectDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Docs.Admin.Projects.CreateProjectDto", + "typeSimple": "Volo.Docs.Admin.Projects.CreateProjectDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Docs.Admin.Projects.ProjectDto", + "typeSimple": "Volo.Docs.Admin.Projects.ProjectDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Admin.Projects.IProjectAdminAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/docs/admin/projects/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Docs.Admin.Projects.UpdateProjectDto, Volo.Docs.Admin.Application.Contracts", + "type": "Volo.Docs.Admin.Projects.UpdateProjectDto", + "typeSimple": "Volo.Docs.Admin.Projects.UpdateProjectDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Docs.Admin.Projects.UpdateProjectDto", + "typeSimple": "Volo.Docs.Admin.Projects.UpdateProjectDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Docs.Admin.Projects.ProjectDto", + "typeSimple": "Volo.Docs.Admin.Projects.ProjectDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Admin.Projects.IProjectAdminAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/docs/admin/projects", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Admin.Projects.IProjectAdminAppService" + }, + "ReindexAllAsync": { + "uniqueName": "ReindexAllAsync", + "name": "ReindexAllAsync", + "httpMethod": "POST", + "url": "api/docs/admin/projects/ReindexAll", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Admin.Projects.IProjectAdminAppService" + }, + "ReindexAsyncByInput": { + "uniqueName": "ReindexAsyncByInput", + "name": "ReindexAsync", + "httpMethod": "POST", + "url": "api/docs/admin/projects/Reindex", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Docs.Admin.Projects.ReindexInput, Volo.Docs.Admin.Application.Contracts", + "type": "Volo.Docs.Admin.Projects.ReindexInput", + "typeSimple": "Volo.Docs.Admin.Projects.ReindexInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Docs.Admin.Projects.ReindexInput", + "typeSimple": "Volo.Docs.Admin.Projects.ReindexInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Admin.Projects.IProjectAdminAppService" + } + } + } + } + } + }, + "types": {} +} \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo/Docs/Admin/DocsAdminHttpApiClientModule.cs b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo/Docs/Admin/DocsAdminHttpApiClientModule.cs index 284d5b4fbf..81e86cf8a6 100644 --- a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo/Docs/Admin/DocsAdminHttpApiClientModule.cs +++ b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo/Docs/Admin/DocsAdminHttpApiClientModule.cs @@ -1,6 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Http.Client; using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; namespace Volo.Docs.Admin { @@ -11,7 +12,12 @@ namespace Volo.Docs.Admin { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddHttpClientProxies(typeof(DocsAdminApplicationContractsModule).Assembly, DocsAdminRemoteServiceConsts.RemoteServiceName); + context.Services.AddStaticHttpClientProxies(typeof(DocsAdminApplicationContractsModule).Assembly, DocsAdminRemoteServiceConsts.RemoteServiceName); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); } } } diff --git a/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebModule.cs b/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebModule.cs index ad4e7b58be..0c054f4a0b 100644 --- a/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebModule.cs +++ b/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebModule.cs @@ -11,7 +11,7 @@ using Volo.Docs.Localization; namespace Volo.Docs.Admin { [DependsOn( - typeof(DocsAdminHttpApiModule), + typeof(DocsAdminApplicationContractsModule), typeof(AbpAspNetCoreMvcUiBootstrapModule) )] public class DocsAdminWebModule : AbpModule diff --git a/modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Documents/Index.cshtml b/modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Documents/Index.cshtml index d1816f4017..1e2dff9970 100644 --- a/modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Documents/Index.cshtml +++ b/modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Documents/Index.cshtml @@ -19,6 +19,7 @@ } @section scripts { + } diff --git a/modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/Index.cshtml b/modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/Index.cshtml index e2792806af..721ca4b770 100644 --- a/modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/Index.cshtml +++ b/modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/Index.cshtml @@ -19,6 +19,7 @@ } @section scripts { + diff --git a/modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj b/modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj index 148400e12c..a523cca13c 100644 --- a/modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj +++ b/modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj @@ -23,7 +23,7 @@ - + @@ -42,6 +42,10 @@ + + + + diff --git a/modules/docs/src/Volo.Docs.Admin.Web/wwwroot/client-proxies/docs-admin-proxy.js b/modules/docs/src/Volo.Docs.Admin.Web/wwwroot/client-proxies/docs-admin-proxy.js new file mode 100644 index 0000000000..e2bd498398 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.Web/wwwroot/client-proxies/docs-admin-proxy.js @@ -0,0 +1,131 @@ +/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */ + + +// module docs-admin + +(function(){ + + // controller volo.docs.admin.documentsAdmin + + (function(){ + + abp.utils.createNamespace(window, 'volo.docs.admin.documentsAdmin'); + + volo.docs.admin.documentsAdmin.clearCache = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/admin/documents/ClearCache', + type: 'POST', + dataType: null, + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.docs.admin.documentsAdmin.pullAll = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/admin/documents/PullAll', + type: 'POST', + dataType: null, + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.docs.admin.documentsAdmin.pull = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/admin/documents/Pull', + type: 'POST', + dataType: null, + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.docs.admin.documentsAdmin.getAll = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/admin/documents/GetAll' + abp.utils.buildQueryString([{ name: 'projectId', value: input.projectId }, { name: 'name', value: input.name }, { name: 'version', value: input.version }, { name: 'languageCode', value: input.languageCode }, { name: 'fileName', value: input.fileName }, { name: 'format', value: input.format }, { name: 'creationTimeMin', value: input.creationTimeMin }, { name: 'creationTimeMax', value: input.creationTimeMax }, { name: 'lastUpdatedTimeMin', value: input.lastUpdatedTimeMin }, { name: 'lastUpdatedTimeMax', value: input.lastUpdatedTimeMax }, { name: 'lastSignificantUpdateTimeMin', value: input.lastSignificantUpdateTimeMin }, { name: 'lastSignificantUpdateTimeMax', value: input.lastSignificantUpdateTimeMax }, { name: 'lastCachedTimeMin', value: input.lastCachedTimeMin }, { name: 'lastCachedTimeMax', value: input.lastCachedTimeMax }, { name: 'sorting', value: input.sorting }, { name: 'skipCount', value: input.skipCount }, { name: 'maxResultCount', value: input.maxResultCount }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.docs.admin.documentsAdmin.removeFromCache = function(documentId, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/admin/documents/RemoveDocumentFromCache' + abp.utils.buildQueryString([{ name: 'documentId', value: documentId }]) + '', + type: 'PUT', + dataType: null + }, ajaxParams)); + }; + + volo.docs.admin.documentsAdmin.reindex = function(documentId, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/admin/documents/ReindexDocument' + abp.utils.buildQueryString([{ name: 'documentId', value: documentId }]) + '', + type: 'PUT', + dataType: null + }, ajaxParams)); + }; + + })(); + + // controller volo.docs.admin.projectsAdmin + + (function(){ + + abp.utils.createNamespace(window, 'volo.docs.admin.projectsAdmin'); + + volo.docs.admin.projectsAdmin.getList = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/admin/projects' + abp.utils.buildQueryString([{ name: 'skipCount', value: input.skipCount }, { name: 'maxResultCount', value: input.maxResultCount }, { name: 'sorting', value: input.sorting }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.docs.admin.projectsAdmin.get = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/admin/projects/' + id + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.docs.admin.projectsAdmin.create = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/admin/projects', + type: 'POST', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.docs.admin.projectsAdmin.update = function(id, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/admin/projects/' + id + '', + type: 'PUT', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.docs.admin.projectsAdmin['delete'] = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/admin/projects' + abp.utils.buildQueryString([{ name: 'id', value: id }]) + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + volo.docs.admin.projectsAdmin.reindexAll = function(ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/admin/projects/ReindexAll', + type: 'POST', + dataType: null + }, ajaxParams)); + }; + + volo.docs.admin.projectsAdmin.reindex = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/admin/projects/Reindex', + type: 'POST', + dataType: null, + data: JSON.stringify(input) + }, ajaxParams)); + }; + + })(); + +})(); + + diff --git a/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsDocumentClientProxy.Generated.cs b/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsDocumentClientProxy.Generated.cs new file mode 100644 index 0000000000..67b4c43071 --- /dev/null +++ b/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsDocumentClientProxy.Generated.cs @@ -0,0 +1,55 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Docs.Documents; +using System.Collections.Generic; + +// ReSharper disable once CheckNamespace +namespace Volo.Docs.Documents.ClientProxies +{ + public partial class DocsDocumentClientProxy + { + public virtual async Task GetAsync(GetDocumentInput input) + { + return await RequestAsync(nameof(GetAsync), input); + } + + public virtual async Task GetDefaultAsync(GetDefaultDocumentInput input) + { + return await RequestAsync(nameof(GetDefaultAsync), input); + } + + public virtual async Task GetNavigationAsync(GetNavigationDocumentInput input) + { + return await RequestAsync(nameof(GetNavigationAsync), input); + } + + public virtual async Task GetResourceAsync(GetDocumentResourceInput input) + { + return await RequestAsync(nameof(GetResourceAsync), input); + } + + public virtual async Task> SearchAsync(DocumentSearchInput input) + { + return await RequestAsync>(nameof(SearchAsync), input); + } + + public virtual async Task FullSearchEnabledAsync() + { + return await RequestAsync(nameof(FullSearchEnabledAsync)); + } + + public virtual async Task> GetUrlsAsync(string prefix) + { + return await RequestAsync>(nameof(GetUrlsAsync), prefix); + } + + public virtual async Task GetParametersAsync(GetParametersDocumentInput input) + { + return await RequestAsync(nameof(GetParametersAsync), input); + } + } +} diff --git a/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsDocumentClientProxy.cs b/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsDocumentClientProxy.cs new file mode 100644 index 0000000000..7714a40e23 --- /dev/null +++ b/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsDocumentClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of DocsDocumentClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Docs.Documents; + +// ReSharper disable once CheckNamespace +namespace Volo.Docs.Documents.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IDocumentAppService), typeof(DocsDocumentClientProxy))] + public partial class DocsDocumentClientProxy : ClientProxyBase, IDocumentAppService + { + } +} diff --git a/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsProjectClientProxy.Generated.cs b/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsProjectClientProxy.Generated.cs new file mode 100644 index 0000000000..644fae63e1 --- /dev/null +++ b/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsProjectClientProxy.Generated.cs @@ -0,0 +1,40 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Docs.Projects; +using Volo.Docs.Documents; + +// ReSharper disable once CheckNamespace +namespace Volo.Docs.Projects.ClientProxies +{ + public partial class DocsProjectClientProxy + { + public virtual async Task> GetListAsync() + { + return await RequestAsync>(nameof(GetListAsync)); + } + + public virtual async Task GetAsync(string shortName) + { + return await RequestAsync(nameof(GetAsync), shortName); + } + + public virtual async Task GetDefaultLanguageCodeAsync(string shortName, string version) + { + return await RequestAsync(nameof(GetDefaultLanguageCodeAsync), shortName, version); + } + + public virtual async Task> GetVersionsAsync(string shortName) + { + return await RequestAsync>(nameof(GetVersionsAsync), shortName); + } + + public virtual async Task GetLanguageListAsync(string shortName, string version) + { + return await RequestAsync(nameof(GetLanguageListAsync), shortName, version); + } + } +} diff --git a/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsProjectClientProxy.cs b/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsProjectClientProxy.cs new file mode 100644 index 0000000000..0bfd8c893c --- /dev/null +++ b/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsProjectClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of DocsProjectClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Docs.Projects; + +// ReSharper disable once CheckNamespace +namespace Volo.Docs.Projects.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IProjectAppService), typeof(DocsProjectClientProxy))] + public partial class DocsProjectClientProxy : ClientProxyBase, IProjectAppService + { + } +} diff --git a/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/docs-generate-proxy.json b/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/docs-generate-proxy.json new file mode 100644 index 0000000000..e57df4a0bd --- /dev/null +++ b/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/docs-generate-proxy.json @@ -0,0 +1,737 @@ +{ + "modules": { + "docs": { + "rootPath": "docs", + "remoteServiceName": "AbpDocs", + "controllers": { + "Volo.Docs.Areas.Documents.DocumentResourceController": { + "controllerName": "DocumentResource", + "controllerGroupName": "DocumentResource", + "type": "Volo.Docs.Areas.Documents.DocumentResourceController", + "interfaces": [], + "actions": { + "GetResourceByInput": { + "uniqueName": "GetResourceByInput", + "name": "GetResource", + "httpMethod": "GET", + "url": "document-resources", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Docs.Documents.GetDocumentResourceInput, Volo.Docs.Application.Contracts", + "type": "Volo.Docs.Documents.GetDocumentResourceInput", + "typeSimple": "Volo.Docs.Documents.GetDocumentResourceInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "ProjectId", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Version", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "LanguageCode", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Microsoft.AspNetCore.Mvc.FileResult", + "typeSimple": "Microsoft.AspNetCore.Mvc.FileResult" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Areas.Documents.DocumentResourceController" + } + } + }, + "Volo.Docs.Projects.DocsProjectController": { + "controllerName": "DocsProject", + "controllerGroupName": "Project", + "type": "Volo.Docs.Projects.DocsProjectController", + "interfaces": [ + { + "type": "Volo.Docs.Projects.IProjectAppService" + } + ], + "actions": { + "GetListAsync": { + "uniqueName": "GetListAsync", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/docs/projects", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Projects.IProjectAppService" + }, + "GetAsyncByShortName": { + "uniqueName": "GetAsyncByShortName", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/docs/projects/{shortName}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "shortName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "shortName", + "name": "shortName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Docs.Projects.ProjectDto", + "typeSimple": "Volo.Docs.Projects.ProjectDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Projects.IProjectAppService" + }, + "GetDefaultLanguageCodeAsyncByShortNameAndVersion": { + "uniqueName": "GetDefaultLanguageCodeAsyncByShortNameAndVersion", + "name": "GetDefaultLanguageCodeAsync", + "httpMethod": "GET", + "url": "api/docs/projects/{shortName}/defaultLanguage", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "shortName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "version", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "shortName", + "name": "shortName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "version", + "name": "version", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Projects.IProjectAppService" + }, + "GetVersionsAsyncByShortName": { + "uniqueName": "GetVersionsAsyncByShortName", + "name": "GetVersionsAsync", + "httpMethod": "GET", + "url": "api/docs/projects/{shortName}/versions", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "shortName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "shortName", + "name": "shortName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Projects.IProjectAppService" + }, + "GetLanguageListAsyncByShortNameAndVersion": { + "uniqueName": "GetLanguageListAsyncByShortNameAndVersion", + "name": "GetLanguageListAsync", + "httpMethod": "GET", + "url": "api/docs/projects/{shortName}/{version}/languageList", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "shortName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "version", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "shortName", + "name": "shortName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "version", + "name": "version", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Docs.Documents.LanguageConfig", + "typeSimple": "Volo.Docs.Documents.LanguageConfig" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Projects.IProjectAppService" + } + } + }, + "Volo.Docs.Documents.DocsDocumentController": { + "controllerName": "DocsDocument", + "controllerGroupName": "Document", + "type": "Volo.Docs.Documents.DocsDocumentController", + "interfaces": [ + { + "type": "Volo.Docs.Documents.IDocumentAppService" + } + ], + "actions": { + "GetAsyncByInput": { + "uniqueName": "GetAsyncByInput", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/docs/documents", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Docs.Documents.GetDocumentInput, Volo.Docs.Application.Contracts", + "type": "Volo.Docs.Documents.GetDocumentInput", + "typeSimple": "Volo.Docs.Documents.GetDocumentInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "ProjectId", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Version", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "LanguageCode", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Docs.Documents.DocumentWithDetailsDto", + "typeSimple": "Volo.Docs.Documents.DocumentWithDetailsDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Documents.IDocumentAppService" + }, + "GetDefaultAsyncByInput": { + "uniqueName": "GetDefaultAsyncByInput", + "name": "GetDefaultAsync", + "httpMethod": "GET", + "url": "api/docs/documents/default", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Docs.Documents.GetDefaultDocumentInput, Volo.Docs.Application.Contracts", + "type": "Volo.Docs.Documents.GetDefaultDocumentInput", + "typeSimple": "Volo.Docs.Documents.GetDefaultDocumentInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "ProjectId", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Version", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "LanguageCode", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Docs.Documents.DocumentWithDetailsDto", + "typeSimple": "Volo.Docs.Documents.DocumentWithDetailsDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Documents.IDocumentAppService" + }, + "GetNavigationAsyncByInput": { + "uniqueName": "GetNavigationAsyncByInput", + "name": "GetNavigationAsync", + "httpMethod": "GET", + "url": "api/docs/documents/navigation", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Docs.Documents.GetNavigationDocumentInput, Volo.Docs.Application.Contracts", + "type": "Volo.Docs.Documents.GetNavigationDocumentInput", + "typeSimple": "Volo.Docs.Documents.GetNavigationDocumentInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "ProjectId", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Version", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "LanguageCode", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Docs.Documents.NavigationNode", + "typeSimple": "Volo.Docs.Documents.NavigationNode" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Documents.IDocumentAppService" + }, + "GetResourceAsyncByInput": { + "uniqueName": "GetResourceAsyncByInput", + "name": "GetResourceAsync", + "httpMethod": "GET", + "url": "api/docs/documents/resource", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Docs.Documents.GetDocumentResourceInput, Volo.Docs.Application.Contracts", + "type": "Volo.Docs.Documents.GetDocumentResourceInput", + "typeSimple": "Volo.Docs.Documents.GetDocumentResourceInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "ProjectId", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Version", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "LanguageCode", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Docs.Documents.DocumentResourceDto", + "typeSimple": "Volo.Docs.Documents.DocumentResourceDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Documents.IDocumentAppService" + }, + "SearchAsyncByInput": { + "uniqueName": "SearchAsyncByInput", + "name": "SearchAsync", + "httpMethod": "POST", + "url": "api/docs/documents/search", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Docs.Documents.DocumentSearchInput, Volo.Docs.Application.Contracts", + "type": "Volo.Docs.Documents.DocumentSearchInput", + "typeSimple": "Volo.Docs.Documents.DocumentSearchInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Docs.Documents.DocumentSearchInput", + "typeSimple": "Volo.Docs.Documents.DocumentSearchInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Collections.Generic.List", + "typeSimple": "[Volo.Docs.Documents.DocumentSearchOutput]" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Documents.IDocumentAppService" + }, + "FullSearchEnabledAsync": { + "uniqueName": "FullSearchEnabledAsync", + "name": "FullSearchEnabledAsync", + "httpMethod": "GET", + "url": "api/docs/documents/full-search-enabled", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.Boolean", + "typeSimple": "boolean" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Documents.IDocumentAppService" + }, + "GetUrlsAsyncByPrefix": { + "uniqueName": "GetUrlsAsyncByPrefix", + "name": "GetUrlsAsync", + "httpMethod": "GET", + "url": "api/docs/documents/links", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "prefix", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "prefix", + "name": "prefix", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Collections.Generic.List", + "typeSimple": "[string]" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Documents.IDocumentAppService" + }, + "GetParametersAsyncByInput": { + "uniqueName": "GetParametersAsyncByInput", + "name": "GetParametersAsync", + "httpMethod": "GET", + "url": "api/docs/documents/parameters", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Docs.Documents.GetParametersDocumentInput, Volo.Docs.Application.Contracts", + "type": "Volo.Docs.Documents.GetParametersDocumentInput", + "typeSimple": "Volo.Docs.Documents.GetParametersDocumentInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "ProjectId", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Version", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "LanguageCode", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Docs.Documents.DocumentParametersDto", + "typeSimple": "Volo.Docs.Documents.DocumentParametersDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Docs.Documents.IDocumentAppService" + } + } + } + } + } + }, + "types": {} +} \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.HttpApi.Client/Volo/Docs/DocsHttpApiClientModule.cs b/modules/docs/src/Volo.Docs.HttpApi.Client/Volo/Docs/DocsHttpApiClientModule.cs index 174b4570c2..c9797fca73 100644 --- a/modules/docs/src/Volo.Docs.HttpApi.Client/Volo/Docs/DocsHttpApiClientModule.cs +++ b/modules/docs/src/Volo.Docs.HttpApi.Client/Volo/Docs/DocsHttpApiClientModule.cs @@ -1,6 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Http.Client; using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; namespace Volo.Docs { @@ -12,7 +13,12 @@ namespace Volo.Docs { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddHttpClientProxies(typeof(DocsApplicationContractsModule).Assembly, DocsRemoteServiceConsts.RemoteServiceName); + context.Services.AddStaticHttpClientProxies(typeof(DocsApplicationContractsModule).Assembly, DocsRemoteServiceConsts.RemoteServiceName); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); } } } diff --git a/modules/docs/src/Volo.Docs.Web/Areas/Documents/DocumentResourceController.cs b/modules/docs/src/Volo.Docs.Web/Areas/Documents/DocumentResourceController.cs index b5cec70a5b..60e087b9a6 100644 --- a/modules/docs/src/Volo.Docs.Web/Areas/Documents/DocumentResourceController.cs +++ b/modules/docs/src/Volo.Docs.Web/Areas/Documents/DocumentResourceController.cs @@ -9,7 +9,7 @@ using Volo.Docs.Documents; namespace Volo.Docs.Areas.Documents { - [RemoteService] + [RemoteService(Name = DocsRemoteServiceConsts.RemoteServiceName)] [Area("docs")] [ControllerName("DocumentResource")] [Route("document-resources")] diff --git a/modules/docs/src/Volo.Docs.Web/DocsWebModule.cs b/modules/docs/src/Volo.Docs.Web/DocsWebModule.cs index 8015100cbc..6048eac619 100644 --- a/modules/docs/src/Volo.Docs.Web/DocsWebModule.cs +++ b/modules/docs/src/Volo.Docs.Web/DocsWebModule.cs @@ -19,7 +19,7 @@ using Volo.Docs.Markdown; namespace Volo.Docs { [DependsOn( - typeof(DocsHttpApiModule), + typeof(DocsApplicationContractsModule), typeof(AbpAutoMapperModule), typeof(AbpAspNetCoreMvcUiBootstrapModule), typeof(AbpAspNetCoreMvcUiThemeSharedModule), diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml index 4d59707f5e..2990ecad29 100644 --- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml +++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml @@ -37,6 +37,7 @@ + diff --git a/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.csproj b/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.csproj index 3f220633be..b5b274e33e 100644 --- a/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.csproj +++ b/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.csproj @@ -20,7 +20,7 @@ - + @@ -41,6 +41,10 @@ + + + + diff --git a/modules/docs/src/Volo.Docs.Web/wwwroot/client-proxies/docs-proxy.js b/modules/docs/src/Volo.Docs.Web/wwwroot/client-proxies/docs-proxy.js new file mode 100644 index 0000000000..be998b251a --- /dev/null +++ b/modules/docs/src/Volo.Docs.Web/wwwroot/client-proxies/docs-proxy.js @@ -0,0 +1,133 @@ +/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */ + + +// module docs + +(function(){ + + // controller volo.docs.areas.documents.documentResource + + (function(){ + + abp.utils.createNamespace(window, 'volo.docs.areas.documents.documentResource'); + + volo.docs.areas.documents.documentResource.getResource = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'document-resources' + abp.utils.buildQueryString([{ name: 'projectId', value: input.projectId }, { name: 'name', value: input.name }, { name: 'version', value: input.version }, { name: 'languageCode', value: input.languageCode }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + })(); + + // controller volo.docs.projects.docsProject + + (function(){ + + abp.utils.createNamespace(window, 'volo.docs.projects.docsProject'); + + volo.docs.projects.docsProject.getList = function(ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/projects', + type: 'GET' + }, ajaxParams)); + }; + + volo.docs.projects.docsProject.get = function(shortName, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/projects/' + shortName + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.docs.projects.docsProject.getDefaultLanguageCode = function(shortName, version, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/projects/' + shortName + '/defaultLanguage' + abp.utils.buildQueryString([{ name: 'version', value: version }]) + '', + type: 'GET' + }, { dataType: 'text' }, ajaxParams)); + }; + + volo.docs.projects.docsProject.getVersions = function(shortName, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/projects/' + shortName + '/versions', + type: 'GET' + }, ajaxParams)); + }; + + volo.docs.projects.docsProject.getLanguageList = function(shortName, version, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/projects/' + shortName + '/' + version + '/languageList', + type: 'GET' + }, ajaxParams)); + }; + + })(); + + // controller volo.docs.documents.docsDocument + + (function(){ + + abp.utils.createNamespace(window, 'volo.docs.documents.docsDocument'); + + volo.docs.documents.docsDocument.get = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/documents' + abp.utils.buildQueryString([{ name: 'projectId', value: input.projectId }, { name: 'name', value: input.name }, { name: 'version', value: input.version }, { name: 'languageCode', value: input.languageCode }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.docs.documents.docsDocument.getDefault = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/documents/default' + abp.utils.buildQueryString([{ name: 'projectId', value: input.projectId }, { name: 'version', value: input.version }, { name: 'languageCode', value: input.languageCode }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.docs.documents.docsDocument.getNavigation = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/documents/navigation' + abp.utils.buildQueryString([{ name: 'projectId', value: input.projectId }, { name: 'version', value: input.version }, { name: 'languageCode', value: input.languageCode }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.docs.documents.docsDocument.getResource = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/documents/resource' + abp.utils.buildQueryString([{ name: 'projectId', value: input.projectId }, { name: 'name', value: input.name }, { name: 'version', value: input.version }, { name: 'languageCode', value: input.languageCode }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.docs.documents.docsDocument.search = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/documents/search', + type: 'POST', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.docs.documents.docsDocument.fullSearchEnabled = function(ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/documents/full-search-enabled', + type: 'GET' + }, ajaxParams)); + }; + + volo.docs.documents.docsDocument.getUrls = function(prefix, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/documents/links' + abp.utils.buildQueryString([{ name: 'prefix', value: prefix }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.docs.documents.docsDocument.getParameters = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/docs/documents/parameters' + abp.utils.buildQueryString([{ name: 'projectId', value: input.projectId }, { name: 'version', value: input.version }, { name: 'languageCode', value: input.languageCode }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + })(); + +})(); + + diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/ClientProxies/FeaturesClientProxy.Generated.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/ClientProxies/FeaturesClientProxy.Generated.cs new file mode 100644 index 0000000000..01cf24f08b --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/ClientProxies/FeaturesClientProxy.Generated.cs @@ -0,0 +1,24 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Abp.FeatureManagement; + +// ReSharper disable once CheckNamespace +namespace Volo.Abp.FeatureManagement.ClientProxies +{ + public partial class FeaturesClientProxy + { + public virtual async Task GetAsync(string providerName, string providerKey) + { + return await RequestAsync(nameof(GetAsync), providerName, providerKey); + } + + public virtual async Task UpdateAsync(string providerName, string providerKey, UpdateFeaturesDto input) + { + await RequestAsync(nameof(UpdateAsync), providerName, providerKey, input); + } + } +} diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/ClientProxies/FeaturesClientProxy.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/ClientProxies/FeaturesClientProxy.cs new file mode 100644 index 0000000000..e2f10443d4 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/ClientProxies/FeaturesClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of FeaturesClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Abp.FeatureManagement; + +// ReSharper disable once CheckNamespace +namespace Volo.Abp.FeatureManagement.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IFeatureAppService), typeof(FeaturesClientProxy))] + public partial class FeaturesClientProxy : ClientProxyBase, IFeatureAppService + { + } +} diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/ClientProxies/featureManagement-generate-proxy.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/ClientProxies/featureManagement-generate-proxy.json new file mode 100644 index 0000000000..79a8b31a0c --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/ClientProxies/featureManagement-generate-proxy.json @@ -0,0 +1,157 @@ +{ + "modules": { + "featureManagement": { + "rootPath": "featureManagement", + "remoteServiceName": "AbpFeatureManagement", + "controllers": { + "Volo.Abp.FeatureManagement.FeaturesController": { + "controllerName": "Features", + "controllerGroupName": "Features", + "type": "Volo.Abp.FeatureManagement.FeaturesController", + "interfaces": [ + { + "type": "Volo.Abp.FeatureManagement.IFeatureAppService" + } + ], + "actions": { + "GetAsyncByProviderNameAndProviderKey": { + "uniqueName": "GetAsyncByProviderNameAndProviderKey", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/feature-management/features", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "providerName", + "name": "providerName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.FeatureManagement.GetFeatureListResultDto", + "typeSimple": "Volo.Abp.FeatureManagement.GetFeatureListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.FeatureManagement.IFeatureAppService" + }, + "UpdateAsyncByProviderNameAndProviderKeyAndInput": { + "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/feature-management/features", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.FeatureManagement.UpdateFeaturesDto, Volo.Abp.FeatureManagement.Application.Contracts", + "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "providerName", + "name": "providerName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.FeatureManagement.IFeatureAppService" + } + } + } + } + } + }, + "types": {} +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo/Abp/FeatureManagement/AbpFeatureManagementHttpApiClientModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo/Abp/FeatureManagement/AbpFeatureManagementHttpApiClientModule.cs index 1bfd2a752c..8d8ebcd37e 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo/Abp/FeatureManagement/AbpFeatureManagementHttpApiClientModule.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo/Abp/FeatureManagement/AbpFeatureManagementHttpApiClientModule.cs @@ -1,6 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Http.Client; using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; namespace Volo.Abp.FeatureManagement { @@ -11,10 +12,15 @@ namespace Volo.Abp.FeatureManagement { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddHttpClientProxies( + context.Services.AddStaticHttpClientProxies( typeof(AbpFeatureManagementApplicationContractsModule).Assembly, FeatureManagementRemoteServiceConsts.RemoteServiceName ); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); } } } diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/AbpFeatureManagementWebModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/AbpFeatureManagementWebModule.cs index 5f02362b13..b7661b1f4a 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/AbpFeatureManagementWebModule.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/AbpFeatureManagementWebModule.cs @@ -10,7 +10,7 @@ using Volo.Abp.VirtualFileSystem; namespace Volo.Abp.FeatureManagement { [DependsOn( - typeof(AbpFeatureManagementHttpApiModule), + typeof(AbpFeatureManagementApplicationContractsModule), typeof(AbpAspNetCoreMvcUiThemeSharedModule), typeof(AbpAutoMapperModule) )] diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Volo.Abp.FeatureManagement.Web.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Volo.Abp.FeatureManagement.Web.csproj index caf860ea0a..623cb2e42c 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Volo.Abp.FeatureManagement.Web.csproj +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Volo.Abp.FeatureManagement.Web.csproj @@ -17,10 +17,14 @@ + + + + @@ -30,7 +34,7 @@ - + diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/wwwroot/client-proxies/featureManagement-proxy.js b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/wwwroot/client-proxies/featureManagement-proxy.js new file mode 100644 index 0000000000..3c149c0a7f --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/wwwroot/client-proxies/featureManagement-proxy.js @@ -0,0 +1,34 @@ +/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */ + + +// module featureManagement + +(function(){ + + // controller volo.abp.featureManagement.features + + (function(){ + + abp.utils.createNamespace(window, 'volo.abp.featureManagement.features'); + + volo.abp.featureManagement.features.get = function(providerName, providerKey, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/feature-management/features' + abp.utils.buildQueryString([{ name: 'providerName', value: providerName }, { name: 'providerKey', value: providerKey }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.abp.featureManagement.features.update = function(providerName, providerKey, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/feature-management/features' + abp.utils.buildQueryString([{ name: 'providerName', value: providerName }, { name: 'providerKey', value: providerKey }]) + '', + type: 'PUT', + dataType: null, + data: JSON.stringify(input) + }, ajaxParams)); + }; + + })(); + +})(); + + diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityRoleClientProxy.Generated.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityRoleClientProxy.Generated.cs new file mode 100644 index 0000000000..bee7716d4b --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityRoleClientProxy.Generated.cs @@ -0,0 +1,44 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Abp.Identity; + +// ReSharper disable once CheckNamespace +namespace Volo.Abp.Identity.ClientProxies +{ + public partial class IdentityRoleClientProxy + { + public virtual async Task> GetAllListAsync() + { + return await RequestAsync>(nameof(GetAllListAsync)); + } + + public virtual async Task> GetListAsync(GetIdentityRolesInput input) + { + return await RequestAsync>(nameof(GetListAsync), input); + } + + public virtual async Task GetAsync(Guid id) + { + return await RequestAsync(nameof(GetAsync), id); + } + + public virtual async Task CreateAsync(IdentityRoleCreateDto input) + { + return await RequestAsync(nameof(CreateAsync), input); + } + + public virtual async Task UpdateAsync(Guid id, IdentityRoleUpdateDto input) + { + return await RequestAsync(nameof(UpdateAsync), id, input); + } + + public virtual async Task DeleteAsync(Guid id) + { + await RequestAsync(nameof(DeleteAsync), id); + } + } +} diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityRoleClientProxy.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityRoleClientProxy.cs new file mode 100644 index 0000000000..af6c563b42 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityRoleClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of IdentityRoleClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Abp.Identity; + +// ReSharper disable once CheckNamespace +namespace Volo.Abp.Identity.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IIdentityRoleAppService), typeof(IdentityRoleClientProxy))] + public partial class IdentityRoleClientProxy : ClientProxyBase, IIdentityRoleAppService + { + } +} diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserClientProxy.Generated.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserClientProxy.Generated.cs new file mode 100644 index 0000000000..16200be664 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserClientProxy.Generated.cs @@ -0,0 +1,64 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Abp.Identity; + +// ReSharper disable once CheckNamespace +namespace Volo.Abp.Identity.ClientProxies +{ + public partial class IdentityUserClientProxy + { + public virtual async Task GetAsync(Guid id) + { + return await RequestAsync(nameof(GetAsync), id); + } + + public virtual async Task> GetListAsync(GetIdentityUsersInput input) + { + return await RequestAsync>(nameof(GetListAsync), input); + } + + public virtual async Task CreateAsync(IdentityUserCreateDto input) + { + return await RequestAsync(nameof(CreateAsync), input); + } + + public virtual async Task UpdateAsync(Guid id, IdentityUserUpdateDto input) + { + return await RequestAsync(nameof(UpdateAsync), id, input); + } + + public virtual async Task DeleteAsync(Guid id) + { + await RequestAsync(nameof(DeleteAsync), id); + } + + public virtual async Task> GetRolesAsync(Guid id) + { + return await RequestAsync>(nameof(GetRolesAsync), id); + } + + public virtual async Task> GetAssignableRolesAsync() + { + return await RequestAsync>(nameof(GetAssignableRolesAsync)); + } + + public virtual async Task UpdateRolesAsync(Guid id, IdentityUserUpdateRolesDto input) + { + await RequestAsync(nameof(UpdateRolesAsync), id, input); + } + + public virtual async Task FindByUsernameAsync(string userName) + { + return await RequestAsync(nameof(FindByUsernameAsync), userName); + } + + public virtual async Task FindByEmailAsync(string email) + { + return await RequestAsync(nameof(FindByEmailAsync), email); + } + } +} diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserClientProxy.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserClientProxy.cs new file mode 100644 index 0000000000..c52e2c1e19 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of IdentityUserClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Abp.Identity; + +// ReSharper disable once CheckNamespace +namespace Volo.Abp.Identity.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IIdentityUserAppService), typeof(IdentityUserClientProxy))] + public partial class IdentityUserClientProxy : ClientProxyBase, IIdentityUserAppService + { + } +} diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserLookupClientProxy.Generated.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserLookupClientProxy.Generated.cs new file mode 100644 index 0000000000..ae54213305 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserLookupClientProxy.Generated.cs @@ -0,0 +1,35 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Abp.Identity; +using Volo.Abp.Users; + +// ReSharper disable once CheckNamespace +namespace Volo.Abp.Identity.ClientProxies +{ + public partial class IdentityUserLookupClientProxy + { + public virtual async Task FindByIdAsync(Guid id) + { + return await RequestAsync(nameof(FindByIdAsync), id); + } + + public virtual async Task FindByUserNameAsync(string userName) + { + return await RequestAsync(nameof(FindByUserNameAsync), userName); + } + + public virtual async Task> SearchAsync(UserLookupSearchInputDto input) + { + return await RequestAsync>(nameof(SearchAsync), input); + } + + public virtual async Task GetCountAsync(UserLookupCountInputDto input) + { + return await RequestAsync(nameof(GetCountAsync), input); + } + } +} diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserLookupClientProxy.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserLookupClientProxy.cs new file mode 100644 index 0000000000..20ed64e387 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserLookupClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of IdentityUserLookupClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Abp.Identity; + +// ReSharper disable once CheckNamespace +namespace Volo.Abp.Identity.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IIdentityUserLookupAppService), typeof(IdentityUserLookupClientProxy))] + public partial class IdentityUserLookupClientProxy : ClientProxyBase, IIdentityUserLookupAppService + { + } +} diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/ProfileClientProxy.Generated.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/ProfileClientProxy.Generated.cs new file mode 100644 index 0000000000..31046ef63d --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/ProfileClientProxy.Generated.cs @@ -0,0 +1,29 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Abp.Identity; + +// ReSharper disable once CheckNamespace +namespace Volo.Abp.Identity.ClientProxies +{ + public partial class ProfileClientProxy + { + public virtual async Task GetAsync() + { + return await RequestAsync(nameof(GetAsync)); + } + + public virtual async Task UpdateAsync(UpdateProfileDto input) + { + return await RequestAsync(nameof(UpdateAsync), input); + } + + public virtual async Task ChangePasswordAsync(ChangePasswordInput input) + { + await RequestAsync(nameof(ChangePasswordAsync), input); + } + } +} diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/ProfileClientProxy.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/ProfileClientProxy.cs new file mode 100644 index 0000000000..5e742144b3 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/ProfileClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of ProfileClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Abp.Identity; + +// ReSharper disable once CheckNamespace +namespace Volo.Abp.Identity.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IProfileAppService), typeof(ProfileClientProxy))] + public partial class ProfileClientProxy : ClientProxyBase, IProfileAppService + { + } +} diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/identity-generate-proxy.json b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/identity-generate-proxy.json new file mode 100644 index 0000000000..00dd299ce9 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/identity-generate-proxy.json @@ -0,0 +1,1012 @@ +{ + "modules": { + "identity": { + "rootPath": "identity", + "remoteServiceName": "AbpIdentity", + "controllers": { + "Volo.Abp.Identity.IdentityRoleController": { + "controllerName": "IdentityRole", + "controllerGroupName": "Role", + "type": "Volo.Abp.Identity.IdentityRoleController", + "interfaces": [ + { + "type": "Volo.Abp.Identity.IIdentityRoleAppService" + } + ], + "actions": { + "GetAllListAsync": { + "uniqueName": "GetAllListAsync", + "name": "GetAllListAsync", + "httpMethod": "GET", + "url": "api/identity/roles/all", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityRoleAppService" + }, + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/identity/roles", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.GetIdentityRolesInput, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.GetIdentityRolesInput", + "typeSimple": "Volo.Abp.Identity.GetIdentityRolesInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/identity/roles/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityRoleDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/identity/roles", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.IdentityRoleCreateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityRoleCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityRoleCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityRoleDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/identity/roles/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.IdentityRoleUpdateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityRoleDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/identity/roles/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" + } + } + }, + "Volo.Abp.Identity.IdentityUserController": { + "controllerName": "IdentityUser", + "controllerGroupName": "User", + "type": "Volo.Abp.Identity.IdentityUserController", + "interfaces": [ + { + "type": "Volo.Abp.Identity.IIdentityUserAppService" + } + ], + "actions": { + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/identity/users/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/identity/users", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.GetIdentityUsersInput, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.GetIdentityUsersInput", + "typeSimple": "Volo.Abp.Identity.GetIdentityUsersInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/identity/users", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.IdentityUserCreateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityUserCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityUserCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/identity/users/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityUserUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityUserUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/identity/users/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" + }, + "GetRolesAsyncById": { + "uniqueName": "GetRolesAsyncById", + "name": "GetRolesAsync", + "httpMethod": "GET", + "url": "api/identity/users/{id}/roles", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + }, + "GetAssignableRolesAsync": { + "uniqueName": "GetAssignableRolesAsync", + "name": "GetAssignableRolesAsync", + "httpMethod": "GET", + "url": "api/identity/users/assignable-roles", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + }, + "UpdateRolesAsyncByIdAndInput": { + "uniqueName": "UpdateRolesAsyncByIdAndInput", + "name": "UpdateRolesAsync", + "httpMethod": "PUT", + "url": "api/identity/users/{id}/roles", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateRolesDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + }, + "FindByUsernameAsyncByUserName": { + "uniqueName": "FindByUsernameAsyncByUserName", + "name": "FindByUsernameAsync", + "httpMethod": "GET", + "url": "api/identity/users/by-username/{userName}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "userName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "userName", + "name": "userName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + }, + "FindByEmailAsyncByEmail": { + "uniqueName": "FindByEmailAsyncByEmail", + "name": "FindByEmailAsync", + "httpMethod": "GET", + "url": "api/identity/users/by-email/{email}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "email", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "email", + "name": "email", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + } + } + }, + "Volo.Abp.Identity.IdentityUserLookupController": { + "controllerName": "IdentityUserLookup", + "controllerGroupName": "UserLookup", + "type": "Volo.Abp.Identity.IdentityUserLookupController", + "interfaces": [ + { + "type": "Volo.Abp.Identity.IIdentityUserLookupAppService" + } + ], + "actions": { + "FindByIdAsyncById": { + "uniqueName": "FindByIdAsyncById", + "name": "FindByIdAsync", + "httpMethod": "GET", + "url": "api/identity/users/lookup/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Users.UserData", + "typeSimple": "Volo.Abp.Users.UserData" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" + }, + "FindByUserNameAsyncByUserName": { + "uniqueName": "FindByUserNameAsyncByUserName", + "name": "FindByUserNameAsync", + "httpMethod": "GET", + "url": "api/identity/users/lookup/by-username/{userName}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "userName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "userName", + "name": "userName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Users.UserData", + "typeSimple": "Volo.Abp.Users.UserData" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" + }, + "SearchAsyncByInput": { + "uniqueName": "SearchAsyncByInput", + "name": "SearchAsync", + "httpMethod": "GET", + "url": "api/identity/users/lookup/search", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.UserLookupSearchInputDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.UserLookupSearchInputDto", + "typeSimple": "Volo.Abp.Identity.UserLookupSearchInputDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" + }, + "GetCountAsyncByInput": { + "uniqueName": "GetCountAsyncByInput", + "name": "GetCountAsync", + "httpMethod": "GET", + "url": "api/identity/users/lookup/count", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.UserLookupCountInputDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.UserLookupCountInputDto", + "typeSimple": "Volo.Abp.Identity.UserLookupCountInputDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "System.Int64", + "typeSimple": "number" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" + } + } + }, + "Volo.Abp.Identity.ProfileController": { + "controllerName": "Profile", + "controllerGroupName": "Profile", + "type": "Volo.Abp.Identity.ProfileController", + "interfaces": [ + { + "type": "Volo.Abp.Identity.IProfileAppService" + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/identity/my-profile", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Identity.ProfileDto", + "typeSimple": "Volo.Abp.Identity.ProfileDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IProfileAppService" + }, + "UpdateAsyncByInput": { + "uniqueName": "UpdateAsyncByInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/identity/my-profile", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.UpdateProfileDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.UpdateProfileDto", + "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.UpdateProfileDto", + "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.ProfileDto", + "typeSimple": "Volo.Abp.Identity.ProfileDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IProfileAppService" + }, + "ChangePasswordAsyncByInput": { + "uniqueName": "ChangePasswordAsyncByInput", + "name": "ChangePasswordAsync", + "httpMethod": "POST", + "url": "api/identity/my-profile/change-password", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.ChangePasswordInput, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.ChangePasswordInput", + "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.ChangePasswordInput", + "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IProfileAppService" + } + } + } + } + } + }, + "types": {} +} \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo/Abp/Identity/AbpIdentityHttpApiClientModule.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo/Abp/Identity/AbpIdentityHttpApiClientModule.cs index d4283e06f5..695729de58 100644 --- a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo/Abp/Identity/AbpIdentityHttpApiClientModule.cs +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo/Abp/Identity/AbpIdentityHttpApiClientModule.cs @@ -1,6 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Http.Client; using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; namespace Volo.Abp.Identity { @@ -11,10 +12,15 @@ namespace Volo.Abp.Identity { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddHttpClientProxies( + context.Services.AddStaticHttpClientProxies( typeof(AbpIdentityApplicationContractsModule).Assembly, IdentityRemoteServiceConsts.RemoteServiceName ); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); } } -} \ No newline at end of file +} diff --git a/modules/identity/src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs b/modules/identity/src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs index 511455bab3..df93e54fe5 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs +++ b/modules/identity/src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs @@ -17,7 +17,7 @@ using Volo.Abp.Threading; namespace Volo.Abp.Identity.Web { - [DependsOn(typeof(AbpIdentityHttpApiModule))] + [DependsOn(typeof(AbpIdentityApplicationContractsModule))] [DependsOn(typeof(AbpAutoMapperModule))] [DependsOn(typeof(AbpPermissionManagementWebModule))] [DependsOn(typeof(AbpAspNetCoreMvcUiThemeSharedModule))] diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/Index.cshtml b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/Index.cshtml index 30e42694e6..44eba179cc 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/Index.cshtml +++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/Index.cshtml @@ -23,6 +23,7 @@ } @section scripts { + @@ -41,4 +42,4 @@ - \ No newline at end of file + diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/Index.cshtml b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/Index.cshtml index 5904cab2fa..2e61876fe6 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/Index.cshtml +++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/Index.cshtml @@ -23,6 +23,7 @@ } @section scripts { + @@ -42,4 +43,4 @@ - \ No newline at end of file + diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Volo.Abp.Identity.Web.csproj b/modules/identity/src/Volo.Abp.Identity.Web/Volo.Abp.Identity.Web.csproj index 4ee5051f57..d0a9c8da05 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Volo.Abp.Identity.Web.csproj +++ b/modules/identity/src/Volo.Abp.Identity.Web/Volo.Abp.Identity.Web.csproj @@ -21,6 +21,8 @@ + + @@ -28,16 +30,16 @@ + + - - + - diff --git a/modules/identity/src/Volo.Abp.Identity.Web/wwwroot/client-proxies/identity-proxy.js b/modules/identity/src/Volo.Abp.Identity.Web/wwwroot/client-proxies/identity-proxy.js new file mode 100644 index 0000000000..824b5cbdeb --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.Web/wwwroot/client-proxies/identity-proxy.js @@ -0,0 +1,214 @@ +/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */ + + +// module identity + +(function(){ + + // controller volo.abp.identity.identityRole + + (function(){ + + abp.utils.createNamespace(window, 'volo.abp.identity.identityRole'); + + volo.abp.identity.identityRole.getAllList = function(ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/roles/all', + type: 'GET' + }, ajaxParams)); + }; + + volo.abp.identity.identityRole.getList = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/roles' + abp.utils.buildQueryString([{ name: 'filter', value: input.filter }, { name: 'sorting', value: input.sorting }, { name: 'skipCount', value: input.skipCount }, { name: 'maxResultCount', value: input.maxResultCount }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.abp.identity.identityRole.get = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/roles/' + id + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.abp.identity.identityRole.create = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/roles', + type: 'POST', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.abp.identity.identityRole.update = function(id, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/roles/' + id + '', + type: 'PUT', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.abp.identity.identityRole['delete'] = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/roles/' + id + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + })(); + + // controller volo.abp.identity.identityUser + + (function(){ + + abp.utils.createNamespace(window, 'volo.abp.identity.identityUser'); + + volo.abp.identity.identityUser.get = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/users/' + id + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.abp.identity.identityUser.getList = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/users' + abp.utils.buildQueryString([{ name: 'filter', value: input.filter }, { name: 'sorting', value: input.sorting }, { name: 'skipCount', value: input.skipCount }, { name: 'maxResultCount', value: input.maxResultCount }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.abp.identity.identityUser.create = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/users', + type: 'POST', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.abp.identity.identityUser.update = function(id, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/users/' + id + '', + type: 'PUT', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.abp.identity.identityUser['delete'] = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/users/' + id + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + volo.abp.identity.identityUser.getRoles = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/users/' + id + '/roles', + type: 'GET' + }, ajaxParams)); + }; + + volo.abp.identity.identityUser.getAssignableRoles = function(ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/users/assignable-roles', + type: 'GET' + }, ajaxParams)); + }; + + volo.abp.identity.identityUser.updateRoles = function(id, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/users/' + id + '/roles', + type: 'PUT', + dataType: null, + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.abp.identity.identityUser.findByUsername = function(userName, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/users/by-username/' + userName + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.abp.identity.identityUser.findByEmail = function(email, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/users/by-email/' + email + '', + type: 'GET' + }, ajaxParams)); + }; + + })(); + + // controller volo.abp.identity.identityUserLookup + + (function(){ + + abp.utils.createNamespace(window, 'volo.abp.identity.identityUserLookup'); + + volo.abp.identity.identityUserLookup.findById = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/users/lookup/' + id + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.abp.identity.identityUserLookup.findByUserName = function(userName, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/users/lookup/by-username/' + userName + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.abp.identity.identityUserLookup.search = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/users/lookup/search' + abp.utils.buildQueryString([{ name: 'filter', value: input.filter }, { name: 'sorting', value: input.sorting }, { name: 'skipCount', value: input.skipCount }, { name: 'maxResultCount', value: input.maxResultCount }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.abp.identity.identityUserLookup.getCount = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/users/lookup/count' + abp.utils.buildQueryString([{ name: 'filter', value: input.filter }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + })(); + + // controller volo.abp.identity.profile + + (function(){ + + abp.utils.createNamespace(window, 'volo.abp.identity.profile'); + + volo.abp.identity.profile.get = function(ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/my-profile', + type: 'GET' + }, ajaxParams)); + }; + + volo.abp.identity.profile.update = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/my-profile', + type: 'PUT', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.abp.identity.profile.changePassword = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/my-profile/change-password', + type: 'POST', + dataType: null, + data: JSON.stringify(input) + }, ajaxParams)); + }; + + })(); + +})(); + + diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/ClientProxies/PermissionsClientProxy.Generated.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/ClientProxies/PermissionsClientProxy.Generated.cs new file mode 100644 index 0000000000..bb3c6d778f --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/ClientProxies/PermissionsClientProxy.Generated.cs @@ -0,0 +1,24 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Abp.PermissionManagement; + +// ReSharper disable once CheckNamespace +namespace Volo.Abp.PermissionManagement.ClientProxies +{ + public partial class PermissionsClientProxy + { + public virtual async Task GetAsync(string providerName, string providerKey) + { + return await RequestAsync(nameof(GetAsync), providerName, providerKey); + } + + public virtual async Task UpdateAsync(string providerName, string providerKey, UpdatePermissionsDto input) + { + await RequestAsync(nameof(UpdateAsync), providerName, providerKey, input); + } + } +} diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/ClientProxies/PermissionsClientProxy.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/ClientProxies/PermissionsClientProxy.cs new file mode 100644 index 0000000000..aea0aca06b --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/ClientProxies/PermissionsClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of PermissionsClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Abp.PermissionManagement; + +// ReSharper disable once CheckNamespace +namespace Volo.Abp.PermissionManagement.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IPermissionAppService), typeof(PermissionsClientProxy))] + public partial class PermissionsClientProxy : ClientProxyBase, IPermissionAppService + { + } +} diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/ClientProxies/permissionManagement-generate-proxy.json b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/ClientProxies/permissionManagement-generate-proxy.json new file mode 100644 index 0000000000..3f867ea85b --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/ClientProxies/permissionManagement-generate-proxy.json @@ -0,0 +1,157 @@ +{ + "modules": { + "permissionManagement": { + "rootPath": "permissionManagement", + "remoteServiceName": "AbpPermissionManagement", + "controllers": { + "Volo.Abp.PermissionManagement.PermissionsController": { + "controllerName": "Permissions", + "controllerGroupName": "Permissions", + "type": "Volo.Abp.PermissionManagement.PermissionsController", + "interfaces": [ + { + "type": "Volo.Abp.PermissionManagement.IPermissionAppService" + } + ], + "actions": { + "GetAsyncByProviderNameAndProviderKey": { + "uniqueName": "GetAsyncByProviderNameAndProviderKey", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/permission-management/permissions", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "providerName", + "name": "providerName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.PermissionManagement.GetPermissionListResultDto", + "typeSimple": "Volo.Abp.PermissionManagement.GetPermissionListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.PermissionManagement.IPermissionAppService" + }, + "UpdateAsyncByProviderNameAndProviderKeyAndInput": { + "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/permission-management/permissions", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.PermissionManagement.UpdatePermissionsDto, Volo.Abp.PermissionManagement.Application.Contracts", + "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "providerName", + "name": "providerName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.PermissionManagement.IPermissionAppService" + } + } + } + } + } + }, + "types": {} +} \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/Volo/Abp/PermissionManagement/AbpPermissionManagementHttpApiClientModule.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/Volo/Abp/PermissionManagement/AbpPermissionManagementHttpApiClientModule.cs index 35932bba56..b9404731a0 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/Volo/Abp/PermissionManagement/AbpPermissionManagementHttpApiClientModule.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/Volo/Abp/PermissionManagement/AbpPermissionManagementHttpApiClientModule.cs @@ -1,6 +1,8 @@ using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; using Volo.Abp.Http.Client; using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; namespace Volo.Abp.PermissionManagement { @@ -11,10 +13,15 @@ namespace Volo.Abp.PermissionManagement { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddHttpClientProxies( + context.Services.AddStaticHttpClientProxies( typeof(AbpPermissionManagementApplicationContractsModule).Assembly, PermissionManagementRemoteServiceConsts.RemoteServiceName ); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); } } } diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebModule.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebModule.cs index 88e1e027ae..3e92c5c06e 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebModule.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebModule.cs @@ -3,13 +3,12 @@ using Volo.Abp.AspNetCore.Mvc.Localization; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; using Volo.Abp.AutoMapper; using Volo.Abp.Modularity; -using Volo.Abp.PermissionManagement.HttpApi; using Volo.Abp.PermissionManagement.Localization; using Volo.Abp.VirtualFileSystem; namespace Volo.Abp.PermissionManagement.Web { - [DependsOn(typeof(AbpPermissionManagementHttpApiModule))] + [DependsOn(typeof(AbpPermissionManagementApplicationContractsModule))] [DependsOn(typeof(AbpAspNetCoreMvcUiBootstrapModule))] [DependsOn(typeof(AbpAutoMapperModule))] public class AbpPermissionManagementWebModule : AbpModule diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Volo.Abp.PermissionManagement.Web.csproj b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Volo.Abp.PermissionManagement.Web.csproj index bb0dd60da3..05dffc66ec 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Volo.Abp.PermissionManagement.Web.csproj +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Volo.Abp.PermissionManagement.Web.csproj @@ -18,15 +18,18 @@ + + + + - - + diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/wwwroot/client-proxies/permissionManagement-proxy.js b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/wwwroot/client-proxies/permissionManagement-proxy.js new file mode 100644 index 0000000000..ab0daefa90 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/wwwroot/client-proxies/permissionManagement-proxy.js @@ -0,0 +1,34 @@ +/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */ + + +// module permissionManagement + +(function(){ + + // controller volo.abp.permissionManagement.permissions + + (function(){ + + abp.utils.createNamespace(window, 'volo.abp.permissionManagement.permissions'); + + volo.abp.permissionManagement.permissions.get = function(providerName, providerKey, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/permission-management/permissions' + abp.utils.buildQueryString([{ name: 'providerName', value: providerName }, { name: 'providerKey', value: providerKey }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.abp.permissionManagement.permissions.update = function(providerName, providerKey, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/permission-management/permissions' + abp.utils.buildQueryString([{ name: 'providerName', value: providerName }, { name: 'providerKey', value: providerKey }]) + '', + type: 'PUT', + dataType: null, + data: JSON.stringify(input) + }, ajaxParams)); + }; + + })(); + +})(); + + diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.HttpApi.Client/ClientProxies/EmailSettingsClientProxy.Generated.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.HttpApi.Client/ClientProxies/EmailSettingsClientProxy.Generated.cs new file mode 100644 index 0000000000..46e5d340f5 --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.HttpApi.Client/ClientProxies/EmailSettingsClientProxy.Generated.cs @@ -0,0 +1,24 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Abp.SettingManagement; + +// ReSharper disable once CheckNamespace +namespace Volo.Abp.SettingManagement.ClientProxies +{ + public partial class EmailSettingsClientProxy + { + public virtual async Task GetAsync() + { + return await RequestAsync(nameof(GetAsync)); + } + + public virtual async Task UpdateAsync(UpdateEmailSettingsDto input) + { + await RequestAsync(nameof(UpdateAsync), input); + } + } +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.HttpApi.Client/ClientProxies/EmailSettingsClientProxy.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.HttpApi.Client/ClientProxies/EmailSettingsClientProxy.cs new file mode 100644 index 0000000000..9864a6ffa7 --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.HttpApi.Client/ClientProxies/EmailSettingsClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of EmailSettingsClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Abp.SettingManagement; + +// ReSharper disable once CheckNamespace +namespace Volo.Abp.SettingManagement.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IEmailSettingsAppService), typeof(EmailSettingsClientProxy))] + public partial class EmailSettingsClientProxy : ClientProxyBase, IEmailSettingsAppService + { + } +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.HttpApi.Client/ClientProxies/settingManagement-generate-proxy.json b/modules/setting-management/src/Volo.Abp.SettingManagement.HttpApi.Client/ClientProxies/settingManagement-generate-proxy.json new file mode 100644 index 0000000000..4a93097b1c --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.HttpApi.Client/ClientProxies/settingManagement-generate-proxy.json @@ -0,0 +1,75 @@ +{ + "modules": { + "settingManagement": { + "rootPath": "settingManagement", + "remoteServiceName": "SettingManagement", + "controllers": { + "Volo.Abp.SettingManagement.EmailSettingsController": { + "controllerName": "EmailSettings", + "controllerGroupName": "EmailSettings", + "type": "Volo.Abp.SettingManagement.EmailSettingsController", + "interfaces": [ + { + "type": "Volo.Abp.SettingManagement.IEmailSettingsAppService" + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/setting-management/emailing", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.SettingManagement.EmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.EmailSettingsDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.SettingManagement.IEmailSettingsAppService" + }, + "UpdateAsyncByInput": { + "uniqueName": "UpdateAsyncByInput", + "name": "UpdateAsync", + "httpMethod": "POST", + "url": "api/setting-management/emailing", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto, Volo.Abp.SettingManagement.Application.Contracts", + "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.SettingManagement.IEmailSettingsAppService" + } + } + } + } + } + }, + "types": {} +} \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.HttpApi.Client/Volo/Abp/SettingManagement/AbpSettingManagementHttpApiClientModule.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.HttpApi.Client/Volo/Abp/SettingManagement/AbpSettingManagementHttpApiClientModule.cs index 7d1c4d2c91..5076619402 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.HttpApi.Client/Volo/Abp/SettingManagement/AbpSettingManagementHttpApiClientModule.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.HttpApi.Client/Volo/Abp/SettingManagement/AbpSettingManagementHttpApiClientModule.cs @@ -1,6 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Http.Client; using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; namespace Volo.Abp.SettingManagement { @@ -11,10 +12,15 @@ namespace Volo.Abp.SettingManagement { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddHttpClientProxies( + context.Services.AddStaticHttpClientProxies( typeof(AbpSettingManagementApplicationContractsModule).Assembly, SettingManagementRemoteServiceConsts.RemoteServiceName ); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); } } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs index 6a2a970b43..e1f13359a1 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs @@ -12,7 +12,7 @@ using Volo.Abp.VirtualFileSystem; namespace Volo.Abp.SettingManagement.Web { [DependsOn( - typeof(AbpSettingManagementHttpApiModule), + typeof(AbpSettingManagementApplicationContractsModule), typeof(AbpAspNetCoreMvcUiThemeSharedModule), typeof(AbpSettingManagementDomainSharedModule) )] diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml index 7a4a36ed6a..6ee1d62299 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml @@ -13,6 +13,7 @@ } @section scripts { + } @@ -35,4 +36,4 @@ - \ No newline at end of file + diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj index e7814a83da..c7cbc9c60b 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj @@ -18,7 +18,7 @@ - + @@ -30,10 +30,14 @@ + + + + diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/wwwroot/client-proxies/settingManagement-proxy.js b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/wwwroot/client-proxies/settingManagement-proxy.js new file mode 100644 index 0000000000..b3b5f5731a --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/wwwroot/client-proxies/settingManagement-proxy.js @@ -0,0 +1,34 @@ +/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */ + + +// module settingManagement + +(function(){ + + // controller volo.abp.settingManagement.emailSettings + + (function(){ + + abp.utils.createNamespace(window, 'volo.abp.settingManagement.emailSettings'); + + volo.abp.settingManagement.emailSettings.get = function(ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/setting-management/emailing', + type: 'GET' + }, ajaxParams)); + }; + + volo.abp.settingManagement.emailSettings.update = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/setting-management/emailing', + type: 'POST', + dataType: null, + data: JSON.stringify(input) + }, ajaxParams)); + }; + + })(); + +})(); + + diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/ClientProxies/TenantClientProxy.Generated.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/ClientProxies/TenantClientProxy.Generated.cs new file mode 100644 index 0000000000..2562feba8c --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/ClientProxies/TenantClientProxy.Generated.cs @@ -0,0 +1,54 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Abp.TenantManagement; + +// ReSharper disable once CheckNamespace +namespace Volo.Abp.TenantManagement.ClientProxies +{ + public partial class TenantClientProxy + { + public virtual async Task GetAsync(Guid id) + { + return await RequestAsync(nameof(GetAsync), id); + } + + public virtual async Task> GetListAsync(GetTenantsInput input) + { + return await RequestAsync>(nameof(GetListAsync), input); + } + + public virtual async Task CreateAsync(TenantCreateDto input) + { + return await RequestAsync(nameof(CreateAsync), input); + } + + public virtual async Task UpdateAsync(Guid id, TenantUpdateDto input) + { + return await RequestAsync(nameof(UpdateAsync), id, input); + } + + public virtual async Task DeleteAsync(Guid id) + { + await RequestAsync(nameof(DeleteAsync), id); + } + + public virtual async Task GetDefaultConnectionStringAsync(Guid id) + { + return await RequestAsync(nameof(GetDefaultConnectionStringAsync), id); + } + + public virtual async Task UpdateDefaultConnectionStringAsync(Guid id, string defaultConnectionString) + { + await RequestAsync(nameof(UpdateDefaultConnectionStringAsync), id, defaultConnectionString); + } + + public virtual async Task DeleteDefaultConnectionStringAsync(Guid id) + { + await RequestAsync(nameof(DeleteDefaultConnectionStringAsync), id); + } + } +} diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/ClientProxies/TenantClientProxy.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/ClientProxies/TenantClientProxy.cs new file mode 100644 index 0000000000..bdd3869930 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/ClientProxies/TenantClientProxy.cs @@ -0,0 +1,14 @@ +// This file is part of TenantClientProxy, you can customize it here +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Abp.TenantManagement; + +// ReSharper disable once CheckNamespace +namespace Volo.Abp.TenantManagement.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(ITenantAppService), typeof(TenantClientProxy))] + public partial class TenantClientProxy : ClientProxyBase, ITenantAppService + { + } +} diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/ClientProxies/multi-tenancy-generate-proxy.json b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/ClientProxies/multi-tenancy-generate-proxy.json new file mode 100644 index 0000000000..4a0e20debe --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/ClientProxies/multi-tenancy-generate-proxy.json @@ -0,0 +1,395 @@ +{ + "modules": { + "multi-tenancy": { + "rootPath": "multi-tenancy", + "remoteServiceName": "AbpTenantManagement", + "controllers": { + "Volo.Abp.TenantManagement.TenantController": { + "controllerName": "Tenant", + "controllerGroupName": "Tenant", + "type": "Volo.Abp.TenantManagement.TenantController", + "interfaces": [ + { + "type": "Volo.Abp.TenantManagement.ITenantAppService" + } + ], + "actions": { + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/multi-tenancy/tenants/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.TenantManagement.TenantDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/multi-tenancy/tenants", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.TenantManagement.GetTenantsInput, Volo.Abp.TenantManagement.Application.Contracts", + "type": "Volo.Abp.TenantManagement.GetTenantsInput", + "typeSimple": "Volo.Abp.TenantManagement.GetTenantsInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/multi-tenancy/tenants", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.TenantManagement.TenantCreateDto, Volo.Abp.TenantManagement.Application.Contracts", + "type": "Volo.Abp.TenantManagement.TenantCreateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.TenantManagement.TenantCreateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.TenantManagement.TenantDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/multi-tenancy/tenants/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.TenantManagement.TenantUpdateDto, Volo.Abp.TenantManagement.Application.Contracts", + "type": "Volo.Abp.TenantManagement.TenantUpdateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.TenantManagement.TenantUpdateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.TenantManagement.TenantDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/multi-tenancy/tenants/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" + }, + "GetDefaultConnectionStringAsyncById": { + "uniqueName": "GetDefaultConnectionStringAsyncById", + "name": "GetDefaultConnectionStringAsync", + "httpMethod": "GET", + "url": "api/multi-tenancy/tenants/{id}/default-connection-string", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" + }, + "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString": { + "uniqueName": "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString", + "name": "UpdateDefaultConnectionStringAsync", + "httpMethod": "PUT", + "url": "api/multi-tenancy/tenants/{id}/default-connection-string", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "defaultConnectionString", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "defaultConnectionString", + "name": "defaultConnectionString", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" + }, + "DeleteDefaultConnectionStringAsyncById": { + "uniqueName": "DeleteDefaultConnectionStringAsyncById", + "name": "DeleteDefaultConnectionStringAsync", + "httpMethod": "DELETE", + "url": "api/multi-tenancy/tenants/{id}/default-connection-string", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" + } + } + } + } + } + }, + "types": {} +} \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/Volo/Abp/TenantManagement/AbpTenantManagementHttpApiClientModule.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/Volo/Abp/TenantManagement/AbpTenantManagementHttpApiClientModule.cs index 7be0b53a72..15fc266f5f 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/Volo/Abp/TenantManagement/AbpTenantManagementHttpApiClientModule.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/Volo/Abp/TenantManagement/AbpTenantManagementHttpApiClientModule.cs @@ -1,20 +1,26 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Http.Client; using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; namespace Volo.Abp.TenantManagement { [DependsOn( - typeof(AbpTenantManagementApplicationContractsModule), + typeof(AbpTenantManagementApplicationContractsModule), typeof(AbpHttpClientModule))] public class AbpTenantManagementHttpApiClientModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddHttpClientProxies( + context.Services.AddStaticHttpClientProxies( typeof(AbpTenantManagementApplicationContractsModule).Assembly, TenantManagementRemoteServiceConsts.RemoteServiceName ); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); } } -} \ No newline at end of file +} diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebModule.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebModule.cs index 02433ff1c0..4ce5aa94d6 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebModule.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebModule.cs @@ -17,7 +17,7 @@ using Volo.Abp.Threading; namespace Volo.Abp.TenantManagement.Web { - [DependsOn(typeof(AbpTenantManagementHttpApiModule))] + [DependsOn(typeof(AbpTenantManagementApplicationContractsModule))] [DependsOn(typeof(AbpAspNetCoreMvcUiBootstrapModule))] [DependsOn(typeof(AbpFeatureManagementWebModule))] [DependsOn(typeof(AbpAutoMapperModule))] diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.cshtml b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.cshtml index 12857a7efb..aa5f51d57d 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.cshtml +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.cshtml @@ -19,8 +19,9 @@ } @section scripts { - - + + + } diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Volo.Abp.TenantManagement.Web.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Volo.Abp.TenantManagement.Web.csproj index 5b19f94bfc..a93043f4a8 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Volo.Abp.TenantManagement.Web.csproj +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Volo.Abp.TenantManagement.Web.csproj @@ -18,10 +18,14 @@ + + + + @@ -29,7 +33,7 @@ - + diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/wwwroot/client-proxies/multi-tenancy-proxy.js b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/wwwroot/client-proxies/multi-tenancy-proxy.js new file mode 100644 index 0000000000..1ef5cddae9 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/wwwroot/client-proxies/multi-tenancy-proxy.js @@ -0,0 +1,79 @@ +/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */ + + +// module multi-tenancy + +(function(){ + + // controller volo.abp.tenantManagement.tenant + + (function(){ + + abp.utils.createNamespace(window, 'volo.abp.tenantManagement.tenant'); + + volo.abp.tenantManagement.tenant.get = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/multi-tenancy/tenants/' + id + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.abp.tenantManagement.tenant.getList = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/multi-tenancy/tenants' + abp.utils.buildQueryString([{ name: 'filter', value: input.filter }, { name: 'sorting', value: input.sorting }, { name: 'skipCount', value: input.skipCount }, { name: 'maxResultCount', value: input.maxResultCount }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.abp.tenantManagement.tenant.create = function(input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/multi-tenancy/tenants', + type: 'POST', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.abp.tenantManagement.tenant.update = function(id, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/multi-tenancy/tenants/' + id + '', + type: 'PUT', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.abp.tenantManagement.tenant['delete'] = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/multi-tenancy/tenants/' + id + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + volo.abp.tenantManagement.tenant.getDefaultConnectionString = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/multi-tenancy/tenants/' + id + '/default-connection-string', + type: 'GET' + }, { dataType: 'text' }, ajaxParams)); + }; + + volo.abp.tenantManagement.tenant.updateDefaultConnectionString = function(id, defaultConnectionString, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/multi-tenancy/tenants/' + id + '/default-connection-string' + abp.utils.buildQueryString([{ name: 'defaultConnectionString', value: defaultConnectionString }]) + '', + type: 'PUT', + dataType: null + }, ajaxParams)); + }; + + volo.abp.tenantManagement.tenant.deleteDefaultConnectionString = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/multi-tenancy/tenants/' + id + '/default-connection-string', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + })(); + +})(); + + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName.MyProjectName.HttpApi.Client.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName.MyProjectName.HttpApi.Client.csproj index 44023bac06..b2bd230422 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName.MyProjectName.HttpApi.Client.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName.MyProjectName.HttpApi.Client.csproj @@ -20,4 +20,9 @@ + + + + + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyProjectNameHttpApiClientModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyProjectNameHttpApiClientModule.cs index 67be0c087a..e54e6cf8c7 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyProjectNameHttpApiClientModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyProjectNameHttpApiClientModule.cs @@ -6,6 +6,7 @@ using Volo.Abp.Modularity; using Volo.Abp.PermissionManagement; using Volo.Abp.TenantManagement; using Volo.Abp.SettingManagement; +using Volo.Abp.VirtualFileSystem; namespace MyCompanyName.MyProjectName { @@ -28,6 +29,11 @@ namespace MyCompanyName.MyProjectName typeof(MyProjectNameApplicationContractsModule).Assembly, RemoteServiceName ); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); } } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj index a26a50692c..4737f9a746 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj @@ -32,7 +32,6 @@ - diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs index b98de6220e..944fd56704 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs @@ -44,7 +44,6 @@ using Volo.Abp.VirtualFileSystem; namespace MyCompanyName.MyProjectName.Web { [DependsOn( - typeof(MyProjectNameHttpApiModule), typeof(MyProjectNameHttpApiClientModule), typeof(AbpAspNetCoreAuthenticationOpenIdConnectModule), typeof(AbpAspNetCoreMvcClientModule), diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName.MyProjectName.HttpApi.Client.csproj b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName.MyProjectName.HttpApi.Client.csproj index 4fb9f73c33..8486d3f247 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName.MyProjectName.HttpApi.Client.csproj +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName.MyProjectName.HttpApi.Client.csproj @@ -12,4 +12,9 @@ + + + + + diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyProjectNameHttpApiClientModule.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyProjectNameHttpApiClientModule.cs index bad5fd9e60..560c1c7669 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyProjectNameHttpApiClientModule.cs +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyProjectNameHttpApiClientModule.cs @@ -1,6 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Http.Client; using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; namespace MyCompanyName.MyProjectName { @@ -17,6 +18,12 @@ namespace MyCompanyName.MyProjectName typeof(MyProjectNameApplicationContractsModule).Assembly, RemoteServiceName ); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + } } } diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj index 8c3c709a74..62b8cd67f1 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj @@ -17,7 +17,7 @@ - + @@ -37,8 +37,4 @@ - - - - diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs index 04ce36df22..6580def0ce 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs @@ -13,7 +13,7 @@ using MyCompanyName.MyProjectName.Permissions; namespace MyCompanyName.MyProjectName.Web { [DependsOn( - typeof(MyProjectNameHttpApiModule), + typeof(MyProjectNameApplicationContractsModule), typeof(AbpAspNetCoreMvcUiThemeSharedModule), typeof(AbpAutoMapperModule) )]