Skip to content

Commit e59ebd5

Browse files
committed
Hubspot CRM upgraded to V16
1 parent 501fcb7 commit e59ebd5

33 files changed

+2029
-2134
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using Umbraco.Cms.Api.Management.OpenApi;
2+
3+
namespace Umbraco.Forms.Integrations.Crm.Hubspot.Api.Configuration;
4+
5+
public class BackOfficeSecurityRequirementsOperationFilter : BackOfficeSecurityRequirementsOperationFilterBase
6+
{
7+
protected override string ApiName => Constants.ManagementApi.ApiName;
8+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using Asp.Versioning;
2+
using Microsoft.AspNetCore.Mvc.ApiExplorer;
3+
using Microsoft.AspNetCore.Mvc.Controllers;
4+
using Microsoft.Extensions.Options;
5+
using Umbraco.Cms.Api.Common.OpenApi;
6+
7+
namespace Umbraco.Forms.Integrations.Crm.Hubspot.Api.Configuration;
8+
9+
internal class HubspotFormsOperationIdHandler : OperationIdHandler
10+
{
11+
public HubspotFormsOperationIdHandler(IOptions<ApiVersioningOptions> apiVersioningOptions) : base(apiVersioningOptions)
12+
{
13+
}
14+
15+
protected override bool CanHandle(ApiDescription apiDescription, ControllerActionDescriptor controllerActionDescriptor)
16+
=> controllerActionDescriptor.ControllerTypeInfo.Namespace?.StartsWith("Umbraco.Forms.Integrations.Crm.Hubspot") is true;
17+
}

src/Umbraco.Forms.Integrations.Crm.Hubspot/Api/Management/Controllers/Contacts/AuthorizeController.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
using Microsoft.AspNetCore.Http;
1+
using Asp.Versioning;
2+
using Microsoft.AspNetCore.Http;
23
using Microsoft.AspNetCore.Mvc;
34
using Umbraco.Forms.Integrations.Crm.Hubspot.Models.Dtos;
45
using Umbraco.Forms.Integrations.Crm.Hubspot.Services;
56

67
namespace Umbraco.Forms.Integrations.Crm.Hubspot.Api.Management.Controllers.Contacts
78
{
9+
[ApiVersion("1.0")]
810
public class AuthorizeController : ContactControllerBase
911
{
1012
public AuthorizeController(IContactService contactService) : base(contactService)

src/Umbraco.Forms.Integrations.Crm.Hubspot/Api/Management/Controllers/Contacts/ContactControllerBase.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
namespace Umbraco.Forms.Integrations.Crm.Hubspot.Api.Management.Controllers.Contacts
77
{
8-
[ApiVersion("1.0")]
98
[BackOfficeRoute($"{Constants.ManagementApi.RootPath}/v{{version:apiVersion}}/contacts")]
109
[ApiExplorerSettings(GroupName = Constants.ManagementApi.ContactGroupName)]
1110
public class ContactControllerBase : HubspotControllerBase

src/Umbraco.Forms.Integrations.Crm.Hubspot/Api/Management/Controllers/Contacts/DeauthorizeController.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
using Microsoft.AspNetCore.Http;
1+
using Asp.Versioning;
2+
using Microsoft.AspNetCore.Http;
23
using Microsoft.AspNetCore.Mvc;
34
using Umbraco.Forms.Integrations.Crm.Hubspot.Models.Dtos;
45
using Umbraco.Forms.Integrations.Crm.Hubspot.Services;
56

67
namespace Umbraco.Forms.Integrations.Crm.Hubspot.Api.Management.Controllers.Contacts
78
{
9+
[ApiVersion("1.0")]
810
public class DeauthorizeController : ContactControllerBase
911
{
1012
public DeauthorizeController(IContactService contactService) : base(contactService)

src/Umbraco.Forms.Integrations.Crm.Hubspot/Api/Management/Controllers/Contacts/GetAllPropertiesController.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
using Microsoft.AspNetCore.Http;
1+
using Asp.Versioning;
2+
using Microsoft.AspNetCore.Http;
23
using Microsoft.AspNetCore.Mvc;
34
using Umbraco.Forms.Integrations.Crm.Hubspot.Models.Responses;
45
using Umbraco.Forms.Integrations.Crm.Hubspot.Services;
56

67
namespace Umbraco.Forms.Integrations.Crm.Hubspot.Api.Management.Controllers.Contacts
78
{
9+
[ApiVersion("1.0")]
810
public class GetAllPropertiesController : ContactControllerBase
911
{
1012
public GetAllPropertiesController(IContactService contactService) : base(contactService)

src/Umbraco.Forms.Integrations.Crm.Hubspot/Api/Management/Controllers/Contacts/GetAuthenticationUrlController.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
using Microsoft.AspNetCore.Http;
1+
using Asp.Versioning;
2+
using Microsoft.AspNetCore.Http;
23
using Microsoft.AspNetCore.Mvc;
34
using Umbraco.Forms.Integrations.Crm.Hubspot.Services;
45

56
namespace Umbraco.Forms.Integrations.Crm.Hubspot.Api.Management.Controllers.Contacts
67
{
8+
[ApiVersion("1.0")]
79
public class GetAuthenticationUrlController : ContactControllerBase
810
{
911
public GetAuthenticationUrlController(IContactService contactService) : base(contactService)

src/Umbraco.Forms.Integrations.Crm.Hubspot/Api/Management/Controllers/Contacts/IsAuthorizationConfiguredController.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
using Microsoft.AspNetCore.Http;
1+
using Asp.Versioning;
2+
using Microsoft.AspNetCore.Http;
23
using Microsoft.AspNetCore.Mvc;
34
using Umbraco.Forms.Integrations.Crm.Hubspot.Services;
45

56
namespace Umbraco.Forms.Integrations.Crm.Hubspot.Api.Management.Controllers.Contacts
67
{
8+
[ApiVersion("1.0")]
79
public class IsAuthorizationConfiguredController : ContactControllerBase
810
{
911
public IsAuthorizationConfiguredController(IContactService contactService) : base(contactService)

src/Umbraco.Forms.Integrations.Crm.Hubspot/Api/Management/Controllers/Forms/FormControllerBase.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
namespace Umbraco.Forms.Integrations.Crm.Hubspot.Api.Management.Controllers.Forms
77
{
8-
[ApiVersion("1.0")]
98
[BackOfficeRoute($"{Constants.ManagementApi.RootPath}/v{{version:apiVersion}}/forms")]
109
[ApiExplorerSettings(GroupName = Constants.ManagementApi.FormGroupName)]
1110
public class FormControllerBase : HubspotControllerBase

src/Umbraco.Forms.Integrations.Crm.Hubspot/Api/Management/Controllers/Forms/GetFormFieldsController.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
using Microsoft.AspNetCore.Http;
1+
using Asp.Versioning;
2+
using Microsoft.AspNetCore.Http;
23
using Microsoft.AspNetCore.Mvc;
34
using Umbraco.Forms.Core.Services;
45
using Umbraco.Forms.Integrations.Crm.Hubspot.Models.Dtos;
56

67
namespace Umbraco.Forms.Integrations.Crm.Hubspot.Api.Management.Controllers.Forms
78
{
9+
[ApiVersion("1.0")]
810
public class GetFormFieldsController : FormControllerBase
911
{
1012
public GetFormFieldsController(IFormService formService) : base(formService)

0 commit comments

Comments
 (0)