Browse Source

Merge branch 'dev' into studio-dev

pull/10363/head
Yunus Emre Kalkan 5 years ago
parent
commit
429092c80c
  1. 25
      framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/PermissionsRequirement.cs
  2. 31
      framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/PermissionsRequirementHandler.cs
  3. 1
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationModule.cs
  4. 8
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/SolutionRenameStep.cs
  5. 34
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs
  6. 110
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs
  7. 15
      framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyBase.cs
  8. 31
      framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyRequestTypeValue.cs
  9. 2
      framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyServiceConvention.cs
  10. 11
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs
  11. 14
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/AuthTestController.cs
  12. 27
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/AuthTestController_Tests.cs
  13. 1
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/TestPermissionDefinitionProvider.cs
  14. 7
      framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/AbpAspNetCoreTestBase.cs
  15. 13
      framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/HardDelete_Tests.cs
  16. 15
      modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/AccountClientProxy.Generated.cs
  17. 26
      modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/ClientProxies/BlogManagementClientProxy.Generated.cs
  18. 10
      modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogFilesClientProxy.Generated.cs
  19. 10
      modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogsClientProxy.Generated.cs
  20. 21
      modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/CommentsClientProxy.Generated.cs
  21. 37
      modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/PostsClientProxy.Generated.cs
  22. 6
      modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/TagsClientProxy.Generated.cs
  23. 5
      modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Menus/MenuItemAdminAppService.cs
  24. 26
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogAdminClientProxy.Generated.cs
  25. 11
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogFeatureAdminClientProxy.Generated.cs
  26. 26
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogPostAdminClientProxy.Generated.cs
  27. 15
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/CommentAdminClientProxy.Generated.cs
  28. 15
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/EntityTagAdminClientProxy.Generated.cs
  29. 11
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MediaDescriptorAdminClientProxy.Generated.cs
  30. 32
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MenuItemAdminClientProxy.Generated.cs
  31. 26
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/PageAdminClientProxy.Generated.cs
  32. 26
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/TagAdminClientProxy.Generated.cs
  33. 6
      modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/BlogFeatureClientProxy.Generated.cs
  34. 5
      modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/MediaDescriptorClientProxy.Generated.cs
  35. 12
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogPostPublicClientProxy.Generated.cs
  36. 24
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs
  37. 5
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/PagesPublicClientProxy.Generated.cs
  38. 19
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs
  39. 20
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/ReactionPublicClientProxy.Generated.cs
  40. 6
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/TagPublicClientProxy.Generated.cs
  41. 30
      modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/DocumentsAdminClientProxy.Generated.cs
  42. 31
      modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/ProjectsAdminClientProxy.Generated.cs
  43. 35
      modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsDocumentClientProxy.Generated.cs
  44. 22
      modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsProjectClientProxy.Generated.cs
  45. 13
      modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/ClientProxies/FeaturesClientProxy.Generated.cs
  46. 26
      modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityRoleClientProxy.Generated.cs
  47. 47
      modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserClientProxy.Generated.cs
  48. 20
      modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserLookupClientProxy.Generated.cs
  49. 10
      modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/ProfileClientProxy.Generated.cs
  50. 13
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs
  51. 14
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScope.cs
  52. 36
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/Client.cs
  53. 14
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientClaim.cs
  54. 6
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Devices/DeviceFlowStore.cs
  55. 3
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrant.cs
  56. 16
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResource.cs
  57. 30
      modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs
  58. 12
      modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiScopes/ApiScopeRepository.cs
  59. 2
      modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs
  60. 6
      modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesRepository.cs
  61. 3
      modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistentGrantRepository.cs
  62. 14
      modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs
  63. 5
      modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs
  64. 15
      modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs
  65. 7
      modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs
  66. 2
      modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs
  67. 4
      modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs
  68. 13
      modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/ClientProxies/PermissionsClientProxy.Generated.cs
  69. 5
      modules/setting-management/src/Volo.Abp.SettingManagement.HttpApi.Client/ClientProxies/EmailSettingsClientProxy.Generated.cs
  70. 42
      modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/ClientProxies/TenantClientProxy.Generated.cs
  71. 4
      npm/ng-packs/.eslintrc.json
  72. 6
      npm/ng-packs/nx.json
  73. 7
      npm/ng-packs/packages/account-core/proxy/ng-package.json
  74. 2
      npm/ng-packs/packages/account-core/proxy/src/lib/index.ts
  75. 0
      npm/ng-packs/packages/account-core/proxy/src/lib/proxy/README.md
  76. 37
      npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/account.service.ts
  77. 0
      npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/index.ts
  78. 0
      npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/models.ts
  79. 35
      npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/account.service.ts
  80. 0
      npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/index.ts
  81. 0
      npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/models/index.ts
  82. 0
      npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/models/login-result-type.enum.ts
  83. 0
      npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/models/models.ts
  84. 0
      npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/index.ts
  85. 0
      npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/index.ts
  86. 0
      npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/index.ts
  87. 2457
      npm/ng-packs/packages/account-core/proxy/src/lib/proxy/generate-proxy.json
  88. 0
      npm/ng-packs/packages/account-core/proxy/src/lib/proxy/identity/index.ts
  89. 0
      npm/ng-packs/packages/account-core/proxy/src/lib/proxy/identity/models.ts
  90. 0
      npm/ng-packs/packages/account-core/proxy/src/lib/proxy/index.ts
  91. 1
      npm/ng-packs/packages/account-core/proxy/src/public-api.ts
  92. 2
      npm/ng-packs/packages/account/ng-package.json
  93. 2
      npm/ng-packs/packages/account/package.json
  94. 2
      npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts
  95. 2
      npm/ng-packs/packages/account/src/lib/components/forgot-password/forgot-password.component.ts
  96. 2
      npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.ts
  97. 2
      npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts
  98. 4
      npm/ng-packs/packages/account/src/lib/components/register/register.component.ts
  99. 2
      npm/ng-packs/packages/account/src/lib/components/reset-password/reset-password.component.ts
  100. 43
      npm/ng-packs/packages/account/src/lib/proxy/account/account.service.ts

25
framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/PermissionsRequirement.cs

@ -0,0 +1,25 @@
using JetBrains.Annotations;
using Microsoft.AspNetCore.Authorization;
namespace Volo.Abp.Authorization
{
public class PermissionsRequirement : IAuthorizationRequirement
{
public string[] PermissionNames { get; }
public bool RequiresAll { get; }
public PermissionsRequirement([NotNull]string[] permissionNames, bool requiresAll)
{
Check.NotNull(permissionNames, nameof(permissionNames));
PermissionNames = permissionNames;
RequiresAll = requiresAll;
}
public override string ToString()
{
return $"PermissionsRequirement: {string.Join(", ", PermissionNames)}";
}
}
}

31
framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/PermissionsRequirementHandler.cs

@ -0,0 +1,31 @@
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Authorization.Permissions;
namespace Volo.Abp.Authorization
{
public class PermissionsRequirementHandler : AuthorizationHandler<PermissionsRequirement>
{
private readonly IPermissionChecker _permissionChecker;
public PermissionsRequirementHandler(IPermissionChecker permissionChecker)
{
_permissionChecker = permissionChecker;
}
protected override async Task HandleRequirementAsync(
AuthorizationHandlerContext context,
PermissionsRequirement requirement)
{
var multiplePermissionGrantResult = await _permissionChecker.IsGrantedAsync(context.User, requirement.PermissionNames);
if (requirement.RequiresAll ?
multiplePermissionGrantResult.AllGranted :
multiplePermissionGrantResult.Result.Any(x => x.Value == PermissionGrantResult.Granted))
{
context.Succeed(requirement);
}
}
}
}

1
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationModule.cs

@ -31,6 +31,7 @@ namespace Volo.Abp.Authorization
context.Services.AddAuthorizationCore(); context.Services.AddAuthorizationCore();
context.Services.AddSingleton<IAuthorizationHandler, PermissionRequirementHandler>(); context.Services.AddSingleton<IAuthorizationHandler, PermissionRequirementHandler>();
context.Services.AddSingleton<IAuthorizationHandler, PermissionsRequirementHandler>();
context.Services.TryAddTransient<DefaultAuthorizationPolicyProvider>(); context.Services.TryAddTransient<DefaultAuthorizationPolicyProvider>();

8
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/SolutionRenameStep.cs

