Browse Source

feat(webhook): Webhooks增加集成服务接口

pull/1125/head
colin 1 year ago
parent
commit
4c640ad010
  1. 5
      aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks.ClientProxies/LINGYUN/Abp/Webhooks/ClientProxies/ClientProxiesWebhookPublisher.cs
  2. 7
      aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks.Core/LINGYUN/Abp/Webhooks/WebhooksDefinitionConsts.cs
  3. 3
      aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks/LINGYUN/Abp/Webhooks/DefaultWebhookSender.cs
  4. 2
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.Application.Contracts/LINGYUN/Abp/WebhooksManagement/Definitions/IWebhookGroupDefinitionAppService.cs
  5. 11
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.Application.Contracts/LINGYUN/Abp/WebhooksManagement/Integration/IWebhookPublishIntegrationService.cs
  6. 2
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.Application/LINGYUN/Abp/WebhooksManagement/Definitions/WebhookGroupDefinitionAppService.cs
  7. 42
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.Application/LINGYUN/Abp/WebhooksManagement/Integration/WebhookPublishIntegrationService.cs
  8. 4
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.Domain/LINGYUN/Abp/WebhooksManagement/WebhooksManagementDomainModule.cs
  9. 61
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/Definitions/WebhookDefinitionClientProxy.Generated.cs
  10. 7
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/Definitions/WebhookDefinitionClientProxy.cs
  11. 60
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/Definitions/WebhookGroupDefinitionClientProxy.Generated.cs
  12. 7
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/Definitions/WebhookGroupDefinitionClientProxy.cs
  13. 29
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/Integration/WebhookPublishIntegrationClientProxy.Generated.cs
  14. 7
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/Integration/WebhookPublishIntegrationClientProxy.cs
  15. 27
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/WebhookPublishClientProxy.Generated.cs
  16. 7
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/WebhookPublishClientProxy.cs
  17. 67
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/WebhookSendRecordClientProxy.Generated.cs
  18. 7
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/WebhookSendRecordClientProxy.cs
  19. 73
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/WebhookSubscriptionClientProxy.Generated.cs
  20. 7
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/WebhookSubscriptionClientProxy.cs
  21. 1774
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/webhooks-management-generate-proxy.json
  22. 8
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/LINGYUN.Abp.WebhooksManagement.HttpApi.Client.csproj
  23. 2
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/LINGYUN/Abp/WebhooksManagement/WebhooksManagementHttpApiClientModule.cs
  24. 4
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi/LINGYUN/Abp/WebhooksManagement/Definitions/WebhookGroupDefinitionController.cs
  25. 26
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi/LINGYUN/Abp/WebhooksManagement/Integration/WebhookPublishIntegrationController.cs

5
aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks.ClientProxies/LINGYUN/Abp/Webhooks/ClientProxies/ClientProxiesWebhookPublisher.cs

@ -1,4 +1,5 @@
using LINGYUN.Abp.WebhooksManagement;
using LINGYUN.Abp.WebhooksManagement.Integration;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
@ -11,10 +12,10 @@ namespace LINGYUN.Abp.Webhooks.ClientProxies;
[Dependency(ReplaceServices = true)]
public class ClientProxiesWebhookPublisher : IWebhookPublisher, ITransientDependency
{
protected IWebhookPublishAppService PublishAppService { get; }
protected IWebhookPublishIntegrationService PublishAppService { get; }
public ClientProxiesWebhookPublisher(
IWebhookPublishAppService publishAppService)
IWebhookPublishIntegrationService publishAppService)
{
PublishAppService = publishAppService;
}

7
aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks.Core/LINGYUN/Abp/Webhooks/WebhooksDefinitionConsts.cs

@ -0,0 +1,7 @@
namespace LINGYUN.Abp.Webhooks;
public static class WebhooksDefinitionConsts
{
public static int MinimumTimeoutDuration { get; set; } = 10;
public static int MaximumTimeoutDuration { get; set; } = 300;
}

