-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from umbraco/v14/feature/42961-V14-Integratio…
…ns-(HubSpot/Forms) V14: Integrations (HubSpot/Forms)
- Loading branch information
Showing
53 changed files
with
610 additions
and
1,243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
...rms.Integrations.Crm.Hubspot/Api/Management/Controllers/Contacts/ContactControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
...rms.Integrations.Crm.Hubspot/Api/Management/Controllers/Contacts/DeauthorizeController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
...ntegrations.Crm.Hubspot/Api/Management/Controllers/Contacts/GetAllPropertiesController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
...rations.Crm.Hubspot/Api/Management/Controllers/Contacts/GetAuthenticationUrlController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
...ns.Crm.Hubspot/Api/Management/Controllers/Contacts/IsAuthorizationConfiguredController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...aco.Forms.Integrations.Crm.Hubspot/Api/Management/Controllers/Forms/FormControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Asp.Versioning; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Cms.Web.Common.Routing; | ||
using Umbraco.Forms.Core.Services; | ||
|
||
namespace Umbraco.Forms.Integrations.Crm.Hubspot.Api.Management.Controllers.Forms | ||
{ | ||
[ApiVersion("1.0")] | ||
[BackOfficeRoute($"{Constants.ManagementApi.RootPath}/v{{version:apiVersion}}/forms")] | ||
[ApiExplorerSettings(GroupName = Constants.ManagementApi.FormGroupName)] | ||
public class FormControllerBase : HubspotControllerBase | ||
{ | ||
protected readonly IFormService FormService; | ||
|
||
public FormControllerBase(IFormService formService) | ||
{ | ||
FormService = formService; | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
...orms.Integrations.Crm.Hubspot/Api/Management/Controllers/Forms/GetFormFieldsController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Microsoft.AspNetCore.Http; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Forms.Core.Services; | ||
using Umbraco.Forms.Integrations.Crm.Hubspot.Models.Dtos; | ||
|
||
namespace Umbraco.Forms.Integrations.Crm.Hubspot.Api.Management.Controllers.Forms | ||
{ | ||
public class GetFormFieldsController : FormControllerBase | ||
{ | ||
public GetFormFieldsController(IFormService formService) : base(formService) | ||
{ | ||
} | ||
|
||
[HttpGet("fields")] | ||
[ProducesResponseType(typeof(List<HubspotWorkflowFormFieldDto>), StatusCodes.Status200OK)] | ||
public IActionResult GetFormFields(string formId) | ||
{ | ||
List<HubspotWorkflowFormFieldDto> formFields = new List<HubspotWorkflowFormFieldDto>(); | ||
var result = FormService.Get(new Guid(formId)); | ||
if (result != null) | ||
{ | ||
formFields = result.AllFields.Select(s => new HubspotWorkflowFormFieldDto{ Caption = s.Caption, Id = s.Id }).ToList(); | ||
} | ||
return Ok(formFields); | ||
} | ||
} | ||
} |
9 changes: 1 addition & 8 deletions
9
...mbraco.Forms.Integrations.Crm.Hubspot/Api/Management/Controllers/HubspotControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Umbraco.Forms.Integrations.Crm.Hubspot/Client/config.outputPath.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export const outputPath = 'Debug' !== 'Release' ? '../wwwroot' : '../obj/Debug/net8.0/clientassets' | ||
export const outputPath = 'Debug' !== 'Release' ? '../wwwroot' : '../obj/Debug/net8.0/clientassets' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.