@ -19,6 +19,14 @@ namespace Volo.Abp.Cli.ProjectBuilding.Building.Steps
context.BuildArgs.SolutionName.ProjectName context.BuildArgs.SolutionName.ProjectName
).Run(); ).Run();
new SolutionRenamer(
context.Files,
"myCompanyName.myProjectName",
"MicroserviceName",
context.BuildArgs.SolutionName.CompanyName,
context.BuildArgs.SolutionName.ProjectName
).Run();
new SolutionRenamer( new SolutionRenamer(
context.Files, context.Files,
null, null,

34
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs

@ -206,7 +206,7 @@ namespace Volo.Abp.Cli.ServiceProxying.CSharp
{ {
var methodBuilder = new StringBuilder(); var methodBuilder = new StringBuilder();
var returnTypeName = GetRealTypeName(usingNamespaceList, action.ReturnValue.Type); var returnTypeName = GetRealTypeName(action.ReturnValue.Type, usingNamespaceList);
if(!action.Name.EndsWith("Async")) if(!action.Name.EndsWith("Async"))
{ {
@ -225,7 +225,7 @@ namespace Volo.Abp.Cli.ServiceProxying.CSharp
foreach (var parameter in action.Parameters.GroupBy(x => x.Name).Select( x=> x.First())) foreach (var parameter in action.Parameters.GroupBy(x => x.Name).Select( x=> x.First()))
{ {
methodBuilder.Replace("<args>", $"{GetRealTypeName(usingNamespaceList, parameter.Type)} {parameter.Name}, <args>"); methodBuilder.Replace("<args>", $"{GetRealTypeName(parameter.Type, usingNamespaceList)} {parameter.Name}, <args>");
} }
methodBuilder.Replace("<args>", string.Empty); methodBuilder.Replace("<args>", string.Empty);
@ -249,7 +249,7 @@ namespace Volo.Abp.Cli.ServiceProxying.CSharp
foreach (var parameter in action.ParametersOnMethod) foreach (var parameter in action.ParametersOnMethod)
{ {
methodBuilder.Replace("<args>", $"{GetRealTypeName(usingNamespaceList, parameter.Type)} {parameter.Name}, <args>"); methodBuilder.Replace("<args>", $"{GetRealTypeName(parameter.Type, usingNamespaceList)} {parameter.Name}, <args>");
} }
methodBuilder.Replace("<args>", string.Empty); methodBuilder.Replace("<args>", string.Empty);
@ -257,21 +257,27 @@ namespace Volo.Abp.Cli.ServiceProxying.CSharp
methodBuilder.AppendLine(" {"); methodBuilder.AppendLine(" {");
var argsTemplate = "new ClientProxyRequestTypeValue" +
$"{Environment.NewLine} {{<args>" +
$"{Environment.NewLine} }}";
var args = action.ParametersOnMethod.Any() ? argsTemplate : string.Empty;
if (returnTypeName == "void") if (returnTypeName == "void")
{ {
methodBuilder.AppendLine($" await RequestAsync(nameof({action.Name}), <args>);"); methodBuilder.AppendLine($" await RequestAsync(nameof({action.Name}), {args});");
} }
else else
{ {
methodBuilder.AppendLine($" return await RequestAsync<{returnTypeName}>(nameof({action.Name}), <args>);"); methodBuilder.AppendLine($" return await RequestAsync<{returnTypeName}>(nameof({action.Name}), {args});");
} }
foreach (var parameter in action.ParametersOnMethod) foreach (var parameter in action.ParametersOnMethod)
{ {
methodBuilder.Replace("<args>", $"{parameter.Name}, <args>"); methodBuilder.Replace("<args>", $"{Environment.NewLine} {{ typeof({GetRealTypeName(parameter.Type)}), {parameter.Name} }},<args>");
} }
methodBuilder.Replace("<args>", string.Empty); methodBuilder.Replace(",<args>", string.Empty);
methodBuilder.Replace(", )", ")"); methodBuilder.Replace(", )", ")");
methodBuilder.AppendLine(" }"); methodBuilder.AppendLine(" }");
} }
@ -297,7 +303,7 @@ namespace Volo.Abp.Cli.ServiceProxying.CSharp
return typeFullName.Substring(0, typeFullName.LastIndexOf('.')); return typeFullName.Substring(0, typeFullName.LastIndexOf('.'));
} }
private string GetRealTypeName(List<string> usingNamespaceList, string typeName) private string GetRealTypeName(string typeName, List<string> usingNamespaceList = null)
{ {
var filter = new []{"<", ",", ">"}; var filter = new []{"<", ",", ">"};
var stringBuilder = new StringBuilder(); var stringBuilder = new StringBuilder();
@ -305,7 +311,11 @@ namespace Volo.Abp.Cli.ServiceProxying.CSharp
if (typeNames.All(x => !filter.Any(x.Contains))) if (typeNames.All(x => !filter.Any(x.Contains)))
{ {
AddUsingNamespace(usingNamespaceList, typeName); if (usingNamespaceList != null)
{
AddUsingNamespace(usingNamespaceList, typeName);
}
return NormalizeTypeName(typeNames.Last()); return NormalizeTypeName(typeNames.Last());
} }
@ -315,7 +325,11 @@ namespace Volo.Abp.Cli.ServiceProxying.CSharp
{ {
if (filter.Any(x => item.Contains(x))) if (filter.Any(x => item.Contains(x)))
{ {
AddUsingNamespace(usingNamespaceList, $"{fullName}.{item}".TrimStart('.')); if (usingNamespaceList != null)
{
AddUsingNamespace(usingNamespaceList, $"{fullName}.{item}".TrimStart('.'));
}
fullName = string.Empty; fullName = string.Empty;
if (item.Contains('<') || item.Contains(',')) if (item.Contains('<') || item.Contains(','))

110
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs

@ -2,6 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Linq.Expressions; using System.Linq.Expressions;
using System.Runtime.CompilerServices;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
@ -54,16 +55,7 @@ namespace Volo.Abp.Domain.Repositories
) )
where TEntity : class, IEntity, ISoftDelete where TEntity : class, IEntity, ISoftDelete
{ {
if (!(ProxyHelper.UnProxy(repository) is IUnitOfWorkManagerAccessor unitOfWorkManagerAccessor)) var uowManager = repository.GetUnitOfWorkManager();
{
throw new AbpException($"The given repository (of type {repository.GetType().AssemblyQualifiedName}) should implement the {typeof(IUnitOfWorkManagerAccessor).AssemblyQualifiedName} interface in order to invoke the {nameof(HardDeleteAsync)} method!");
}
var uowManager = unitOfWorkManagerAccessor.UnitOfWorkManager;
if (uowManager == null)
{
throw new AbpException($"{nameof(unitOfWorkManagerAccessor.UnitOfWorkManager)} property of the given {nameof(repository)} object is null!");
}
if (uowManager.Current == null) if (uowManager.Current == null)
{ {
@ -79,29 +71,27 @@ namespace Volo.Abp.Domain.Repositories
} }
} }
private static async Task HardDeleteWithUnitOfWorkAsync<TEntity>( public static async Task HardDeleteAsync<TEntity>(
IRepository<TEntity> repository, this IBasicRepository<TEntity> repository,
Expression<Func<TEntity, bool>> predicate, IEnumerable<TEntity> entities,
bool autoSave, bool autoSave = false,
CancellationToken cancellationToken, IUnitOfWork currentUow CancellationToken cancellationToken = default
) )
where TEntity : class, IEntity, ISoftDelete where TEntity : class, IEntity, ISoftDelete
{ {
var hardDeleteEntities = (HashSet<IEntity>) currentUow.Items.GetOrAdd( var uowManager = repository.GetUnitOfWorkManager();
UnitOfWorkItemNames.HardDeletedEntities,
() => new HashSet<IEntity>()
);
List<TEntity> entities; if (uowManager.Current == null)
using (currentUow.ServiceProvider.GetRequiredService<IDataFilter<ISoftDelete>>().Disable())
{ {
entities = await repository.AsyncExecuter.ToListAsync((await repository.GetQueryableAsync()).Where(predicate), cancellationToken); using (var uow = uowManager.Begin())
{
await HardDeleteWithUnitOfWorkAsync(repository, entities, autoSave, cancellationToken, uowManager.Current);
await uow.CompleteAsync(cancellationToken);
}
} }
else
foreach (var entity in entities)
{ {
hardDeleteEntities.Add(entity); await HardDeleteWithUnitOfWorkAsync(repository, entities, autoSave, cancellationToken, uowManager.Current);
await repository.DeleteAsync(entity, autoSave, cancellationToken);
} }
} }
@ -113,16 +103,7 @@ namespace Volo.Abp.Domain.Repositories
) )
where TEntity : class, IEntity, ISoftDelete where TEntity : class, IEntity, ISoftDelete
{ {
if (!(ProxyHelper.UnProxy(repository) is IUnitOfWorkManagerAccessor unitOfWorkManagerAccessor)) var uowManager = repository.GetUnitOfWorkManager();
{
throw new AbpException($"The given repository (of type {repository.GetType().AssemblyQualifiedName}) should implement the {typeof(IUnitOfWorkManagerAccessor).AssemblyQualifiedName} interface in order to invoke the {nameof(HardDeleteAsync)} method!");
}
var uowManager = unitOfWorkManagerAccessor.UnitOfWorkManager;
if (uowManager == null)
{
throw new AbpException($"{nameof(unitOfWorkManagerAccessor.UnitOfWorkManager)} property of the given {nameof(repository)} object is null!");
}
if (uowManager.Current == null) if (uowManager.Current == null)
{ {
@ -138,11 +119,66 @@ namespace Volo.Abp.Domain.Repositories
} }
} }
private static IUnitOfWorkManager GetUnitOfWorkManager<TEntity>(
this IBasicRepository<TEntity> repository,
[CallerMemberName] string callingMethodName = nameof(GetUnitOfWorkManager)
)
where TEntity : class, IEntity
{
if (ProxyHelper.UnProxy(repository) is not IUnitOfWorkManagerAccessor unitOfWorkManagerAccessor)
{
throw new AbpException($"The given repository (of type {repository.GetType().AssemblyQualifiedName}) should implement the " +
$"{typeof(IUnitOfWorkManagerAccessor).AssemblyQualifiedName} interface in order to invoke the {callingMethodName} method!");
}
if (unitOfWorkManagerAccessor.UnitOfWorkManager == null)
{
throw new AbpException($"{nameof(unitOfWorkManagerAccessor.UnitOfWorkManager)} property of the given {nameof(repository)} object is null!");
}
return unitOfWorkManagerAccessor.UnitOfWorkManager;
}
private static async Task HardDeleteWithUnitOfWorkAsync<TEntity>(
IRepository<TEntity> repository,
Expression<Func<TEntity, bool>> predicate,
bool autoSave,
CancellationToken cancellationToken,
IUnitOfWork currentUow
)
where TEntity : class, IEntity, ISoftDelete
{
using (currentUow.ServiceProvider.GetRequiredService<IDataFilter<ISoftDelete>>().Disable())
{
var entities = await repository.AsyncExecuter.ToListAsync((await repository.GetQueryableAsync()).Where(predicate), cancellationToken);
await HardDeleteWithUnitOfWorkAsync(repository, entities, autoSave, cancellationToken, currentUow);
}
}
private static async Task HardDeleteWithUnitOfWorkAsync<TEntity>(
IBasicRepository<TEntity> repository,
IEnumerable<TEntity> entities,
bool autoSave,
CancellationToken cancellationToken,
IUnitOfWork currentUow
)
where TEntity : class, IEntity, ISoftDelete
{
var hardDeleteEntities = (HashSet<IEntity>)currentUow.Items.GetOrAdd(
UnitOfWorkItemNames.HardDeletedEntities,
() => new HashSet<IEntity>()
);
hardDeleteEntities.UnionWith(entities);
await repository.DeleteManyAsync(entities, autoSave, cancellationToken);
}
private static async Task HardDeleteWithUnitOfWorkAsync<TEntity>( private static async Task HardDeleteWithUnitOfWorkAsync<TEntity>(
IBasicRepository<TEntity> repository, IBasicRepository<TEntity> repository,
TEntity entity, TEntity entity,
bool autoSave, bool autoSave,
CancellationToken cancellationToken, IUnitOfWork currentUow CancellationToken cancellationToken,
IUnitOfWork currentUow
) )
where TEntity : class, IEntity, ISoftDelete where TEntity : class, IEntity, ISoftDelete
{ {

15
framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyBase.cs

@ -38,19 +38,24 @@ namespace Volo.Abp.Http.Client.ClientProxying
protected ClientProxyRequestPayloadBuilder ClientProxyRequestPayloadBuilder => LazyServiceProvider.LazyGetRequiredService<ClientProxyRequestPayloadBuilder>(); protected ClientProxyRequestPayloadBuilder ClientProxyRequestPayloadBuilder => LazyServiceProvider.LazyGetRequiredService<ClientProxyRequestPayloadBuilder>();
protected ClientProxyUrlBuilder ClientProxyUrlBuilder => LazyServiceProvider.LazyGetRequiredService<ClientProxyUrlBuilder>(); protected ClientProxyUrlBuilder ClientProxyUrlBuilder => LazyServiceProvider.LazyGetRequiredService<ClientProxyUrlBuilder>();
protected virtual async Task RequestAsync(string methodName, params object[] arguments) protected virtual async Task RequestAsync(string methodName, ClientProxyRequestTypeValue arguments = null)
{ {
await RequestAsync(BuildHttpProxyClientProxyContext(methodName, arguments)); await RequestAsync(BuildHttpProxyClientProxyContext(methodName, arguments));
} }
protected virtual async Task<T> RequestAsync<T>(string methodName, params object[] arguments) protected virtual async Task<T> RequestAsync<T>(string methodName, ClientProxyRequestTypeValue arguments = null)
{ {
return await RequestAsync<T>(BuildHttpProxyClientProxyContext(methodName, arguments)); return await RequestAsync<T>(BuildHttpProxyClientProxyContext(methodName, arguments));
} }
protected virtual ClientProxyRequestContext BuildHttpProxyClientProxyContext(string methodName, params object[] arguments) protected virtual ClientProxyRequestContext BuildHttpProxyClientProxyContext(string methodName, ClientProxyRequestTypeValue arguments = null)
{ {
var methodUniqueName = $"{typeof(TService).FullName}.{methodName}.{string.Join("-", arguments.Select(x => x.GetType().FullName))}"; if (arguments == null)
{
arguments = new ClientProxyRequestTypeValue();
}
var methodUniqueName = $"{typeof(TService).FullName}.{methodName}.{string.Join("-", arguments.Values.Select(x => x.Key.FullName))}";
var action = ClientProxyApiDescriptionFinder.FindAction(methodUniqueName); var action = ClientProxyApiDescriptionFinder.FindAction(methodUniqueName);
if (action == null) if (action == null)
{ {
@ -60,7 +65,7 @@ namespace Volo.Abp.Http.Client.ClientProxying
action, action,
action.Parameters action.Parameters
.GroupBy(x => x.NameOnMethod) .GroupBy(x => x.NameOnMethod)
.Select((x, i) => new KeyValuePair<string, object>(x.Key, arguments[i])) .Select((x, i) => new KeyValuePair<string, object>(x.Key, arguments.Values[i].Value))
.ToDictionary(x => x.Key, x => x.Value), .ToDictionary(x => x.Key, x => x.Value),
typeof(TService)); typeof(TService));
} }

31
framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyRequestTypeValue.cs

@ -0,0 +1,31 @@
using System;
using System.Collections;
using System.Collections.Generic;
namespace Volo.Abp.Http.Client.ClientProxying
{
public class ClientProxyRequestTypeValue : IEnumerable<KeyValuePair<Type, object>>
{
public List<KeyValuePair<Type, object>> Values { get; private set; }
public ClientProxyRequestTypeValue()
{
Values = new List<KeyValuePair<Type, object>>();
}
public void Add(Type type, object value)
{
Values.Add(new KeyValuePair<Type, object>(type, value));
}
public IEnumerator<KeyValuePair<Type, object>> GetEnumerator()
{
return Values.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
}
}

2
framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyServiceConvention.cs

@ -217,7 +217,7 @@ namespace Volo.Abp.Swashbuckle.Conventions
var key = var key =
$"{appServiceType.FullName}." + $"{appServiceType.FullName}." +
$"{action.ActionMethod.Name}." + $"{action.ActionMethod.Name}." +
$"{string.Join("-", action.Parameters.Select(x => x.ParameterType.FullName))}"; $"{string.Join("-", action.Parameters.Select(x => TypeHelper.GetFullNameHandlingNullableAndGenerics(x.ParameterType)))}";
var actionApiDescriptionModel = ClientProxyApiDescriptionFinder.FindAction(key); var actionApiDescriptionModel = ClientProxyApiDescriptionFinder.FindAction(key);
if (actionApiDescriptionModel == null) if (actionApiDescriptionModel == null)

11
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs

@ -11,6 +11,7 @@ using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.AspNetCore.Mvc.Localization.Resource; using Volo.Abp.AspNetCore.Mvc.Localization.Resource;
using Volo.Abp.AspNetCore.Security.Claims; using Volo.Abp.AspNetCore.Security.Claims;
using Volo.Abp.AspNetCore.TestBase; using Volo.Abp.AspNetCore.TestBase;
using Volo.Abp.Authorization;
using Volo.Abp.Autofac; using Volo.Abp.Autofac;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.Abp.Localization; using Volo.Abp.Localization;
@ -65,6 +66,16 @@ namespace Volo.Abp.AspNetCore.Mvc
{ {
policy.RequireClaim("MyCustomClaimType", "42"); policy.RequireClaim("MyCustomClaimType", "42");
}); });
options.AddPolicy("TestPermission1_And_TestPermission2", policy =>
{
policy.Requirements.Add(new PermissionsRequirement(new []{"TestPermission1", "TestPermission2"}, requiresAll: true));
});
options.AddPolicy("TestPermission1_Or_TestPermission2", policy =>
{
policy.Requirements.Add(new PermissionsRequirement(new []{"TestPermission1", "TestPermission2"}, requiresAll: false));
});
}); });
Configure<AbpAspNetCoreMvcOptions>(options => Configure<AbpAspNetCoreMvcOptions>(options =>

14
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/AuthTestController.cs

@ -38,5 +38,19 @@ namespace Volo.Abp.AspNetCore.Mvc.Authorization
CurrentUser.Id.ShouldBe(FakeUserId); CurrentUser.Id.ShouldBe(FakeUserId);
return Content("OK"); return Content("OK");
} }
[Authorize("TestPermission1_And_TestPermission2")]
public ActionResult Custom_And_PolicyTest()
{
CurrentUser.Id.ShouldBe(FakeUserId);
return Content("OK");
}
[Authorize("TestPermission1_Or_TestPermission2")]
public ActionResult Custom_Or_PolicyTest()
{
CurrentUser.Id.ShouldBe(FakeUserId);
return Content("OK");
}
} }
} }

27
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/AuthTestController_Tests.cs

@ -1,5 +1,4 @@
using System; using System.Net;
using System.Net;
using System.Security.Claims; using System.Security.Claims;
using System.Threading.Tasks; using System.Threading.Tasks;
using Shouldly; using Shouldly;
@ -72,5 +71,29 @@ namespace Volo.Abp.AspNetCore.Mvc.Authorization
var result = await GetResponseAsStringAsync("/AuthTest/PermissionTest"); var result = await GetResponseAsStringAsync("/AuthTest/PermissionTest");
result.ShouldBe("OK"); result.ShouldBe("OK");
} }
[Fact]
public async Task Custom_And_Policy_Should_Not_Work_When_Permissions_Not_Granted()
{
_fakeRequiredService.Claims.AddRange(new[]
{
new Claim(AbpClaimTypes.UserId, AuthTestController.FakeUserId.ToString())
});
var response = await GetResponseAsync("/AuthTest/Custom_And_PolicyTest", HttpStatusCode.Forbidden, xmlHttpRequest: true);
response.StatusCode.ShouldBe(HttpStatusCode.Forbidden);
}
[Fact]
public async Task Custom_Or_Policy_Should_Work_When_Permissions_Are_Granted()
{
_fakeRequiredService.Claims.AddRange(new[]
{
new Claim(AbpClaimTypes.UserId, AuthTestController.FakeUserId.ToString())
});
var result = await GetResponseAsStringAsync("/AuthTest/Custom_Or_PolicyTest");
result.ShouldBe("OK");
}
} }
} }

1
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/TestPermissionDefinitionProvider.cs

@ -9,6 +9,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Authorization
var testGroup = context.AddGroup("TestGroup"); var testGroup = context.AddGroup("TestGroup");
testGroup.AddPermission("TestPermission1"); testGroup.AddPermission("TestPermission1");
testGroup.AddPermission("TestPermission2");
} }
} }
} }

7
framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/AbpAspNetCoreTestBase.cs