3
aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks/LINGYUN/Abp/Webhooks/DefaultWebhookSender.cs

@ -118,7 +118,8 @@ namespace LINGYUN.Abp.Webhooks
{
var client = _httpClientFactory.CreateClient(AbpWebhooksModule.WebhooksClient);
if (webhookSenderArgs.TimeoutDuration.HasValue &&
(webhookSenderArgs.TimeoutDuration >= 10 && webhookSenderArgs.TimeoutDuration <= 300))
(webhookSenderArgs.TimeoutDuration >= WebhooksDefinitionConsts.MinimumTimeoutDuration &&
webhookSenderArgs.TimeoutDuration <= WebhooksDefinitionConsts.MaximumTimeoutDuration))
{
client.Timeout = TimeSpan.FromSeconds(webhookSenderArgs.TimeoutDuration.Value);
}

2
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.Application.Contracts/LINGYUN/Abp/WebhooksManagement/Definitions/IWebhookGroupDefinitionAppService.cs

@ -8,7 +8,7 @@ public interface IWebhookGroupDefinitionAppService : IApplicationService
{
Task<WebhookGroupDefinitionDto> GetAsync(string name);
Task DeleteAysnc(string name);
Task DeleteAsync(string name);
Task<WebhookGroupDefinitionDto> CreateAsync(WebhookGroupDefinitionCreateDto input);

11
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.Application.Contracts/LINGYUN/Abp/WebhooksManagement/Integration/IWebhookPublishIntegrationService.cs

@ -0,0 +1,11 @@
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Services;
namespace LINGYUN.Abp.WebhooksManagement.Integration;
[IntegrationService]
public interface IWebhookPublishIntegrationService : IApplicationService
{
Task PublishAsync(WebhookPublishInput input);
}

2
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.Application/LINGYUN/Abp/WebhooksManagement/Definitions/WebhookGroupDefinitionAppService.cs

@ -71,7 +71,7 @@ public class WebhookGroupDefinitionAppService : WebhooksManagementAppServiceBase
}
[Authorize(WebhooksManagementPermissions.WebhookGroupDefinition.Delete)]
public async virtual Task DeleteAysnc(string name)
public async virtual Task DeleteAsync(string name)
{
var webhookGroupDefinitionRecord = await _webhookGroupDefinitionRecordRepository.FindByNameAsync(name);
if (webhookGroupDefinitionRecord != null)

42
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.Application/LINGYUN/Abp/WebhooksManagement/Integration/WebhookPublishIntegrationService.cs

@ -0,0 +1,42 @@
using LINGYUN.Abp.Webhooks;
using Newtonsoft.Json;
using System.Linq;
using System.Threading.Tasks;
namespace LINGYUN.Abp.WebhooksManagement.Integration;
public class WebhookPublishIntegrationService : WebhooksManagementAppServiceBase, IWebhookPublishIntegrationService
{
protected IWebhookPublisher InnerPublisher { get; }
public WebhookPublishIntegrationService(IWebhookPublisher innerPublisher)
{
InnerPublisher = innerPublisher;
}
public async virtual Task PublishAsync(WebhookPublishInput input)
{
var webhookHeader = new WebhookHeader
{
UseOnlyGivenHeaders = input.Header.UseOnlyGivenHeaders,
Headers = input.Header.Headers,
};
var inputData = JsonConvert.DeserializeObject(input.Data);
if (input.TenantIds.Any())
{
await InnerPublisher.PublishAsync(
input.TenantIds.ToArray(),
input.WebhookName,
inputData,
input.SendExactSameData,
webhookHeader);
return;
}
await InnerPublisher.PublishAsync(
input.WebhookName,
inputData,
input.SendExactSameData,
webhookHeader);
}
}

4
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.Domain/LINGYUN/Abp/WebhooksManagement/WebhooksManagementDomainModule.cs

@ -21,6 +21,7 @@ public class WebhooksManagementDomainModule : AbpModule
{
private readonly CancellationTokenSource _cancellationTokenSource = new();
private readonly static OneTimeRunner OneTimeRunner = new();
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<WebhooksManagementDomainModule>();
@ -55,6 +56,9 @@ public class WebhooksManagementDomainModule : AbpModule
{
OneTimeRunner.Run(() =>
{
WebhooksDefinitionConsts.MinimumTimeoutDuration = WebhookSubscriptionConsts.TimeoutDurationMinimum;
WebhooksDefinitionConsts.MaximumTimeoutDuration = WebhookSubscriptionConsts.TimeoutDurationMaximum;
// 扩展实体配置
ModuleExtensionConfigurationHelper.ApplyEntityConfigurationToEntity(
WebhooksManagementModuleExtensionConsts.ModuleName,

61
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/Definitions/WebhookDefinitionClientProxy.Generated.cs

@ -0,0 +1,61 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Abp.WebhooksManagement.Definitions;
using LINGYUN.Abp.WebhooksManagement.Definitions.Dto;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.WebhooksManagement.Definitions;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IWebhookDefinitionAppService), typeof(WebhookDefinitionClientProxy))]
public partial class WebhookDefinitionClientProxy : ClientProxyBase<IWebhookDefinitionAppService>, IWebhookDefinitionAppService
{
public virtual async Task<WebhookDefinitionDto> CreateAsync(WebhookDefinitionCreateDto input)
{
return await RequestAsync<WebhookDefinitionDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(WebhookDefinitionCreateDto), input }
});
}
public virtual async Task DeleteAsync(string name)
{
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), name }
});
}
public virtual async Task<WebhookDefinitionDto> GetAsync(string name)
{
return await RequestAsync<WebhookDefinitionDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), name }
});
}
public virtual async Task<ListResultDto<WebhookDefinitionDto>> GetListAsync(WebhookDefinitionGetListInput input)
{
return await RequestAsync<ListResultDto<WebhookDefinitionDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(WebhookDefinitionGetListInput), input }
});
}
public virtual async Task<WebhookDefinitionDto> UpdateAsync(string name, WebhookDefinitionUpdateDto input)
{
return await RequestAsync<WebhookDefinitionDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), name },
{ typeof(WebhookDefinitionUpdateDto), input }
});
}
}