@ -3,6 +3,7 @@ using System.Net;
using System.Net.Http; using System.Net.Http;
using System.Text.Json; using System.Text.Json;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Net.Http.Headers;
using Shouldly; using Shouldly;
using Volo.Abp.AspNetCore.TestBase; using Volo.Abp.AspNetCore.TestBase;
@ -30,11 +31,15 @@ namespace Volo.Abp.AspNetCore
} }
} }
protected virtual async Task<HttpResponseMessage> GetResponseAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK) protected virtual async Task<HttpResponseMessage> GetResponseAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK, bool xmlHttpRequest = false)
{ {
using (var requestMessage = new HttpRequestMessage(HttpMethod.Get, url)) using (var requestMessage = new HttpRequestMessage(HttpMethod.Get, url))
{ {
requestMessage.Headers.Add("Accept-Language", CultureInfo.CurrentUICulture.Name); requestMessage.Headers.Add("Accept-Language", CultureInfo.CurrentUICulture.Name);
if (xmlHttpRequest)
{
requestMessage.Headers.Add(HeaderNames.XRequestedWith, "XMLHttpRequest");
}
var response = await Client.SendAsync(requestMessage); var response = await Client.SendAsync(requestMessage);
response.StatusCode.ShouldBe(expectedStatusCode); response.StatusCode.ShouldBe(expectedStatusCode);
return response; return response;

13
framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/HardDelete_Tests.cs

@ -54,6 +54,19 @@ namespace Volo.Abp.TestApp.Testing
} }
} }
[Fact]
public async Task Should_HardDelete_Entities_With_IEnumerable()
{
using (DataFilter.Disable<ISoftDelete>())
{
var persons = await PersonRepository.GetListAsync();
await PersonRepository.HardDeleteAsync(persons);
var personCount = await PersonRepository.GetCountAsync();
personCount.ShouldBe(0);
}
}
[Fact] [Fact]
public async Task Should_HardDelete_Soft_Deleted_Entities() public async Task Should_HardDelete_Soft_Deleted_Entities()
{ {

15
modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/AccountClientProxy.Generated.cs

@ -18,17 +18,26 @@ namespace Volo.Abp.Account.ClientProxies
{ {
public virtual async Task<IdentityUserDto> RegisterAsync(RegisterDto input) public virtual async Task<IdentityUserDto> RegisterAsync(RegisterDto input)
{ {
return await RequestAsync<IdentityUserDto>(nameof(RegisterAsync), input); return await RequestAsync<IdentityUserDto>(nameof(RegisterAsync), new ClientProxyRequestTypeValue
{
{ typeof(RegisterDto), input }
});
} }
public virtual async Task SendPasswordResetCodeAsync(SendPasswordResetCodeDto input) public virtual async Task SendPasswordResetCodeAsync(SendPasswordResetCodeDto input)
{ {
await RequestAsync(nameof(SendPasswordResetCodeAsync), input); await RequestAsync(nameof(SendPasswordResetCodeAsync), new ClientProxyRequestTypeValue
{
{ typeof(SendPasswordResetCodeDto), input }
});
} }
public virtual async Task ResetPasswordAsync(ResetPasswordDto input) public virtual async Task ResetPasswordAsync(ResetPasswordDto input)
{ {
await RequestAsync(nameof(ResetPasswordAsync), input); await RequestAsync(nameof(ResetPasswordAsync), new ClientProxyRequestTypeValue
{
{ typeof(ResetPasswordDto), input }
});
} }
} }
} }

26
modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/ClientProxies/BlogManagementClientProxy.Generated.cs

@ -23,27 +23,43 @@ namespace Volo.Blogging.Admin.ClientProxies
public virtual async Task<BlogDto> GetAsync(Guid id) public virtual async Task<BlogDto> GetAsync(Guid id)
{ {
return await RequestAsync<BlogDto>(nameof(GetAsync), id); return await RequestAsync<BlogDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task<BlogDto> CreateAsync(CreateBlogDto input) public virtual async Task<BlogDto> CreateAsync(CreateBlogDto input)
{ {
return await RequestAsync<BlogDto>(nameof(CreateAsync), input); return await RequestAsync<BlogDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(CreateBlogDto), input }
});
} }
public virtual async Task<BlogDto> UpdateAsync(Guid id, UpdateBlogDto input) public virtual async Task<BlogDto> UpdateAsync(Guid id, UpdateBlogDto input)
{ {
return await RequestAsync<BlogDto>(nameof(UpdateAsync), id, input); return await RequestAsync<BlogDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(UpdateBlogDto), input }
});
} }
public virtual async Task DeleteAsync(Guid id) public virtual async Task DeleteAsync(Guid id)
{ {
await RequestAsync(nameof(DeleteAsync), id); await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task ClearCacheAsync(Guid id) public virtual async Task ClearCacheAsync(Guid id)
{ {
await RequestAsync(nameof(ClearCacheAsync), id); await RequestAsync(nameof(ClearCacheAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
} }
} }

10
modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogFilesClientProxy.Generated.cs

@ -17,12 +17,18 @@ namespace Volo.Blogging.ClientProxies
{ {
public virtual async Task<RawFileDto> GetAsync(string name) public virtual async Task<RawFileDto> GetAsync(string name)
{ {
return await RequestAsync<RawFileDto>(nameof(GetAsync), name); return await RequestAsync<RawFileDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), name }
});
} }
public virtual async Task<FileUploadOutputDto> CreateAsync(FileUploadInputDto input) public virtual async Task<FileUploadOutputDto> CreateAsync(FileUploadInputDto input)
{ {
return await RequestAsync<FileUploadOutputDto>(nameof(CreateAsync), input); return await RequestAsync<FileUploadOutputDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(FileUploadInputDto), input }
});
} }
} }
} }

10
modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogsClientProxy.Generated.cs

@ -23,12 +23,18 @@ namespace Volo.Blogging.ClientProxies
public virtual async Task<BlogDto> GetByShortNameAsync(string shortName) public virtual async Task<BlogDto> GetByShortNameAsync(string shortName)
{ {
return await RequestAsync<BlogDto>(nameof(GetByShortNameAsync), shortName); return await RequestAsync<BlogDto>(nameof(GetByShortNameAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), shortName }
});
} }
public virtual async Task<BlogDto> GetAsync(Guid id) public virtual async Task<BlogDto> GetAsync(Guid id)
{ {
return await RequestAsync<BlogDto>(nameof(GetAsync), id); return await RequestAsync<BlogDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
} }
} }

21
modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/CommentsClientProxy.Generated.cs

@ -19,22 +19,35 @@ namespace Volo.Blogging.ClientProxies
{ {
public virtual async Task<List<CommentWithRepliesDto>> GetHierarchicalListOfPostAsync(Guid postId) public virtual async Task<List<CommentWithRepliesDto>> GetHierarchicalListOfPostAsync(Guid postId)
{ {
return await RequestAsync<List<CommentWithRepliesDto>>(nameof(GetHierarchicalListOfPostAsync), postId); return await RequestAsync<List<CommentWithRepliesDto>>(nameof(GetHierarchicalListOfPostAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), postId }
});
} }
public virtual async Task<CommentWithDetailsDto> CreateAsync(CreateCommentDto input) public virtual async Task<CommentWithDetailsDto> CreateAsync(CreateCommentDto input)
{ {
return await RequestAsync<CommentWithDetailsDto>(nameof(CreateAsync), input); return await RequestAsync<CommentWithDetailsDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(CreateCommentDto), input }
});
} }
public virtual async Task<CommentWithDetailsDto> UpdateAsync(Guid id, UpdateCommentDto input) public virtual async Task<CommentWithDetailsDto> UpdateAsync(Guid id, UpdateCommentDto input)
{ {
return await RequestAsync<CommentWithDetailsDto>(nameof(UpdateAsync), id, input); return await RequestAsync<CommentWithDetailsDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(UpdateCommentDto), input }
});
} }
public virtual async Task DeleteAsync(Guid id) public virtual async Task DeleteAsync(Guid id)
{ {
await RequestAsync(nameof(DeleteAsync), id); await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
} }
} }

37
modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/PostsClientProxy.Generated.cs

@ -17,37 +17,60 @@ namespace Volo.Blogging.ClientProxies
{ {
public virtual async Task<ListResultDto<PostWithDetailsDto>> GetListByBlogIdAndTagNameAsync(Guid blogId, string tagName) public virtual async Task<ListResultDto<PostWithDetailsDto>> GetListByBlogIdAndTagNameAsync(Guid blogId, string tagName)
{ {
return await RequestAsync<ListResultDto<PostWithDetailsDto>>(nameof(GetListByBlogIdAndTagNameAsync), blogId, tagName); return await RequestAsync<ListResultDto<PostWithDetailsDto>>(nameof(GetListByBlogIdAndTagNameAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), blogId },
{ typeof(string), tagName }
});
} }
public virtual async Task<ListResultDto<PostWithDetailsDto>> GetTimeOrderedListAsync(Guid blogId) public virtual async Task<ListResultDto<PostWithDetailsDto>> GetTimeOrderedListAsync(Guid blogId)
{ {
return await RequestAsync<ListResultDto<PostWithDetailsDto>>(nameof(GetTimeOrderedListAsync), blogId); return await RequestAsync<ListResultDto<PostWithDetailsDto>>(nameof(GetTimeOrderedListAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), blogId }
});
} }
public virtual async Task<PostWithDetailsDto> GetForReadingAsync(GetPostInput input) public virtual async Task<PostWithDetailsDto> GetForReadingAsync(GetPostInput input)
{ {
return await RequestAsync<PostWithDetailsDto>(nameof(GetForReadingAsync), input); return await RequestAsync<PostWithDetailsDto>(nameof(GetForReadingAsync), new ClientProxyRequestTypeValue
{
{ typeof(GetPostInput), input }
});
} }
public virtual async Task<PostWithDetailsDto> GetAsync(Guid id) public virtual async Task<PostWithDetailsDto> GetAsync(Guid id)
{ {
return await RequestAsync<PostWithDetailsDto>(nameof(GetAsync), id); return await RequestAsync<PostWithDetailsDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task<PostWithDetailsDto> CreateAsync(CreatePostDto input) public virtual async Task<PostWithDetailsDto> CreateAsync(CreatePostDto input)
{ {
return await RequestAsync<PostWithDetailsDto>(nameof(CreateAsync), input); return await RequestAsync<PostWithDetailsDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(CreatePostDto), input }
});
} }
public virtual async Task<PostWithDetailsDto> UpdateAsync(Guid id, UpdatePostDto input) public virtual async Task<PostWithDetailsDto> UpdateAsync(Guid id, UpdatePostDto input)
{ {
return await RequestAsync<PostWithDetailsDto>(nameof(UpdateAsync), id, input); return await RequestAsync<PostWithDetailsDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(UpdatePostDto), input }
});
} }
public virtual async Task DeleteAsync(Guid id) public virtual async Task DeleteAsync(Guid id)
{ {
await RequestAsync(nameof(DeleteAsync), id); await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
} }
} }

6
modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/TagsClientProxy.Generated.cs

@ -19,7 +19,11 @@ namespace Volo.Blogging.ClientProxies
{ {
public virtual async Task<List<TagDto>> GetPopularTagsAsync(Guid blogId, GetPopularTagsInput input) public virtual async Task<List<TagDto>> GetPopularTagsAsync(Guid blogId, GetPopularTagsInput input)
{ {
return await RequestAsync<List<TagDto>>(nameof(GetPopularTagsAsync), blogId, input); return await RequestAsync<List<TagDto>>(nameof(GetPopularTagsAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), blogId },
{ typeof(GetPopularTagsInput), input }
});
} }
} }
} }

5
modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Menus/MenuItemAdminAppService.cs

@ -64,6 +64,11 @@ namespace Volo.CmsKit.Admin.Menus
CurrentTenant.Id CurrentTenant.Id
); );
if (input.PageId.HasValue)
{
MenuManager.SetPageUrl(menuItem, await PageRepository.GetAsync(input.PageId.Value));
}
await MenuItemRepository.InsertAsync(menuItem); await MenuItemRepository.InsertAsync(menuItem);
return ObjectMapper.Map<MenuItem, MenuItemDto>(menuItem); return ObjectMapper.Map<MenuItem, MenuItemDto>(menuItem);

26
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogAdminClientProxy.Generated.cs

@ -17,27 +17,43 @@ namespace Volo.CmsKit.Admin.Blogs.ClientProxies
{ {
public virtual async Task<BlogDto> GetAsync(Guid id) public virtual async Task<BlogDto> GetAsync(Guid id)
{ {
return await RequestAsync<BlogDto>(nameof(GetAsync), id); return await RequestAsync<BlogDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task<PagedResultDto<BlogDto>> GetListAsync(BlogGetListInput input) public virtual async Task<PagedResultDto<BlogDto>> GetListAsync(BlogGetListInput input)
{ {
return await RequestAsync<PagedResultDto<BlogDto>>(nameof(GetListAsync), input); return await RequestAsync<PagedResultDto<BlogDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(BlogGetListInput), input }
});
} }
public virtual async Task<BlogDto> CreateAsync(CreateBlogDto input) public virtual async Task<BlogDto> CreateAsync(CreateBlogDto input)
{ {
return await RequestAsync<BlogDto>(nameof(CreateAsync), input); return await RequestAsync<BlogDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(CreateBlogDto), input }
});
} }
public virtual async Task<BlogDto> UpdateAsync(Guid id, UpdateBlogDto input) public virtual async Task<BlogDto> UpdateAsync(Guid id, UpdateBlogDto input)
{ {
return await RequestAsync<BlogDto>(nameof(UpdateAsync), id, input); return await RequestAsync<BlogDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(UpdateBlogDto), input }
});
} }
public virtual async Task DeleteAsync(Guid id) public virtual async Task DeleteAsync(Guid id)
{ {
await RequestAsync(nameof(DeleteAsync), id); await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
} }
} }

11
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogFeatureAdminClientProxy.Generated.cs

@ -19,12 +19,19 @@ namespace Volo.CmsKit.Admin.Blogs.ClientProxies
{ {
public virtual async Task<List<BlogFeatureDto>> GetListAsync(Guid blogId) public virtual async Task<List<BlogFeatureDto>> GetListAsync(Guid blogId)
{ {
return await RequestAsync<List<BlogFeatureDto>>(nameof(GetListAsync), blogId); return await RequestAsync<List<BlogFeatureDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), blogId }
});
} }
public virtual async Task SetAsync(Guid blogId, BlogFeatureInputDto dto) public virtual async Task SetAsync(Guid blogId, BlogFeatureInputDto dto)
{ {
await RequestAsync(nameof(SetAsync), blogId, dto); await RequestAsync(nameof(SetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), blogId },
{ typeof(BlogFeatureInputDto), dto }
});
} }
} }
} }

26
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogPostAdminClientProxy.Generated.cs

@ -17,27 +17,43 @@ namespace Volo.CmsKit.Admin.Blogs.ClientProxies
{ {
public virtual async Task<BlogPostDto> CreateAsync(CreateBlogPostDto input) public virtual async Task<BlogPostDto> CreateAsync(CreateBlogPostDto input)
{ {
return await RequestAsync<BlogPostDto>(nameof(CreateAsync), input); return await RequestAsync<BlogPostDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(CreateBlogPostDto), input }
});
} }
public virtual async Task DeleteAsync(Guid id) public virtual async Task DeleteAsync(Guid id)
{ {
await RequestAsync(nameof(DeleteAsync), id); await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task<BlogPostDto> GetAsync(Guid id) public virtual async Task<BlogPostDto> GetAsync(Guid id)
{ {
return await RequestAsync<BlogPostDto>(nameof(GetAsync), id); return await RequestAsync<BlogPostDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task<PagedResultDto<BlogPostListDto>> GetListAsync(BlogPostGetListInput input) public virtual async Task<PagedResultDto<BlogPostListDto>> GetListAsync(BlogPostGetListInput input)
{ {
return await RequestAsync<PagedResultDto<BlogPostListDto>>(nameof(GetListAsync), input); return await RequestAsync<PagedResultDto<BlogPostListDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(BlogPostGetListInput), input }
});
} }
public virtual async Task<BlogPostDto> UpdateAsync(Guid id, UpdateBlogPostDto input) public virtual async Task<BlogPostDto> UpdateAsync(Guid id, UpdateBlogPostDto input)
{ {
return await RequestAsync<BlogPostDto>(nameof(UpdateAsync), id, input); return await RequestAsync<BlogPostDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(UpdateBlogPostDto), input }
});
} }
} }
} }