7
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/Definitions/WebhookDefinitionClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of WebhookDefinitionClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.WebhooksManagement.Definitions;
public partial class WebhookDefinitionClientProxy
{
}

60
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/Definitions/WebhookGroupDefinitionClientProxy.Generated.cs

@ -0,0 +1,60 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Abp.WebhooksManagement.Definitions;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.WebhooksManagement.Definitions;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IWebhookGroupDefinitionAppService), typeof(WebhookGroupDefinitionClientProxy))]
public partial class WebhookGroupDefinitionClientProxy : ClientProxyBase<IWebhookGroupDefinitionAppService>, IWebhookGroupDefinitionAppService
{
public virtual async Task<WebhookGroupDefinitionDto> CreateAsync(WebhookGroupDefinitionCreateDto input)
{
return await RequestAsync<WebhookGroupDefinitionDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(WebhookGroupDefinitionCreateDto), input }
});
}
public virtual async Task DeleteAsync(string name)
{
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), name }
});
}
public virtual async Task<WebhookGroupDefinitionDto> GetAsync(string name)
{
return await RequestAsync<WebhookGroupDefinitionDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), name }
});
}
public virtual async Task<ListResultDto<WebhookGroupDefinitionDto>> GetListAsync(WebhookGroupDefinitionGetListInput input)
{
return await RequestAsync<ListResultDto<WebhookGroupDefinitionDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(WebhookGroupDefinitionGetListInput), input }
});
}
public virtual async Task<WebhookGroupDefinitionDto> UpdateAsync(string name, WebhookGroupDefinitionUpdateDto input)
{
return await RequestAsync<WebhookGroupDefinitionDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), name },
{ typeof(WebhookGroupDefinitionUpdateDto), input }
});
}
}

7
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/Definitions/WebhookGroupDefinitionClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of WebhookGroupDefinitionClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.WebhooksManagement.Definitions;
public partial class WebhookGroupDefinitionClientProxy
{
}