15
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/CommentAdminClientProxy.Generated.cs

@ -17,17 +17,26 @@ namespace Volo.CmsKit.Admin.Comments.ClientProxies
{ {
public virtual async Task<PagedResultDto<CommentWithAuthorDto>> GetListAsync(CommentGetListInput input) public virtual async Task<PagedResultDto<CommentWithAuthorDto>> GetListAsync(CommentGetListInput input)
{ {
return await RequestAsync<PagedResultDto<CommentWithAuthorDto>>(nameof(GetListAsync), input); return await RequestAsync<PagedResultDto<CommentWithAuthorDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(CommentGetListInput), input }
});
} }
public virtual async Task<CommentWithAuthorDto> GetAsync(Guid id) public virtual async Task<CommentWithAuthorDto> GetAsync(Guid id)
{ {
return await RequestAsync<CommentWithAuthorDto>(nameof(GetAsync), id); return await RequestAsync<CommentWithAuthorDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task DeleteAsync(Guid id) public virtual async Task DeleteAsync(Guid id)
{ {
await RequestAsync(nameof(DeleteAsync), id); await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
} }
} }

15
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/EntityTagAdminClientProxy.Generated.cs

@ -17,17 +17,26 @@ namespace Volo.CmsKit.Admin.Tags.ClientProxies
{ {
public virtual async Task AddTagToEntityAsync(EntityTagCreateDto input) public virtual async Task AddTagToEntityAsync(EntityTagCreateDto input)
{ {
await RequestAsync(nameof(AddTagToEntityAsync), input); await RequestAsync(nameof(AddTagToEntityAsync), new ClientProxyRequestTypeValue
{
{ typeof(EntityTagCreateDto), input }
});
} }
public virtual async Task RemoveTagFromEntityAsync(EntityTagRemoveDto input) public virtual async Task RemoveTagFromEntityAsync(EntityTagRemoveDto input)
{ {
await RequestAsync(nameof(RemoveTagFromEntityAsync), input); await RequestAsync(nameof(RemoveTagFromEntityAsync), new ClientProxyRequestTypeValue
{
{ typeof(EntityTagRemoveDto), input }
});
} }
public virtual async Task SetEntityTagsAsync(EntityTagSetDto input) public virtual async Task SetEntityTagsAsync(EntityTagSetDto input)
{ {
await RequestAsync(nameof(SetEntityTagsAsync), input); await RequestAsync(nameof(SetEntityTagsAsync), new ClientProxyRequestTypeValue
{
{ typeof(EntityTagSetDto), input }
});
} }
} }
} }

11
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MediaDescriptorAdminClientProxy.Generated.cs

@ -17,12 +17,19 @@ namespace Volo.CmsKit.Admin.MediaDescriptors.ClientProxies
{ {
public virtual async Task<MediaDescriptorDto> CreateAsync(string entityType, CreateMediaInputWithStream inputStream) public virtual async Task<MediaDescriptorDto> CreateAsync(string entityType, CreateMediaInputWithStream inputStream)
{ {
return await RequestAsync<MediaDescriptorDto>(nameof(CreateAsync), entityType, inputStream); return await RequestAsync<MediaDescriptorDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), entityType },
{ typeof(CreateMediaInputWithStream), inputStream }
});
} }
public virtual async Task DeleteAsync(Guid id) public virtual async Task DeleteAsync(Guid id)
{ {
await RequestAsync(nameof(DeleteAsync), id); await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
} }
} }

32
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MenuItemAdminClientProxy.Generated.cs

@ -23,32 +23,52 @@ namespace Volo.CmsKit.Admin.Menus.ClientProxies
public virtual async Task<MenuItemDto> GetAsync(Guid id) public virtual async Task<MenuItemDto> GetAsync(Guid id)
{ {
return await RequestAsync<MenuItemDto>(nameof(GetAsync), id); return await RequestAsync<MenuItemDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task<MenuItemDto> CreateAsync(MenuItemCreateInput input) public virtual async Task<MenuItemDto> CreateAsync(MenuItemCreateInput input)
{ {
return await RequestAsync<MenuItemDto>(nameof(CreateAsync), input); return await RequestAsync<MenuItemDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(MenuItemCreateInput), input }
});
} }
public virtual async Task<MenuItemDto> UpdateAsync(Guid id, MenuItemUpdateInput input) public virtual async Task<MenuItemDto> UpdateAsync(Guid id, MenuItemUpdateInput input)
{ {
return await RequestAsync<MenuItemDto>(nameof(UpdateAsync), id, input); return await RequestAsync<MenuItemDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(MenuItemUpdateInput), input }
});
} }
public virtual async Task DeleteAsync(Guid id) public virtual async Task DeleteAsync(Guid id)
{ {
await RequestAsync(nameof(DeleteAsync), id); await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task MoveMenuItemAsync(Guid id, MenuItemMoveInput input) public virtual async Task MoveMenuItemAsync(Guid id, MenuItemMoveInput input)
{ {
await RequestAsync(nameof(MoveMenuItemAsync), id, input); await RequestAsync(nameof(MoveMenuItemAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(MenuItemMoveInput), input }
});
} }
public virtual async Task<PagedResultDto<PageLookupDto>> GetPageLookupAsync(PageLookupInputDto input) public virtual async Task<PagedResultDto<PageLookupDto>> GetPageLookupAsync(PageLookupInputDto input)
{ {
return await RequestAsync<PagedResultDto<PageLookupDto>>(nameof(GetPageLookupAsync), input); return await RequestAsync<PagedResultDto<PageLookupDto>>(nameof(GetPageLookupAsync), new ClientProxyRequestTypeValue
{
{ typeof(PageLookupInputDto), input }
});
} }
} }
} }

26
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/PageAdminClientProxy.Generated.cs

@ -17,27 +17,43 @@ namespace Volo.CmsKit.Admin.Pages.ClientProxies
{ {
public virtual async Task<PageDto> GetAsync(Guid id) public virtual async Task<PageDto> GetAsync(Guid id)
{ {
return await RequestAsync<PageDto>(nameof(GetAsync), id); return await RequestAsync<PageDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task<PagedResultDto<PageDto>> GetListAsync(GetPagesInputDto input) public virtual async Task<PagedResultDto<PageDto>> GetListAsync(GetPagesInputDto input)
{ {
return await RequestAsync<PagedResultDto<PageDto>>(nameof(GetListAsync), input); return await RequestAsync<PagedResultDto<PageDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(GetPagesInputDto), input }
});
} }
public virtual async Task<PageDto> CreateAsync(CreatePageInputDto input) public virtual async Task<PageDto> CreateAsync(CreatePageInputDto input)
{ {
return await RequestAsync<PageDto>(nameof(CreateAsync), input); return await RequestAsync<PageDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(CreatePageInputDto), input }
});
} }
public virtual async Task<PageDto> UpdateAsync(Guid id, UpdatePageInputDto input) public virtual async Task<PageDto> UpdateAsync(Guid id, UpdatePageInputDto input)
{ {
return await RequestAsync<PageDto>(nameof(UpdateAsync), id, input); return await RequestAsync<PageDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(UpdatePageInputDto), input }
});
} }
public virtual async Task DeleteAsync(Guid id) public virtual async Task DeleteAsync(Guid id)
{ {
await RequestAsync(nameof(DeleteAsync), id); await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
} }
} }

26
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/TagAdminClientProxy.Generated.cs

@ -19,27 +19,43 @@ namespace Volo.CmsKit.Admin.Tags.ClientProxies
{ {
public virtual async Task<TagDto> CreateAsync(TagCreateDto input) public virtual async Task<TagDto> CreateAsync(TagCreateDto input)
{ {
return await RequestAsync<TagDto>(nameof(CreateAsync), input); return await RequestAsync<TagDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(TagCreateDto), input }
});
} }
public virtual async Task DeleteAsync(Guid id) public virtual async Task DeleteAsync(Guid id)
{ {
await RequestAsync(nameof(DeleteAsync), id); await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task<TagDto> GetAsync(Guid id) public virtual async Task<TagDto> GetAsync(Guid id)
{ {
return await RequestAsync<TagDto>(nameof(GetAsync), id); return await RequestAsync<TagDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task<PagedResultDto<TagDto>> GetListAsync(TagGetListInput input) public virtual async Task<PagedResultDto<TagDto>> GetListAsync(TagGetListInput input)
{ {
return await RequestAsync<PagedResultDto<TagDto>>(nameof(GetListAsync), input); return await RequestAsync<PagedResultDto<TagDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(TagGetListInput), input }
});
} }
public virtual async Task<TagDto> UpdateAsync(Guid id, TagUpdateDto input) public virtual async Task<TagDto> UpdateAsync(Guid id, TagUpdateDto input)
{ {
return await RequestAsync<TagDto>(nameof(UpdateAsync), id, input); return await RequestAsync<TagDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(TagUpdateDto), input }
});
} }
public virtual async Task<List<TagDefinitionDto>> GetTagDefinitionsAsync() public virtual async Task<List<TagDefinitionDto>> GetTagDefinitionsAsync()

6
modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/BlogFeatureClientProxy.Generated.cs

@ -17,7 +17,11 @@ namespace Volo.CmsKit.Blogs.ClientProxies
{ {
public virtual async Task<BlogFeatureDto> GetOrDefaultAsync(Guid blogId, string featureName) public virtual async Task<BlogFeatureDto> GetOrDefaultAsync(Guid blogId, string featureName)
{ {
return await RequestAsync<BlogFeatureDto>(nameof(GetOrDefaultAsync), blogId, featureName); return await RequestAsync<BlogFeatureDto>(nameof(GetOrDefaultAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), blogId },
{ typeof(string), featureName }
});
} }
} }
} }

5
modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/MediaDescriptorClientProxy.Generated.cs

@ -18,7 +18,10 @@ namespace Volo.CmsKit.MediaDescriptors.ClientProxies
{ {
public virtual async Task<RemoteStreamContent> DownloadAsync(Guid id) public virtual async Task<RemoteStreamContent> DownloadAsync(Guid id)
{ {
return await RequestAsync<RemoteStreamContent>(nameof(DownloadAsync), id); return await RequestAsync<RemoteStreamContent>(nameof(DownloadAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
} }
} }

12
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogPostPublicClientProxy.Generated.cs

@ -17,12 +17,20 @@ namespace Volo.CmsKit.Public.Blogs.ClientProxies
{ {
public virtual async Task<BlogPostPublicDto> GetAsync(string blogSlug, string blogPostSlug) public virtual async Task<BlogPostPublicDto> GetAsync(string blogSlug, string blogPostSlug)
{ {
return await RequestAsync<BlogPostPublicDto>(nameof(GetAsync), blogSlug, blogPostSlug); return await RequestAsync<BlogPostPublicDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), blogSlug },
{ typeof(string), blogPostSlug }
});
} }
public virtual async Task<PagedResultDto<BlogPostPublicDto>> GetListAsync(string blogSlug, PagedAndSortedResultRequestDto input) public virtual async Task<PagedResultDto<BlogPostPublicDto>> GetListAsync(string blogSlug, PagedAndSortedResultRequestDto input)
{ {
return await RequestAsync<PagedResultDto<BlogPostPublicDto>>(nameof(GetListAsync), blogSlug, input); return await RequestAsync<PagedResultDto<BlogPostPublicDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), blogSlug },
{ typeof(PagedAndSortedResultRequestDto), input }
});
} }
} }
} }

24
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs

@ -17,22 +17,38 @@ namespace Volo.CmsKit.Public.Comments.ClientProxies
{ {
public virtual async Task<ListResultDto<CommentWithDetailsDto>> GetListAsync(string entityType, string entityId) public virtual async Task<ListResultDto<CommentWithDetailsDto>> GetListAsync(string entityType, string entityId)
{ {
return await RequestAsync<ListResultDto<CommentWithDetailsDto>>(nameof(GetListAsync), entityType, entityId); return await RequestAsync<ListResultDto<CommentWithDetailsDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), entityType },
{ typeof(string), entityId }
});
} }
public virtual async Task<CommentDto> CreateAsync(string entityType, string entityId, CreateCommentInput input) public virtual async Task<CommentDto> CreateAsync(string entityType, string entityId, CreateCommentInput input)
{ {
return await RequestAsync<CommentDto>(nameof(CreateAsync), entityType, entityId, input); return await RequestAsync<CommentDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), entityType },
{ typeof(string), entityId },
{ typeof(CreateCommentInput), input }
});
} }
public virtual async Task<CommentDto> UpdateAsync(Guid id, UpdateCommentInput input) public virtual async Task<CommentDto> UpdateAsync(Guid id, UpdateCommentInput input)
{ {
return await RequestAsync<CommentDto>(nameof(UpdateAsync), id, input); return await RequestAsync<CommentDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(UpdateCommentInput), input }
});
} }
public virtual async Task DeleteAsync(Guid id) public virtual async Task DeleteAsync(Guid id)
{ {
await RequestAsync(nameof(DeleteAsync), id); await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
} }
} }

5
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/PagesPublicClientProxy.Generated.cs

@ -17,7 +17,10 @@ namespace Volo.CmsKit.Public.Pages.ClientProxies
{ {
public virtual async Task<PageDto> FindBySlugAsync(string slug) public virtual async Task<PageDto> FindBySlugAsync(string slug)
{ {
return await RequestAsync<PageDto>(nameof(FindBySlugAsync), slug); return await RequestAsync<PageDto>(nameof(FindBySlugAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), slug }
});
} }
} }
} }

19
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs

@ -18,17 +18,30 @@ namespace Volo.CmsKit.Public.Ratings.ClientProxies
{ {
public virtual async Task<RatingDto> CreateAsync(string entityType, string entityId, CreateUpdateRatingInput input) public virtual async Task<RatingDto> CreateAsync(string entityType, string entityId, CreateUpdateRatingInput input)
{ {
return await RequestAsync<RatingDto>(nameof(CreateAsync), entityType, entityId, input); return await RequestAsync<RatingDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), entityType },
{ typeof(string), entityId },
{ typeof(CreateUpdateRatingInput), input }
});
} }
public virtual async Task DeleteAsync(string entityType, string entityId) public virtual async Task DeleteAsync(string entityType, string entityId)
{ {
await RequestAsync(nameof(DeleteAsync), entityType, entityId); await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), entityType },
{ typeof(string), entityId }
});
} }
public virtual async Task<List<RatingWithStarCountDto>> GetGroupedStarCountsAsync(string entityType, string entityId) public virtual async Task<List<RatingWithStarCountDto>> GetGroupedStarCountsAsync(string entityType, string entityId)
{ {
return await RequestAsync<List<RatingWithStarCountDto>>(nameof(GetGroupedStarCountsAsync), entityType, entityId); return await RequestAsync<List<RatingWithStarCountDto>>(nameof(GetGroupedStarCountsAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), entityType },
{ typeof(string), entityId }
});
} }
} }
} }

20
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/ReactionPublicClientProxy.Generated.cs

@ -17,17 +17,31 @@ namespace Volo.CmsKit.Public.Reactions.ClientProxies
{ {
public virtual async Task<ListResultDto<ReactionWithSelectionDto>> GetForSelectionAsync(string entityType, string entityId) public virtual async Task<ListResultDto<ReactionWithSelectionDto>> GetForSelectionAsync(string entityType, string entityId)
{ {
return await RequestAsync<ListResultDto<ReactionWithSelectionDto>>(nameof(GetForSelectionAsync), entityType, entityId); return await RequestAsync<ListResultDto<ReactionWithSelectionDto>>(nameof(GetForSelectionAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), entityType },
{ typeof(string), entityId }
});
} }
public virtual async Task CreateAsync(string entityType, string entityId, string reaction) public virtual async Task CreateAsync(string entityType, string entityId, string reaction)
{ {
await RequestAsync(nameof(CreateAsync), entityType, entityId, reaction); await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), entityType },
{ typeof(string), entityId },
{ typeof(string), reaction }
});
} }
public virtual async Task DeleteAsync(string entityType, string entityId, string reaction) public virtual async Task DeleteAsync(string entityType, string entityId, string reaction)
{ {
await RequestAsync(nameof(DeleteAsync), entityType, entityId, reaction); await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), entityType },
{ typeof(string), entityId },
{ typeof(string), reaction }
});
} }
} }
} }

6
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/TagPublicClientProxy.Generated.cs

@ -18,7 +18,11 @@ namespace Volo.CmsKit.Public.Tags.ClientProxies
{ {
public virtual async Task<List<TagDto>> GetAllRelatedTagsAsync(string entityType, string entityId) public virtual async Task<List<TagDto>> GetAllRelatedTagsAsync(string entityType, string entityId)
{ {
return await RequestAsync<List<TagDto>>(nameof(GetAllRelatedTagsAsync), entityType, entityId); return await RequestAsync<List<TagDto>>(nameof(GetAllRelatedTagsAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), entityType },
{ typeof(string), entityId }
});
} }
} }
} }

30
modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/DocumentsAdminClientProxy.Generated.cs

@ -17,32 +17,50 @@ namespace Volo.Docs.Admin.ClientProxies
{ {
public virtual async Task ClearCacheAsync(ClearCacheInput input) public virtual async Task ClearCacheAsync(ClearCacheInput input)
{ {
await RequestAsync(nameof(ClearCacheAsync), input); await RequestAsync(nameof(ClearCacheAsync), new ClientProxyRequestTypeValue
{
{ typeof(ClearCacheInput), input }
});
} }
public virtual async Task PullAllAsync(PullAllDocumentInput input) public virtual async Task PullAllAsync(PullAllDocumentInput input)
{ {
await RequestAsync(nameof(PullAllAsync), input); await RequestAsync(nameof(PullAllAsync), new ClientProxyRequestTypeValue
{
{ typeof(PullAllDocumentInput), input }
});
} }
public virtual async Task PullAsync(PullDocumentInput input) public virtual async Task PullAsync(PullDocumentInput input)
{ {
await RequestAsync(nameof(PullAsync), input); await RequestAsync(nameof(PullAsync), new ClientProxyRequestTypeValue
{
{ typeof(PullDocumentInput), input }
});
} }
public virtual async Task<PagedResultDto<DocumentDto>> GetAllAsync(GetAllInput input) public virtual async Task<PagedResultDto<DocumentDto>> GetAllAsync(GetAllInput input)
{ {
return await RequestAsync<PagedResultDto<DocumentDto>>(nameof(GetAllAsync), input); return await RequestAsync<PagedResultDto<DocumentDto>>(nameof(GetAllAsync), new ClientProxyRequestTypeValue
{
{ typeof(GetAllInput), input }
});
} }
public virtual async Task RemoveFromCacheAsync(Guid documentId) public virtual async Task RemoveFromCacheAsync(Guid documentId)
{ {
await RequestAsync(nameof(RemoveFromCacheAsync), documentId); await RequestAsync(nameof(RemoveFromCacheAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), documentId }
});
} }
public virtual async Task ReindexAsync(Guid documentId) public virtual async Task ReindexAsync(Guid documentId)
{ {
await RequestAsync(nameof(ReindexAsync), documentId); await RequestAsync(nameof(ReindexAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), documentId }
});
} }
} }
} }

31
modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/ProjectsAdminClientProxy.Generated.cs

@ -17,27 +17,43 @@ namespace Volo.Docs.Admin.ClientProxies
{ {
public virtual async Task<PagedResultDto<ProjectDto>> GetListAsync(PagedAndSortedResultRequestDto input) public virtual async Task<PagedResultDto<ProjectDto>> GetListAsync(PagedAndSortedResultRequestDto input)
{ {
return await RequestAsync<PagedResultDto<ProjectDto>>(nameof(GetListAsync), input); return await RequestAsync<PagedResultDto<ProjectDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(PagedAndSortedResultRequestDto), input }
});
} }
public virtual async Task<ProjectDto> GetAsync(Guid id) public virtual async Task<ProjectDto> GetAsync(Guid id)
{ {
return await RequestAsync<ProjectDto>(nameof(GetAsync), id); return await RequestAsync<ProjectDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task<ProjectDto> CreateAsync(CreateProjectDto input) public virtual async Task<ProjectDto> CreateAsync(CreateProjectDto input)
{ {
return await RequestAsync<ProjectDto>(nameof(CreateAsync), input); return await RequestAsync<ProjectDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(CreateProjectDto), input }
});
} }
public virtual async Task<ProjectDto> UpdateAsync(Guid id, UpdateProjectDto input) public virtual async Task<ProjectDto> UpdateAsync(Guid id, UpdateProjectDto input)
{ {
return await RequestAsync<ProjectDto>(nameof(UpdateAsync), id, input); return await RequestAsync<ProjectDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(UpdateProjectDto), input }
});
} }
public virtual async Task DeleteAsync(Guid id) public virtual async Task DeleteAsync(Guid id)
{ {
await RequestAsync(nameof(DeleteAsync), id); await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task ReindexAllAsync() public virtual async Task ReindexAllAsync()
@ -47,7 +63,10 @@ namespace Volo.Docs.Admin.ClientProxies
public virtual async Task ReindexAsync(ReindexInput input) public virtual async Task ReindexAsync(ReindexInput input)
{ {
await RequestAsync(nameof(ReindexAsync), input); await RequestAsync(nameof(ReindexAsync), new ClientProxyRequestTypeValue
{
{ typeof(ReindexInput), input }
});
} }
} }
} }

35
modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsDocumentClientProxy.Generated.cs

@ -18,27 +18,42 @@ namespace Volo.Docs.Documents.ClientProxies
{ {
public virtual async Task<DocumentWithDetailsDto> GetAsync(GetDocumentInput input) public virtual async Task<DocumentWithDetailsDto> GetAsync(GetDocumentInput input)
{ {
return await RequestAsync<DocumentWithDetailsDto>(nameof(GetAsync), input); return await RequestAsync<DocumentWithDetailsDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(GetDocumentInput), input }
});
} }
public virtual async Task<DocumentWithDetailsDto> GetDefaultAsync(GetDefaultDocumentInput input) public virtual async Task<DocumentWithDetailsDto> GetDefaultAsync(GetDefaultDocumentInput input)
{ {
return await RequestAsync<DocumentWithDetailsDto>(nameof(GetDefaultAsync), input); return await RequestAsync<DocumentWithDetailsDto>(nameof(GetDefaultAsync), new ClientProxyRequestTypeValue
{
{ typeof(GetDefaultDocumentInput), input }
});
} }
public virtual async Task<NavigationNode> GetNavigationAsync(GetNavigationDocumentInput input) public virtual async Task<NavigationNode> GetNavigationAsync(GetNavigationDocumentInput input)
{ {
return await RequestAsync<NavigationNode>(nameof(GetNavigationAsync), input); return await RequestAsync<NavigationNode>(nameof(GetNavigationAsync), new ClientProxyRequestTypeValue
{
{ typeof(GetNavigationDocumentInput), input }
});
} }
public virtual async Task<DocumentResourceDto> GetResourceAsync(GetDocumentResourceInput input) public virtual async Task<DocumentResourceDto> GetResourceAsync(GetDocumentResourceInput input)
{ {
return await RequestAsync<DocumentResourceDto>(nameof(GetResourceAsync), input); return await RequestAsync<DocumentResourceDto>(nameof(GetResourceAsync), new ClientProxyRequestTypeValue
{
{ typeof(GetDocumentResourceInput), input }
});
} }
public virtual async Task<List<DocumentSearchOutput>> SearchAsync(DocumentSearchInput input) public virtual async Task<List<DocumentSearchOutput>> SearchAsync(DocumentSearchInput input)
{ {
return await RequestAsync<List<DocumentSearchOutput>>(nameof(SearchAsync), input); return await RequestAsync<List<DocumentSearchOutput>>(nameof(SearchAsync), new ClientProxyRequestTypeValue
{
{ typeof(DocumentSearchInput), input }
});
} }
public virtual async Task<bool> FullSearchEnabledAsync() public virtual async Task<bool> FullSearchEnabledAsync()
@ -48,12 +63,18 @@ namespace Volo.Docs.Documents.ClientProxies
public virtual async Task<List<String>> GetUrlsAsync(string prefix) public virtual async Task<List<String>> GetUrlsAsync(string prefix)
{ {
return await RequestAsync<List<String>>(nameof(GetUrlsAsync), prefix); return await RequestAsync<List<String>>(nameof(GetUrlsAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), prefix }
});
} }
public virtual async Task<DocumentParametersDto> GetParametersAsync(GetParametersDocumentInput input) public virtual async Task<DocumentParametersDto> GetParametersAsync(GetParametersDocumentInput input)
{ {
return await RequestAsync<DocumentParametersDto>(nameof(GetParametersAsync), input); return await RequestAsync<DocumentParametersDto>(nameof(GetParametersAsync), new ClientProxyRequestTypeValue
{
{ typeof(GetParametersDocumentInput), input }
});
} }
} }
} }

22
modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsProjectClientProxy.Generated.cs

@ -23,22 +23,36 @@ namespace Volo.Docs.Projects.ClientProxies
public virtual async Task<ProjectDto> GetAsync(string shortName) public virtual async Task<ProjectDto> GetAsync(string shortName)
{ {
return await RequestAsync<ProjectDto>(nameof(GetAsync), shortName); return await RequestAsync<ProjectDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), shortName }
});
} }
public virtual async Task<string> GetDefaultLanguageCodeAsync(string shortName, string version) public virtual async Task<string> GetDefaultLanguageCodeAsync(string shortName, string version)
{ {
return await RequestAsync<string>(nameof(GetDefaultLanguageCodeAsync), shortName, version); return await RequestAsync<string>(nameof(GetDefaultLanguageCodeAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), shortName },
{ typeof(string), version }
});
} }
public virtual async Task<ListResultDto<VersionInfoDto>> GetVersionsAsync(string shortName) public virtual async Task<ListResultDto<VersionInfoDto>> GetVersionsAsync(string shortName)
{ {
return await RequestAsync<ListResultDto<VersionInfoDto>>(nameof(GetVersionsAsync), shortName); return await RequestAsync<ListResultDto<VersionInfoDto>>(nameof(GetVersionsAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), shortName }
});
} }
public virtual async Task<LanguageConfig> GetLanguageListAsync(string shortName, string version) public virtual async Task<LanguageConfig> GetLanguageListAsync(string shortName, string version)
{ {
return await RequestAsync<LanguageConfig>(nameof(GetLanguageListAsync), shortName, version); return await RequestAsync<LanguageConfig>(nameof(GetLanguageListAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), shortName },
{ typeof(string), version }
});
} }
} }
} }

13
modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/ClientProxies/FeaturesClientProxy.Generated.cs

@ -17,12 +17,21 @@ namespace Volo.Abp.FeatureManagement.ClientProxies
{ {
public virtual async Task<GetFeatureListResultDto> GetAsync(string providerName, string providerKey) public virtual async Task<GetFeatureListResultDto> GetAsync(string providerName, string providerKey)
{ {
return await RequestAsync<GetFeatureListResultDto>(nameof(GetAsync), providerName, providerKey); return await RequestAsync<GetFeatureListResultDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), providerName },
{ typeof(string), providerKey }
});
} }
public virtual async Task UpdateAsync(string providerName, string providerKey, UpdateFeaturesDto input) public virtual async Task UpdateAsync(string providerName, string providerKey, UpdateFeaturesDto input)
{ {
await RequestAsync(nameof(UpdateAsync), providerName, providerKey, input); await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), providerName },
{ typeof(string), providerKey },
{ typeof(UpdateFeaturesDto), input }
});
} }
} }
} }

26
modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityRoleClientProxy.Generated.cs

@ -22,27 +22,43 @@ namespace Volo.Abp.Identity.ClientProxies
public virtual async Task<PagedResultDto<IdentityRoleDto>> GetListAsync(GetIdentityRolesInput input) public virtual async Task<PagedResultDto<IdentityRoleDto>> GetListAsync(GetIdentityRolesInput input)
{ {
return await RequestAsync<PagedResultDto<IdentityRoleDto>>(nameof(GetListAsync), input); return await RequestAsync<PagedResultDto<IdentityRoleDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(GetIdentityRolesInput), input }
});
} }
public virtual async Task<IdentityRoleDto> GetAsync(Guid id) public virtual async Task<IdentityRoleDto> GetAsync(Guid id)
{ {
return await RequestAsync<IdentityRoleDto>(nameof(GetAsync), id); return await RequestAsync<IdentityRoleDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task<IdentityRoleDto> CreateAsync(IdentityRoleCreateDto input) public virtual async Task<IdentityRoleDto> CreateAsync(IdentityRoleCreateDto input)
{ {
return await RequestAsync<IdentityRoleDto>(nameof(CreateAsync), input); return await RequestAsync<IdentityRoleDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(IdentityRoleCreateDto), input }
});
} }
public virtual async Task<IdentityRoleDto> UpdateAsync(Guid id, IdentityRoleUpdateDto input) public virtual async Task<IdentityRoleDto> UpdateAsync(Guid id, IdentityRoleUpdateDto input)
{ {
return await RequestAsync<IdentityRoleDto>(nameof(UpdateAsync), id, input); return await RequestAsync<IdentityRoleDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(IdentityRoleUpdateDto), input }
});
} }
public virtual async Task DeleteAsync(Guid id) public virtual async Task DeleteAsync(Guid id)
{ {
await RequestAsync(nameof(DeleteAsync), id); await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
} }
} }