29
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/Integration/WebhookPublishIntegrationClientProxy.Generated.cs

@ -0,0 +1,29 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Abp.WebhooksManagement;
using LINGYUN.Abp.WebhooksManagement.Integration;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.WebhooksManagement.Integration;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IWebhookPublishIntegrationService), typeof(WebhookPublishIntegrationClientProxy))]
[IntegrationService]
public partial class WebhookPublishIntegrationClientProxy : ClientProxyBase<IWebhookPublishIntegrationService>, IWebhookPublishIntegrationService
{
public virtual async Task PublishAsync(WebhookPublishInput input)
{
await RequestAsync(nameof(PublishAsync), new ClientProxyRequestTypeValue
{
{ typeof(WebhookPublishInput), input }
});
}
}

7
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/Integration/WebhookPublishIntegrationClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of WebhookPublishIntegrationClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.WebhooksManagement.Integration;
public partial class WebhookPublishIntegrationClientProxy
{
}

27
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/WebhookPublishClientProxy.Generated.cs

@ -0,0 +1,27 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Abp.WebhooksManagement;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.WebhooksManagement;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IWebhookPublishAppService), typeof(WebhookPublishClientProxy))]
public partial class WebhookPublishClientProxy : ClientProxyBase<IWebhookPublishAppService>, IWebhookPublishAppService
{
public virtual async Task PublishAsync(WebhookPublishInput input)
{
await RequestAsync(nameof(PublishAsync), new ClientProxyRequestTypeValue
{
{ typeof(WebhookPublishInput), input }
});
}
}

7
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/WebhookPublishClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of WebhookPublishClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.WebhooksManagement;
public partial class WebhookPublishClientProxy
{
}

67
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/WebhookSendRecordClientProxy.Generated.cs

@ -0,0 +1,67 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Abp.WebhooksManagement;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.WebhooksManagement;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IWebhookSendRecordAppService), typeof(WebhookSendRecordClientProxy))]
public partial class WebhookSendRecordClientProxy : ClientProxyBase<IWebhookSendRecordAppService>, IWebhookSendRecordAppService
{
public virtual async Task<WebhookSendRecordDto> GetAsync(Guid id)
{
return await RequestAsync<WebhookSendRecordDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task DeleteAsync(Guid id)
{
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task DeleteManyAsync(WebhookSendRecordDeleteManyInput input)
{
await RequestAsync(nameof(DeleteManyAsync), new ClientProxyRequestTypeValue
{
{ typeof(WebhookSendRecordDeleteManyInput), input }
});
}
public virtual async Task<PagedResultDto<WebhookSendRecordDto>> GetListAsync(WebhookSendRecordGetListInput input)
{
return await RequestAsync<PagedResultDto<WebhookSendRecordDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(WebhookSendRecordGetListInput), input }
});
}
public virtual async Task ResendAsync(Guid id)
{
await RequestAsync(nameof(ResendAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task ResendManyAsync(WebhookSendRecordResendManyInput input)
{
await RequestAsync(nameof(ResendManyAsync), new ClientProxyRequestTypeValue
{
{ typeof(WebhookSendRecordResendManyInput), input }
});
}
}

7
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/WebhookSendRecordClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of WebhookSendRecordClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.WebhooksManagement;
public partial class WebhookSendRecordClientProxy
{
}

73
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/WebhookSubscriptionClientProxy.Generated.cs

@ -0,0 +1,73 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Abp.WebhooksManagement;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.WebhooksManagement;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IWebhookSubscriptionAppService), typeof(WebhookSubscriptionClientProxy))]
public partial class WebhookSubscriptionClientProxy : ClientProxyBase<IWebhookSubscriptionAppService>, IWebhookSubscriptionAppService
{
public virtual async Task<WebhookSubscriptionDto> CreateAsync(WebhookSubscriptionCreateInput input)
{
return await RequestAsync<WebhookSubscriptionDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(WebhookSubscriptionCreateInput), input }
});
}
public virtual async Task DeleteAsync(Guid id)
{
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task DeleteManyAsync(WebhookSubscriptionDeleteManyInput input)
{
await RequestAsync(nameof(DeleteManyAsync), new ClientProxyRequestTypeValue
{
{ typeof(WebhookSubscriptionDeleteManyInput), input }
});
}
public virtual async Task<WebhookSubscriptionDto> GetAsync(Guid id)
{
return await RequestAsync<WebhookSubscriptionDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task<PagedResultDto<WebhookSubscriptionDto>> GetListAsync(WebhookSubscriptionGetListInput input)
{
return await RequestAsync<PagedResultDto<WebhookSubscriptionDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(WebhookSubscriptionGetListInput), input }
});
}
public virtual async Task<WebhookSubscriptionDto> UpdateAsync(Guid id, WebhookSubscriptionUpdateInput input)
{
return await RequestAsync<WebhookSubscriptionDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(WebhookSubscriptionUpdateInput), input }
});
}
public virtual async Task<ListResultDto<WebhookAvailableGroupDto>> GetAllAvailableWebhooksAsync()
{
return await RequestAsync<ListResultDto<WebhookAvailableGroupDto>>(nameof(GetAllAvailableWebhooksAsync));
}
}