47
modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserClientProxy.Generated.cs

@ -17,32 +17,51 @@ namespace Volo.Abp.Identity.ClientProxies
{ {
public virtual async Task<IdentityUserDto> GetAsync(Guid id) public virtual async Task<IdentityUserDto> GetAsync(Guid id)
{ {
return await RequestAsync<IdentityUserDto>(nameof(GetAsync), id); return await RequestAsync<IdentityUserDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task<PagedResultDto<IdentityUserDto>> GetListAsync(GetIdentityUsersInput input) public virtual async Task<PagedResultDto<IdentityUserDto>> GetListAsync(GetIdentityUsersInput input)
{ {
return await RequestAsync<PagedResultDto<IdentityUserDto>>(nameof(GetListAsync), input); return await RequestAsync<PagedResultDto<IdentityUserDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(GetIdentityUsersInput), input }
});
} }
public virtual async Task<IdentityUserDto> CreateAsync(IdentityUserCreateDto input) public virtual async Task<IdentityUserDto> CreateAsync(IdentityUserCreateDto input)
{ {
return await RequestAsync<IdentityUserDto>(nameof(CreateAsync), input); return await RequestAsync<IdentityUserDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(IdentityUserCreateDto), input }
});
} }
public virtual async Task<IdentityUserDto> UpdateAsync(Guid id, IdentityUserUpdateDto input) public virtual async Task<IdentityUserDto> UpdateAsync(Guid id, IdentityUserUpdateDto input)
{ {
return await RequestAsync<IdentityUserDto>(nameof(UpdateAsync), id, input); return await RequestAsync<IdentityUserDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(IdentityUserUpdateDto), input }
});
} }
public virtual async Task DeleteAsync(Guid id) public virtual async Task DeleteAsync(Guid id)
{ {
await RequestAsync(nameof(DeleteAsync), id); await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task<ListResultDto<IdentityRoleDto>> GetRolesAsync(Guid id) public virtual async Task<ListResultDto<IdentityRoleDto>> GetRolesAsync(Guid id)
{ {
return await RequestAsync<ListResultDto<IdentityRoleDto>>(nameof(GetRolesAsync), id); return await RequestAsync<ListResultDto<IdentityRoleDto>>(nameof(GetRolesAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task<ListResultDto<IdentityRoleDto>> GetAssignableRolesAsync() public virtual async Task<ListResultDto<IdentityRoleDto>> GetAssignableRolesAsync()
@ -52,17 +71,27 @@ namespace Volo.Abp.Identity.ClientProxies
public virtual async Task UpdateRolesAsync(Guid id, IdentityUserUpdateRolesDto input) public virtual async Task UpdateRolesAsync(Guid id, IdentityUserUpdateRolesDto input)
{ {
await RequestAsync(nameof(UpdateRolesAsync), id, input); await RequestAsync(nameof(UpdateRolesAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(IdentityUserUpdateRolesDto), input }
});
} }
public virtual async Task<IdentityUserDto> FindByUsernameAsync(string userName) public virtual async Task<IdentityUserDto> FindByUsernameAsync(string userName)
{ {
return await RequestAsync<IdentityUserDto>(nameof(FindByUsernameAsync), userName); return await RequestAsync<IdentityUserDto>(nameof(FindByUsernameAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), userName }
});
} }
public virtual async Task<IdentityUserDto> FindByEmailAsync(string email) public virtual async Task<IdentityUserDto> FindByEmailAsync(string email)
{ {
return await RequestAsync<IdentityUserDto>(nameof(FindByEmailAsync), email); return await RequestAsync<IdentityUserDto>(nameof(FindByEmailAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), email }
});
} }
} }
} }

20
modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserLookupClientProxy.Generated.cs

@ -18,22 +18,34 @@ namespace Volo.Abp.Identity.ClientProxies
{ {
public virtual async Task<UserData> FindByIdAsync(Guid id) public virtual async Task<UserData> FindByIdAsync(Guid id)
{ {
return await RequestAsync<UserData>(nameof(FindByIdAsync), id); return await RequestAsync<UserData>(nameof(FindByIdAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task<UserData> FindByUserNameAsync(string userName) public virtual async Task<UserData> FindByUserNameAsync(string userName)
{ {
return await RequestAsync<UserData>(nameof(FindByUserNameAsync), userName); return await RequestAsync<UserData>(nameof(FindByUserNameAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), userName }
});
} }
public virtual async Task<ListResultDto<UserData>> SearchAsync(UserLookupSearchInputDto input) public virtual async Task<ListResultDto<UserData>> SearchAsync(UserLookupSearchInputDto input)
{ {
return await RequestAsync<ListResultDto<UserData>>(nameof(SearchAsync), input); return await RequestAsync<ListResultDto<UserData>>(nameof(SearchAsync), new ClientProxyRequestTypeValue
{
{ typeof(UserLookupSearchInputDto), input }
});
} }
public virtual async Task<long> GetCountAsync(UserLookupCountInputDto input) public virtual async Task<long> GetCountAsync(UserLookupCountInputDto input)
{ {
return await RequestAsync<long>(nameof(GetCountAsync), input); return await RequestAsync<long>(nameof(GetCountAsync), new ClientProxyRequestTypeValue
{
{ typeof(UserLookupCountInputDto), input }
});
} }
} }
} }

10
modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/ProfileClientProxy.Generated.cs

@ -22,12 +22,18 @@ namespace Volo.Abp.Identity.ClientProxies
public virtual async Task<ProfileDto> UpdateAsync(UpdateProfileDto input) public virtual async Task<ProfileDto> UpdateAsync(UpdateProfileDto input)
{ {
return await RequestAsync<ProfileDto>(nameof(UpdateAsync), input); return await RequestAsync<ProfileDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(UpdateProfileDto), input }
});
} }
public virtual async Task ChangePasswordAsync(ChangePasswordInput input) public virtual async Task ChangePasswordAsync(ChangePasswordInput input)
{ {
await RequestAsync(nameof(ChangePasswordAsync), input); await RequestAsync(nameof(ChangePasswordAsync), new ClientProxyRequestTypeValue
{
{ typeof(ChangePasswordInput), input }
});
} }
} }
} }

13
modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs

@ -36,11 +36,10 @@ namespace Volo.Abp.IdentityServer.ApiResources
} }
public ApiResource(Guid id, [NotNull] string name, string displayName = null, string description = null) public ApiResource(Guid id, [NotNull] string name, string displayName = null, string description = null)
: base(id)
{ {
Check.NotNull(name, nameof(name)); Check.NotNull(name, nameof(name));
Id = id;
Name = name; Name = name;
DisplayName = displayName; DisplayName = displayName;
@ -124,7 +123,15 @@ namespace Volo.Abp.IdentityServer.ApiResources
public virtual void AddProperty([NotNull] string key, string value) public virtual void AddProperty([NotNull] string key, string value)
{ {
Properties.Add(new ApiResourceProperty(Id, key, value)); var property = FindProperty(key);
if (property == null)
{
Properties.Add(new ApiResourceProperty(Id, key, value));
}
else
{
property.Value = value;
}
} }
public virtual void RemoveAllProperties() public virtual void RemoveAllProperties()

14
modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScope.cs

@ -40,11 +40,11 @@ namespace Volo.Abp.IdentityServer.ApiScopes
bool required = false, bool required = false,
bool emphasize = false, bool emphasize = false,
bool showInDiscoveryDocument = true, bool showInDiscoveryDocument = true,
bool enabled = true) bool enabled = true
) : base(id)
{ {
Check.NotNull(name, nameof(name)); Check.NotNull(name, nameof(name));
Id = id;
Name = name; Name = name;
DisplayName = displayName ?? name; DisplayName = displayName ?? name;
Description = description; Description = description;
@ -79,7 +79,15 @@ namespace Volo.Abp.IdentityServer.ApiScopes
public virtual void AddProperty([NotNull] string key, string value) public virtual void AddProperty([NotNull] string key, string value)
{ {
Properties.Add(new ApiScopeProperty(Id, key, value)); var property = FindProperty(key);
if (property == null)
{
Properties.Add(new ApiScopeProperty(Id, key, value));
}
else
{
property.Value = value;
}
} }
public virtual void RemoveAllProperties() public virtual void RemoveAllProperties()

36
modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/Client.cs

@ -266,7 +266,15 @@ namespace Volo.Abp.IdentityServer.Clients
public virtual void AddProperty([NotNull] string key, [NotNull] string value) public virtual void AddProperty([NotNull] string key, [NotNull] string value)
{ {
Properties.Add(new ClientProperty(Id, key,value)); var property = FindProperty(key);
if (property == null)
{
Properties.Add(new ClientProperty(Id, key, value));
}
else
{
property.Value = value;
}
} }
public virtual void RemoveAllProperties() public virtual void RemoveAllProperties()
@ -274,17 +282,17 @@ namespace Volo.Abp.IdentityServer.Clients
Properties.Clear(); Properties.Clear();
} }
public virtual void RemoveProperty(string key, string value) public virtual void RemoveProperty(string key)
{ {
Properties.RemoveAll(c => c.Value == value && c.Key == key); Properties.RemoveAll(c => c.Key == key);
} }
public virtual ClientProperty FindProperty(string key, string value) public virtual ClientProperty FindProperty(string key)
{ {
return Properties.FirstOrDefault(c => c.Key == key && c.Value == value); return Properties.FirstOrDefault(c => c.Key == key);
} }
public virtual void AddClaim([NotNull] string value, string type) public virtual void AddClaim([NotNull] string type, [NotNull] string value)
{ {
Claims.Add(new ClientClaim(Id, type, value)); Claims.Add(new ClientClaim(Id, type, value));
} }
@ -294,12 +302,22 @@ namespace Volo.Abp.IdentityServer.Clients
Claims.Clear(); Claims.Clear();
} }
public virtual void RemoveClaim(string value, string type) public virtual void RemoveClaim(string type)
{ {
Claims.RemoveAll(c => c.Value == value && c.Type == type); Claims.RemoveAll(c => c.Type == type);
} }
public virtual ClientClaim FindClaim(string value, string type) public virtual void RemoveClaim(string type, string value)
{
Claims.RemoveAll(c => c.Type == type && c.Value == value);
}
public virtual List<ClientClaim> FindClaims(string type)
{
return Claims.Where(c => c.Type == type).ToList();
}
public virtual ClientClaim FindClaim(string type, string value)
{ {
return Claims.FirstOrDefault(c => c.Type == type && c.Value == value); return Claims.FirstOrDefault(c => c.Type == type && c.Value == value);
} }

14
modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientClaim.cs

@ -1,4 +1,4 @@
using System; using System;
using JetBrains.Annotations; using JetBrains.Annotations;
using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Entities;
@ -17,11 +17,6 @@ namespace Volo.Abp.IdentityServer.Clients
} }
public virtual bool Equals(Guid clientId, string value, string type)
{
return ClientId == clientId && Type == type && Value == value;
}
protected internal ClientClaim(Guid clientId, [NotNull] string type, string value) protected internal ClientClaim(Guid clientId, [NotNull] string type, string value)
{ {
Check.NotNull(type, nameof(type)); Check.NotNull(type, nameof(type));
@ -31,9 +26,14 @@ namespace Volo.Abp.IdentityServer.Clients
Value = value; Value = value;
} }
public virtual bool Equals(Guid clientId, string type, string value)
{
return ClientId == clientId && Type == type && Value == value;
}
public override object[] GetKeys() public override object[] GetKeys()
{ {
return new object[] { ClientId, Type, Value }; return new object[] { ClientId, Type, Value };
} }
} }
} }

6
modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Devices/DeviceFlowStore.cs

@ -1,4 +1,4 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using IdentityModel; using IdentityModel;
using IdentityServer4.Models; using IdentityServer4.Models;
@ -38,7 +38,7 @@ namespace Volo.Abp.IdentityServer.Devices
DeviceCode = deviceCode, DeviceCode = deviceCode,
UserCode = userCode, UserCode = userCode,
ClientId = data.ClientId, ClientId = data.ClientId,
SubjectId = data.Subject?.FindFirst(JwtClaimTypes.Subject).Value, SubjectId = data.Subject?.FindFirst(JwtClaimTypes.Subject)?.Value,
CreationTime = data.CreationTime, CreationTime = data.CreationTime,
Expiration = data.CreationTime.AddSeconds(data.Lifetime), Expiration = data.CreationTime.AddSeconds(data.Lifetime),
Data = Serialize(data) Data = Serialize(data)
@ -93,7 +93,7 @@ namespace Volo.Abp.IdentityServer.Devices
throw new InvalidOperationException($"Could not update device code by the given userCode: {userCode}"); throw new InvalidOperationException($"Could not update device code by the given userCode: {userCode}");
} }
deviceCodes.SubjectId = data.Subject?.FindFirst(JwtClaimTypes.Subject).Value; deviceCodes.SubjectId = data.Subject?.FindFirst(JwtClaimTypes.Subject)?.Value;
deviceCodes.Data = Serialize(data); deviceCodes.Data = Serialize(data);
await DeviceFlowCodesRepository await DeviceFlowCodesRepository

3
modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrant.cs

@ -27,12 +27,11 @@ namespace Volo.Abp.IdentityServer.Grants
protected PersistedGrant() protected PersistedGrant()
{ {
} }
public PersistedGrant(Guid id) public PersistedGrant(Guid id)
: base(id)
{ {
Id = id;
} }
} }
} }

16
modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResource.cs