7
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/WebhooksManagement/WebhookSubscriptionClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of WebhookSubscriptionClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.WebhooksManagement;
public partial class WebhookSubscriptionClientProxy
{
}

1774
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/ClientProxies/webhooks-management-generate-proxy.json

File diff suppressed because it is too large

8
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/LINGYUN.Abp.WebhooksManagement.HttpApi.Client.csproj

@ -13,6 +13,14 @@
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<None Remove="ClientProxies\webhooks-management-generate-proxy.json" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ClientProxies\webhooks-management-generate-proxy.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client" />
</ItemGroup>

2
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi.Client/LINGYUN/Abp/WebhooksManagement/WebhooksManagementHttpApiClientModule.cs

@ -11,7 +11,7 @@ public class WebhooksManagementHttpApiClientModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddHttpClientProxies(
context.Services.AddStaticHttpClientProxies(
typeof(WebhooksManagementApplicationContractsModule).Assembly,
WebhooksManagementRemoteServiceConsts.RemoteServiceName);
}

4
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi/LINGYUN/Abp/WebhooksManagement/Definitions/WebhookGroupDefinitionController.cs

@ -30,9 +30,9 @@ public class WebhookGroupDefinitionController : WebhooksManagementControllerBase
[HttpDelete]
[Route("{name}")]
[Authorize(WebhooksManagementPermissions.WebhookGroupDefinition.Delete)]
public virtual Task DeleteAysnc(string name)
public virtual Task DeleteAsync(string name)
{
return _service.DeleteAysnc(name);
return _service.DeleteAsync(name);
}
[HttpGet]

26
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.HttpApi/LINGYUN/Abp/WebhooksManagement/Integration/WebhookPublishIntegrationController.cs

@ -0,0 +1,26 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using Volo.Abp;
namespace LINGYUN.Abp.WebhooksManagement.Integration;
[Area(WebhooksManagementRemoteServiceConsts.ModuleName)]
[ControllerName("WebhookPublishIntegration")]
[RemoteService(Name = WebhooksManagementRemoteServiceConsts.RemoteServiceName)]
[Route($"integration-api/{WebhooksManagementRemoteServiceConsts.ModuleName}/webhooks/publish")]
public class WebhookPublishIntegrationController : WebhooksManagementControllerBase, IWebhookPublishIntegrationService
{
protected IWebhookPublishIntegrationService PublishAppService { get; }
public WebhookPublishIntegrationController(IWebhookPublishIntegrationService publishAppService)
{
PublishAppService = publishAppService;
}
[HttpPost]
public virtual Task PublishAsync(WebhookPublishInput input)
{
return PublishAppService.PublishAsync(input);
}
}
Loading…
Cancel
Save