@ -39,11 +39,11 @@ namespace Volo.Abp.IdentityServer.IdentityResources
bool enabled = true, bool enabled = true,
bool required = false, bool required = false,
bool emphasize = false, bool emphasize = false,
bool showInDiscoveryDocument = true) bool showInDiscoveryDocument = true
) : base(id)
{ {
Check.NotNull(name, nameof(name)); Check.NotNull(name, nameof(name));
Id = id;
Name = name; Name = name;
DisplayName = displayName; DisplayName = displayName;
Description = description; Description = description;
@ -57,8 +57,8 @@ namespace Volo.Abp.IdentityServer.IdentityResources
} }
public IdentityResource(Guid id, IdentityServer4.Models.IdentityResource resource) public IdentityResource(Guid id, IdentityServer4.Models.IdentityResource resource)
: base(id)
{ {
Id = id;
Name = resource.Name; Name = resource.Name;
DisplayName = resource.DisplayName; DisplayName = resource.DisplayName;
Description = resource.Description; Description = resource.Description;
@ -92,7 +92,15 @@ namespace Volo.Abp.IdentityServer.IdentityResources
public virtual void AddProperty([NotNull] string key, string value) public virtual void AddProperty([NotNull] string key, string value)
{ {
Properties.Add(new IdentityResourceProperty(Id, key, value)); var property = FindProperty(key);
if (property == null)
{
Properties.Add(new IdentityResourceProperty(Id, key, value));
}
else
{
property.Value = value;
}
} }
public virtual void RemoveAllProperties() public virtual void RemoveAllProperties()

30
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs

@ -20,23 +20,20 @@ namespace Volo.Abp.IdentityServer.ApiResources
public async Task<ApiResource> FindByNameAsync(string apiResourceName, bool includeDetails = true, CancellationToken cancellationToken = default) public async Task<ApiResource> FindByNameAsync(string apiResourceName, bool includeDetails = true, CancellationToken cancellationToken = default)
{ {
var query = from apiResource in (await GetDbSetAsync()).IncludeDetails(includeDetails) return await (await GetDbSetAsync())
where apiResource.Name == apiResourceName .IncludeDetails(includeDetails)
orderby apiResource.Id .OrderBy(apiResource => apiResource.Id)
select apiResource; .FirstOrDefaultAsync(apiResource => apiResource.Name == apiResourceName, GetCancellationToken(cancellationToken));
return await query.FirstOrDefaultAsync(GetCancellationToken(cancellationToken));
} }
public async Task<List<ApiResource>> FindByNameAsync(string[] apiResourceNames, bool includeDetails = true, public async Task<List<ApiResource>> FindByNameAsync(string[] apiResourceNames, bool includeDetails = true,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
{ {
var query = from apiResource in (await GetDbSetAsync()).IncludeDetails(includeDetails) return await (await GetDbSetAsync())
where apiResourceNames.Contains(apiResource.Name) .IncludeDetails(includeDetails)
orderby apiResource.Name .Where(apiResource => apiResourceNames.Contains(apiResource.Name))
select apiResource; .OrderBy(apiResource => apiResource.Name)
.ToListAsync(GetCancellationToken(cancellationToken));
return await query.ToListAsync(GetCancellationToken(cancellationToken));
} }
public virtual async Task<List<ApiResource>> GetListByScopesAsync( public virtual async Task<List<ApiResource>> GetListByScopesAsync(
@ -44,11 +41,10 @@ namespace Volo.Abp.IdentityServer.ApiResources
bool includeDetails = false, bool includeDetails = false,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
{ {
var query = from api in (await GetDbSetAsync()).IncludeDetails(includeDetails) return await (await GetDbSetAsync())
where api.Scopes.Any(x => scopeNames.Contains(x.Scope)) .IncludeDetails(includeDetails)
select api; .Where(api => api.Scopes.Any(x => scopeNames.Contains(x.Scope)))
.ToListAsync(GetCancellationToken(cancellationToken));
return await query.ToListAsync(GetCancellationToken(cancellationToken));
} }
public virtual async Task<List<ApiResource>> GetListAsync( public virtual async Task<List<ApiResource>> GetListAsync(

12
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiScopes/ApiScopeRepository.cs

@ -21,6 +21,7 @@ namespace Volo.Abp.IdentityServer.ApiScopes
public async Task<ApiScope> FindByNameAsync(string scopeName, bool includeDetails = true, CancellationToken cancellationToken = default) public async Task<ApiScope> FindByNameAsync(string scopeName, bool includeDetails = true, CancellationToken cancellationToken = default)
{ {
return await (await GetDbSetAsync()) return await (await GetDbSetAsync())
.IncludeDetails(includeDetails)
.OrderBy(x=>x.Id) .OrderBy(x=>x.Id)
.FirstOrDefaultAsync(x => x.Name == scopeName, GetCancellationToken(cancellationToken)); .FirstOrDefaultAsync(x => x.Name == scopeName, GetCancellationToken(cancellationToken));
} }
@ -28,12 +29,11 @@ namespace Volo.Abp.IdentityServer.ApiScopes
public async Task<List<ApiScope>> GetListByNameAsync(string[] scopeNames, bool includeDetails = false, public async Task<List<ApiScope>> GetListByNameAsync(string[] scopeNames, bool includeDetails = false,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
{ {
var query = from scope in (await GetDbSetAsync()).IncludeDetails(includeDetails) return await (await GetDbSetAsync())
where scopeNames.Contains(scope.Name) .IncludeDetails(includeDetails)
orderby scope.Id .Where(scope => scopeNames.Contains(scope.Name))
select scope; .OrderBy(scope => scope.Id)
.ToListAsync(GetCancellationToken(cancellationToken));
return await query.ToListAsync(GetCancellationToken(cancellationToken));
} }
public async Task<List<ApiScope>> GetListAsync(string sorting, int skipCount, int maxResultCount, string filter = null, bool includeDetails = false, CancellationToken cancellationToken = default) public async Task<List<ApiScope>> GetListAsync(string sorting, int skipCount, int maxResultCount, string filter = null, bool includeDetails = false, CancellationToken cancellationToken = default)

2
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs

@ -58,7 +58,7 @@ namespace Volo.Abp.IdentityServer.Clients
public virtual async Task<bool> CheckClientIdExistAsync(string clientId, Guid? expectedId = null, CancellationToken cancellationToken = default) public virtual async Task<bool> CheckClientIdExistAsync(string clientId, Guid? expectedId = null, CancellationToken cancellationToken = default)
{ {
return await (await GetDbSetAsync()).AnyAsync(c => c.Id != expectedId && c.ClientId == clientId, cancellationToken: cancellationToken); return await (await GetDbSetAsync()).AnyAsync(c => c.Id != expectedId && c.ClientId == clientId, GetCancellationToken(cancellationToken));
} }
public async override Task DeleteAsync(Guid id, bool autoSave = false, CancellationToken cancellationToken = default) public async override Task DeleteAsync(Guid id, bool autoSave = false, CancellationToken cancellationToken = default)

6
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesRepository.cs

@ -24,9 +24,8 @@ namespace Volo.Abp.IdentityServer.Devices
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
{ {
return await (await GetDbSetAsync()) return await (await GetDbSetAsync())
.Where(d => d.UserCode == userCode)
.OrderBy(d => d.Id) .OrderBy(d => d.Id)
.FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); .FirstOrDefaultAsync(d => d.UserCode == userCode, GetCancellationToken(cancellationToken));
} }
public virtual async Task<DeviceFlowCodes> FindByDeviceCodeAsync( public virtual async Task<DeviceFlowCodes> FindByDeviceCodeAsync(
@ -34,9 +33,8 @@ namespace Volo.Abp.IdentityServer.Devices
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
{ {
return await (await GetDbSetAsync()) return await (await GetDbSetAsync())
.Where(d => d.DeviceCode == deviceCode)
.OrderBy(d => d.Id) .OrderBy(d => d.Id)
.FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); .FirstOrDefaultAsync(d => d.DeviceCode == deviceCode, GetCancellationToken(cancellationToken));
} }
public virtual async Task<List<DeviceFlowCodes>> GetListByExpirationAsync(DateTime maxExpirationDate, int maxResultCount, public virtual async Task<List<DeviceFlowCodes>> GetListByExpirationAsync(DateTime maxExpirationDate, int maxResultCount,

3
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistentGrantRepository.cs

@ -30,9 +30,8 @@ namespace Volo.Abp.IdentityServer.Grants
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
{ {
return await (await GetDbSetAsync()) return await (await GetDbSetAsync())
.Where(x => x.Key == key)
.OrderBy(x => x.Id) .OrderBy(x => x.Id)
.FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); .FirstOrDefaultAsync(x => x.Key == key, GetCancellationToken(cancellationToken));
} }
public virtual async Task<List<PersistedGrant>> GetListBySubjectIdAsync( public virtual async Task<List<PersistedGrant>> GetListBySubjectIdAsync(

14
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs

@ -24,11 +24,10 @@ namespace Volo.Abp.IdentityServer.IdentityResources
bool includeDetails = false, bool includeDetails = false,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
{ {
var query = from identityResource in (await GetDbSetAsync()).IncludeDetails(includeDetails) return await (await GetDbSetAsync())
where scopeNames.Contains(identityResource.Name) .IncludeDetails(includeDetails)
select identityResource; .Where(identityResource => scopeNames.Contains(identityResource.Name))
.ToListAsync(GetCancellationToken(cancellationToken));
return await query.ToListAsync(GetCancellationToken(cancellationToken));
} }
[Obsolete("Use WithDetailsAsync method.")] [Obsolete("Use WithDetailsAsync method.")]
@ -72,14 +71,13 @@ namespace Volo.Abp.IdentityServer.IdentityResources
{ {
return await (await GetDbSetAsync()) return await (await GetDbSetAsync())
.IncludeDetails(includeDetails) .IncludeDetails(includeDetails)
.Where(x => x.Name == name)
.OrderBy(x => x.Id) .OrderBy(x => x.Id)
.FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); .FirstOrDefaultAsync(x => x.Name == name, GetCancellationToken(cancellationToken));
} }
public virtual async Task<bool> CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) public virtual async Task<bool> CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default)
{ {
return await (await GetDbSetAsync()).AnyAsync(ir => ir.Id != expectedId && ir.Name == name, cancellationToken: cancellationToken); return await (await GetDbSetAsync()).AnyAsync(ir => ir.Id != expectedId && ir.Name == name, GetCancellationToken(cancellationToken));
} }
} }
} }

5
modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs

@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
@ -21,9 +21,8 @@ namespace Volo.Abp.IdentityServer.MongoDB
public async Task<ApiResource> FindByNameAsync(string apiResourceName, bool includeDetails = true, CancellationToken cancellationToken = default) public async Task<ApiResource> FindByNameAsync(string apiResourceName, bool includeDetails = true, CancellationToken cancellationToken = default)
{ {
return await (await GetMongoQueryableAsync(cancellationToken)) return await (await GetMongoQueryableAsync(cancellationToken))
.Where(ar => ar.Name == apiResourceName)
.OrderBy(ar => ar.Id) .OrderBy(ar => ar.Id)
.FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); .FirstOrDefaultAsync(ar => ar.Name == apiResourceName, GetCancellationToken(cancellationToken));
} }
public async Task<List<ApiResource>> FindByNameAsync(string[] apiResourceNames, bool includeDetails = true, public async Task<List<ApiResource>> FindByNameAsync(string[] apiResourceNames, bool includeDetails = true,

15
modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs

@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
@ -23,20 +23,17 @@ namespace Volo.Abp.IdentityServer.MongoDB
public async Task<ApiScope> FindByNameAsync(string scopeName, bool includeDetails = true, CancellationToken cancellationToken = default) public async Task<ApiScope> FindByNameAsync(string scopeName, bool includeDetails = true, CancellationToken cancellationToken = default)
{ {
return await (await GetMongoQueryableAsync(cancellationToken)) return await (await GetMongoQueryableAsync(cancellationToken))
.Where(x => x.Name == scopeName)
.OrderBy(x => x.Id) .OrderBy(x => x.Id)
.FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); .FirstOrDefaultAsync(x => x.Name == scopeName, GetCancellationToken(cancellationToken));
} }
public async Task<List<ApiScope>> GetListByNameAsync(string[] scopeNames, bool includeDetails = false, public async Task<List<ApiScope>> GetListByNameAsync(string[] scopeNames, bool includeDetails = false,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
{ {
var query = from scope in (await GetMongoQueryableAsync(cancellationToken)) return await (await GetMongoQueryableAsync(cancellationToken))
where scopeNames.Contains(scope.Name) .Where(scope => scopeNames.Contains(scope.Name))
orderby scope.Id .OrderBy(scope => scope.Id)
select scope; .ToListAsync(GetCancellationToken(cancellationToken));
return await query.ToListAsync(GetCancellationToken(cancellationToken));
} }
public async Task<List<ApiScope>> GetListAsync(string sorting, int skipCount, int maxResultCount, string filter = null, bool includeDetails = false, public async Task<List<ApiScope>> GetListAsync(string sorting, int skipCount, int maxResultCount, string filter = null, bool includeDetails = false,

7
modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs

@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
@ -27,9 +27,8 @@ namespace Volo.Abp.IdentityServer.MongoDB
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
{ {
return await (await GetMongoQueryableAsync(cancellationToken)) return await (await GetMongoQueryableAsync(cancellationToken))
.Where(x => x.ClientId == clientId)
.OrderBy(x => x.Id) .OrderBy(x => x.Id)
.FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); .FirstOrDefaultAsync(x => x.ClientId == clientId, GetCancellationToken(cancellationToken));
} }
public virtual async Task<List<Client>> GetListAsync( public virtual async Task<List<Client>> GetListAsync(
@ -69,7 +68,7 @@ namespace Volo.Abp.IdentityServer.MongoDB
public virtual async Task<bool> CheckClientIdExistAsync(string clientId, Guid? expectedId = null, CancellationToken cancellationToken = default) public virtual async Task<bool> CheckClientIdExistAsync(string clientId, Guid? expectedId = null, CancellationToken cancellationToken = default)
{ {
return await (await GetMongoQueryableAsync(cancellationToken)) return await (await GetMongoQueryableAsync(cancellationToken))
.AnyAsync(c => c.Id != expectedId && c.ClientId == clientId, cancellationToken: cancellationToken); .AnyAsync(c => c.Id != expectedId && c.ClientId == clientId, GetCancellationToken(cancellationToken));
} }
} }
} }

2
modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs

@ -62,7 +62,7 @@ namespace Volo.Abp.IdentityServer.MongoDB
public virtual async Task<bool> CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) public virtual async Task<bool> CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default)
{ {
return await (await GetMongoQueryableAsync(cancellationToken)) return await (await GetMongoQueryableAsync(cancellationToken))
.AnyAsync(ir => ir.Id != expectedId && ir.Name == name, cancellationToken: cancellationToken); .AnyAsync(ir => ir.Id != expectedId && ir.Name == name, GetCancellationToken(cancellationToken));
} }
} }
} }

4
modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs

@ -1,4 +1,4 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Volo.Abp.Guids; using Volo.Abp.Guids;
@ -149,7 +149,7 @@ namespace Volo.Abp.IdentityServer
client.AddCorsOrigin("https://client1-origin.com"); client.AddCorsOrigin("https://client1-origin.com");
client.AddCorsOrigin("https://{0}.abp.io"); client.AddCorsOrigin("https://{0}.abp.io");
client.AddClaim(nameof(ClientClaim.Value), nameof(ClientClaim.Type)); client.AddClaim(nameof(ClientClaim.Type), nameof(ClientClaim.Value));
client.AddGrantType(nameof(ClientGrantType.GrantType)); client.AddGrantType(nameof(ClientGrantType.GrantType));
client.AddIdentityProviderRestriction(nameof(ClientIdPRestriction.Provider)); client.AddIdentityProviderRestriction(nameof(ClientIdPRestriction.Provider));
client.AddPostLogoutRedirectUri(nameof(ClientPostLogoutRedirectUri.PostLogoutRedirectUri)); client.AddPostLogoutRedirectUri(nameof(ClientPostLogoutRedirectUri.PostLogoutRedirectUri));

13
modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/ClientProxies/PermissionsClientProxy.Generated.cs

@ -17,12 +17,21 @@ namespace Volo.Abp.PermissionManagement.ClientProxies
{ {
public virtual async Task<GetPermissionListResultDto> GetAsync(string providerName, string providerKey) public virtual async Task<GetPermissionListResultDto> GetAsync(string providerName, string providerKey)
{ {
return await RequestAsync<GetPermissionListResultDto>(nameof(GetAsync), providerName, providerKey); return await RequestAsync<GetPermissionListResultDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), providerName },
{ typeof(string), providerKey }
});
} }
public virtual async Task UpdateAsync(string providerName, string providerKey, UpdatePermissionsDto input) public virtual async Task UpdateAsync(string providerName, string providerKey, UpdatePermissionsDto input)
{ {
await RequestAsync(nameof(UpdateAsync), providerName, providerKey, input); await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), providerName },
{ typeof(string), providerKey },
{ typeof(UpdatePermissionsDto), input }
});
} }
} }
} }

5
modules/setting-management/src/Volo.Abp.SettingManagement.HttpApi.Client/ClientProxies/EmailSettingsClientProxy.Generated.cs

@ -22,7 +22,10 @@ namespace Volo.Abp.SettingManagement.ClientProxies
public virtual async Task UpdateAsync(UpdateEmailSettingsDto input) public virtual async Task UpdateAsync(UpdateEmailSettingsDto input)
{ {
await RequestAsync(nameof(UpdateAsync), input); await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(UpdateEmailSettingsDto), input }
});
} }
} }
} }

42
modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/ClientProxies/TenantClientProxy.Generated.cs

@ -17,42 +17,68 @@ namespace Volo.Abp.TenantManagement.ClientProxies
{ {
public virtual async Task<TenantDto> GetAsync(Guid id) public virtual async Task<TenantDto> GetAsync(Guid id)
{ {
return await RequestAsync<TenantDto>(nameof(GetAsync), id); return await RequestAsync<TenantDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task<PagedResultDto<TenantDto>> GetListAsync(GetTenantsInput input) public virtual async Task<PagedResultDto<TenantDto>> GetListAsync(GetTenantsInput input)
{ {
return await RequestAsync<PagedResultDto<TenantDto>>(nameof(GetListAsync), input); return await RequestAsync<PagedResultDto<TenantDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(GetTenantsInput), input }
});
} }
public virtual async Task<TenantDto> CreateAsync(TenantCreateDto input) public virtual async Task<TenantDto> CreateAsync(TenantCreateDto input)
{ {
return await RequestAsync<TenantDto>(nameof(CreateAsync), input); return await RequestAsync<TenantDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(TenantCreateDto), input }
});
} }
public virtual async Task<TenantDto> UpdateAsync(Guid id, TenantUpdateDto input) public virtual async Task<TenantDto> UpdateAsync(Guid id, TenantUpdateDto input)
{ {
return await RequestAsync<TenantDto>(nameof(UpdateAsync), id, input); return await RequestAsync<TenantDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(TenantUpdateDto), input }
});
} }
public virtual async Task DeleteAsync(Guid id) public virtual async Task DeleteAsync(Guid id)
{ {
await RequestAsync(nameof(DeleteAsync), id); await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task<string> GetDefaultConnectionStringAsync(Guid id) public virtual async Task<string> GetDefaultConnectionStringAsync(Guid id)
{ {
return await RequestAsync<string>(nameof(GetDefaultConnectionStringAsync), id); return await RequestAsync<string>(nameof(GetDefaultConnectionStringAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
public virtual async Task UpdateDefaultConnectionStringAsync(Guid id, string defaultConnectionString) public virtual async Task UpdateDefaultConnectionStringAsync(Guid id, string defaultConnectionString)
{ {
await RequestAsync(nameof(UpdateDefaultConnectionStringAsync), id, defaultConnectionString); await RequestAsync(nameof(UpdateDefaultConnectionStringAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(string), defaultConnectionString }
});
} }
public virtual async Task DeleteDefaultConnectionStringAsync(Guid id) public virtual async Task DeleteDefaultConnectionStringAsync(Guid id)
{ {
await RequestAsync(nameof(DeleteDefaultConnectionStringAsync), id); await RequestAsync(nameof(DeleteDefaultConnectionStringAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
} }
} }
} }

4
npm/ng-packs/.eslintrc.json

@ -10,7 +10,7 @@
"error", "error",
{ {
"enforceBuildableLibDependency": true, "enforceBuildableLibDependency": true,
"allow": [], "allow": ["@abp/**/proxy"],
"depConstraints": [ "depConstraints": [
{ {
"sourceTag": "*", "sourceTag": "*",
@ -20,7 +20,7 @@
} }
] ]
} }
}, },
{ {
"files": ["*.ts", "*.tsx"], "files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"], "extends": ["plugin:@nrwl/nx/typescript"],

6
npm/ng-packs/nx.json

@ -31,13 +31,13 @@
"appsDir": "" "appsDir": ""
}, },
"projects": { "projects": {
"account": { "account-core": {
"tags": [], "tags": [],
"implicitDependencies": ["core", "theme-shared"] "implicitDependencies": ["core", "theme-shared"]
}, },
"account-core": { "account": {
"tags": [], "tags": [],
"implicitDependencies": ["core", "theme-shared"] "implicitDependencies": ["core", "theme-shared", "account-core", "identity"]
}, },
"components": { "components": {
"tags": [], "tags": [],

7
npm/ng-packs/packages/account-core/proxy/ng-package.json

@ -0,0 +1,7 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../dist/packages/account-core/proxy",
"lib": {
"entryFile": "src/public-api.ts"
}
}

2
npm/ng-packs/packages/account-core/proxy/src/lib/index.ts

@ -0,0 +1,2 @@
export * from './proxy/account';
export * from './proxy/identity';

0
npm/ng-packs/packages/account/src/lib/proxy/README.md → npm/ng-packs/packages/account-core/proxy/src/lib/proxy/README.md

37
npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/account.service.ts

@ -0,0 +1,37 @@
import type { RegisterDto, ResetPasswordDto, SendPasswordResetCodeDto } from './models';
import { RestService } from '@abp/ng.core';
import { Injectable } from '@angular/core';
import type { IdentityUserDto } from '../identity/models';
@Injectable({
providedIn: 'root',
})
export class AccountService {
apiName = 'AbpAccount';
register = (input: RegisterDto) =>
this.restService.request<any, IdentityUserDto>({
method: 'POST',
url: '/api/account/register',
body: input,
},
{ apiName: this.apiName });
resetPassword = (input: ResetPasswordDto) =>
this.restService.request<any, void>({
method: 'POST',
url: '/api/account/reset-password',
body: input,
},
{ apiName: this.apiName });
sendPasswordResetCode = (input: SendPasswordResetCodeDto) =>
this.restService.request<any, void>({
method: 'POST',
url: '/api/account/send-password-reset-code',
body: input,
},
{ apiName: this.apiName });
constructor(private restService: RestService) {}
}

0
npm/ng-packs/packages/account/src/lib/proxy/account/index.ts → npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/index.ts

0
npm/ng-packs/packages/account/src/lib/proxy/account/models.ts → npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/models.ts

35
npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/account.service.ts

@ -0,0 +1,35 @@
import type { AbpLoginResult, UserLoginInfo } from './models/models';
import { RestService } from '@abp/ng.core';
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root',
})
export class AccountService {
apiName = 'AbpAccount';
checkPasswordByLogin = (login: UserLoginInfo) =>
this.restService.request<any, AbpLoginResult>({
method: 'POST',
url: '/api/account/check-password',
body: login,
},
{ apiName: this.apiName });
loginByLogin = (login: UserLoginInfo) =>
this.restService.request<any, AbpLoginResult>({
method: 'POST',
url: '/api/account/login',
body: login,
},
{ apiName: this.apiName });
logout = () =>
this.restService.request<any, void>({
method: 'GET',
url: '/api/account/logout',
},
{ apiName: this.apiName });
constructor(private restService: RestService) {}
}

0
npm/ng-packs/packages/account/src/lib/proxy/account/web/areas/account/controllers/index.ts → npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/index.ts

0
npm/ng-packs/packages/account/src/lib/proxy/account/web/areas/account/controllers/models/index.ts → npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/models/index.ts

0
npm/ng-packs/packages/account/src/lib/proxy/account/web/areas/account/controllers/models/login-result-type.enum.ts → npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/models/login-result-type.enum.ts

0
npm/ng-packs/packages/account/src/lib/proxy/account/web/areas/account/controllers/models/models.ts → npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/models/models.ts

0
npm/ng-packs/packages/account/src/lib/proxy/account/web/areas/account/index.ts → npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/index.ts

0
npm/ng-packs/packages/account/src/lib/proxy/account/web/areas/index.ts → npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/index.ts

0
npm/ng-packs/packages/account/src/lib/proxy/account/web/index.ts → npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/index.ts

2457
npm/ng-packs/packages/account/src/lib/proxy/generate-proxy.json → npm/ng-packs/packages/account-core/proxy/src/lib/proxy/generate-proxy.json

File diff suppressed because it is too large

0
npm/ng-packs/packages/account/src/lib/proxy/identity/index.ts → npm/ng-packs/packages/account-core/proxy/src/lib/proxy/identity/index.ts

0
npm/ng-packs/packages/account/src/lib/proxy/identity/models.ts → npm/ng-packs/packages/account-core/proxy/src/lib/proxy/identity/models.ts

0
npm/ng-packs/packages/account/src/lib/proxy/index.ts → npm/ng-packs/packages/account-core/proxy/src/lib/proxy/index.ts

1
npm/ng-packs/packages/account-core/proxy/src/public-api.ts

@ -0,0 +1 @@
export * from './lib/index';

2
npm/ng-packs/packages/account/ng-package.json

@ -4,5 +4,5 @@
"lib": { "lib": {
"entryFile": "src/public-api.ts" "entryFile": "src/public-api.ts"
}, },
"allowedNonPeerDependencies": ["@abp/ng.theme.shared"] "allowedNonPeerDependencies": ["@abp/ng.theme.shared", "@abp/ng.identity", "@abp/ng.account.core"]
} }

2
npm/ng-packs/packages/account/package.json

@ -8,6 +8,8 @@
}, },
"dependencies": { "dependencies": {
"@abp/ng.theme.shared": "~4.4.2", "@abp/ng.theme.shared": "~4.4.2",
"@abp/ng.identity": "~4.4.2",
"@abp/ng.account.core": "~4.4.2",
"tslib": "^2.0.0" "tslib": "^2.0.0"
}, },
"publishConfig": { "publishConfig": {

2
npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts

@ -1,4 +1,4 @@
import { ProfileService } from '@abp/ng.core'; import { ProfileService } from '@abp/ng.identity/proxy';
import { getPasswordValidators, ToasterService } from '@abp/ng.theme.shared'; import { getPasswordValidators, ToasterService } from '@abp/ng.theme.shared';
import { Component, Injector, OnInit } from '@angular/core'; import { Component, Injector, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';

2
npm/ng-packs/packages/account/src/lib/components/forgot-password/forgot-password.component.ts

@ -1,7 +1,7 @@
import { AccountService } from '@abp/ng.account.core/proxy';
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { finalize } from 'rxjs/operators'; import { finalize } from 'rxjs/operators';
import { AccountService } from '../../proxy/account/account.service';
@Component({ @Component({
selector: 'abp-forgot-password', selector: 'abp-forgot-password',

2
npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.ts

@ -1,4 +1,4 @@
import { ProfileService } from '@abp/ng.core'; import { ProfileService } from '@abp/ng.identity/proxy';
import { fadeIn } from '@abp/ng.theme.shared'; import { fadeIn } from '@abp/ng.theme.shared';
import { transition, trigger, useAnimation } from '@angular/animations'; import { transition, trigger, useAnimation } from '@angular/animations';
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';

2
npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts

@ -1,4 +1,4 @@
import { ProfileService } from '@abp/ng.core'; import { ProfileService } from '@abp/ng.identity/proxy';
import { ToasterService } from '@abp/ng.theme.shared'; import { ToasterService } from '@abp/ng.theme.shared';
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { FormBuilder, FormGroup, Validators } from '@angular/forms';

4
npm/ng-packs/packages/account/src/lib/components/register/register.component.ts

@ -1,3 +1,4 @@
import { AccountService, RegisterDto } from '@abp/ng.account.core/proxy';
import { AuthService, ConfigStateService } from '@abp/ng.core'; import { AuthService, ConfigStateService } from '@abp/ng.core';
import { getPasswordValidators, ToasterService } from '@abp/ng.theme.shared'; import { getPasswordValidators, ToasterService } from '@abp/ng.theme.shared';
import { Component, Injector, OnInit } from '@angular/core'; import { Component, Injector, OnInit } from '@angular/core';
@ -5,9 +6,8 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { throwError } from 'rxjs'; import { throwError } from 'rxjs';
import { catchError, finalize, switchMap } from 'rxjs/operators'; import { catchError, finalize, switchMap } from 'rxjs/operators';
import { eAccountComponents } from '../../enums/components'; import { eAccountComponents } from '../../enums/components';
import { AccountService } from '../../proxy/account/account.service';
import { RegisterDto } from '../../proxy/account/models';
import { getRedirectUrl } from '../../utils/auth-utils'; import { getRedirectUrl } from '../../utils/auth-utils';
const { maxLength, required, email } = Validators; const { maxLength, required, email } = Validators;
@Component({ @Component({

2
npm/ng-packs/packages/account/src/lib/components/reset-password/reset-password.component.ts

@ -1,10 +1,10 @@
import { AccountService } from '@abp/ng.account.core/proxy';
import { getPasswordValidators } from '@abp/ng.theme.shared'; import { getPasswordValidators } from '@abp/ng.theme.shared';
import { Component, Injector, OnInit } from '@angular/core'; import { Component, Injector, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { comparePasswords, Validation } from '@ngx-validate/core'; import { comparePasswords, Validation } from '@ngx-validate/core';
import { finalize } from 'rxjs/operators'; import { finalize } from 'rxjs/operators';
import { AccountService } from '../../proxy/account/account.service';
const PASSWORD_FIELDS = ['password', 'confirmPassword']; const PASSWORD_FIELDS = ['password', 'confirmPassword'];

43
npm/ng-packs/packages/account/src/lib/proxy/account/account.service.ts

@ -1,43 +0,0 @@
import type { RegisterDto, ResetPasswordDto, SendPasswordResetCodeDto } from './models';
import { RestService } from '@abp/ng.core';
import { Injectable } from '@angular/core';
import type { IdentityUserDto } from '../identity/models';
@Injectable({
providedIn: 'root',
})
export class AccountService {
apiName = 'AbpAccount';
register = (input: RegisterDto) =>
this.restService.request<any, IdentityUserDto>(
{
method: 'POST',
url: '/api/account/register',
body: input,
},
{ apiName: this.apiName },
);
resetPassword = (input: ResetPasswordDto) =>
this.restService.request<any, void>(
{
method: 'POST',
url: '/api/account/reset-password',
body: input,
},
{ apiName: this.apiName },
);
sendPasswordResetCode = (input: SendPasswordResetCodeDto) =>
this.restService.request<any, void>(
{
method: 'POST',
url: '/api/account/send-password-reset-code',
body: input,
},
{ apiName: this.apiName },
);
constructor(private restService: RestService) {}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save